-
Notifications
You must be signed in to change notification settings - Fork 1
/
codec.go
149 lines (133 loc) · 4.7 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
package types
import (
"github.com/cosmos/cosmos-sdk/codec"
cdctypes "github.com/cosmos/cosmos-sdk/codec/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/msgservice"
govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
"github.com/gogo/protobuf/proto"
)
func RegisterCodec(cdc *codec.LegacyAmino) {
cdc.RegisterConcrete(&MsgStake{}, "rarimocore/Stake", nil)
cdc.RegisterConcrete(&MsgUnstake{}, "rarimocore/Unstake", nil)
cdc.RegisterConcrete(&MsgCreateViolationReport{}, "rarimocore/CreateViolationReport", nil)
cdc.RegisterConcrete(&MsgCreateConfirmation{}, "rarimocore/CreateConfirmation", nil)
cdc.RegisterConcrete(&MsgCreateChangePartiesOp{}, "rarimocore/CreateChangeParties", nil)
cdc.RegisterConcrete(&MsgSetupInitial{}, "rarimocore/SetupInitial", nil)
cdc.RegisterConcrete(&MsgResign{}, "rarimocore/Resign", nil)
cdc.RegisterConcrete(&Transfer{}, "rarimocore/Transfer", nil)
cdc.RegisterConcrete(&ChangeParties{}, "rarimocore/ChangeParties", nil)
cdc.RegisterConcrete(&FeeTokenManagement{}, "rarimocore/FeeTokenManagement", nil)
cdc.RegisterConcrete(&ContractUpgrade{}, "rarimocore/ContractUpgrade", nil)
cdc.RegisterConcrete(&IdentityDefaultTransfer{}, "rarimocore/IdentityDefaultTransfer", nil)
cdc.RegisterConcrete(&IdentityAggregatedTransfer{}, "rarimocore/IdentityAggregatedTransfer", nil)
cdc.RegisterConcrete(&IdentityGISTTransfer{}, "rarimocore/IdentityGISTTransfer", nil)
cdc.RegisterConcrete(&IdentityStateTransfer{}, "rarimocore/IdentityStateTransfer", nil)
cdc.RegisterConcrete(&WorldCoinIdentityTransfer{}, "rarimocore/WorldCoinIdentityTransfer", nil)
cdc.RegisterConcrete(&CSCARootUpdate{}, "rarimocore/CSCARootUpdate", nil)
cdc.RegisterConcrete(&UnfreezeSignerPartyProposal{}, "rarimocore/UnfreezeSignerPartyProposal", nil)
cdc.RegisterConcrete(&ReshareKeysProposal{}, "rarimocore/ReshareKeysProposal", nil)
cdc.RegisterConcrete(&SlashProposal{}, "rarimocore/SlashProposal", nil)
cdc.RegisterConcrete(&DropPartiesProposal{}, "rarimocore/DropPartiesProposal", nil)
// this line is used by starport scaffolding # 2
}
func RegisterInterfaces(registry cdctypes.InterfaceRegistry) {
registry.RegisterImplementations((*sdk.Msg)(nil),
&MsgStake{},
)
registry.RegisterImplementations((*sdk.Msg)(nil),
&MsgCreateViolationReport{},
)
registry.RegisterImplementations((*sdk.Msg)(nil),
&MsgUnstake{},
)
registry.RegisterImplementations((*sdk.Msg)(nil),
&MsgCreateConfirmation{},
)
registry.RegisterImplementations((*sdk.Msg)(nil),
&MsgCreateChangePartiesOp{},
)
registry.RegisterImplementations((*sdk.Msg)(nil),
&MsgSetupInitial{},
)
registry.RegisterImplementations((*sdk.Msg)(nil),
&MsgResign{},
)
registry.RegisterImplementations(
(*govv1beta1.Content)(nil),
&UnfreezeSignerPartyProposal{},
)
registry.RegisterImplementations(
(*govv1beta1.Content)(nil),
&ReshareKeysProposal{},
)
registry.RegisterImplementations(
(*govv1beta1.Content)(nil),
&SlashProposal{},
)
registry.RegisterImplementations(
(*govv1beta1.Content)(nil),
&DropPartiesProposal{},
)
registry.RegisterInterface(
"rarimo.rarimocore.rarimocore.Transfer",
(*proto.Message)(nil),
&Transfer{},
)
registry.RegisterInterface(
"rarimo.rarimocore.rarimocore.ChangeParties",
(*proto.Message)(nil),
&ChangeParties{},
)
registry.RegisterInterface(
"rarimo.rarimocore.rarimocore.FeeTokenManagement",
(*proto.Message)(nil),
&FeeTokenManagement{},
)
registry.RegisterInterface(
"rarimo.rarimocore.rarimocore.ContractUpgrade",
(*proto.Message)(nil),
&ContractUpgrade{},
)
registry.RegisterInterface(
"rarimo.rarimocore.rarimocore.IdentityDefaultTransfer",
(*proto.Message)(nil),
&IdentityDefaultTransfer{},
)
registry.RegisterInterface(
"rarimo.rarimocore.rarimocore.IdentityGISTTransfer",
(*proto.Message)(nil),
&IdentityGISTTransfer{},
)
registry.RegisterInterface(
"rarimo.rarimocore.rarimocore.IdentityStateTransfer",
(*proto.Message)(nil),
&IdentityStateTransfer{},
)
registry.RegisterInterface(
"rarimo.rarimocore.rarimocore.IdentityAggregatedTransfer",
(*proto.Message)(nil),
&IdentityAggregatedTransfer{},
)
registry.RegisterInterface(
"rarimo.rarimocore.rarimocore.WorldCoinIdentityTransfer",
(*proto.Message)(nil),
&WorldCoinIdentityTransfer{},
)
registry.RegisterInterface(
"rarimo.rarimocore.rarimocore.CSCARootUpdate",
(*proto.Message)(nil),
&CSCARootUpdate{},
)
registry.RegisterInterface(
"rarimo.rarimocore.rarimocore.ViolationReport",
(*proto.Message)(nil),
&ViolationReport{},
)
// this line is used by starport scaffolding # 3
msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc)
}
var (
Amino = codec.NewLegacyAmino()
ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry())
)