github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/x/feesplit/types/codec.go (about) 1 package types 2 3 import ( 4 "github.com/fibonacci-chain/fbc/libs/cosmos-sdk/codec" 5 ) 6 7 // ModuleCdc defines the feesplit module's codec 8 var ModuleCdc = codec.New() 9 10 const ( 11 // Amino names 12 registerFeeSplitName = "fbexchain/MsgRegisterFeeSplit" 13 updateFeeSplitName = "fbexchain/MsgUpdateFeeSplit" 14 cancelFeeSplitName = "fbexchain/MsgCancelFeeSplit" 15 sharesProposalName = "fbexchain/feesplit/SharesProposal" 16 ) 17 18 // NOTE: This is required for the GetSignBytes function 19 func init() { 20 RegisterCodec(ModuleCdc) 21 codec.RegisterCrypto(ModuleCdc) 22 ModuleCdc.Seal() 23 } 24 25 // RegisterCodec registers all the necessary types and interfaces for the 26 // feesplit module 27 func RegisterCodec(cdc *codec.Codec) { 28 cdc.RegisterConcrete(MsgRegisterFeeSplit{}, registerFeeSplitName, nil) 29 cdc.RegisterConcrete(MsgUpdateFeeSplit{}, updateFeeSplitName, nil) 30 cdc.RegisterConcrete(MsgCancelFeeSplit{}, cancelFeeSplitName, nil) 31 cdc.RegisterConcrete(FeeSplitSharesProposal{}, sharesProposalName, nil) 32 }