github.com/InjectiveLabs/sdk-go@v1.53.0/chain/tokenfactory/types/codec.go (about) 1 package types 2 3 import ( 4 "github.com/cosmos/cosmos-sdk/codec" 5 cdctypes "github.com/cosmos/cosmos-sdk/codec/types" 6 sdk "github.com/cosmos/cosmos-sdk/types" 7 authzcdc "github.com/cosmos/cosmos-sdk/x/authz/codec" 8 // this line is used by starport scaffolding # 1 9 "github.com/cosmos/cosmos-sdk/types/msgservice" 10 ) 11 12 func RegisterCodec(cdc *codec.LegacyAmino) { 13 cdc.RegisterConcrete(&MsgCreateDenom{}, "injective/tokenfactory/create-denom", nil) 14 cdc.RegisterConcrete(&MsgMint{}, "injective/tokenfactory/mint", nil) 15 cdc.RegisterConcrete(&MsgBurn{}, "injective/tokenfactory/burn", nil) 16 // nolint:all 17 // cdc.RegisterConcrete(&MsgForceTransfer{}, "injective/tokenfactory/force-transfer", nil) 18 cdc.RegisterConcrete(&MsgChangeAdmin{}, "injective/tokenfactory/change-admin", nil) 19 cdc.RegisterConcrete(&MsgUpdateParams{}, "injective/tokenfactory/update-params", nil) 20 cdc.RegisterConcrete(&MsgSetDenomMetadata{}, "injective/tokenfactory/set-denom-metadata", nil) 21 cdc.RegisterConcrete(&Params{}, "injective/tokenfactory/Params", nil) 22 23 } 24 25 func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { 26 registry.RegisterImplementations((*sdk.Msg)(nil), 27 &MsgCreateDenom{}, 28 &MsgMint{}, 29 &MsgBurn{}, 30 // &MsgForceTransfer{}, 31 &MsgChangeAdmin{}, 32 &MsgUpdateParams{}, 33 &MsgSetDenomMetadata{}, 34 ) 35 36 msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) 37 } 38 39 var ( 40 ModuleCdc = codec.NewLegacyAmino() 41 ) 42 43 func init() { 44 RegisterCodec(ModuleCdc) 45 // Register all Amino interfaces and concrete types on the authz Amino codec so that this can later be 46 // used to properly serialize MsgGrant and MsgExec instances 47 sdk.RegisterLegacyAminoCodec(ModuleCdc) 48 RegisterCodec(authzcdc.Amino) 49 50 ModuleCdc.Seal() 51 }