/
codec.go
38 lines (32 loc) · 1.47 KB
/
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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package types
import (
"github.com/brc20-collab/brczero/libs/cosmos-sdk/codec"
codectypes "github.com/brc20-collab/brczero/libs/cosmos-sdk/codec/types"
clienttypes "github.com/brc20-collab/brczero/libs/ibc-go/modules/core/02-client/types"
connectiontypes "github.com/brc20-collab/brczero/libs/ibc-go/modules/core/03-connection/types"
channeltypes "github.com/brc20-collab/brczero/libs/ibc-go/modules/core/04-channel/types"
commitmenttypes "github.com/brc20-collab/brczero/libs/ibc-go/modules/core/23-commitment/types"
solomachinetypes "github.com/brc20-collab/brczero/libs/ibc-go/modules/light-clients/06-solomachine/types"
ibctmtypes "github.com/brc20-collab/brczero/libs/ibc-go/modules/light-clients/07-tendermint/types"
localhosttypes "github.com/brc20-collab/brczero/libs/ibc-go/modules/light-clients/09-localhost/types"
)
var ModuleCdc *codec.Codec
func init() {
ModuleCdc = codec.New()
codec.RegisterCrypto(ModuleCdc)
ModuleCdc.Seal()
}
// RegisterInterfaces registers x/ibc interfaces into protobuf Any.
func RegisterInterfaces(registry codectypes.InterfaceRegistry) {
clienttypes.RegisterInterfaces(registry)
connectiontypes.RegisterInterfaces(registry)
channeltypes.RegisterInterfaces(registry)
solomachinetypes.RegisterInterfaces(registry)
ibctmtypes.RegisterInterfaces(registry)
localhosttypes.RegisterInterfaces(registry)
commitmenttypes.RegisterInterfaces(registry)
}
func RegisterCodec(cdc *codec.Codec) {
clienttypes.RegisterCodec(cdc)
ibctmtypes.RegisterCodec(cdc)
}