github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/x/farm/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(MsgCreatePool{}, "fbexchain/farm/MsgCreatePool", nil)
    10  	cdc.RegisterConcrete(MsgDestroyPool{}, "fbexchain/farm/MsgDestroyPool", nil)
    11  	cdc.RegisterConcrete(MsgLock{}, "fbexchain/farm/MsgLock", nil)
    12  	cdc.RegisterConcrete(MsgUnlock{}, "fbexchain/farm/MsgUnlock", nil)
    13  	cdc.RegisterConcrete(MsgClaim{}, "fbexchain/farm/MsgClaim", nil)
    14  	cdc.RegisterConcrete(MsgProvide{}, "fbexchain/farm/MsgProvide", nil)
    15  	cdc.RegisterConcrete(ManageWhiteListProposal{}, "fbexchain/farm/ManageWhiteListProposal", nil)
    16  }
    17  
    18  // ModuleCdc defines the module codec
    19  var ModuleCdc *codec.Codec
    20  
    21  func init() {
    22  	ModuleCdc = codec.New()
    23  	RegisterCodec(ModuleCdc)
    24  	codec.RegisterCrypto(ModuleCdc)
    25  	ModuleCdc.Seal()
    26  }