forked from InjectiveLabs/sdk-go
/
msgs.go
593 lines (499 loc) · 19 KB
/
msgs.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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
package types
import (
"encoding/hex"
"fmt"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/ethereum/go-ethereum/common"
"github.com/tendermint/tendermint/crypto/tmhash"
)
var (
_ sdk.Msg = &MsgValsetConfirm{}
_ sdk.Msg = &MsgSendToEth{}
_ sdk.Msg = &MsgRequestBatch{}
_ sdk.Msg = &MsgConfirmBatch{}
_ sdk.Msg = &MsgSetOrchestratorAddresses{}
_ sdk.Msg = &MsgERC20DeployedClaim{}
_ sdk.Msg = &MsgDepositClaim{}
_ sdk.Msg = &MsgWithdrawClaim{}
_ sdk.Msg = &MsgCancelSendToEth{}
_ sdk.Msg = &MsgValsetUpdatedClaim{}
_ sdk.Msg = &MsgSubmitBadSignatureEvidence{}
)
// NewMsgSetOrchestratorAddress returns a new MsgSetOrchestratorAddresses
func NewMsgSetOrchestratorAddress(sender, orchestrator sdk.AccAddress, ethAddr common.Address) *MsgSetOrchestratorAddresses {
return &MsgSetOrchestratorAddresses{
Sender: sender.String(),
Orchestrator: orchestrator.String(),
EthAddress: ethAddr.Hex(),
}
}
// Route should return the name of the module
func (msg *MsgSetOrchestratorAddresses) Route() string { return RouterKey }
// Type should return the action
func (msg *MsgSetOrchestratorAddresses) Type() string { return "set_operator_address" }
// ValidateBasic performs stateless checks
func (msg *MsgSetOrchestratorAddresses) ValidateBasic() (err error) {
if _, err = sdk.AccAddressFromBech32(msg.Sender); err != nil {
return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Sender)
}
if _, err = sdk.AccAddressFromBech32(msg.Orchestrator); err != nil {
return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Orchestrator)
}
if err := ValidateEthAddress(msg.EthAddress); err != nil {
return sdkerrors.Wrap(err, "ethereum address")
}
return nil
}
// GetSignBytes encodes the message for signing
func (msg *MsgSetOrchestratorAddresses) GetSignBytes() []byte {
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(msg))
}
// GetSigners defines whose signature is required
func (msg *MsgSetOrchestratorAddresses) GetSigners() []sdk.AccAddress {
acc, err := sdk.AccAddressFromBech32(msg.Sender)
if err != nil {
panic(err)
}
return []sdk.AccAddress{acc}
}
// NewMsgValsetConfirm returns a new msgValsetConfirm
func NewMsgValsetConfirm(nonce uint64, ethAddress string, validator sdk.AccAddress, signature string) *MsgValsetConfirm {
return &MsgValsetConfirm{
Nonce: nonce,
Orchestrator: validator.String(),
EthAddress: ethAddress,
Signature: signature,
}
}
// Route should return the name of the module
func (msg *MsgValsetConfirm) Route() string { return RouterKey }
// Type should return the action
func (msg *MsgValsetConfirm) Type() string { return "valset_confirm" }
// ValidateBasic performs stateless checks
func (msg *MsgValsetConfirm) ValidateBasic() (err error) {
if _, err = sdk.AccAddressFromBech32(msg.Orchestrator); err != nil {
return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Orchestrator)
}
if err := ValidateEthAddress(msg.EthAddress); err != nil {
return sdkerrors.Wrap(err, "ethereum address")
}
return nil
}
// GetSignBytes encodes the message for signing
func (msg *MsgValsetConfirm) GetSignBytes() []byte {
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(msg))
}
// GetSigners defines whose signature is required
func (msg *MsgValsetConfirm) GetSigners() []sdk.AccAddress {
acc, err := sdk.AccAddressFromBech32(msg.Orchestrator)
if err != nil {
panic(err)
}
return []sdk.AccAddress{acc}
}
// NewMsgSendToEth returns a new msgSendToEth
func NewMsgSendToEth(sender sdk.AccAddress, destAddress string, send, bridgeFee sdk.Coin) *MsgSendToEth {
return &MsgSendToEth{
Sender: sender.String(),
EthDest: destAddress,
Amount: send,
BridgeFee: bridgeFee,
}
}
// Route should return the name of the module
func (msg MsgSendToEth) Route() string { return RouterKey }
// Type should return the action
func (msg MsgSendToEth) Type() string { return "send_to_eth" }
// ValidateBasic runs stateless checks on the message
// Checks if the Eth address is valid
func (msg MsgSendToEth) ValidateBasic() error {
if _, err := sdk.AccAddressFromBech32(msg.Sender); err != nil {
return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Sender)
}
// fee and send must be of the same denom
if msg.Amount.Denom != msg.BridgeFee.Denom {
return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, fmt.Sprintf("fee and amount must be the same type %s != %s", msg.Amount.Denom, msg.BridgeFee.Denom))
}
if !msg.Amount.IsValid() || msg.Amount.IsZero() {
return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, "amount")
}
if !msg.BridgeFee.IsValid() || msg.BridgeFee.IsZero() {
return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, "fee")
}
if err := ValidateEthAddress(msg.EthDest); err != nil {
return sdkerrors.Wrap(err, "ethereum address")
}
return nil
}
// GetSignBytes encodes the message for signing
func (msg MsgSendToEth) GetSignBytes() []byte {
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(msg))
}
// GetSigners defines whose signature is required
func (msg MsgSendToEth) GetSigners() []sdk.AccAddress {
acc, err := sdk.AccAddressFromBech32(msg.Sender)
if err != nil {
panic(err)
}
return []sdk.AccAddress{acc}
}
// NewMsgRequestBatch returns a new msgRequestBatch
func NewMsgRequestBatch(orchestrator sdk.AccAddress) *MsgRequestBatch {
return &MsgRequestBatch{
Orchestrator: orchestrator.String(),
}
}
// Route should return the name of the module
func (msg MsgRequestBatch) Route() string { return RouterKey }
// Type should return the action
func (msg MsgRequestBatch) Type() string { return "request_batch" }
// ValidateBasic performs stateless checks
func (msg MsgRequestBatch) ValidateBasic() error {
if _, err := sdk.AccAddressFromBech32(msg.Orchestrator); err != nil {
return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Orchestrator)
}
return nil
}
// GetSignBytes encodes the message for signing
func (msg MsgRequestBatch) GetSignBytes() []byte {
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(msg))
}
// GetSigners defines whose signature is required
func (msg MsgRequestBatch) GetSigners() []sdk.AccAddress {
acc, err := sdk.AccAddressFromBech32(msg.Orchestrator)
if err != nil {
panic(err)
}
return []sdk.AccAddress{acc}
}
// Route should return the name of the module
func (msg MsgConfirmBatch) Route() string { return RouterKey }
// Type should return the action
func (msg MsgConfirmBatch) Type() string { return "confirm_batch" }
// ValidateBasic performs stateless checks
func (msg MsgConfirmBatch) ValidateBasic() error {
if _, err := sdk.AccAddressFromBech32(msg.Orchestrator); err != nil {
return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Orchestrator)
}
if err := ValidateEthAddress(msg.EthSigner); err != nil {
return sdkerrors.Wrap(err, "eth signer")
}
if err := ValidateEthAddress(msg.TokenContract); err != nil {
return sdkerrors.Wrap(err, "token contract")
}
_, err := hex.DecodeString(msg.Signature)
if err != nil {
return sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "Could not decode hex string %s", msg.Signature)
}
return nil
}
// GetSignBytes encodes the message for signing
func (msg MsgConfirmBatch) GetSignBytes() []byte {
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(msg))
}
// GetSigners defines whose signature is required
func (msg MsgConfirmBatch) GetSigners() []sdk.AccAddress {
acc, err := sdk.AccAddressFromBech32(msg.Orchestrator)
if err != nil {
panic(err)
}
return []sdk.AccAddress{acc}
}
// EthereumClaim represents a claim on ethereum state
type EthereumClaim interface {
// All Ethereum claims that we relay from the Peggy contract and into the module
// have a nonce that is monotonically increasing and unique, since this nonce is
// issued by the Ethereum contract it is immutable and must be agreed on by all validators
// any disagreement on what claim goes to what nonce means someone is lying.
GetEventNonce() uint64
// The block height that the claimed event occurred on. This EventNonce provides sufficient
// ordering for the execution of all claims. The block height is used only for batchTimeouts
// when we go to create a new batch we set the timeout some number of batches out from the last
// known height plus projected block progress since then.
GetBlockHeight() uint64
// the delegate address of the claimer, for MsgDepositClaim and MsgWithdrawClaim
// this is sent in as the sdk.AccAddress of the delegated key. it is up to the user
// to disambiguate this into a sdk.ValAddress
GetClaimer() sdk.AccAddress
// Which type of claim this is
GetType() ClaimType
ValidateBasic() error
// The claim hash of this claim. This is used to store these claims and also used to check if two different
// validators claims agree. Therefore it's extremely important that this include all elements of the claim
// with the exception of the orchestrator who sent it in, which will be used as a different part of the index
ClaimHash() []byte
}
var (
_ EthereumClaim = &MsgDepositClaim{}
_ EthereumClaim = &MsgWithdrawClaim{}
_ EthereumClaim = &MsgERC20DeployedClaim{}
)
// GetType returns the type of the claim
func (msg *MsgDepositClaim) GetType() ClaimType {
return CLAIM_TYPE_DEPOSIT
}
// ValidateBasic performs stateless checks
func (msg *MsgDepositClaim) ValidateBasic() error {
if _, err := sdk.AccAddressFromBech32(msg.CosmosReceiver); err != nil {
return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.CosmosReceiver)
}
if err := ValidateEthAddress(msg.EthereumSender); err != nil {
return sdkerrors.Wrap(err, "eth sender")
}
if err := ValidateEthAddress(msg.TokenContract); err != nil {
return sdkerrors.Wrap(err, "erc20 token")
}
if _, err := sdk.AccAddressFromBech32(msg.Orchestrator); err != nil {
return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Orchestrator)
}
if msg.EventNonce == 0 {
return fmt.Errorf("nonce == 0")
}
return nil
}
// GetSignBytes encodes the message for signing
func (msg MsgDepositClaim) GetSignBytes() []byte {
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(msg))
}
func (msg MsgDepositClaim) GetClaimer() sdk.AccAddress {
err := msg.ValidateBasic()
if err != nil {
panic("MsgDepositClaim failed ValidateBasic! Should have been handled earlier")
}
val, _ := sdk.AccAddressFromBech32(msg.Orchestrator)
return val
}
// GetSigners defines whose signature is required
func (msg MsgDepositClaim) GetSigners() []sdk.AccAddress {
acc, err := sdk.AccAddressFromBech32(msg.Orchestrator)
if err != nil {
panic(err)
}
return []sdk.AccAddress{acc}
}
// Type should return the action
func (msg MsgDepositClaim) Type() string { return "deposit_claim" }
// Route should return the name of the module
func (msg MsgDepositClaim) Route() string { return RouterKey }
const (
TypeMsgWithdrawClaim = "withdraw_claim"
)
// Hash implements BridgeDeposit.Hash
// modify this with care as it is security sensitive. If an element of the claim is not in this hash a single hostile validator
// could engineer a hash collision and execute a version of the claim with any unhashed data changed to benefit them.
// note that the Orchestrator is the only field excluded from this hash, this is because that value is used higher up in the store
// structure for who has made what claim and is verified by the msg ante-handler for signatures
func (msg *MsgDepositClaim) ClaimHash() []byte {
path := fmt.Sprintf("%d/%d/%s/%s/%s/%s/%s", msg.EventNonce, msg.BlockHeight, msg.TokenContract, msg.Amount.String(), msg.EthereumSender, msg.CosmosReceiver, msg.Data)
return tmhash.Sum([]byte(path))
}
// GetType returns the claim type
func (msg *MsgWithdrawClaim) GetType() ClaimType {
return CLAIM_TYPE_WITHDRAW
}
// ValidateBasic performs stateless checks
func (msg *MsgWithdrawClaim) ValidateBasic() error {
if msg.EventNonce == 0 {
return fmt.Errorf("event_nonce == 0")
}
if msg.BatchNonce == 0 {
return fmt.Errorf("batch_nonce == 0")
}
if err := ValidateEthAddress(msg.TokenContract); err != nil {
return sdkerrors.Wrap(err, "erc20 token")
}
if _, err := sdk.AccAddressFromBech32(msg.Orchestrator); err != nil {
return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Orchestrator)
}
return nil
}
// Hash implements WithdrawBatch.Hash
func (msg *MsgWithdrawClaim) ClaimHash() []byte {
path := fmt.Sprintf("%s/%d/%d/%s", msg.TokenContract, msg.BatchNonce, msg.EventNonce, msg.TokenContract)
return tmhash.Sum([]byte(path))
}
// GetSignBytes encodes the message for signing
func (msg MsgWithdrawClaim) GetSignBytes() []byte {
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(msg))
}
func (msg MsgWithdrawClaim) GetClaimer() sdk.AccAddress {
err := msg.ValidateBasic()
if err != nil {
panic("MsgWithdrawClaim failed ValidateBasic! Should have been handled earlier")
}
val, _ := sdk.AccAddressFromBech32(msg.Orchestrator)
return val
}
// GetSigners defines whose signature is required
func (msg MsgWithdrawClaim) GetSigners() []sdk.AccAddress {
acc, err := sdk.AccAddressFromBech32(msg.Orchestrator)
if err != nil {
panic(err)
}
return []sdk.AccAddress{acc}
}
// Route should return the name of the module
func (msg MsgWithdrawClaim) Route() string { return RouterKey }
// Type should return the action
func (msg MsgWithdrawClaim) Type() string { return "withdraw_claim" }
const (
TypeMsgDepositClaim = "deposit_claim"
)
// EthereumClaim implementation for MsgERC20DeployedClaim
// ======================================================
// GetType returns the type of the claim
func (e *MsgERC20DeployedClaim) GetType() ClaimType {
return CLAIM_TYPE_ERC20_DEPLOYED
}
// ValidateBasic performs stateless checks
func (e *MsgERC20DeployedClaim) ValidateBasic() error {
if err := ValidateEthAddress(e.TokenContract); err != nil {
return sdkerrors.Wrap(err, "erc20 token")
}
if _, err := sdk.AccAddressFromBech32(e.Orchestrator); err != nil {
return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, e.Orchestrator)
}
if e.EventNonce == 0 {
return fmt.Errorf("nonce == 0")
}
return nil
}
// GetSignBytes encodes the message for signing
func (msg MsgERC20DeployedClaim) GetSignBytes() []byte {
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(msg))
}
func (msg MsgERC20DeployedClaim) GetClaimer() sdk.AccAddress {
err := msg.ValidateBasic()
if err != nil {
panic("MsgERC20DeployedClaim failed ValidateBasic! Should have been handled earlier")
}
val, _ := sdk.AccAddressFromBech32(msg.Orchestrator)
return val
}
// GetSigners defines whose signature is required
func (msg MsgERC20DeployedClaim) GetSigners() []sdk.AccAddress {
acc, err := sdk.AccAddressFromBech32(msg.Orchestrator)
if err != nil {
panic(err)
}
return []sdk.AccAddress{acc}
}
// Type should return the action
func (msg MsgERC20DeployedClaim) Type() string { return "ERC20_deployed_claim" }
// Route should return the name of the module
func (msg MsgERC20DeployedClaim) Route() string { return RouterKey }
// Hash implements BridgeDeposit.Hash
// modify this with care as it is security sensitive. If an element of the claim is not in this hash a single hostile validator
// could engineer a hash collision and execute a version of the claim with any unhashed data changed to benefit them.
// note that the Orchestrator is the only field excluded from this hash, this is because that value is used higher up in the store
// structure for who has made what claim and is verified by the msg ante-handler for signatures
func (b *MsgERC20DeployedClaim) ClaimHash() []byte {
path := fmt.Sprintf("%d/%d/%s/%s/%s/%s/%d", b.EventNonce, b.BlockHeight, b.CosmosDenom, b.TokenContract, b.Name, b.Symbol, b.Decimals)
return tmhash.Sum([]byte(path))
}
// GetType returns the type of the claim
func (e *MsgValsetUpdatedClaim) GetType() ClaimType {
return CLAIM_TYPE_VALSET_UPDATED
}
// ValidateBasic performs stateless checks
func (e *MsgValsetUpdatedClaim) ValidateBasic() error {
if _, err := sdk.AccAddressFromBech32(e.Orchestrator); err != nil {
return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, e.Orchestrator)
}
if e.EventNonce == 0 {
return fmt.Errorf("nonce == 0")
}
err := ValidateEthAddress(e.RewardToken)
if err != nil {
return err
}
for _, member := range e.Members {
err := ValidateEthAddress(member.EthereumAddress)
if err != nil {
return err
}
}
return nil
}
// GetSignBytes encodes the message for signing
func (msg MsgValsetUpdatedClaim) GetSignBytes() []byte {
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(msg))
}
func (msg MsgValsetUpdatedClaim) GetClaimer() sdk.AccAddress {
err := msg.ValidateBasic()
if err != nil {
panic("MsgERC20DeployedClaim failed ValidateBasic! Should have been handled earlier")
}
val, _ := sdk.AccAddressFromBech32(msg.Orchestrator)
return val
}
// GetSigners defines whose signature is required
func (msg MsgValsetUpdatedClaim) GetSigners() []sdk.AccAddress {
acc, err := sdk.AccAddressFromBech32(msg.Orchestrator)
if err != nil {
panic(err)
}
return []sdk.AccAddress{acc}
}
// Type should return the action
func (msg MsgValsetUpdatedClaim) Type() string { return "Valset_Updated_Claim" }
// Route should return the name of the module
func (msg MsgValsetUpdatedClaim) Route() string { return RouterKey }
// Hash implements BridgeDeposit.Hash
func (b *MsgValsetUpdatedClaim) ClaimHash() []byte {
path := fmt.Sprintf("%d/%d/%d/%s/", b.ValsetNonce, b.EventNonce, b.BlockHeight, b.Members)
return tmhash.Sum([]byte(path))
}
// NewMsgCancelSendToEth returns a new msgMsgCancelSendToEth
func NewMsgCancelSendToEth(sender sdk.AccAddress, id uint64) *MsgCancelSendToEth {
return &MsgCancelSendToEth{
TransactionId: id,
Sender: sender.String(),
}
}
// Route should return the name of the module
func (msg *MsgCancelSendToEth) Route() string { return RouterKey }
// Type should return the action
func (msg *MsgCancelSendToEth) Type() string { return "cancel_send_to_eth" }
// ValidateBasic performs stateless checks
func (msg *MsgCancelSendToEth) ValidateBasic() (err error) {
if _, err := sdk.AccAddressFromBech32(msg.Sender); err != nil {
return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Sender)
}
return nil
}
// GetSignBytes encodes the message for signing
func (msg *MsgCancelSendToEth) GetSignBytes() []byte {
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(msg))
}
// GetSigners defines whose signature is required
func (msg *MsgCancelSendToEth) GetSigners() []sdk.AccAddress {
acc, err := sdk.AccAddressFromBech32(msg.Sender)
if err != nil {
panic(err)
}
return []sdk.AccAddress{acc}
}
// MsgSubmitBadSignatureEvidence
// ======================================================
// ValidateBasic performs stateless checks
func (e *MsgSubmitBadSignatureEvidence) ValidateBasic() error {
return nil
}
// GetSignBytes encodes the message for signing
func (msg MsgSubmitBadSignatureEvidence) GetSignBytes() []byte {
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(msg))
}
// GetSigners defines whose signature is required
func (msg MsgSubmitBadSignatureEvidence) GetSigners() []sdk.AccAddress {
acc, err := sdk.AccAddressFromBech32(msg.Sender)
if err != nil {
panic(err)
}
return []sdk.AccAddress{acc}
}
// Type should return the action
func (msg MsgSubmitBadSignatureEvidence) Type() string { return "Submit_Bad_Signature_Evidence" }
// Route should return the name of the module
func (msg MsgSubmitBadSignatureEvidence) Route() string { return RouterKey }