github.com/cosmos/cosmos-sdk@v0.50.10/x/gov/types/v1/codec.go (about) 1 package v1 2 3 import ( 4 "github.com/cosmos/cosmos-sdk/codec" 5 "github.com/cosmos/cosmos-sdk/codec/legacy" 6 codectypes "github.com/cosmos/cosmos-sdk/codec/types" 7 sdk "github.com/cosmos/cosmos-sdk/types" 8 "github.com/cosmos/cosmos-sdk/types/msgservice" 9 ) 10 11 // RegisterLegacyAminoCodec registers all the necessary types and interfaces for the 12 // governance module. 13 func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { 14 legacy.RegisterAminoMsg(cdc, &MsgSubmitProposal{}, "cosmos-sdk/v1/MsgSubmitProposal") 15 legacy.RegisterAminoMsg(cdc, &MsgDeposit{}, "cosmos-sdk/v1/MsgDeposit") 16 legacy.RegisterAminoMsg(cdc, &MsgVote{}, "cosmos-sdk/v1/MsgVote") 17 legacy.RegisterAminoMsg(cdc, &MsgVoteWeighted{}, "cosmos-sdk/v1/MsgVoteWeighted") 18 legacy.RegisterAminoMsg(cdc, &MsgExecLegacyContent{}, "cosmos-sdk/v1/MsgExecLegacyContent") 19 legacy.RegisterAminoMsg(cdc, &MsgUpdateParams{}, "cosmos-sdk/x/gov/v1/MsgUpdateParams") 20 } 21 22 // RegisterInterfaces registers the interfaces types with the Interface Registry. 23 func RegisterInterfaces(registry codectypes.InterfaceRegistry) { 24 registry.RegisterImplementations((*sdk.Msg)(nil), 25 &MsgSubmitProposal{}, 26 &MsgVote{}, 27 &MsgVoteWeighted{}, 28 &MsgDeposit{}, 29 &MsgExecLegacyContent{}, 30 &MsgUpdateParams{}, 31 ) 32 33 msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) 34 }