-
Notifications
You must be signed in to change notification settings - Fork 0
/
codec.go
31 lines (26 loc) · 1.15 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
package types
import (
"github.com/furyaxyz/fuxchain/libs/cosmos-sdk/codec"
"github.com/furyaxyz/fuxchain/libs/system"
)
// RegisterCodec registers concrete types on the Amino codec
func RegisterCodec(cdc *codec.Codec) {
cdc.RegisterConcrete(MsgTokenIssue{}, system.Chain+"/token/MsgIssue", nil)
cdc.RegisterConcrete(MsgTokenBurn{}, system.Chain+"/token/MsgBurn", nil)
cdc.RegisterConcrete(MsgTokenMint{}, system.Chain+"/token/MsgMint", nil)
cdc.RegisterConcrete(MsgMultiSend{}, system.Chain+"/token/MsgMultiTransfer", nil)
cdc.RegisterConcrete(MsgSend{}, system.Chain+"/token/MsgTransfer", nil)
cdc.RegisterConcrete(MsgTransferOwnership{}, system.Chain+"/token/MsgTransferOwnership", nil)
cdc.RegisterConcrete(MsgConfirmOwnership{}, system.Chain+"/token/MsgConfirmOwnership", nil)
cdc.RegisterConcrete(MsgTokenModify{}, system.Chain+"/token/MsgModify", nil)
// for test
//cdc.RegisterConcrete(MsgTokenDestroy{}, system.Chain+"/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()
}