-
Notifications
You must be signed in to change notification settings - Fork 182
/
codec.go
30 lines (26 loc) · 1.27 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
package types
import (
"github.com/okex/exchain/libs/cosmos-sdk/codec"
)
// RegisterCodec registers concrete types for codec
func RegisterCodec(cdc *codec.Codec) {
cdc.RegisterConcrete(MsgCreateValidator{}, "okexchain/staking/MsgCreateValidator", nil)
cdc.RegisterConcrete(MsgEditValidator{}, "okexchain/staking/MsgEditValidator", nil)
cdc.RegisterConcrete(MsgEditValidatorCommissionRate{}, "okexchain/staking/MsgEditValidatorCommissionRate", nil)
cdc.RegisterConcrete(MsgDestroyValidator{}, "okexchain/staking/MsgDestroyValidator", nil)
cdc.RegisterConcrete(MsgDeposit{}, "okexchain/staking/MsgDeposit", nil)
cdc.RegisterConcrete(MsgWithdraw{}, "okexchain/staking/MsgWithdraw", nil)
cdc.RegisterConcrete(MsgAddShares{}, "okexchain/staking/MsgAddShares", nil)
cdc.RegisterConcrete(MsgRegProxy{}, "okexchain/staking/MsgRegProxy", nil)
cdc.RegisterConcrete(MsgBindProxy{}, "okexchain/staking/MsgBindProxy", nil)
cdc.RegisterConcrete(MsgUnbindProxy{}, "okexchain/staking/MsgUnbindProxy", nil)
cdc.RegisterConcrete(CM45Validator{}, "cosmos-sdk/staking/validator", nil)
}
// ModuleCdc is generic sealed codec to be used throughout this module
var ModuleCdc *codec.Codec
func init() {
ModuleCdc = codec.New()
RegisterCodec(ModuleCdc)
codec.RegisterCrypto(ModuleCdc)
ModuleCdc.Seal()
}