github.com/lino-network/lino@v0.6.11/x/post/types/codec.go (about)

     1  package types
     2  
     3  import (
     4  	"github.com/cosmos/cosmos-sdk/codec"
     5  )
     6  
     7  // RegisterCodec concrete types on wire codec
     8  func RegisterCodec(cdc *codec.Codec) {
     9  	cdc.RegisterConcrete(CreatePostMsg{}, "lino/createPost", nil)
    10  	cdc.RegisterConcrete(UpdatePostMsg{}, "lino/updatePost", nil)
    11  	cdc.RegisterConcrete(DeletePostMsg{}, "lino/deletePost", nil)
    12  	cdc.RegisterConcrete(DonateMsg{}, "lino/donate", nil)
    13  	cdc.RegisterConcrete(IDADonateMsg{}, "lino/idaDonate", nil)
    14  }
    15  
    16  // ModuleCdc is the module codec
    17  var ModuleCdc *codec.Codec
    18  
    19  func init() {
    20  	ModuleCdc = codec.New()
    21  	RegisterCodec(ModuleCdc)
    22  	ModuleCdc.Seal()
    23  }