cosmos-sdk/types/codec.go
Marko 62b0b26d0c
chore: migrate sdk.Msg to transaction.type (#20273)
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Hieu Vu <72878483+hieuvubk@users.noreply.github.com>
2024-05-10 10:23:22 +00:00

25 lines
697 B
Go

package types
import (
coretransaction "cosmossdk.io/core/transaction"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/codec/types"
)
const (
// MsgInterfaceProtoName defines the protobuf name of the cosmos Msg interface
MsgInterfaceProtoName = "cosmos.base.v1beta1.Msg"
)
// RegisterLegacyAminoCodec registers the sdk message type.
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
cdc.RegisterInterface((*coretransaction.Msg)(nil), nil)
cdc.RegisterInterface((*Tx)(nil), nil)
}
// RegisterInterfaces registers the sdk message type.
func RegisterInterfaces(registry types.InterfaceRegistry) {
registry.RegisterInterface(MsgInterfaceProtoName, (*Msg)(nil))
}