-
Notifications
You must be signed in to change notification settings - Fork 52
/
codec.go
33 lines (29 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
package types
import (
"github.com/cosmos/cosmos-sdk/codec"
)
// RegisterCodec registers the account types and interface.
func RegisterCodec(cdc *codec.Codec) {
cdc.RegisterConcrete(MsgCreatePool{}, "shield/MsgCreatePool", nil)
cdc.RegisterConcrete(MsgUpdatePool{}, "shield/MsgUpdatePool", nil)
cdc.RegisterConcrete(MsgPausePool{}, "shield/MsgPausePool", nil)
cdc.RegisterConcrete(MsgResumePool{}, "shield/MsgResumePool", nil)
cdc.RegisterConcrete(MsgDepositCollateral{}, "shield/MsgDepositCollateral", nil)
cdc.RegisterConcrete(MsgWithdrawCollateral{}, "shield/MsgWithdrawCollateral", nil)
cdc.RegisterConcrete(MsgWithdrawRewards{}, "shield/MsgWithdrawRewards", nil)
cdc.RegisterConcrete(MsgWithdrawForeignRewards{}, "shield/MsgWithdrawForeignRewards", nil)
cdc.RegisterConcrete(MsgClearPayouts{}, "shield/MsgClearPayouts", nil)
cdc.RegisterConcrete(ShieldClaimProposal{}, "shield/ShieldClaimProposal", nil)
cdc.RegisterConcrete(MsgPurchaseShield{}, "shield/MsgPurchaseShield", nil)
cdc.RegisterConcrete(MsgWithdrawReimbursement{}, "shield/MsgWithdrawReimbursement", nil)
cdc.RegisterConcrete(MsgUpdateSponsor{}, "shield/MsgUpdateSponsor", nil)
cdc.RegisterConcrete(MsgStakeForShield{}, "shield/MsgStakeForShield", nil)
cdc.RegisterConcrete(MsgUnstakeFromShield{}, "shield/MsgUnstakeFromShield", nil)
}
// ModuleCdc is the generic sealed codec to be used throughout module.
var ModuleCdc *codec.Codec
func init() {
cdc := codec.New()
RegisterCodec(cdc)
ModuleCdc = cdc.Seal()
}