-
Notifications
You must be signed in to change notification settings - Fork 257
/
codec.go
23 lines (20 loc) · 854 Bytes
/
codec.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package types
import (
"github.com/cosmos/cosmos-sdk/codec"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/msgservice"
)
// RegisterLegacyAminoCodec registers the upgrade types on the provided
// LegacyAmino codec.
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
cdc.RegisterConcrete(&MsgTryUpgrade{}, URLMsgTryUpgrade, nil)
cdc.RegisterConcrete(&MsgSignalVersion{}, URLMsgSignalVersion, nil)
}
// RegisterInterfaces registers the upgrade module types on the provided
// registry.
func RegisterInterfaces(registry codectypes.InterfaceRegistry) {
registry.RegisterImplementations((*sdk.Msg)(nil), &MsgTryUpgrade{})
registry.RegisterImplementations((*sdk.Msg)(nil), &MsgSignalVersion{})
msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc)
}