/
gravity_abi.go
1404 lines (1201 loc) · 70.7 KB
/
gravity_abi.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
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated - DO NOT EDIT.
// This file is a generated binding and any manual changes will be lost.
package integration_tests
import (
"errors"
"math/big"
"strings"
ethereum "github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/event"
)
// Reference imports to suppress errors if they are not otherwise used.
var (
_ = errors.New
_ = big.NewInt
_ = strings.NewReader
_ = ethereum.NotFound
_ = bind.Bind
_ = common.Big1
_ = types.BloomLookup
_ = event.NewSubscription
)
// LogicCallArgs is an auto generated low-level Go binding around an user-defined struct.
type LogicCallArgs struct {
TransferAmounts []*big.Int
TransferTokenContracts []common.Address
FeeAmounts []*big.Int
FeeTokenContracts []common.Address
LogicContractAddress common.Address
Payload []byte
TimeOut *big.Int
InvalidationId [32]byte
InvalidationNonce *big.Int
}
// ValSignature is an auto generated low-level Go binding around an user-defined struct.
type ValSignature struct {
V uint8
R [32]byte
S [32]byte
}
// ValsetArgs is an auto generated low-level Go binding around an user-defined struct.
type ValsetArgs struct {
Validators []common.Address
Powers []*big.Int
ValsetNonce *big.Int
RewardAmount *big.Int
RewardToken common.Address
}
// GravityMetaData contains all meta data concerning the Gravity contract.
var GravityMetaData = &bind.MetaData{
ABI: "[{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_gravityId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_powerThreshold\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"_validators\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_powers\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"BatchTimedOut\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IncorrectCheckpoint\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"cumulativePower\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"powerThreshold\",\"type\":\"uint256\"}],\"name\":\"InsufficientPower\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newNonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"currentNonce\",\"type\":\"uint256\"}],\"name\":\"InvalidBatchNonce\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidLogicCallFees\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newNonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"currentNonce\",\"type\":\"uint256\"}],\"name\":\"InvalidLogicCallNonce\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidLogicCallTransfers\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSendToCosmos\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newNonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"currentNonce\",\"type\":\"uint256\"}],\"name\":\"InvalidValsetNonce\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LogicCallTimedOut\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MalformedBatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MalformedCurrentValidatorSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MalformedNewValidatorSet\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_cosmosDenom\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_tokenContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"_decimals\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_eventNonce\",\"type\":\"uint256\"}],\"name\":\"ERC20DeployedEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_invalidationId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_invalidationNonce\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_returnData\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_eventNonce\",\"type\":\"uint256\"}],\"name\":\"LogicCallEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_tokenContract\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_destination\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_eventNonce\",\"type\":\"uint256\"}],\"name\":\"SendToCosmosEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_batchNonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_eventNonce\",\"type\":\"uint256\"}],\"name\":\"TransactionBatchExecutedEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_newValsetNonce\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_eventNonce\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_rewardAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_rewardToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"_validators\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_powers\",\"type\":\"uint256[]\"}],\"name\":\"ValsetUpdatedEvent\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_cosmosDenom\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"_decimals\",\"type\":\"uint8\"}],\"name\":\"deployERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_erc20Address\",\"type\":\"address\"}],\"name\":\"lastBatchNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_invalidation_id\",\"type\":\"bytes32\"}],\"name\":\"lastLogicCallNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenContract\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_destination\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"sendToCosmos\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"state_gravityId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"state_invalidationMapping\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"state_lastBatchNonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"state_lastEventNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"state_lastValsetCheckpoint\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"state_lastValsetNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"state_powerThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address[]\",\"name\":\"validators\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"powers\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"valsetNonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rewardAmount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"rewardToken\",\"type\":\"address\"}],\"internalType\":\"structValsetArgs\",\"name\":\"_currentValset\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"structValSignature[]\",\"name\":\"_sigs\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"address[]\",\"name\":\"_destinations\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_fees\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"_batchNonce\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_tokenContract\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_batchTimeout\",\"type\":\"uint256\"}],\"name\":\"submitBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address[]\",\"name\":\"validators\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"powers\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"valsetNonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rewardAmount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"rewardToken\",\"type\":\"address\"}],\"internalType\":\"structValsetArgs\",\"name\":\"_currentValset\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"structValSignature[]\",\"name\":\"_sigs\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"uint256[]\",\"name\":\"transferAmounts\",\"type\":\"uint256[]\"},{\"internalType\":\"address[]\",\"name\":\"transferTokenContracts\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"feeAmounts\",\"type\":\"uint256[]\"},{\"internalType\":\"address[]\",\"name\":\"feeTokenContracts\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"logicContractAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"timeOut\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"invalidationId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"invalidationNonce\",\"type\":\"uint256\"}],\"internalType\":\"structLogicCallArgs\",\"name\":\"_args\",\"type\":\"tuple\"}],\"name\":\"submitLogicCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address[]\",\"name\":\"validators\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"powers\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"valsetNonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rewardAmount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"rewardToken\",\"type\":\"address\"}],\"internalType\":\"structValsetArgs\",\"name\":\"_currentValset\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"structValSignature[]\",\"name\":\"_sigs\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes32\",\"name\":\"_theHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_powerThreshold\",\"type\":\"uint256\"}],\"name\":\"testCheckValidatorSignatures\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address[]\",\"name\":\"validators\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"powers\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"valsetNonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rewardAmount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"rewardToken\",\"type\":\"address\"}],\"internalType\":\"structValsetArgs\",\"name\":\"_valsetArgs\",\"type\":\"tuple\"},{\"internalType\":\"bytes32\",\"name\":\"_gravityId\",\"type\":\"bytes32\"}],\"name\":\"testMakeCheckpoint\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address[]\",\"name\":\"validators\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"powers\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"valsetNonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rewardAmount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"rewardToken\",\"type\":\"address\"}],\"internalType\":\"structValsetArgs\",\"name\":\"_newValset\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address[]\",\"name\":\"validators\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"powers\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"valsetNonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rewardAmount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"rewardToken\",\"type\":\"address\"}],\"internalType\":\"structValsetArgs\",\"name\":\"_currentValset\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"structValSignature[]\",\"name\":\"_sigs\",\"type\":\"tuple[]\"}],\"name\":\"updateValset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
}
// GravityABI is the input ABI used to generate the binding from.
// Deprecated: Use GravityMetaData.ABI instead.
var GravityABI = GravityMetaData.ABI
// Gravity is an auto generated Go binding around an Ethereum contract.
type Gravity struct {
GravityCaller // Read-only binding to the contract
GravityTransactor // Write-only binding to the contract
GravityFilterer // Log filterer for contract events
}
// GravityCaller is an auto generated read-only Go binding around an Ethereum contract.
type GravityCaller struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// GravityTransactor is an auto generated write-only Go binding around an Ethereum contract.
type GravityTransactor struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// GravityFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
type GravityFilterer struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// GravitySession is an auto generated Go binding around an Ethereum contract,
// with pre-set call and transact options.
type GravitySession struct {
Contract *Gravity // Generic contract binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
// GravityCallerSession is an auto generated read-only Go binding around an Ethereum contract,
// with pre-set call options.
type GravityCallerSession struct {
Contract *GravityCaller // Generic contract caller binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
}
// GravityTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
// with pre-set transact options.
type GravityTransactorSession struct {
Contract *GravityTransactor // Generic contract transactor binding to set the session for
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
// GravityRaw is an auto generated low-level Go binding around an Ethereum contract.
type GravityRaw struct {
Contract *Gravity // Generic contract binding to access the raw methods on
}
// GravityCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
type GravityCallerRaw struct {
Contract *GravityCaller // Generic read-only contract binding to access the raw methods on
}
// GravityTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
type GravityTransactorRaw struct {
Contract *GravityTransactor // Generic write-only contract binding to access the raw methods on
}
// NewGravity creates a new instance of Gravity, bound to a specific deployed contract.
func NewGravity(address common.Address, backend bind.ContractBackend) (*Gravity, error) {
contract, err := bindGravity(address, backend, backend, backend)
if err != nil {
return nil, err
}
return &Gravity{GravityCaller: GravityCaller{contract: contract}, GravityTransactor: GravityTransactor{contract: contract}, GravityFilterer: GravityFilterer{contract: contract}}, nil
}
// NewGravityCaller creates a new read-only instance of Gravity, bound to a specific deployed contract.
func NewGravityCaller(address common.Address, caller bind.ContractCaller) (*GravityCaller, error) {
contract, err := bindGravity(address, caller, nil, nil)
if err != nil {
return nil, err
}
return &GravityCaller{contract: contract}, nil
}
// NewGravityTransactor creates a new write-only instance of Gravity, bound to a specific deployed contract.
func NewGravityTransactor(address common.Address, transactor bind.ContractTransactor) (*GravityTransactor, error) {
contract, err := bindGravity(address, nil, transactor, nil)
if err != nil {
return nil, err
}
return &GravityTransactor{contract: contract}, nil
}
// NewGravityFilterer creates a new log filterer instance of Gravity, bound to a specific deployed contract.
func NewGravityFilterer(address common.Address, filterer bind.ContractFilterer) (*GravityFilterer, error) {
contract, err := bindGravity(address, nil, nil, filterer)
if err != nil {
return nil, err
}
return &GravityFilterer{contract: contract}, nil
}
// bindGravity binds a generic wrapper to an already deployed contract.
func bindGravity(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
parsed, err := abi.JSON(strings.NewReader(GravityABI))
if err != nil {
return nil, err
}
return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
}
// Call invokes the (constant) contract method with params as input values and
// sets the output to result. The result type might be a single field for simple
// returns, a slice of interfaces for anonymous returns and a struct for named
// returns.
func (_Gravity *GravityRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _Gravity.Contract.GravityCaller.contract.Call(opts, result, method, params...)
}
// Transfer initiates a plain transaction to move funds to the contract, calling
// its default method if one is available.
func (_Gravity *GravityRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _Gravity.Contract.GravityTransactor.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_Gravity *GravityRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _Gravity.Contract.GravityTransactor.contract.Transact(opts, method, params...)
}
// Call invokes the (constant) contract method with params as input values and
// sets the output to result. The result type might be a single field for simple
// returns, a slice of interfaces for anonymous returns and a struct for named
// returns.
func (_Gravity *GravityCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _Gravity.Contract.contract.Call(opts, result, method, params...)
}
// Transfer initiates a plain transaction to move funds to the contract, calling
// its default method if one is available.
func (_Gravity *GravityTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _Gravity.Contract.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_Gravity *GravityTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _Gravity.Contract.contract.Transact(opts, method, params...)
}
// LastBatchNonce is a free data retrieval call binding the contract method 0x011b2174.
//
// Solidity: function lastBatchNonce(address _erc20Address) view returns(uint256)
func (_Gravity *GravityCaller) LastBatchNonce(opts *bind.CallOpts, _erc20Address common.Address) (*big.Int, error) {
var out []interface{}
err := _Gravity.contract.Call(opts, &out, "lastBatchNonce", _erc20Address)
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// LastBatchNonce is a free data retrieval call binding the contract method 0x011b2174.
//
// Solidity: function lastBatchNonce(address _erc20Address) view returns(uint256)
func (_Gravity *GravitySession) LastBatchNonce(_erc20Address common.Address) (*big.Int, error) {
return _Gravity.Contract.LastBatchNonce(&_Gravity.CallOpts, _erc20Address)
}
// LastBatchNonce is a free data retrieval call binding the contract method 0x011b2174.
//
// Solidity: function lastBatchNonce(address _erc20Address) view returns(uint256)
func (_Gravity *GravityCallerSession) LastBatchNonce(_erc20Address common.Address) (*big.Int, error) {
return _Gravity.Contract.LastBatchNonce(&_Gravity.CallOpts, _erc20Address)
}
// LastLogicCallNonce is a free data retrieval call binding the contract method 0xc9d194d5.
//
// Solidity: function lastLogicCallNonce(bytes32 _invalidation_id) view returns(uint256)
func (_Gravity *GravityCaller) LastLogicCallNonce(opts *bind.CallOpts, _invalidation_id [32]byte) (*big.Int, error) {
var out []interface{}
err := _Gravity.contract.Call(opts, &out, "lastLogicCallNonce", _invalidation_id)
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// LastLogicCallNonce is a free data retrieval call binding the contract method 0xc9d194d5.
//
// Solidity: function lastLogicCallNonce(bytes32 _invalidation_id) view returns(uint256)
func (_Gravity *GravitySession) LastLogicCallNonce(_invalidation_id [32]byte) (*big.Int, error) {
return _Gravity.Contract.LastLogicCallNonce(&_Gravity.CallOpts, _invalidation_id)
}
// LastLogicCallNonce is a free data retrieval call binding the contract method 0xc9d194d5.
//
// Solidity: function lastLogicCallNonce(bytes32 _invalidation_id) view returns(uint256)
func (_Gravity *GravityCallerSession) LastLogicCallNonce(_invalidation_id [32]byte) (*big.Int, error) {
return _Gravity.Contract.LastLogicCallNonce(&_Gravity.CallOpts, _invalidation_id)
}
// StateGravityId is a free data retrieval call binding the contract method 0xbdda81d4.
//
// Solidity: function state_gravityId() view returns(bytes32)
func (_Gravity *GravityCaller) StateGravityId(opts *bind.CallOpts) ([32]byte, error) {
var out []interface{}
err := _Gravity.contract.Call(opts, &out, "state_gravityId")
if err != nil {
return *new([32]byte), err
}
out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
return out0, err
}
// StateGravityId is a free data retrieval call binding the contract method 0xbdda81d4.
//
// Solidity: function state_gravityId() view returns(bytes32)
func (_Gravity *GravitySession) StateGravityId() ([32]byte, error) {
return _Gravity.Contract.StateGravityId(&_Gravity.CallOpts)
}
// StateGravityId is a free data retrieval call binding the contract method 0xbdda81d4.
//
// Solidity: function state_gravityId() view returns(bytes32)
func (_Gravity *GravityCallerSession) StateGravityId() ([32]byte, error) {
return _Gravity.Contract.StateGravityId(&_Gravity.CallOpts)
}
// StateInvalidationMapping is a free data retrieval call binding the contract method 0x7dfb6f86.
//
// Solidity: function state_invalidationMapping(bytes32 ) view returns(uint256)
func (_Gravity *GravityCaller) StateInvalidationMapping(opts *bind.CallOpts, arg0 [32]byte) (*big.Int, error) {
var out []interface{}
err := _Gravity.contract.Call(opts, &out, "state_invalidationMapping", arg0)
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// StateInvalidationMapping is a free data retrieval call binding the contract method 0x7dfb6f86.
//
// Solidity: function state_invalidationMapping(bytes32 ) view returns(uint256)
func (_Gravity *GravitySession) StateInvalidationMapping(arg0 [32]byte) (*big.Int, error) {
return _Gravity.Contract.StateInvalidationMapping(&_Gravity.CallOpts, arg0)
}
// StateInvalidationMapping is a free data retrieval call binding the contract method 0x7dfb6f86.
//
// Solidity: function state_invalidationMapping(bytes32 ) view returns(uint256)
func (_Gravity *GravityCallerSession) StateInvalidationMapping(arg0 [32]byte) (*big.Int, error) {
return _Gravity.Contract.StateInvalidationMapping(&_Gravity.CallOpts, arg0)
}
// StateLastBatchNonces is a free data retrieval call binding the contract method 0xdf97174b.
//
// Solidity: function state_lastBatchNonces(address ) view returns(uint256)
func (_Gravity *GravityCaller) StateLastBatchNonces(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) {
var out []interface{}
err := _Gravity.contract.Call(opts, &out, "state_lastBatchNonces", arg0)
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// StateLastBatchNonces is a free data retrieval call binding the contract method 0xdf97174b.
//
// Solidity: function state_lastBatchNonces(address ) view returns(uint256)
func (_Gravity *GravitySession) StateLastBatchNonces(arg0 common.Address) (*big.Int, error) {
return _Gravity.Contract.StateLastBatchNonces(&_Gravity.CallOpts, arg0)
}
// StateLastBatchNonces is a free data retrieval call binding the contract method 0xdf97174b.
//
// Solidity: function state_lastBatchNonces(address ) view returns(uint256)
func (_Gravity *GravityCallerSession) StateLastBatchNonces(arg0 common.Address) (*big.Int, error) {
return _Gravity.Contract.StateLastBatchNonces(&_Gravity.CallOpts, arg0)
}
// StateLastEventNonce is a free data retrieval call binding the contract method 0x73b20547.
//
// Solidity: function state_lastEventNonce() view returns(uint256)
func (_Gravity *GravityCaller) StateLastEventNonce(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _Gravity.contract.Call(opts, &out, "state_lastEventNonce")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// StateLastEventNonce is a free data retrieval call binding the contract method 0x73b20547.
//
// Solidity: function state_lastEventNonce() view returns(uint256)
func (_Gravity *GravitySession) StateLastEventNonce() (*big.Int, error) {
return _Gravity.Contract.StateLastEventNonce(&_Gravity.CallOpts)
}
// StateLastEventNonce is a free data retrieval call binding the contract method 0x73b20547.
//
// Solidity: function state_lastEventNonce() view returns(uint256)
func (_Gravity *GravityCallerSession) StateLastEventNonce() (*big.Int, error) {
return _Gravity.Contract.StateLastEventNonce(&_Gravity.CallOpts)
}
// StateLastValsetCheckpoint is a free data retrieval call binding the contract method 0xf2b53307.
//
// Solidity: function state_lastValsetCheckpoint() view returns(bytes32)
func (_Gravity *GravityCaller) StateLastValsetCheckpoint(opts *bind.CallOpts) ([32]byte, error) {
var out []interface{}
err := _Gravity.contract.Call(opts, &out, "state_lastValsetCheckpoint")
if err != nil {
return *new([32]byte), err
}
out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
return out0, err
}
// StateLastValsetCheckpoint is a free data retrieval call binding the contract method 0xf2b53307.
//
// Solidity: function state_lastValsetCheckpoint() view returns(bytes32)
func (_Gravity *GravitySession) StateLastValsetCheckpoint() ([32]byte, error) {
return _Gravity.Contract.StateLastValsetCheckpoint(&_Gravity.CallOpts)
}
// StateLastValsetCheckpoint is a free data retrieval call binding the contract method 0xf2b53307.
//
// Solidity: function state_lastValsetCheckpoint() view returns(bytes32)
func (_Gravity *GravityCallerSession) StateLastValsetCheckpoint() ([32]byte, error) {
return _Gravity.Contract.StateLastValsetCheckpoint(&_Gravity.CallOpts)
}
// StateLastValsetNonce is a free data retrieval call binding the contract method 0xb56561fe.
//
// Solidity: function state_lastValsetNonce() view returns(uint256)
func (_Gravity *GravityCaller) StateLastValsetNonce(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _Gravity.contract.Call(opts, &out, "state_lastValsetNonce")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// StateLastValsetNonce is a free data retrieval call binding the contract method 0xb56561fe.
//
// Solidity: function state_lastValsetNonce() view returns(uint256)
func (_Gravity *GravitySession) StateLastValsetNonce() (*big.Int, error) {
return _Gravity.Contract.StateLastValsetNonce(&_Gravity.CallOpts)
}
// StateLastValsetNonce is a free data retrieval call binding the contract method 0xb56561fe.
//
// Solidity: function state_lastValsetNonce() view returns(uint256)
func (_Gravity *GravityCallerSession) StateLastValsetNonce() (*big.Int, error) {
return _Gravity.Contract.StateLastValsetNonce(&_Gravity.CallOpts)
}
// StatePowerThreshold is a free data retrieval call binding the contract method 0xe5a2b5d2.
//
// Solidity: function state_powerThreshold() view returns(uint256)
func (_Gravity *GravityCaller) StatePowerThreshold(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _Gravity.contract.Call(opts, &out, "state_powerThreshold")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// StatePowerThreshold is a free data retrieval call binding the contract method 0xe5a2b5d2.
//
// Solidity: function state_powerThreshold() view returns(uint256)
func (_Gravity *GravitySession) StatePowerThreshold() (*big.Int, error) {
return _Gravity.Contract.StatePowerThreshold(&_Gravity.CallOpts)
}
// StatePowerThreshold is a free data retrieval call binding the contract method 0xe5a2b5d2.
//
// Solidity: function state_powerThreshold() view returns(uint256)
func (_Gravity *GravityCallerSession) StatePowerThreshold() (*big.Int, error) {
return _Gravity.Contract.StatePowerThreshold(&_Gravity.CallOpts)
}
// TestCheckValidatorSignatures is a free data retrieval call binding the contract method 0x00901153.
//
// Solidity: function testCheckValidatorSignatures((address[],uint256[],uint256,uint256,address) _currentValset, (uint8,bytes32,bytes32)[] _sigs, bytes32 _theHash, uint256 _powerThreshold) pure returns()
func (_Gravity *GravityCaller) TestCheckValidatorSignatures(opts *bind.CallOpts, _currentValset ValsetArgs, _sigs []ValSignature, _theHash [32]byte, _powerThreshold *big.Int) error {
var out []interface{}
err := _Gravity.contract.Call(opts, &out, "testCheckValidatorSignatures", _currentValset, _sigs, _theHash, _powerThreshold)
if err != nil {
return err
}
return err
}
// TestCheckValidatorSignatures is a free data retrieval call binding the contract method 0x00901153.
//
// Solidity: function testCheckValidatorSignatures((address[],uint256[],uint256,uint256,address) _currentValset, (uint8,bytes32,bytes32)[] _sigs, bytes32 _theHash, uint256 _powerThreshold) pure returns()
func (_Gravity *GravitySession) TestCheckValidatorSignatures(_currentValset ValsetArgs, _sigs []ValSignature, _theHash [32]byte, _powerThreshold *big.Int) error {
return _Gravity.Contract.TestCheckValidatorSignatures(&_Gravity.CallOpts, _currentValset, _sigs, _theHash, _powerThreshold)
}
// TestCheckValidatorSignatures is a free data retrieval call binding the contract method 0x00901153.
//
// Solidity: function testCheckValidatorSignatures((address[],uint256[],uint256,uint256,address) _currentValset, (uint8,bytes32,bytes32)[] _sigs, bytes32 _theHash, uint256 _powerThreshold) pure returns()
func (_Gravity *GravityCallerSession) TestCheckValidatorSignatures(_currentValset ValsetArgs, _sigs []ValSignature, _theHash [32]byte, _powerThreshold *big.Int) error {
return _Gravity.Contract.TestCheckValidatorSignatures(&_Gravity.CallOpts, _currentValset, _sigs, _theHash, _powerThreshold)
}
// TestMakeCheckpoint is a free data retrieval call binding the contract method 0x01031525.
//
// Solidity: function testMakeCheckpoint((address[],uint256[],uint256,uint256,address) _valsetArgs, bytes32 _gravityId) pure returns()
func (_Gravity *GravityCaller) TestMakeCheckpoint(opts *bind.CallOpts, _valsetArgs ValsetArgs, _gravityId [32]byte) error {
var out []interface{}
err := _Gravity.contract.Call(opts, &out, "testMakeCheckpoint", _valsetArgs, _gravityId)
if err != nil {
return err
}
return err
}
// TestMakeCheckpoint is a free data retrieval call binding the contract method 0x01031525.
//
// Solidity: function testMakeCheckpoint((address[],uint256[],uint256,uint256,address) _valsetArgs, bytes32 _gravityId) pure returns()
func (_Gravity *GravitySession) TestMakeCheckpoint(_valsetArgs ValsetArgs, _gravityId [32]byte) error {
return _Gravity.Contract.TestMakeCheckpoint(&_Gravity.CallOpts, _valsetArgs, _gravityId)
}
// TestMakeCheckpoint is a free data retrieval call binding the contract method 0x01031525.
//
// Solidity: function testMakeCheckpoint((address[],uint256[],uint256,uint256,address) _valsetArgs, bytes32 _gravityId) pure returns()
func (_Gravity *GravityCallerSession) TestMakeCheckpoint(_valsetArgs ValsetArgs, _gravityId [32]byte) error {
return _Gravity.Contract.TestMakeCheckpoint(&_Gravity.CallOpts, _valsetArgs, _gravityId)
}
// DeployERC20 is a paid mutator transaction binding the contract method 0xf7955637.
//
// Solidity: function deployERC20(string _cosmosDenom, string _name, string _symbol, uint8 _decimals) returns()
func (_Gravity *GravityTransactor) DeployERC20(opts *bind.TransactOpts, _cosmosDenom string, _name string, _symbol string, _decimals uint8) (*types.Transaction, error) {
return _Gravity.contract.Transact(opts, "deployERC20", _cosmosDenom, _name, _symbol, _decimals)
}
// DeployERC20 is a paid mutator transaction binding the contract method 0xf7955637.
//
// Solidity: function deployERC20(string _cosmosDenom, string _name, string _symbol, uint8 _decimals) returns()
func (_Gravity *GravitySession) DeployERC20(_cosmosDenom string, _name string, _symbol string, _decimals uint8) (*types.Transaction, error) {
return _Gravity.Contract.DeployERC20(&_Gravity.TransactOpts, _cosmosDenom, _name, _symbol, _decimals)
}
// DeployERC20 is a paid mutator transaction binding the contract method 0xf7955637.
//
// Solidity: function deployERC20(string _cosmosDenom, string _name, string _symbol, uint8 _decimals) returns()
func (_Gravity *GravityTransactorSession) DeployERC20(_cosmosDenom string, _name string, _symbol string, _decimals uint8) (*types.Transaction, error) {
return _Gravity.Contract.DeployERC20(&_Gravity.TransactOpts, _cosmosDenom, _name, _symbol, _decimals)
}
// SendToCosmos is a paid mutator transaction binding the contract method 0x1ffbe7f9.
//
// Solidity: function sendToCosmos(address _tokenContract, bytes32 _destination, uint256 _amount) returns()
func (_Gravity *GravityTransactor) SendToCosmos(opts *bind.TransactOpts, _tokenContract common.Address, _destination [32]byte, _amount *big.Int) (*types.Transaction, error) {
return _Gravity.contract.Transact(opts, "sendToCosmos", _tokenContract, _destination, _amount)
}
// SendToCosmos is a paid mutator transaction binding the contract method 0x1ffbe7f9.
//
// Solidity: function sendToCosmos(address _tokenContract, bytes32 _destination, uint256 _amount) returns()
func (_Gravity *GravitySession) SendToCosmos(_tokenContract common.Address, _destination [32]byte, _amount *big.Int) (*types.Transaction, error) {
return _Gravity.Contract.SendToCosmos(&_Gravity.TransactOpts, _tokenContract, _destination, _amount)
}
// SendToCosmos is a paid mutator transaction binding the contract method 0x1ffbe7f9.
//
// Solidity: function sendToCosmos(address _tokenContract, bytes32 _destination, uint256 _amount) returns()
func (_Gravity *GravityTransactorSession) SendToCosmos(_tokenContract common.Address, _destination [32]byte, _amount *big.Int) (*types.Transaction, error) {
return _Gravity.Contract.SendToCosmos(&_Gravity.TransactOpts, _tokenContract, _destination, _amount)
}
// SubmitBatch is a paid mutator transaction binding the contract method 0x8690ff98.
//
// Solidity: function submitBatch((address[],uint256[],uint256,uint256,address) _currentValset, (uint8,bytes32,bytes32)[] _sigs, uint256[] _amounts, address[] _destinations, uint256[] _fees, uint256 _batchNonce, address _tokenContract, uint256 _batchTimeout) returns()
func (_Gravity *GravityTransactor) SubmitBatch(opts *bind.TransactOpts, _currentValset ValsetArgs, _sigs []ValSignature, _amounts []*big.Int, _destinations []common.Address, _fees []*big.Int, _batchNonce *big.Int, _tokenContract common.Address, _batchTimeout *big.Int) (*types.Transaction, error) {
return _Gravity.contract.Transact(opts, "submitBatch", _currentValset, _sigs, _amounts, _destinations, _fees, _batchNonce, _tokenContract, _batchTimeout)
}
// SubmitBatch is a paid mutator transaction binding the contract method 0x8690ff98.
//
// Solidity: function submitBatch((address[],uint256[],uint256,uint256,address) _currentValset, (uint8,bytes32,bytes32)[] _sigs, uint256[] _amounts, address[] _destinations, uint256[] _fees, uint256 _batchNonce, address _tokenContract, uint256 _batchTimeout) returns()
func (_Gravity *GravitySession) SubmitBatch(_currentValset ValsetArgs, _sigs []ValSignature, _amounts []*big.Int, _destinations []common.Address, _fees []*big.Int, _batchNonce *big.Int, _tokenContract common.Address, _batchTimeout *big.Int) (*types.Transaction, error) {
return _Gravity.Contract.SubmitBatch(&_Gravity.TransactOpts, _currentValset, _sigs, _amounts, _destinations, _fees, _batchNonce, _tokenContract, _batchTimeout)
}
// SubmitBatch is a paid mutator transaction binding the contract method 0x8690ff98.
//
// Solidity: function submitBatch((address[],uint256[],uint256,uint256,address) _currentValset, (uint8,bytes32,bytes32)[] _sigs, uint256[] _amounts, address[] _destinations, uint256[] _fees, uint256 _batchNonce, address _tokenContract, uint256 _batchTimeout) returns()
func (_Gravity *GravityTransactorSession) SubmitBatch(_currentValset ValsetArgs, _sigs []ValSignature, _amounts []*big.Int, _destinations []common.Address, _fees []*big.Int, _batchNonce *big.Int, _tokenContract common.Address, _batchTimeout *big.Int) (*types.Transaction, error) {
return _Gravity.Contract.SubmitBatch(&_Gravity.TransactOpts, _currentValset, _sigs, _amounts, _destinations, _fees, _batchNonce, _tokenContract, _batchTimeout)
}
// SubmitLogicCall is a paid mutator transaction binding the contract method 0x6941db93.
//
// Solidity: function submitLogicCall((address[],uint256[],uint256,uint256,address) _currentValset, (uint8,bytes32,bytes32)[] _sigs, (uint256[],address[],uint256[],address[],address,bytes,uint256,bytes32,uint256) _args) returns()
func (_Gravity *GravityTransactor) SubmitLogicCall(opts *bind.TransactOpts, _currentValset ValsetArgs, _sigs []ValSignature, _args LogicCallArgs) (*types.Transaction, error) {
return _Gravity.contract.Transact(opts, "submitLogicCall", _currentValset, _sigs, _args)
}
// SubmitLogicCall is a paid mutator transaction binding the contract method 0x6941db93.
//
// Solidity: function submitLogicCall((address[],uint256[],uint256,uint256,address) _currentValset, (uint8,bytes32,bytes32)[] _sigs, (uint256[],address[],uint256[],address[],address,bytes,uint256,bytes32,uint256) _args) returns()
func (_Gravity *GravitySession) SubmitLogicCall(_currentValset ValsetArgs, _sigs []ValSignature, _args LogicCallArgs) (*types.Transaction, error) {
return _Gravity.Contract.SubmitLogicCall(&_Gravity.TransactOpts, _currentValset, _sigs, _args)
}
// SubmitLogicCall is a paid mutator transaction binding the contract method 0x6941db93.
//
// Solidity: function submitLogicCall((address[],uint256[],uint256,uint256,address) _currentValset, (uint8,bytes32,bytes32)[] _sigs, (uint256[],address[],uint256[],address[],address,bytes,uint256,bytes32,uint256) _args) returns()
func (_Gravity *GravityTransactorSession) SubmitLogicCall(_currentValset ValsetArgs, _sigs []ValSignature, _args LogicCallArgs) (*types.Transaction, error) {
return _Gravity.Contract.SubmitLogicCall(&_Gravity.TransactOpts, _currentValset, _sigs, _args)
}
// UpdateValset is a paid mutator transaction binding the contract method 0xaca6b1c1.
//
// Solidity: function updateValset((address[],uint256[],uint256,uint256,address) _newValset, (address[],uint256[],uint256,uint256,address) _currentValset, (uint8,bytes32,bytes32)[] _sigs) returns()
func (_Gravity *GravityTransactor) UpdateValset(opts *bind.TransactOpts, _newValset ValsetArgs, _currentValset ValsetArgs, _sigs []ValSignature) (*types.Transaction, error) {
return _Gravity.contract.Transact(opts, "updateValset", _newValset, _currentValset, _sigs)
}
// UpdateValset is a paid mutator transaction binding the contract method 0xaca6b1c1.
//
// Solidity: function updateValset((address[],uint256[],uint256,uint256,address) _newValset, (address[],uint256[],uint256,uint256,address) _currentValset, (uint8,bytes32,bytes32)[] _sigs) returns()
func (_Gravity *GravitySession) UpdateValset(_newValset ValsetArgs, _currentValset ValsetArgs, _sigs []ValSignature) (*types.Transaction, error) {
return _Gravity.Contract.UpdateValset(&_Gravity.TransactOpts, _newValset, _currentValset, _sigs)
}
// UpdateValset is a paid mutator transaction binding the contract method 0xaca6b1c1.
//
// Solidity: function updateValset((address[],uint256[],uint256,uint256,address) _newValset, (address[],uint256[],uint256,uint256,address) _currentValset, (uint8,bytes32,bytes32)[] _sigs) returns()
func (_Gravity *GravityTransactorSession) UpdateValset(_newValset ValsetArgs, _currentValset ValsetArgs, _sigs []ValSignature) (*types.Transaction, error) {
return _Gravity.Contract.UpdateValset(&_Gravity.TransactOpts, _newValset, _currentValset, _sigs)
}
// GravityERC20DeployedEventIterator is returned from FilterERC20DeployedEvent and is used to iterate over the raw logs and unpacked data for ERC20DeployedEvent events raised by the Gravity contract.
type GravityERC20DeployedEventIterator struct {
Event *GravityERC20DeployedEvent // Event containing the contract specifics and raw log
contract *bind.BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data
logs chan types.Log // Log channel receiving the found contract events
sub ethereum.Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
// Next advances the iterator to the subsequent event, returning whether there
// are any more events found. In case of a retrieval or parsing error, false is
// returned and Error() can be queried for the exact failure.
func (it *GravityERC20DeployedEventIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
}
// If the iterator completed, deliver directly whatever's available
if it.done {
select {
case log := <-it.logs:
it.Event = new(GravityERC20DeployedEvent)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
default:
return false
}
}
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
it.Event = new(GravityERC20DeployedEvent)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
case err := <-it.sub.Err():
it.done = true
it.fail = err
return it.Next()
}
}
// Error returns any retrieval or parsing error occurred during filtering.
func (it *GravityERC20DeployedEventIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *GravityERC20DeployedEventIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
// GravityERC20DeployedEvent represents a ERC20DeployedEvent event raised by the Gravity contract.
type GravityERC20DeployedEvent struct {
CosmosDenom string
TokenContract common.Address
Name string
Symbol string
Decimals uint8
EventNonce *big.Int
Raw types.Log // Blockchain specific contextual infos
}
// FilterERC20DeployedEvent is a free log retrieval operation binding the contract event 0x82fe3a4fa49c6382d0c085746698ddbbafe6c2bf61285b19410644b5b26287c7.
//
// Solidity: event ERC20DeployedEvent(string _cosmosDenom, address indexed _tokenContract, string _name, string _symbol, uint8 _decimals, uint256 _eventNonce)
func (_Gravity *GravityFilterer) FilterERC20DeployedEvent(opts *bind.FilterOpts, _tokenContract []common.Address) (*GravityERC20DeployedEventIterator, error) {
var _tokenContractRule []interface{}
for _, _tokenContractItem := range _tokenContract {
_tokenContractRule = append(_tokenContractRule, _tokenContractItem)
}
logs, sub, err := _Gravity.contract.FilterLogs(opts, "ERC20DeployedEvent", _tokenContractRule)
if err != nil {
return nil, err
}
return &GravityERC20DeployedEventIterator{contract: _Gravity.contract, event: "ERC20DeployedEvent", logs: logs, sub: sub}, nil
}
// WatchERC20DeployedEvent is a free log subscription operation binding the contract event 0x82fe3a4fa49c6382d0c085746698ddbbafe6c2bf61285b19410644b5b26287c7.
//
// Solidity: event ERC20DeployedEvent(string _cosmosDenom, address indexed _tokenContract, string _name, string _symbol, uint8 _decimals, uint256 _eventNonce)
func (_Gravity *GravityFilterer) WatchERC20DeployedEvent(opts *bind.WatchOpts, sink chan<- *GravityERC20DeployedEvent, _tokenContract []common.Address) (event.Subscription, error) {
var _tokenContractRule []interface{}
for _, _tokenContractItem := range _tokenContract {
_tokenContractRule = append(_tokenContractRule, _tokenContractItem)
}
logs, sub, err := _Gravity.contract.WatchLogs(opts, "ERC20DeployedEvent", _tokenContractRule)
if err != nil {
return nil, err
}
return event.NewSubscription(func(quit <-chan struct{}) error {
defer sub.Unsubscribe()
for {
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
event := new(GravityERC20DeployedEvent)
if err := _Gravity.contract.UnpackLog(event, "ERC20DeployedEvent", log); err != nil {
return err
}
event.Raw = log
select {
case sink <- event:
case err := <-sub.Err():
return err
case <-quit:
return nil
}
case err := <-sub.Err():
return err
case <-quit:
return nil
}
}
}), nil
}
// ParseERC20DeployedEvent is a log parse operation binding the contract event 0x82fe3a4fa49c6382d0c085746698ddbbafe6c2bf61285b19410644b5b26287c7.
//
// Solidity: event ERC20DeployedEvent(string _cosmosDenom, address indexed _tokenContract, string _name, string _symbol, uint8 _decimals, uint256 _eventNonce)
func (_Gravity *GravityFilterer) ParseERC20DeployedEvent(log types.Log) (*GravityERC20DeployedEvent, error) {
event := new(GravityERC20DeployedEvent)
if err := _Gravity.contract.UnpackLog(event, "ERC20DeployedEvent", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
// GravityLogicCallEventIterator is returned from FilterLogicCallEvent and is used to iterate over the raw logs and unpacked data for LogicCallEvent events raised by the Gravity contract.
type GravityLogicCallEventIterator struct {
Event *GravityLogicCallEvent // Event containing the contract specifics and raw log
contract *bind.BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data
logs chan types.Log // Log channel receiving the found contract events
sub ethereum.Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
// Next advances the iterator to the subsequent event, returning whether there
// are any more events found. In case of a retrieval or parsing error, false is
// returned and Error() can be queried for the exact failure.
func (it *GravityLogicCallEventIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
}
// If the iterator completed, deliver directly whatever's available
if it.done {
select {
case log := <-it.logs:
it.Event = new(GravityLogicCallEvent)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
default:
return false
}
}
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
it.Event = new(GravityLogicCallEvent)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
case err := <-it.sub.Err():
it.done = true
it.fail = err
return it.Next()
}
}
// Error returns any retrieval or parsing error occurred during filtering.
func (it *GravityLogicCallEventIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *GravityLogicCallEventIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
// GravityLogicCallEvent represents a LogicCallEvent event raised by the Gravity contract.
type GravityLogicCallEvent struct {
InvalidationId [32]byte
InvalidationNonce *big.Int
ReturnData []byte
EventNonce *big.Int
Raw types.Log // Blockchain specific contextual infos
}
// FilterLogicCallEvent is a free log retrieval operation binding the contract event 0x7c2bb24f8e1b3725cb613d7f11ef97d9745cc97a0e40f730621c052d684077a1.
//
// Solidity: event LogicCallEvent(bytes32 _invalidationId, uint256 _invalidationNonce, bytes _returnData, uint256 _eventNonce)
func (_Gravity *GravityFilterer) FilterLogicCallEvent(opts *bind.FilterOpts) (*GravityLogicCallEventIterator, error) {
logs, sub, err := _Gravity.contract.FilterLogs(opts, "LogicCallEvent")
if err != nil {
return nil, err
}
return &GravityLogicCallEventIterator{contract: _Gravity.contract, event: "LogicCallEvent", logs: logs, sub: sub}, nil
}
// WatchLogicCallEvent is a free log subscription operation binding the contract event 0x7c2bb24f8e1b3725cb613d7f11ef97d9745cc97a0e40f730621c052d684077a1.
//
// Solidity: event LogicCallEvent(bytes32 _invalidationId, uint256 _invalidationNonce, bytes _returnData, uint256 _eventNonce)
func (_Gravity *GravityFilterer) WatchLogicCallEvent(opts *bind.WatchOpts, sink chan<- *GravityLogicCallEvent) (event.Subscription, error) {
logs, sub, err := _Gravity.contract.WatchLogs(opts, "LogicCallEvent")
if err != nil {
return nil, err
}
return event.NewSubscription(func(quit <-chan struct{}) error {
defer sub.Unsubscribe()
for {
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
event := new(GravityLogicCallEvent)
if err := _Gravity.contract.UnpackLog(event, "LogicCallEvent", log); err != nil {
return err
}
event.Raw = log
select {
case sink <- event:
case err := <-sub.Err():
return err
case <-quit:
return nil
}
case err := <-sub.Err():
return err
case <-quit:
return nil
}
}
}), nil
}
// ParseLogicCallEvent is a log parse operation binding the contract event 0x7c2bb24f8e1b3725cb613d7f11ef97d9745cc97a0e40f730621c052d684077a1.
//
// Solidity: event LogicCallEvent(bytes32 _invalidationId, uint256 _invalidationNonce, bytes _returnData, uint256 _eventNonce)
func (_Gravity *GravityFilterer) ParseLogicCallEvent(log types.Log) (*GravityLogicCallEvent, error) {
event := new(GravityLogicCallEvent)
if err := _Gravity.contract.UnpackLog(event, "LogicCallEvent", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
// GravitySendToCosmosEventIterator is returned from FilterSendToCosmosEvent and is used to iterate over the raw logs and unpacked data for SendToCosmosEvent events raised by the Gravity contract.
type GravitySendToCosmosEventIterator struct {
Event *GravitySendToCosmosEvent // Event containing the contract specifics and raw log
contract *bind.BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data
logs chan types.Log // Log channel receiving the found contract events
sub ethereum.Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
// Next advances the iterator to the subsequent event, returning whether there
// are any more events found. In case of a retrieval or parsing error, false is
// returned and Error() can be queried for the exact failure.
func (it *GravitySendToCosmosEventIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
}
// If the iterator completed, deliver directly whatever's available
if it.done {
select {
case log := <-it.logs:
it.Event = new(GravitySendToCosmosEvent)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
default:
return false
}
}
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
it.Event = new(GravitySendToCosmosEvent)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
case err := <-it.sub.Err():
it.done = true
it.fail = err
return it.Next()
}
}
// Error returns any retrieval or parsing error occurred during filtering.
func (it *GravitySendToCosmosEventIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.