github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/x/ammswap/types/codec.go (about) 1 package types 2 3 import ( 4 "github.com/fibonacci-chain/fbc/libs/cosmos-sdk/codec" 5 ) 6 7 // RegisterCodec registers concrete types on codec 8 func RegisterCodec(cdc *codec.Codec) { 9 cdc.RegisterConcrete(MsgAddLiquidity{}, "fbexchain/ammswap/MsgAddLiquidity", nil) 10 cdc.RegisterConcrete(MsgRemoveLiquidity{}, "fbexchain/ammswap/MsgRemoveLiquidity", nil) 11 cdc.RegisterConcrete(MsgCreateExchange{}, "fbexchain/ammswap/MsgCreateExchange", nil) 12 cdc.RegisterConcrete(MsgTokenToToken{}, "fbexchain/ammswap/MsgSwapToken", nil) 13 } 14 15 // ModuleCdc defines the module codec 16 var ModuleCdc *codec.Codec 17 18 func init() { 19 ModuleCdc = codec.New() 20 RegisterCodec(ModuleCdc) 21 codec.RegisterCrypto(ModuleCdc) 22 ModuleCdc.Seal() 23 }