cosmos-sdk/x/ibc/types/codec.go

30 lines
1.1 KiB
Go
Raw Normal View History

package types
import (
"github.com/cosmos/cosmos-sdk/codec"
cdctypes "github.com/cosmos/cosmos-sdk/codec/types"
2020-06-30 03:37:05 -07:00
clienttypes "github.com/cosmos/cosmos-sdk/x/ibc/02-client/types"
connection "github.com/cosmos/cosmos-sdk/x/ibc/03-connection"
channel "github.com/cosmos/cosmos-sdk/x/ibc/04-channel"
ibctmtypes "github.com/cosmos/cosmos-sdk/x/ibc/07-tendermint/types"
localhosttypes "github.com/cosmos/cosmos-sdk/x/ibc/09-localhost/types"
commitmenttypes "github.com/cosmos/cosmos-sdk/x/ibc/23-commitment/types"
)
// RegisterCodec registers the necessary x/ibc interfaces and concrete types
// on the provided Amino codec. These types are used for Amino JSON serialization.
func RegisterCodec(cdc *codec.Codec) {
2020-06-30 03:37:05 -07:00
clienttypes.RegisterCodec(cdc)
connection.RegisterCodec(cdc)
channel.RegisterCodec(cdc)
ibctmtypes.RegisterCodec(cdc)
localhosttypes.RegisterCodec(cdc)
commitmenttypes.RegisterCodec(cdc)
}
// RegisterInterfaces registers x/ibc interfaces into protobuf Any.
func RegisterInterfaces(registry cdctypes.InterfaceRegistry) {
connection.RegisterInterfaces(registry)
channel.RegisterInterfaces(registry)
}