-
Notifications
You must be signed in to change notification settings - Fork 179
/
codec.go
30 lines (25 loc) · 1.05 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
package types
import (
"github.com/cosmos/cosmos-sdk/codec"
)
// RegisterCodec registers concrete types on the Amino codec
func RegisterCodec(cdc *codec.Codec) {
cdc.RegisterConcrete(MsgTokenIssue{}, "okexchain/token/MsgIssue", nil)
cdc.RegisterConcrete(MsgTokenBurn{}, "okexchain/token/MsgBurn", nil)
cdc.RegisterConcrete(MsgTokenMint{}, "okexchain/token/MsgMint", nil)
cdc.RegisterConcrete(MsgMultiSend{}, "okexchain/token/MsgMultiTransfer", nil)
cdc.RegisterConcrete(MsgSend{}, "okexchain/token/MsgTransfer", nil)
cdc.RegisterConcrete(MsgTransferOwnership{}, "okexchain/token/MsgTransferOwnership", nil)
cdc.RegisterConcrete(MsgConfirmOwnership{}, "okexchain/token/MsgConfirmOwnership", nil)
cdc.RegisterConcrete(MsgTokenModify{}, "okexchain/token/MsgModify", nil)
// for test
//cdc.RegisterConcrete(MsgTokenDestroy{}, "okexchain/token/MsgDestroy", nil)
}
// generic sealed codec to be used throughout this module
var ModuleCdc *codec.Codec
func init() {
ModuleCdc = codec.New()
RegisterCodec(ModuleCdc)
codec.RegisterCrypto(ModuleCdc)
ModuleCdc.Seal()
}