/
validator.go
3046 lines (2614 loc) · 125 KB
/
validator.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 validator
import (
"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 (
_ = big.NewInt
_ = strings.NewReader
_ = ethereum.NotFound
_ = bind.Bind
_ = common.Big1
_ = types.BloomLookup
_ = event.NewSubscription
)
// ContractsABI is the input ABI used to generate the binding from.
const ContractsABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"val\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"time\",\"type\":\"uint256\"}],\"name\":\"LogAddToTopValidators\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"val\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fee\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"time\",\"type\":\"uint256\"}],\"name\":\"LogCreateValidator\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"coinbase\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"blockReward\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"time\",\"type\":\"uint256\"}],\"name\":\"LogDistributeBlockReward\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"val\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fee\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"time\",\"type\":\"uint256\"}],\"name\":\"LogEditValidator\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"val\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"time\",\"type\":\"uint256\"}],\"name\":\"LogReactive\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"val\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"time\",\"type\":\"uint256\"}],\"name\":\"LogRemoveFromTopValidators\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"val\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amt\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"time\",\"type\":\"uint256\"}],\"name\":\"LogRemoveValidator\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"val\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amt\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"time\",\"type\":\"uint256\"}],\"name\":\"LogRemoveValidatorIncoming\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"val\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"staking\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"time\",\"type\":\"uint256\"}],\"name\":\"LogStake\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"val\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"time\",\"type\":\"uint256\"}],\"name\":\"LogUnStake\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"newSet\",\"type\":\"address[]\"}],\"name\":\"LogUpdateValidator\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"val\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fee\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amt\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"time\",\"type\":\"uint256\"}],\"name\":\"LogWithdrawProfits\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"val\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"time\",\"type\":\"uint256\"}],\"name\":\"LogWithdrawStaking\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"FeeRecoder\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MaxValidators\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MinimalStakingCoin\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ProposalContractAddr\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PunishContractAddr\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"StakingLockPeriod\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ValidatorContractAddr\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WithdrawProfitPeriod\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"feeAddr\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"moniker\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"identity\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"website\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"email\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"details\",\"type\":\"string\"}],\"name\":\"createOrEditValidator\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"currentValidatorSet\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"distributeBlockReward\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getActiveValidators\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"val\",\"type\":\"address\"}],\"name\":\"getStakingInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTopValidators\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalStakeOfActiveValidators\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"total\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"len\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"val\",\"type\":\"address\"}],\"name\":\"getValidatorDescription\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"val\",\"type\":\"address\"}],\"name\":\"getValidatorInfo\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"enumValidators.Status\",\"name\":\"\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"highestValidatorsSet\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"vals\",\"type\":\"address[]\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"isActiveValidator\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"isTopValidator\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"val\",\"type\":\"address\"}],\"name\":\"removeValidator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"val\",\"type\":\"address\"}],\"name\":\"removeValidatorIncoming\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"validator\",\"type\":\"address\"}],\"name\":\"stake\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalJailed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalStake\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"validator\",\"type\":\"address\"}],\"name\":\"tryReactive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"validator\",\"type\":\"address\"}],\"name\":\"unStake\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"name\":\"updateActiveValidatorSet\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"moniker\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"identity\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"website\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"email\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"details\",\"type\":\"string\"}],\"name\":\"validateDescription\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"validator\",\"type\":\"address\"}],\"name\":\"withdrawProfits\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"validator\",\"type\":\"address\"}],\"name\":\"withdrawStaking\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]"
// Contracts is an auto generated Go binding around an Ethereum contract.
type Contracts struct {
ContractsCaller // Read-only binding to the contract
ContractsTransactor // Write-only binding to the contract
ContractsFilterer // Log filterer for contract events
}
// ContractsCaller is an auto generated read-only Go binding around an Ethereum contract.
type ContractsCaller struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// ContractsTransactor is an auto generated write-only Go binding around an Ethereum contract.
type ContractsTransactor struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// ContractsFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
type ContractsFilterer struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// ContractsSession is an auto generated Go binding around an Ethereum contract,
// with pre-set call and transact options.
type ContractsSession struct {
Contract *Contracts // 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
}
// ContractsCallerSession is an auto generated read-only Go binding around an Ethereum contract,
// with pre-set call options.
type ContractsCallerSession struct {
Contract *ContractsCaller // Generic contract caller binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
}
// ContractsTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
// with pre-set transact options.
type ContractsTransactorSession struct {
Contract *ContractsTransactor // Generic contract transactor binding to set the session for
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
// ContractsRaw is an auto generated low-level Go binding around an Ethereum contract.
type ContractsRaw struct {
Contract *Contracts // Generic contract binding to access the raw methods on
}
// ContractsCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
type ContractsCallerRaw struct {
Contract *ContractsCaller // Generic read-only contract binding to access the raw methods on
}
// ContractsTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
type ContractsTransactorRaw struct {
Contract *ContractsTransactor // Generic write-only contract binding to access the raw methods on
}
// NewContracts creates a new instance of Contracts, bound to a specific deployed contract.
func NewContracts(address common.Address, backend bind.ContractBackend) (*Contracts, error) {
contract, err := bindContracts(address, backend, backend, backend)
if err != nil {
return nil, err
}
return &Contracts{ContractsCaller: ContractsCaller{contract: contract}, ContractsTransactor: ContractsTransactor{contract: contract}, ContractsFilterer: ContractsFilterer{contract: contract}}, nil
}
// NewContractsCaller creates a new read-only instance of Contracts, bound to a specific deployed contract.
func NewContractsCaller(address common.Address, caller bind.ContractCaller) (*ContractsCaller, error) {
contract, err := bindContracts(address, caller, nil, nil)
if err != nil {
return nil, err
}
return &ContractsCaller{contract: contract}, nil
}
// NewContractsTransactor creates a new write-only instance of Contracts, bound to a specific deployed contract.
func NewContractsTransactor(address common.Address, transactor bind.ContractTransactor) (*ContractsTransactor, error) {
contract, err := bindContracts(address, nil, transactor, nil)
if err != nil {
return nil, err
}
return &ContractsTransactor{contract: contract}, nil
}
// NewContractsFilterer creates a new log filterer instance of Contracts, bound to a specific deployed contract.
func NewContractsFilterer(address common.Address, filterer bind.ContractFilterer) (*ContractsFilterer, error) {
contract, err := bindContracts(address, nil, nil, filterer)
if err != nil {
return nil, err
}
return &ContractsFilterer{contract: contract}, nil
}
// bindContracts binds a generic wrapper to an already deployed contract.
func bindContracts(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
parsed, err := abi.JSON(strings.NewReader(ContractsABI))
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 (_Contracts *ContractsRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _Contracts.Contract.ContractsCaller.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 (_Contracts *ContractsRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _Contracts.Contract.ContractsTransactor.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_Contracts *ContractsRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _Contracts.Contract.ContractsTransactor.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 (_Contracts *ContractsCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _Contracts.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 (_Contracts *ContractsTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _Contracts.Contract.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_Contracts *ContractsTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _Contracts.Contract.contract.Transact(opts, method, params...)
}
// FeeRecoder is a free data retrieval call binding the contract method 0xabfcb13f.
//
// Solidity: function FeeRecoder() view returns(address)
func (_Contracts *ContractsCaller) FeeRecoder(opts *bind.CallOpts) (common.Address, error) {
var out []interface{}
err := _Contracts.contract.Call(opts, &out, "FeeRecoder")
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// FeeRecoder is a free data retrieval call binding the contract method 0xabfcb13f.
//
// Solidity: function FeeRecoder() view returns(address)
func (_Contracts *ContractsSession) FeeRecoder() (common.Address, error) {
return _Contracts.Contract.FeeRecoder(&_Contracts.CallOpts)
}
// FeeRecoder is a free data retrieval call binding the contract method 0xabfcb13f.
//
// Solidity: function FeeRecoder() view returns(address)
func (_Contracts *ContractsCallerSession) FeeRecoder() (common.Address, error) {
return _Contracts.Contract.FeeRecoder(&_Contracts.CallOpts)
}
// MaxValidators is a free data retrieval call binding the contract method 0xc967f90f.
//
// Solidity: function MaxValidators() view returns(uint16)
func (_Contracts *ContractsCaller) MaxValidators(opts *bind.CallOpts) (uint16, error) {
var out []interface{}
err := _Contracts.contract.Call(opts, &out, "MaxValidators")
if err != nil {
return *new(uint16), err
}
out0 := *abi.ConvertType(out[0], new(uint16)).(*uint16)
return out0, err
}
// MaxValidators is a free data retrieval call binding the contract method 0xc967f90f.
//
// Solidity: function MaxValidators() view returns(uint16)
func (_Contracts *ContractsSession) MaxValidators() (uint16, error) {
return _Contracts.Contract.MaxValidators(&_Contracts.CallOpts)
}
// MaxValidators is a free data retrieval call binding the contract method 0xc967f90f.
//
// Solidity: function MaxValidators() view returns(uint16)
func (_Contracts *ContractsCallerSession) MaxValidators() (uint16, error) {
return _Contracts.Contract.MaxValidators(&_Contracts.CallOpts)
}
// MinimalStakingCoin is a free data retrieval call binding the contract method 0xbe645692.
//
// Solidity: function MinimalStakingCoin() view returns(uint256)
func (_Contracts *ContractsCaller) MinimalStakingCoin(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _Contracts.contract.Call(opts, &out, "MinimalStakingCoin")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// MinimalStakingCoin is a free data retrieval call binding the contract method 0xbe645692.
//
// Solidity: function MinimalStakingCoin() view returns(uint256)
func (_Contracts *ContractsSession) MinimalStakingCoin() (*big.Int, error) {
return _Contracts.Contract.MinimalStakingCoin(&_Contracts.CallOpts)
}
// MinimalStakingCoin is a free data retrieval call binding the contract method 0xbe645692.
//
// Solidity: function MinimalStakingCoin() view returns(uint256)
func (_Contracts *ContractsCallerSession) MinimalStakingCoin() (*big.Int, error) {
return _Contracts.Contract.MinimalStakingCoin(&_Contracts.CallOpts)
}
// ProposalContractAddr is a free data retrieval call binding the contract method 0x60ae528c.
//
// Solidity: function ProposalContractAddr() view returns(address)
func (_Contracts *ContractsCaller) ProposalContractAddr(opts *bind.CallOpts) (common.Address, error) {
var out []interface{}
err := _Contracts.contract.Call(opts, &out, "ProposalContractAddr")
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// ProposalContractAddr is a free data retrieval call binding the contract method 0x60ae528c.
//
// Solidity: function ProposalContractAddr() view returns(address)
func (_Contracts *ContractsSession) ProposalContractAddr() (common.Address, error) {
return _Contracts.Contract.ProposalContractAddr(&_Contracts.CallOpts)
}
// ProposalContractAddr is a free data retrieval call binding the contract method 0x60ae528c.
//
// Solidity: function ProposalContractAddr() view returns(address)
func (_Contracts *ContractsCallerSession) ProposalContractAddr() (common.Address, error) {
return _Contracts.Contract.ProposalContractAddr(&_Contracts.CallOpts)
}
// PunishContractAddr is a free data retrieval call binding the contract method 0x1b5e358c.
//
// Solidity: function PunishContractAddr() view returns(address)
func (_Contracts *ContractsCaller) PunishContractAddr(opts *bind.CallOpts) (common.Address, error) {
var out []interface{}
err := _Contracts.contract.Call(opts, &out, "PunishContractAddr")
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// PunishContractAddr is a free data retrieval call binding the contract method 0x1b5e358c.
//
// Solidity: function PunishContractAddr() view returns(address)
func (_Contracts *ContractsSession) PunishContractAddr() (common.Address, error) {
return _Contracts.Contract.PunishContractAddr(&_Contracts.CallOpts)
}
// PunishContractAddr is a free data retrieval call binding the contract method 0x1b5e358c.
//
// Solidity: function PunishContractAddr() view returns(address)
func (_Contracts *ContractsCallerSession) PunishContractAddr() (common.Address, error) {
return _Contracts.Contract.PunishContractAddr(&_Contracts.CallOpts)
}
// StakingLockPeriod is a free data retrieval call binding the contract method 0xdb78dd28.
//
// Solidity: function StakingLockPeriod() view returns(uint64)
func (_Contracts *ContractsCaller) StakingLockPeriod(opts *bind.CallOpts) (uint64, error) {
var out []interface{}
err := _Contracts.contract.Call(opts, &out, "StakingLockPeriod")
if err != nil {
return *new(uint64), err
}
out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64)
return out0, err
}
// StakingLockPeriod is a free data retrieval call binding the contract method 0xdb78dd28.
//
// Solidity: function StakingLockPeriod() view returns(uint64)
func (_Contracts *ContractsSession) StakingLockPeriod() (uint64, error) {
return _Contracts.Contract.StakingLockPeriod(&_Contracts.CallOpts)
}
// StakingLockPeriod is a free data retrieval call binding the contract method 0xdb78dd28.
//
// Solidity: function StakingLockPeriod() view returns(uint64)
func (_Contracts *ContractsCallerSession) StakingLockPeriod() (uint64, error) {
return _Contracts.Contract.StakingLockPeriod(&_Contracts.CallOpts)
}
// ValidatorContractAddr is a free data retrieval call binding the contract method 0x3a061bd3.
//
// Solidity: function ValidatorContractAddr() view returns(address)
func (_Contracts *ContractsCaller) ValidatorContractAddr(opts *bind.CallOpts) (common.Address, error) {
var out []interface{}
err := _Contracts.contract.Call(opts, &out, "ValidatorContractAddr")
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// ValidatorContractAddr is a free data retrieval call binding the contract method 0x3a061bd3.
//
// Solidity: function ValidatorContractAddr() view returns(address)
func (_Contracts *ContractsSession) ValidatorContractAddr() (common.Address, error) {
return _Contracts.Contract.ValidatorContractAddr(&_Contracts.CallOpts)
}
// ValidatorContractAddr is a free data retrieval call binding the contract method 0x3a061bd3.
//
// Solidity: function ValidatorContractAddr() view returns(address)
func (_Contracts *ContractsCallerSession) ValidatorContractAddr() (common.Address, error) {
return _Contracts.Contract.ValidatorContractAddr(&_Contracts.CallOpts)
}
// WithdrawProfitPeriod is a free data retrieval call binding the contract method 0xefd8d8e2.
//
// Solidity: function WithdrawProfitPeriod() view returns(uint64)
func (_Contracts *ContractsCaller) WithdrawProfitPeriod(opts *bind.CallOpts) (uint64, error) {
var out []interface{}
err := _Contracts.contract.Call(opts, &out, "WithdrawProfitPeriod")
if err != nil {
return *new(uint64), err
}
out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64)
return out0, err
}
// WithdrawProfitPeriod is a free data retrieval call binding the contract method 0xefd8d8e2.
//
// Solidity: function WithdrawProfitPeriod() view returns(uint64)
func (_Contracts *ContractsSession) WithdrawProfitPeriod() (uint64, error) {
return _Contracts.Contract.WithdrawProfitPeriod(&_Contracts.CallOpts)
}
// WithdrawProfitPeriod is a free data retrieval call binding the contract method 0xefd8d8e2.
//
// Solidity: function WithdrawProfitPeriod() view returns(uint64)
func (_Contracts *ContractsCallerSession) WithdrawProfitPeriod() (uint64, error) {
return _Contracts.Contract.WithdrawProfitPeriod(&_Contracts.CallOpts)
}
// CurrentValidatorSet is a free data retrieval call binding the contract method 0x6969a25c.
//
// Solidity: function currentValidatorSet(uint256 ) view returns(address)
func (_Contracts *ContractsCaller) CurrentValidatorSet(opts *bind.CallOpts, arg0 *big.Int) (common.Address, error) {
var out []interface{}
err := _Contracts.contract.Call(opts, &out, "currentValidatorSet", arg0)
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// CurrentValidatorSet is a free data retrieval call binding the contract method 0x6969a25c.
//
// Solidity: function currentValidatorSet(uint256 ) view returns(address)
func (_Contracts *ContractsSession) CurrentValidatorSet(arg0 *big.Int) (common.Address, error) {
return _Contracts.Contract.CurrentValidatorSet(&_Contracts.CallOpts, arg0)
}
// CurrentValidatorSet is a free data retrieval call binding the contract method 0x6969a25c.
//
// Solidity: function currentValidatorSet(uint256 ) view returns(address)
func (_Contracts *ContractsCallerSession) CurrentValidatorSet(arg0 *big.Int) (common.Address, error) {
return _Contracts.Contract.CurrentValidatorSet(&_Contracts.CallOpts, arg0)
}
// GetActiveValidators is a free data retrieval call binding the contract method 0x9de70258.
//
// Solidity: function getActiveValidators() view returns(address[])
func (_Contracts *ContractsCaller) GetActiveValidators(opts *bind.CallOpts) ([]common.Address, error) {
var out []interface{}
err := _Contracts.contract.Call(opts, &out, "getActiveValidators")
if err != nil {
return *new([]common.Address), err
}
out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address)
return out0, err
}
// GetActiveValidators is a free data retrieval call binding the contract method 0x9de70258.
//
// Solidity: function getActiveValidators() view returns(address[])
func (_Contracts *ContractsSession) GetActiveValidators() ([]common.Address, error) {
return _Contracts.Contract.GetActiveValidators(&_Contracts.CallOpts)
}
// GetActiveValidators is a free data retrieval call binding the contract method 0x9de70258.
//
// Solidity: function getActiveValidators() view returns(address[])
func (_Contracts *ContractsCallerSession) GetActiveValidators() ([]common.Address, error) {
return _Contracts.Contract.GetActiveValidators(&_Contracts.CallOpts)
}
// GetStakingInfo is a free data retrieval call binding the contract method 0x7f4f95fa.
//
// Solidity: function getStakingInfo(address staker, address val) view returns(uint256, uint256, uint256)
func (_Contracts *ContractsCaller) GetStakingInfo(opts *bind.CallOpts, staker common.Address, val common.Address) (*big.Int, *big.Int, *big.Int, error) {
var out []interface{}
err := _Contracts.contract.Call(opts, &out, "getStakingInfo", staker, val)
if err != nil {
return *new(*big.Int), *new(*big.Int), *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
out1 := *abi.ConvertType(out[1], new(*big.Int)).(**big.Int)
out2 := *abi.ConvertType(out[2], new(*big.Int)).(**big.Int)
return out0, out1, out2, err
}
// GetStakingInfo is a free data retrieval call binding the contract method 0x7f4f95fa.
//
// Solidity: function getStakingInfo(address staker, address val) view returns(uint256, uint256, uint256)
func (_Contracts *ContractsSession) GetStakingInfo(staker common.Address, val common.Address) (*big.Int, *big.Int, *big.Int, error) {
return _Contracts.Contract.GetStakingInfo(&_Contracts.CallOpts, staker, val)
}
// GetStakingInfo is a free data retrieval call binding the contract method 0x7f4f95fa.
//
// Solidity: function getStakingInfo(address staker, address val) view returns(uint256, uint256, uint256)
func (_Contracts *ContractsCallerSession) GetStakingInfo(staker common.Address, val common.Address) (*big.Int, *big.Int, *big.Int, error) {
return _Contracts.Contract.GetStakingInfo(&_Contracts.CallOpts, staker, val)
}
// GetTopValidators is a free data retrieval call binding the contract method 0xafeea115.
//
// Solidity: function getTopValidators() view returns(address[])
func (_Contracts *ContractsCaller) GetTopValidators(opts *bind.CallOpts) ([]common.Address, error) {
var out []interface{}
err := _Contracts.contract.Call(opts, &out, "getTopValidators")
if err != nil {
return *new([]common.Address), err
}
out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address)
return out0, err
}
// GetTopValidators is a free data retrieval call binding the contract method 0xafeea115.
//
// Solidity: function getTopValidators() view returns(address[])
func (_Contracts *ContractsSession) GetTopValidators() ([]common.Address, error) {
return _Contracts.Contract.GetTopValidators(&_Contracts.CallOpts)
}
// GetTopValidators is a free data retrieval call binding the contract method 0xafeea115.
//
// Solidity: function getTopValidators() view returns(address[])
func (_Contracts *ContractsCallerSession) GetTopValidators() ([]common.Address, error) {
return _Contracts.Contract.GetTopValidators(&_Contracts.CallOpts)
}
// GetTotalStakeOfActiveValidators is a free data retrieval call binding the contract method 0xc253c384.
//
// Solidity: function getTotalStakeOfActiveValidators() view returns(uint256 total, uint256 len)
func (_Contracts *ContractsCaller) GetTotalStakeOfActiveValidators(opts *bind.CallOpts) (struct {
Total *big.Int
Len *big.Int
}, error) {
var out []interface{}
err := _Contracts.contract.Call(opts, &out, "getTotalStakeOfActiveValidators")
outstruct := new(struct {
Total *big.Int
Len *big.Int
})
if err != nil {
return *outstruct, err
}
outstruct.Total = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
outstruct.Len = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int)
return *outstruct, err
}
// GetTotalStakeOfActiveValidators is a free data retrieval call binding the contract method 0xc253c384.
//
// Solidity: function getTotalStakeOfActiveValidators() view returns(uint256 total, uint256 len)
func (_Contracts *ContractsSession) GetTotalStakeOfActiveValidators() (struct {
Total *big.Int
Len *big.Int
}, error) {
return _Contracts.Contract.GetTotalStakeOfActiveValidators(&_Contracts.CallOpts)
}
// GetTotalStakeOfActiveValidators is a free data retrieval call binding the contract method 0xc253c384.
//
// Solidity: function getTotalStakeOfActiveValidators() view returns(uint256 total, uint256 len)
func (_Contracts *ContractsCallerSession) GetTotalStakeOfActiveValidators() (struct {
Total *big.Int
Len *big.Int
}, error) {
return _Contracts.Contract.GetTotalStakeOfActiveValidators(&_Contracts.CallOpts)
}
// GetValidatorDescription is a free data retrieval call binding the contract method 0xa43569b3.
//
// Solidity: function getValidatorDescription(address val) view returns(string, string, string, string, string)
func (_Contracts *ContractsCaller) GetValidatorDescription(opts *bind.CallOpts, val common.Address) (string, string, string, string, string, error) {
var out []interface{}
err := _Contracts.contract.Call(opts, &out, "getValidatorDescription", val)
if err != nil {
return *new(string), *new(string), *new(string), *new(string), *new(string), err
}
out0 := *abi.ConvertType(out[0], new(string)).(*string)
out1 := *abi.ConvertType(out[1], new(string)).(*string)
out2 := *abi.ConvertType(out[2], new(string)).(*string)
out3 := *abi.ConvertType(out[3], new(string)).(*string)
out4 := *abi.ConvertType(out[4], new(string)).(*string)
return out0, out1, out2, out3, out4, err
}
// GetValidatorDescription is a free data retrieval call binding the contract method 0xa43569b3.
//
// Solidity: function getValidatorDescription(address val) view returns(string, string, string, string, string)
func (_Contracts *ContractsSession) GetValidatorDescription(val common.Address) (string, string, string, string, string, error) {
return _Contracts.Contract.GetValidatorDescription(&_Contracts.CallOpts, val)
}
// GetValidatorDescription is a free data retrieval call binding the contract method 0xa43569b3.
//
// Solidity: function getValidatorDescription(address val) view returns(string, string, string, string, string)
func (_Contracts *ContractsCallerSession) GetValidatorDescription(val common.Address) (string, string, string, string, string, error) {
return _Contracts.Contract.GetValidatorDescription(&_Contracts.CallOpts, val)
}
// GetValidatorInfo is a free data retrieval call binding the contract method 0x8a11d7c9.
//
// Solidity: function getValidatorInfo(address val) view returns(address, uint8, uint256, uint256, uint256, uint256, address[])
func (_Contracts *ContractsCaller) GetValidatorInfo(opts *bind.CallOpts, val common.Address) (common.Address, uint8, *big.Int, *big.Int, *big.Int, *big.Int, []common.Address, error) {
var out []interface{}
err := _Contracts.contract.Call(opts, &out, "getValidatorInfo", val)
if err != nil {
return *new(common.Address), *new(uint8), *new(*big.Int), *new(*big.Int), *new(*big.Int), *new(*big.Int), *new([]common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
out1 := *abi.ConvertType(out[1], new(uint8)).(*uint8)
out2 := *abi.ConvertType(out[2], new(*big.Int)).(**big.Int)
out3 := *abi.ConvertType(out[3], new(*big.Int)).(**big.Int)
out4 := *abi.ConvertType(out[4], new(*big.Int)).(**big.Int)
out5 := *abi.ConvertType(out[5], new(*big.Int)).(**big.Int)
out6 := *abi.ConvertType(out[6], new([]common.Address)).(*[]common.Address)
return out0, out1, out2, out3, out4, out5, out6, err
}
// GetValidatorInfo is a free data retrieval call binding the contract method 0x8a11d7c9.
//
// Solidity: function getValidatorInfo(address val) view returns(address, uint8, uint256, uint256, uint256, uint256, address[])
func (_Contracts *ContractsSession) GetValidatorInfo(val common.Address) (common.Address, uint8, *big.Int, *big.Int, *big.Int, *big.Int, []common.Address, error) {
return _Contracts.Contract.GetValidatorInfo(&_Contracts.CallOpts, val)
}
// GetValidatorInfo is a free data retrieval call binding the contract method 0x8a11d7c9.
//
// Solidity: function getValidatorInfo(address val) view returns(address, uint8, uint256, uint256, uint256, uint256, address[])
func (_Contracts *ContractsCallerSession) GetValidatorInfo(val common.Address) (common.Address, uint8, *big.Int, *big.Int, *big.Int, *big.Int, []common.Address, error) {
return _Contracts.Contract.GetValidatorInfo(&_Contracts.CallOpts, val)
}
// HighestValidatorsSet is a free data retrieval call binding the contract method 0x4b3d500b.
//
// Solidity: function highestValidatorsSet(uint256 ) view returns(address)
func (_Contracts *ContractsCaller) HighestValidatorsSet(opts *bind.CallOpts, arg0 *big.Int) (common.Address, error) {
var out []interface{}
err := _Contracts.contract.Call(opts, &out, "highestValidatorsSet", arg0)
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// HighestValidatorsSet is a free data retrieval call binding the contract method 0x4b3d500b.
//
// Solidity: function highestValidatorsSet(uint256 ) view returns(address)
func (_Contracts *ContractsSession) HighestValidatorsSet(arg0 *big.Int) (common.Address, error) {
return _Contracts.Contract.HighestValidatorsSet(&_Contracts.CallOpts, arg0)
}
// HighestValidatorsSet is a free data retrieval call binding the contract method 0x4b3d500b.
//
// Solidity: function highestValidatorsSet(uint256 ) view returns(address)
func (_Contracts *ContractsCallerSession) HighestValidatorsSet(arg0 *big.Int) (common.Address, error) {
return _Contracts.Contract.HighestValidatorsSet(&_Contracts.CallOpts, arg0)
}
// Initialized is a free data retrieval call binding the contract method 0x158ef93e.
//
// Solidity: function initialized() view returns(bool)
func (_Contracts *ContractsCaller) Initialized(opts *bind.CallOpts) (bool, error) {
var out []interface{}
err := _Contracts.contract.Call(opts, &out, "initialized")
if err != nil {
return *new(bool), err
}
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
return out0, err
}
// Initialized is a free data retrieval call binding the contract method 0x158ef93e.
//
// Solidity: function initialized() view returns(bool)
func (_Contracts *ContractsSession) Initialized() (bool, error) {
return _Contracts.Contract.Initialized(&_Contracts.CallOpts)
}
// Initialized is a free data retrieval call binding the contract method 0x158ef93e.
//
// Solidity: function initialized() view returns(bool)
func (_Contracts *ContractsCallerSession) Initialized() (bool, error) {
return _Contracts.Contract.Initialized(&_Contracts.CallOpts)
}
// IsActiveValidator is a free data retrieval call binding the contract method 0x40550a1c.
//
// Solidity: function isActiveValidator(address who) view returns(bool)
func (_Contracts *ContractsCaller) IsActiveValidator(opts *bind.CallOpts, who common.Address) (bool, error) {
var out []interface{}
err := _Contracts.contract.Call(opts, &out, "isActiveValidator", who)
if err != nil {
return *new(bool), err
}
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
return out0, err
}
// IsActiveValidator is a free data retrieval call binding the contract method 0x40550a1c.
//
// Solidity: function isActiveValidator(address who) view returns(bool)
func (_Contracts *ContractsSession) IsActiveValidator(who common.Address) (bool, error) {
return _Contracts.Contract.IsActiveValidator(&_Contracts.CallOpts, who)
}
// IsActiveValidator is a free data retrieval call binding the contract method 0x40550a1c.
//
// Solidity: function isActiveValidator(address who) view returns(bool)
func (_Contracts *ContractsCallerSession) IsActiveValidator(who common.Address) (bool, error) {
return _Contracts.Contract.IsActiveValidator(&_Contracts.CallOpts, who)
}
// IsTopValidator is a free data retrieval call binding the contract method 0x98e3b626.
//
// Solidity: function isTopValidator(address who) view returns(bool)
func (_Contracts *ContractsCaller) IsTopValidator(opts *bind.CallOpts, who common.Address) (bool, error) {
var out []interface{}
err := _Contracts.contract.Call(opts, &out, "isTopValidator", who)
if err != nil {
return *new(bool), err
}
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
return out0, err
}
// IsTopValidator is a free data retrieval call binding the contract method 0x98e3b626.
//
// Solidity: function isTopValidator(address who) view returns(bool)
func (_Contracts *ContractsSession) IsTopValidator(who common.Address) (bool, error) {
return _Contracts.Contract.IsTopValidator(&_Contracts.CallOpts, who)
}
// IsTopValidator is a free data retrieval call binding the contract method 0x98e3b626.
//
// Solidity: function isTopValidator(address who) view returns(bool)
func (_Contracts *ContractsCallerSession) IsTopValidator(who common.Address) (bool, error) {
return _Contracts.Contract.IsTopValidator(&_Contracts.CallOpts, who)
}
// TotalJailed is a free data retrieval call binding the contract method 0x534dacd6.
//
// Solidity: function totalJailed() view returns(uint256)
func (_Contracts *ContractsCaller) TotalJailed(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _Contracts.contract.Call(opts, &out, "totalJailed")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// TotalJailed is a free data retrieval call binding the contract method 0x534dacd6.
//
// Solidity: function totalJailed() view returns(uint256)
func (_Contracts *ContractsSession) TotalJailed() (*big.Int, error) {
return _Contracts.Contract.TotalJailed(&_Contracts.CallOpts)
}
// TotalJailed is a free data retrieval call binding the contract method 0x534dacd6.
//
// Solidity: function totalJailed() view returns(uint256)
func (_Contracts *ContractsCallerSession) TotalJailed() (*big.Int, error) {
return _Contracts.Contract.TotalJailed(&_Contracts.CallOpts)
}
// TotalStake is a free data retrieval call binding the contract method 0x8b0e9f3f.
//
// Solidity: function totalStake() view returns(uint256)
func (_Contracts *ContractsCaller) TotalStake(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _Contracts.contract.Call(opts, &out, "totalStake")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// TotalStake is a free data retrieval call binding the contract method 0x8b0e9f3f.
//
// Solidity: function totalStake() view returns(uint256)
func (_Contracts *ContractsSession) TotalStake() (*big.Int, error) {
return _Contracts.Contract.TotalStake(&_Contracts.CallOpts)
}
// TotalStake is a free data retrieval call binding the contract method 0x8b0e9f3f.
//
// Solidity: function totalStake() view returns(uint256)
func (_Contracts *ContractsCallerSession) TotalStake() (*big.Int, error) {
return _Contracts.Contract.TotalStake(&_Contracts.CallOpts)
}
// ValidateDescription is a free data retrieval call binding the contract method 0xb6c88519.
//
// Solidity: function validateDescription(string moniker, string identity, string website, string email, string details) pure returns(bool)
func (_Contracts *ContractsCaller) ValidateDescription(opts *bind.CallOpts, moniker string, identity string, website string, email string, details string) (bool, error) {
var out []interface{}
err := _Contracts.contract.Call(opts, &out, "validateDescription", moniker, identity, website, email, details)
if err != nil {
return *new(bool), err
}
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
return out0, err
}
// ValidateDescription is a free data retrieval call binding the contract method 0xb6c88519.
//
// Solidity: function validateDescription(string moniker, string identity, string website, string email, string details) pure returns(bool)
func (_Contracts *ContractsSession) ValidateDescription(moniker string, identity string, website string, email string, details string) (bool, error) {
return _Contracts.Contract.ValidateDescription(&_Contracts.CallOpts, moniker, identity, website, email, details)
}
// ValidateDescription is a free data retrieval call binding the contract method 0xb6c88519.
//
// Solidity: function validateDescription(string moniker, string identity, string website, string email, string details) pure returns(bool)
func (_Contracts *ContractsCallerSession) ValidateDescription(moniker string, identity string, website string, email string, details string) (bool, error) {
return _Contracts.Contract.ValidateDescription(&_Contracts.CallOpts, moniker, identity, website, email, details)
}
// CreateOrEditValidator is a paid mutator transaction binding the contract method 0xa406fcb7.
//
// Solidity: function createOrEditValidator(address feeAddr, string moniker, string identity, string website, string email, string details) returns(bool)
func (_Contracts *ContractsTransactor) CreateOrEditValidator(opts *bind.TransactOpts, feeAddr common.Address, moniker string, identity string, website string, email string, details string) (*types.Transaction, error) {
return _Contracts.contract.Transact(opts, "createOrEditValidator", feeAddr, moniker, identity, website, email, details)
}
// CreateOrEditValidator is a paid mutator transaction binding the contract method 0xa406fcb7.
//
// Solidity: function createOrEditValidator(address feeAddr, string moniker, string identity, string website, string email, string details) returns(bool)
func (_Contracts *ContractsSession) CreateOrEditValidator(feeAddr common.Address, moniker string, identity string, website string, email string, details string) (*types.Transaction, error) {
return _Contracts.Contract.CreateOrEditValidator(&_Contracts.TransactOpts, feeAddr, moniker, identity, website, email, details)
}
// CreateOrEditValidator is a paid mutator transaction binding the contract method 0xa406fcb7.
//
// Solidity: function createOrEditValidator(address feeAddr, string moniker, string identity, string website, string email, string details) returns(bool)
func (_Contracts *ContractsTransactorSession) CreateOrEditValidator(feeAddr common.Address, moniker string, identity string, website string, email string, details string) (*types.Transaction, error) {
return _Contracts.Contract.CreateOrEditValidator(&_Contracts.TransactOpts, feeAddr, moniker, identity, website, email, details)
}
// DistributeBlockReward is a paid mutator transaction binding the contract method 0xd6c0edad.
//
// Solidity: function distributeBlockReward() payable returns()
func (_Contracts *ContractsTransactor) DistributeBlockReward(opts *bind.TransactOpts) (*types.Transaction, error) {
return _Contracts.contract.Transact(opts, "distributeBlockReward")
}
// DistributeBlockReward is a paid mutator transaction binding the contract method 0xd6c0edad.
//
// Solidity: function distributeBlockReward() payable returns()
func (_Contracts *ContractsSession) DistributeBlockReward() (*types.Transaction, error) {
return _Contracts.Contract.DistributeBlockReward(&_Contracts.TransactOpts)
}
// DistributeBlockReward is a paid mutator transaction binding the contract method 0xd6c0edad.
//
// Solidity: function distributeBlockReward() payable returns()
func (_Contracts *ContractsTransactorSession) DistributeBlockReward() (*types.Transaction, error) {
return _Contracts.Contract.DistributeBlockReward(&_Contracts.TransactOpts)
}
// Initialize is a paid mutator transaction binding the contract method 0xa224cee7.
//
// Solidity: function initialize(address[] vals) returns()
func (_Contracts *ContractsTransactor) Initialize(opts *bind.TransactOpts, vals []common.Address) (*types.Transaction, error) {
return _Contracts.contract.Transact(opts, "initialize", vals)
}
// Initialize is a paid mutator transaction binding the contract method 0xa224cee7.
//
// Solidity: function initialize(address[] vals) returns()
func (_Contracts *ContractsSession) Initialize(vals []common.Address) (*types.Transaction, error) {
return _Contracts.Contract.Initialize(&_Contracts.TransactOpts, vals)
}
// Initialize is a paid mutator transaction binding the contract method 0xa224cee7.
//
// Solidity: function initialize(address[] vals) returns()
func (_Contracts *ContractsTransactorSession) Initialize(vals []common.Address) (*types.Transaction, error) {
return _Contracts.Contract.Initialize(&_Contracts.TransactOpts, vals)
}
// RemoveValidator is a paid mutator transaction binding the contract method 0x40a141ff.
//
// Solidity: function removeValidator(address val) returns()
func (_Contracts *ContractsTransactor) RemoveValidator(opts *bind.TransactOpts, val common.Address) (*types.Transaction, error) {
return _Contracts.contract.Transact(opts, "removeValidator", val)
}
// RemoveValidator is a paid mutator transaction binding the contract method 0x40a141ff.
//
// Solidity: function removeValidator(address val) returns()
func (_Contracts *ContractsSession) RemoveValidator(val common.Address) (*types.Transaction, error) {
return _Contracts.Contract.RemoveValidator(&_Contracts.TransactOpts, val)
}
// RemoveValidator is a paid mutator transaction binding the contract method 0x40a141ff.
//
// Solidity: function removeValidator(address val) returns()
func (_Contracts *ContractsTransactorSession) RemoveValidator(val common.Address) (*types.Transaction, error) {
return _Contracts.Contract.RemoveValidator(&_Contracts.TransactOpts, val)
}
// RemoveValidatorIncoming is a paid mutator transaction binding the contract method 0x5dd09590.
//
// Solidity: function removeValidatorIncoming(address val) returns()
func (_Contracts *ContractsTransactor) RemoveValidatorIncoming(opts *bind.TransactOpts, val common.Address) (*types.Transaction, error) {
return _Contracts.contract.Transact(opts, "removeValidatorIncoming", val)
}
// RemoveValidatorIncoming is a paid mutator transaction binding the contract method 0x5dd09590.
//
// Solidity: function removeValidatorIncoming(address val) returns()
func (_Contracts *ContractsSession) RemoveValidatorIncoming(val common.Address) (*types.Transaction, error) {
return _Contracts.Contract.RemoveValidatorIncoming(&_Contracts.TransactOpts, val)
}
// RemoveValidatorIncoming is a paid mutator transaction binding the contract method 0x5dd09590.
//
// Solidity: function removeValidatorIncoming(address val) returns()
func (_Contracts *ContractsTransactorSession) RemoveValidatorIncoming(val common.Address) (*types.Transaction, error) {
return _Contracts.Contract.RemoveValidatorIncoming(&_Contracts.TransactOpts, val)
}
// Stake is a paid mutator transaction binding the contract method 0x26476204.
//
// Solidity: function stake(address validator) payable returns(bool)
func (_Contracts *ContractsTransactor) Stake(opts *bind.TransactOpts, validator common.Address) (*types.Transaction, error) {
return _Contracts.contract.Transact(opts, "stake", validator)
}
// Stake is a paid mutator transaction binding the contract method 0x26476204.
//
// Solidity: function stake(address validator) payable returns(bool)
func (_Contracts *ContractsSession) Stake(validator common.Address) (*types.Transaction, error) {
return _Contracts.Contract.Stake(&_Contracts.TransactOpts, validator)
}