-
Notifications
You must be signed in to change notification settings - Fork 182
/
codec.go
26 lines (22 loc) · 871 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
24
25
26
package types
import (
"github.com/okex/exchain/libs/cosmos-sdk/codec"
)
// RegisterCodec registers concrete types on codec
func RegisterCodec(cdc *codec.Codec) {
cdc.RegisterConcrete(MsgCreatePool{}, "okexchain/farm/MsgCreatePool", nil)
cdc.RegisterConcrete(MsgDestroyPool{}, "okexchain/farm/MsgDestroyPool", nil)
cdc.RegisterConcrete(MsgLock{}, "okexchain/farm/MsgLock", nil)
cdc.RegisterConcrete(MsgUnlock{}, "okexchain/farm/MsgUnlock", nil)
cdc.RegisterConcrete(MsgClaim{}, "okexchain/farm/MsgClaim", nil)
cdc.RegisterConcrete(MsgProvide{}, "okexchain/farm/MsgProvide", nil)
cdc.RegisterConcrete(ManageWhiteListProposal{}, "okexchain/farm/ManageWhiteListProposal", nil)
}
// ModuleCdc defines the module codec
var ModuleCdc *codec.Codec
func init() {
ModuleCdc = codec.New()
RegisterCodec(ModuleCdc)
codec.RegisterCrypto(ModuleCdc)
ModuleCdc.Seal()
}