/
codec.go
65 lines (57 loc) · 2.39 KB
/
codec.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
package types
import (
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/codec/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/msgservice"
)
// ModuleCdc is the codec for the module
var ModuleCdc = codec.NewLegacyAmino()
func init() {
RegisterLegacyAminoCodec(ModuleCdc)
}
// RegisterInterfaces registers the interfaces for the proto stuff
func RegisterInterfaces(registry types.InterfaceRegistry) {
registry.RegisterImplementations((*sdk.Msg)(nil),
&MsgValsetConfirm{},
&MsgSendToEth{},
&MsgRequestBatch{},
&MsgConfirmBatch{},
&MsgDepositClaim{},
&MsgWithdrawClaim{},
&MsgERC20DeployedClaim{},
&MsgSetOrchestratorAddresses{},
&MsgValsetUpdatedClaim{},
&MsgCancelSendToEth{},
&MsgSubmitBadSignatureEvidence{},
)
registry.RegisterInterface(
"peggy.v1beta1.EthereumClaim",
(*EthereumClaim)(nil),
&MsgDepositClaim{},
&MsgWithdrawClaim{},
&MsgERC20DeployedClaim{},
&MsgValsetUpdatedClaim{},
)
msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc)
}
// RegisterLegacyAminoCodec registers concrete types on the Amino codec
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
cdc.RegisterConcrete(&MsgSetOrchestratorAddresses{}, "peggy/MsgSetOrchestratorAddresses", nil)
cdc.RegisterConcrete(&MsgValsetConfirm{}, "peggy/MsgValsetConfirm", nil)
cdc.RegisterConcrete(&MsgSendToEth{}, "peggy/MsgSendToEth", nil)
cdc.RegisterConcrete(&MsgCancelSendToEth{}, "peggy/MsgCancelSendToEth", nil)
cdc.RegisterConcrete(&MsgRequestBatch{}, "peggy/MsgRequestBatch", nil)
cdc.RegisterConcrete(&MsgConfirmBatch{}, "peggy/MsgConfirmBatch", nil)
cdc.RegisterConcrete(&Valset{}, "peggy/Valset", nil)
cdc.RegisterConcrete(&MsgDepositClaim{}, "peggy/MsgDepositClaim", nil)
cdc.RegisterConcrete(&MsgWithdrawClaim{}, "peggy/MsgWithdrawClaim", nil)
cdc.RegisterConcrete(&MsgERC20DeployedClaim{}, "peggy/MsgERC20DeployedClaim", nil)
cdc.RegisterConcrete(&MsgValsetUpdatedClaim{}, "peggy/MsgValsetUpdatedClaim", nil)
cdc.RegisterConcrete(&OutgoingTxBatch{}, "peggy/OutgoingTxBatch", nil)
cdc.RegisterConcrete(&OutgoingTransferTx{}, "peggy/OutgoingTransferTx", nil)
cdc.RegisterConcrete(&ERC20Token{}, "peggy/ERC20Token", nil)
cdc.RegisterConcrete(&IDSet{}, "peggy/IDSet", nil)
cdc.RegisterConcrete(&Attestation{}, "peggy/Attestation", nil)
cdc.RegisterConcrete(&MsgSubmitBadSignatureEvidence{}, "peggy/MsgSubmitBadSignatureEvidence", nil)
}