forked from cosmos/cosmos-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcodec.go
35 lines (29 loc) · 1.39 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
package types
import (
"cosmossdk.io/core/registry"
coretransaction "cosmossdk.io/core/transaction"
"github.com/cosmos/cosmos-sdk/codec/legacy"
"github.com/cosmos/cosmos-sdk/types/msgservice"
)
// RegisterLegacyAminoCodec registers the necessary x/distribution interfaces
// and concrete types on the provided LegacyAmino codec. These types are used
// for Amino JSON serialization.
func RegisterLegacyAminoCodec(registrar registry.AminoRegistrar) {
legacy.RegisterAminoMsg(registrar, &MsgWithdrawDelegatorReward{}, "cosmos-sdk/MsgWithdrawDelegationReward")
legacy.RegisterAminoMsg(registrar, &MsgWithdrawValidatorCommission{}, "cosmos-sdk/MsgWithdrawValCommission")
legacy.RegisterAminoMsg(registrar, &MsgSetWithdrawAddress{}, "cosmos-sdk/MsgModifyWithdrawAddress")
legacy.RegisterAminoMsg(registrar, &MsgUpdateParams{}, "cosmos-sdk/distribution/MsgUpdateParams")
legacy.RegisterAminoMsg(registrar, &MsgDepositValidatorRewardsPool{}, "cosmos-sdk/distr/MsgDepositValRewards")
registrar.RegisterConcrete(Params{}, "cosmos-sdk/x/distribution/Params")
}
func RegisterInterfaces(registrar registry.InterfaceRegistrar) {
registrar.RegisterImplementations(
(*coretransaction.Msg)(nil),
&MsgWithdrawDelegatorReward{},
&MsgWithdrawValidatorCommission{},
&MsgSetWithdrawAddress{},
&MsgUpdateParams{},
&MsgDepositValidatorRewardsPool{},
)
msgservice.RegisterMsgServiceDesc(registrar, &_Msg_serviceDesc)
}