/
btcvseth.go
3592 lines (3096 loc) · 142 KB
/
btcvseth.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 btcvseth
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
)
// BtcvsethMetaData contains all meta data concerning the Btcvseth contract.
var BtcvsethMetaData = &bind.MetaData{
ABI: "[{\"type\":\"constructor\",\"stateMutability\":\"nonpayable\",\"inputs\":[{\"type\":\"address\",\"name\":\"_oracleFirst\",\"internalType\":\"contractAggregatorV3Interface\"},{\"type\":\"address\",\"name\":\"_oracleSecond\",\"internalType\":\"contractAggregatorV3Interface\"},{\"type\":\"address\",\"name\":\"_adminAddress\",\"internalType\":\"address\"},{\"type\":\"address\",\"name\":\"_operatorAddress\",\"internalType\":\"address\"},{\"type\":\"uint256\",\"name\":\"_intervalBlocks\",\"internalType\":\"uint256\"},{\"type\":\"uint256\",\"name\":\"_bufferBlocks\",\"internalType\":\"uint256\"},{\"type\":\"uint256\",\"name\":\"_minBetAmount\",\"internalType\":\"uint256\"},{\"type\":\"uint256\",\"name\":\"_oracleUpdateAllowance\",\"internalType\":\"uint256\"}]},{\"type\":\"event\",\"name\":\"BetBear\",\"inputs\":[{\"type\":\"address\",\"name\":\"sender\",\"internalType\":\"address\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"currentEpoch\",\"internalType\":\"uint256\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"amount\",\"internalType\":\"uint256\",\"indexed\":false}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BetBull\",\"inputs\":[{\"type\":\"address\",\"name\":\"sender\",\"internalType\":\"address\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"currentEpoch\",\"internalType\":\"uint256\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"amount\",\"internalType\":\"uint256\",\"indexed\":false}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Claim\",\"inputs\":[{\"type\":\"address\",\"name\":\"sender\",\"internalType\":\"address\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"currentEpoch\",\"internalType\":\"uint256\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"amount\",\"internalType\":\"uint256\",\"indexed\":false}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ClaimTreasury\",\"inputs\":[{\"type\":\"uint256\",\"name\":\"amount\",\"internalType\":\"uint256\",\"indexed\":false}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"EndRound\",\"inputs\":[{\"type\":\"uint256\",\"name\":\"epoch\",\"internalType\":\"uint256\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"blockNumber\",\"internalType\":\"uint256\",\"indexed\":false},{\"type\":\"int256\",\"name\":\"firstPrice\",\"internalType\":\"int256\",\"indexed\":false},{\"type\":\"int256\",\"name\":\"secondPrice\",\"internalType\":\"int256\",\"indexed\":false}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"LockRound\",\"inputs\":[{\"type\":\"uint256\",\"name\":\"epoch\",\"internalType\":\"uint256\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"blockNumber\",\"internalType\":\"uint256\",\"indexed\":false},{\"type\":\"int256\",\"name\":\"firstPrice\",\"internalType\":\"int256\",\"indexed\":false},{\"type\":\"int256\",\"name\":\"secondPrice\",\"internalType\":\"int256\",\"indexed\":false}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MinBetAmountUpdated\",\"inputs\":[{\"type\":\"uint256\",\"name\":\"epoch\",\"internalType\":\"uint256\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"minBetAmount\",\"internalType\":\"uint256\",\"indexed\":false}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"type\":\"address\",\"name\":\"previousOwner\",\"internalType\":\"address\",\"indexed\":true},{\"type\":\"address\",\"name\":\"newOwner\",\"internalType\":\"address\",\"indexed\":true}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Pause\",\"inputs\":[{\"type\":\"uint256\",\"name\":\"epoch\",\"internalType\":\"uint256\",\"indexed\":false}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Paused\",\"inputs\":[{\"type\":\"address\",\"name\":\"account\",\"internalType\":\"address\",\"indexed\":false}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RatesUpdated\",\"inputs\":[{\"type\":\"uint256\",\"name\":\"epoch\",\"internalType\":\"uint256\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"rewardRate\",\"internalType\":\"uint256\",\"indexed\":false},{\"type\":\"uint256\",\"name\":\"treasuryRate\",\"internalType\":\"uint256\",\"indexed\":false}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RewardsCalculated\",\"inputs\":[{\"type\":\"uint256\",\"name\":\"epoch\",\"internalType\":\"uint256\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"rewardBaseCalAmount\",\"internalType\":\"uint256\",\"indexed\":false},{\"type\":\"uint256\",\"name\":\"rewardAmount\",\"internalType\":\"uint256\",\"indexed\":false},{\"type\":\"uint256\",\"name\":\"treasuryAmount\",\"internalType\":\"uint256\",\"indexed\":false},{\"type\":\"int256\",\"name\":\"firstPercent\",\"internalType\":\"int256\",\"indexed\":false},{\"type\":\"int256\",\"name\":\"secondPercent\",\"internalType\":\"int256\",\"indexed\":false}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"StartRound\",\"inputs\":[{\"type\":\"uint256\",\"name\":\"epoch\",\"internalType\":\"uint256\",\"indexed\":true},{\"type\":\"uint256\",\"name\":\"blockNumber\",\"internalType\":\"uint256\",\"indexed\":false}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpause\",\"inputs\":[{\"type\":\"uint256\",\"name\":\"epoch\",\"internalType\":\"uint256\",\"indexed\":false}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"type\":\"address\",\"name\":\"account\",\"internalType\":\"address\",\"indexed\":false}],\"anonymous\":false},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"uint256\",\"name\":\"\",\"internalType\":\"uint256\"}],\"name\":\"TOTAL_RATE\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"address\",\"name\":\"\",\"internalType\":\"address\"}],\"name\":\"adminAddress\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"payable\",\"outputs\":[],\"name\":\"betBear\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"payable\",\"outputs\":[],\"name\":\"betBull\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"uint256\",\"name\":\"\",\"internalType\":\"uint256\"}],\"name\":\"bufferBlocks\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"outputs\":[],\"name\":\"claim\",\"inputs\":[{\"type\":\"uint256\",\"name\":\"epoch\",\"internalType\":\"uint256\"}]},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"outputs\":[],\"name\":\"claimTreasury\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"bool\",\"name\":\"\",\"internalType\":\"bool\"}],\"name\":\"claimable\",\"inputs\":[{\"type\":\"uint256\",\"name\":\"epoch\",\"internalType\":\"uint256\"},{\"type\":\"address\",\"name\":\"user\",\"internalType\":\"address\"}]},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"uint256\",\"name\":\"\",\"internalType\":\"uint256\"}],\"name\":\"currentEpoch\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"outputs\":[],\"name\":\"executeRound\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"bool\",\"name\":\"\",\"internalType\":\"bool\"}],\"name\":\"genesisLockOnce\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"outputs\":[],\"name\":\"genesisLockRound\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"bool\",\"name\":\"\",\"internalType\":\"bool\"}],\"name\":\"genesisStartOnce\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"outputs\":[],\"name\":\"genesisStartRound\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"uint256[]\",\"name\":\"\",\"internalType\":\"uint256[]\"},{\"type\":\"uint256\",\"name\":\"\",\"internalType\":\"uint256\"}],\"name\":\"getUserRounds\",\"inputs\":[{\"type\":\"address\",\"name\":\"user\",\"internalType\":\"address\"},{\"type\":\"uint256\",\"name\":\"cursor\",\"internalType\":\"uint256\"},{\"type\":\"uint256\",\"name\":\"size\",\"internalType\":\"uint256\"}]},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"uint256\",\"name\":\"\",\"internalType\":\"uint256\"}],\"name\":\"intervalBlocks\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"uint8\",\"name\":\"position\",\"internalType\":\"enumBtcVsEth.Position\"},{\"type\":\"uint256\",\"name\":\"amount\",\"internalType\":\"uint256\"},{\"type\":\"bool\",\"name\":\"claimed\",\"internalType\":\"bool\"}],\"name\":\"ledger\",\"inputs\":[{\"type\":\"uint256\",\"name\":\"\",\"internalType\":\"uint256\"},{\"type\":\"address\",\"name\":\"\",\"internalType\":\"address\"}]},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"uint256\",\"name\":\"\",\"internalType\":\"uint256\"}],\"name\":\"minBetAmount\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"address\",\"name\":\"\",\"internalType\":\"address\"}],\"name\":\"operatorAddress\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"uint256\",\"name\":\"\",\"internalType\":\"uint256\"}],\"name\":\"oracleFirstLatestRoundId\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"uint256\",\"name\":\"\",\"internalType\":\"uint256\"}],\"name\":\"oracleSecondLatestRoundId\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"uint256\",\"name\":\"\",\"internalType\":\"uint256\"}],\"name\":\"oracleUpdateAllowance\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"address\",\"name\":\"\",\"internalType\":\"address\"}],\"name\":\"owner\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"outputs\":[],\"name\":\"pause\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"bool\",\"name\":\"\",\"internalType\":\"bool\"}],\"name\":\"paused\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"bool\",\"name\":\"\",\"internalType\":\"bool\"}],\"name\":\"refundable\",\"inputs\":[{\"type\":\"uint256\",\"name\":\"epoch\",\"internalType\":\"uint256\"},{\"type\":\"address\",\"name\":\"user\",\"internalType\":\"address\"}]},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"outputs\":[],\"name\":\"renounceOwnership\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"uint256\",\"name\":\"\",\"internalType\":\"uint256\"}],\"name\":\"rewardRate\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"uint256\",\"name\":\"epoch\",\"internalType\":\"uint256\"},{\"type\":\"uint256\",\"name\":\"startBlock\",\"internalType\":\"uint256\"},{\"type\":\"uint256\",\"name\":\"lockBlock\",\"internalType\":\"uint256\"},{\"type\":\"uint256\",\"name\":\"endBlock\",\"internalType\":\"uint256\"},{\"type\":\"int256\",\"name\":\"lockFirstPrice\",\"internalType\":\"int256\"},{\"type\":\"int256\",\"name\":\"closeFirstPrice\",\"internalType\":\"int256\"},{\"type\":\"int256\",\"name\":\"lockSecondPrice\",\"internalType\":\"int256\"},{\"type\":\"int256\",\"name\":\"closeSecondPrice\",\"internalType\":\"int256\"},{\"type\":\"uint256\",\"name\":\"totalAmount\",\"internalType\":\"uint256\"},{\"type\":\"uint256\",\"name\":\"bullAmount\",\"internalType\":\"uint256\"},{\"type\":\"uint256\",\"name\":\"bearAmount\",\"internalType\":\"uint256\"},{\"type\":\"uint256\",\"name\":\"rewardBaseCalAmount\",\"internalType\":\"uint256\"},{\"type\":\"uint256\",\"name\":\"rewardAmount\",\"internalType\":\"uint256\"},{\"type\":\"bool\",\"name\":\"oracleCalled\",\"internalType\":\"bool\"}],\"name\":\"rounds\",\"inputs\":[{\"type\":\"uint256\",\"name\":\"\",\"internalType\":\"uint256\"}]},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"outputs\":[],\"name\":\"setAdmin\",\"inputs\":[{\"type\":\"address\",\"name\":\"_adminAddress\",\"internalType\":\"address\"}]},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"outputs\":[],\"name\":\"setBufferBlocks\",\"inputs\":[{\"type\":\"uint256\",\"name\":\"_bufferBlocks\",\"internalType\":\"uint256\"}]},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"outputs\":[],\"name\":\"setFirstOracle\",\"inputs\":[{\"type\":\"address\",\"name\":\"_oracle\",\"internalType\":\"address\"}]},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"outputs\":[],\"name\":\"setIntervalBlocks\",\"inputs\":[{\"type\":\"uint256\",\"name\":\"_intervalBlocks\",\"internalType\":\"uint256\"}]},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"outputs\":[],\"name\":\"setMinBetAmount\",\"inputs\":[{\"type\":\"uint256\",\"name\":\"_minBetAmount\",\"internalType\":\"uint256\"}]},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"outputs\":[],\"name\":\"setOperator\",\"inputs\":[{\"type\":\"address\",\"name\":\"_operatorAddress\",\"internalType\":\"address\"}]},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"outputs\":[],\"name\":\"setOracleUpdateAllowance\",\"inputs\":[{\"type\":\"uint256\",\"name\":\"_oracleUpdateAllowance\",\"internalType\":\"uint256\"}]},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"outputs\":[],\"name\":\"setRewardRate\",\"inputs\":[{\"type\":\"uint256\",\"name\":\"_rewardRate\",\"internalType\":\"uint256\"}]},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"outputs\":[],\"name\":\"setSecondOracle\",\"inputs\":[{\"type\":\"address\",\"name\":\"_oracle\",\"internalType\":\"address\"}]},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"outputs\":[],\"name\":\"setTreasuryRate\",\"inputs\":[{\"type\":\"uint256\",\"name\":\"_treasuryRate\",\"internalType\":\"uint256\"}]},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"outputs\":[],\"name\":\"transferOwnership\",\"inputs\":[{\"type\":\"address\",\"name\":\"newOwner\",\"internalType\":\"address\"}]},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"uint256\",\"name\":\"\",\"internalType\":\"uint256\"}],\"name\":\"treasuryAmount\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"uint256\",\"name\":\"\",\"internalType\":\"uint256\"}],\"name\":\"treasuryRate\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"nonpayable\",\"outputs\":[],\"name\":\"unpause\",\"inputs\":[]},{\"type\":\"function\",\"stateMutability\":\"view\",\"outputs\":[{\"type\":\"uint256\",\"name\":\"\",\"internalType\":\"uint256\"}],\"name\":\"userRounds\",\"inputs\":[{\"type\":\"address\",\"name\":\"\",\"internalType\":\"address\"},{\"type\":\"uint256\",\"name\":\"\",\"internalType\":\"uint256\"}]}]",
}
// BtcvsethABI is the input ABI used to generate the binding from.
// Deprecated: Use BtcvsethMetaData.ABI instead.
var BtcvsethABI = BtcvsethMetaData.ABI
// Btcvseth is an auto generated Go binding around an Ethereum contract.
type Btcvseth struct {
BtcvsethCaller // Read-only binding to the contract
BtcvsethTransactor // Write-only binding to the contract
BtcvsethFilterer // Log filterer for contract events
}
// BtcvsethCaller is an auto generated read-only Go binding around an Ethereum contract.
type BtcvsethCaller struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// BtcvsethTransactor is an auto generated write-only Go binding around an Ethereum contract.
type BtcvsethTransactor struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// BtcvsethFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
type BtcvsethFilterer struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// BtcvsethSession is an auto generated Go binding around an Ethereum contract,
// with pre-set call and transact options.
type BtcvsethSession struct {
Contract *Btcvseth // 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
}
// BtcvsethCallerSession is an auto generated read-only Go binding around an Ethereum contract,
// with pre-set call options.
type BtcvsethCallerSession struct {
Contract *BtcvsethCaller // Generic contract caller binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
}
// BtcvsethTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
// with pre-set transact options.
type BtcvsethTransactorSession struct {
Contract *BtcvsethTransactor // Generic contract transactor binding to set the session for
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
// BtcvsethRaw is an auto generated low-level Go binding around an Ethereum contract.
type BtcvsethRaw struct {
Contract *Btcvseth // Generic contract binding to access the raw methods on
}
// BtcvsethCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
type BtcvsethCallerRaw struct {
Contract *BtcvsethCaller // Generic read-only contract binding to access the raw methods on
}
// BtcvsethTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
type BtcvsethTransactorRaw struct {
Contract *BtcvsethTransactor // Generic write-only contract binding to access the raw methods on
}
// NewBtcvseth creates a new instance of Btcvseth, bound to a specific deployed contract.
func NewBtcvseth(address common.Address, backend bind.ContractBackend) (*Btcvseth, error) {
contract, err := bindBtcvseth(address, backend, backend, backend)
if err != nil {
return nil, err
}
return &Btcvseth{BtcvsethCaller: BtcvsethCaller{contract: contract}, BtcvsethTransactor: BtcvsethTransactor{contract: contract}, BtcvsethFilterer: BtcvsethFilterer{contract: contract}}, nil
}
// NewBtcvsethCaller creates a new read-only instance of Btcvseth, bound to a specific deployed contract.
func NewBtcvsethCaller(address common.Address, caller bind.ContractCaller) (*BtcvsethCaller, error) {
contract, err := bindBtcvseth(address, caller, nil, nil)
if err != nil {
return nil, err
}
return &BtcvsethCaller{contract: contract}, nil
}
// NewBtcvsethTransactor creates a new write-only instance of Btcvseth, bound to a specific deployed contract.
func NewBtcvsethTransactor(address common.Address, transactor bind.ContractTransactor) (*BtcvsethTransactor, error) {
contract, err := bindBtcvseth(address, nil, transactor, nil)
if err != nil {
return nil, err
}
return &BtcvsethTransactor{contract: contract}, nil
}
// NewBtcvsethFilterer creates a new log filterer instance of Btcvseth, bound to a specific deployed contract.
func NewBtcvsethFilterer(address common.Address, filterer bind.ContractFilterer) (*BtcvsethFilterer, error) {
contract, err := bindBtcvseth(address, nil, nil, filterer)
if err != nil {
return nil, err
}
return &BtcvsethFilterer{contract: contract}, nil
}
// bindBtcvseth binds a generic wrapper to an already deployed contract.
func bindBtcvseth(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
parsed, err := abi.JSON(strings.NewReader(BtcvsethABI))
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 (_Btcvseth *BtcvsethRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _Btcvseth.Contract.BtcvsethCaller.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 (_Btcvseth *BtcvsethRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _Btcvseth.Contract.BtcvsethTransactor.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_Btcvseth *BtcvsethRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _Btcvseth.Contract.BtcvsethTransactor.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 (_Btcvseth *BtcvsethCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _Btcvseth.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 (_Btcvseth *BtcvsethTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _Btcvseth.Contract.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_Btcvseth *BtcvsethTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _Btcvseth.Contract.contract.Transact(opts, method, params...)
}
// TOTALRATE is a free data retrieval call binding the contract method 0xb29c299b.
//
// Solidity: function TOTAL_RATE() view returns(uint256)
func (_Btcvseth *BtcvsethCaller) TOTALRATE(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _Btcvseth.contract.Call(opts, &out, "TOTAL_RATE")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// TOTALRATE is a free data retrieval call binding the contract method 0xb29c299b.
//
// Solidity: function TOTAL_RATE() view returns(uint256)
func (_Btcvseth *BtcvsethSession) TOTALRATE() (*big.Int, error) {
return _Btcvseth.Contract.TOTALRATE(&_Btcvseth.CallOpts)
}
// TOTALRATE is a free data retrieval call binding the contract method 0xb29c299b.
//
// Solidity: function TOTAL_RATE() view returns(uint256)
func (_Btcvseth *BtcvsethCallerSession) TOTALRATE() (*big.Int, error) {
return _Btcvseth.Contract.TOTALRATE(&_Btcvseth.CallOpts)
}
// AdminAddress is a free data retrieval call binding the contract method 0xfc6f9468.
//
// Solidity: function adminAddress() view returns(address)
func (_Btcvseth *BtcvsethCaller) AdminAddress(opts *bind.CallOpts) (common.Address, error) {
var out []interface{}
err := _Btcvseth.contract.Call(opts, &out, "adminAddress")
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// AdminAddress is a free data retrieval call binding the contract method 0xfc6f9468.
//
// Solidity: function adminAddress() view returns(address)
func (_Btcvseth *BtcvsethSession) AdminAddress() (common.Address, error) {
return _Btcvseth.Contract.AdminAddress(&_Btcvseth.CallOpts)
}
// AdminAddress is a free data retrieval call binding the contract method 0xfc6f9468.
//
// Solidity: function adminAddress() view returns(address)
func (_Btcvseth *BtcvsethCallerSession) AdminAddress() (common.Address, error) {
return _Btcvseth.Contract.AdminAddress(&_Btcvseth.CallOpts)
}
// BufferBlocks is a free data retrieval call binding the contract method 0x9780a752.
//
// Solidity: function bufferBlocks() view returns(uint256)
func (_Btcvseth *BtcvsethCaller) BufferBlocks(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _Btcvseth.contract.Call(opts, &out, "bufferBlocks")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// BufferBlocks is a free data retrieval call binding the contract method 0x9780a752.
//
// Solidity: function bufferBlocks() view returns(uint256)
func (_Btcvseth *BtcvsethSession) BufferBlocks() (*big.Int, error) {
return _Btcvseth.Contract.BufferBlocks(&_Btcvseth.CallOpts)
}
// BufferBlocks is a free data retrieval call binding the contract method 0x9780a752.
//
// Solidity: function bufferBlocks() view returns(uint256)
func (_Btcvseth *BtcvsethCallerSession) BufferBlocks() (*big.Int, error) {
return _Btcvseth.Contract.BufferBlocks(&_Btcvseth.CallOpts)
}
// Claimable is a free data retrieval call binding the contract method 0xa0c7f71c.
//
// Solidity: function claimable(uint256 epoch, address user) view returns(bool)
func (_Btcvseth *BtcvsethCaller) Claimable(opts *bind.CallOpts, epoch *big.Int, user common.Address) (bool, error) {
var out []interface{}
err := _Btcvseth.contract.Call(opts, &out, "claimable", epoch, user)
if err != nil {
return *new(bool), err
}
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
return out0, err
}
// Claimable is a free data retrieval call binding the contract method 0xa0c7f71c.
//
// Solidity: function claimable(uint256 epoch, address user) view returns(bool)
func (_Btcvseth *BtcvsethSession) Claimable(epoch *big.Int, user common.Address) (bool, error) {
return _Btcvseth.Contract.Claimable(&_Btcvseth.CallOpts, epoch, user)
}
// Claimable is a free data retrieval call binding the contract method 0xa0c7f71c.
//
// Solidity: function claimable(uint256 epoch, address user) view returns(bool)
func (_Btcvseth *BtcvsethCallerSession) Claimable(epoch *big.Int, user common.Address) (bool, error) {
return _Btcvseth.Contract.Claimable(&_Btcvseth.CallOpts, epoch, user)
}
// CurrentEpoch is a free data retrieval call binding the contract method 0x76671808.
//
// Solidity: function currentEpoch() view returns(uint256)
func (_Btcvseth *BtcvsethCaller) CurrentEpoch(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _Btcvseth.contract.Call(opts, &out, "currentEpoch")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// CurrentEpoch is a free data retrieval call binding the contract method 0x76671808.
//
// Solidity: function currentEpoch() view returns(uint256)
func (_Btcvseth *BtcvsethSession) CurrentEpoch() (*big.Int, error) {
return _Btcvseth.Contract.CurrentEpoch(&_Btcvseth.CallOpts)
}
// CurrentEpoch is a free data retrieval call binding the contract method 0x76671808.
//
// Solidity: function currentEpoch() view returns(uint256)
func (_Btcvseth *BtcvsethCallerSession) CurrentEpoch() (*big.Int, error) {
return _Btcvseth.Contract.CurrentEpoch(&_Btcvseth.CallOpts)
}
// GenesisLockOnce is a free data retrieval call binding the contract method 0x0f74174f.
//
// Solidity: function genesisLockOnce() view returns(bool)
func (_Btcvseth *BtcvsethCaller) GenesisLockOnce(opts *bind.CallOpts) (bool, error) {
var out []interface{}
err := _Btcvseth.contract.Call(opts, &out, "genesisLockOnce")
if err != nil {
return *new(bool), err
}
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
return out0, err
}
// GenesisLockOnce is a free data retrieval call binding the contract method 0x0f74174f.
//
// Solidity: function genesisLockOnce() view returns(bool)
func (_Btcvseth *BtcvsethSession) GenesisLockOnce() (bool, error) {
return _Btcvseth.Contract.GenesisLockOnce(&_Btcvseth.CallOpts)
}
// GenesisLockOnce is a free data retrieval call binding the contract method 0x0f74174f.
//
// Solidity: function genesisLockOnce() view returns(bool)
func (_Btcvseth *BtcvsethCallerSession) GenesisLockOnce() (bool, error) {
return _Btcvseth.Contract.GenesisLockOnce(&_Btcvseth.CallOpts)
}
// GenesisStartOnce is a free data retrieval call binding the contract method 0xf7fdec28.
//
// Solidity: function genesisStartOnce() view returns(bool)
func (_Btcvseth *BtcvsethCaller) GenesisStartOnce(opts *bind.CallOpts) (bool, error) {
var out []interface{}
err := _Btcvseth.contract.Call(opts, &out, "genesisStartOnce")
if err != nil {
return *new(bool), err
}
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
return out0, err
}
// GenesisStartOnce is a free data retrieval call binding the contract method 0xf7fdec28.
//
// Solidity: function genesisStartOnce() view returns(bool)
func (_Btcvseth *BtcvsethSession) GenesisStartOnce() (bool, error) {
return _Btcvseth.Contract.GenesisStartOnce(&_Btcvseth.CallOpts)
}
// GenesisStartOnce is a free data retrieval call binding the contract method 0xf7fdec28.
//
// Solidity: function genesisStartOnce() view returns(bool)
func (_Btcvseth *BtcvsethCallerSession) GenesisStartOnce() (bool, error) {
return _Btcvseth.Contract.GenesisStartOnce(&_Btcvseth.CallOpts)
}
// GetUserRounds is a free data retrieval call binding the contract method 0x951fd600.
//
// Solidity: function getUserRounds(address user, uint256 cursor, uint256 size) view returns(uint256[], uint256)
func (_Btcvseth *BtcvsethCaller) GetUserRounds(opts *bind.CallOpts, user common.Address, cursor *big.Int, size *big.Int) ([]*big.Int, *big.Int, error) {
var out []interface{}
err := _Btcvseth.contract.Call(opts, &out, "getUserRounds", user, cursor, size)
if err != nil {
return *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)
return out0, out1, err
}
// GetUserRounds is a free data retrieval call binding the contract method 0x951fd600.
//
// Solidity: function getUserRounds(address user, uint256 cursor, uint256 size) view returns(uint256[], uint256)
func (_Btcvseth *BtcvsethSession) GetUserRounds(user common.Address, cursor *big.Int, size *big.Int) ([]*big.Int, *big.Int, error) {
return _Btcvseth.Contract.GetUserRounds(&_Btcvseth.CallOpts, user, cursor, size)
}
// GetUserRounds is a free data retrieval call binding the contract method 0x951fd600.
//
// Solidity: function getUserRounds(address user, uint256 cursor, uint256 size) view returns(uint256[], uint256)
func (_Btcvseth *BtcvsethCallerSession) GetUserRounds(user common.Address, cursor *big.Int, size *big.Int) ([]*big.Int, *big.Int, error) {
return _Btcvseth.Contract.GetUserRounds(&_Btcvseth.CallOpts, user, cursor, size)
}
// IntervalBlocks is a free data retrieval call binding the contract method 0x1ec9f34b.
//
// Solidity: function intervalBlocks() view returns(uint256)
func (_Btcvseth *BtcvsethCaller) IntervalBlocks(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _Btcvseth.contract.Call(opts, &out, "intervalBlocks")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// IntervalBlocks is a free data retrieval call binding the contract method 0x1ec9f34b.
//
// Solidity: function intervalBlocks() view returns(uint256)
func (_Btcvseth *BtcvsethSession) IntervalBlocks() (*big.Int, error) {
return _Btcvseth.Contract.IntervalBlocks(&_Btcvseth.CallOpts)
}
// IntervalBlocks is a free data retrieval call binding the contract method 0x1ec9f34b.
//
// Solidity: function intervalBlocks() view returns(uint256)
func (_Btcvseth *BtcvsethCallerSession) IntervalBlocks() (*big.Int, error) {
return _Btcvseth.Contract.IntervalBlocks(&_Btcvseth.CallOpts)
}
// Ledger is a free data retrieval call binding the contract method 0x7285c58b.
//
// Solidity: function ledger(uint256 , address ) view returns(uint8 position, uint256 amount, bool claimed)
func (_Btcvseth *BtcvsethCaller) Ledger(opts *bind.CallOpts, arg0 *big.Int, arg1 common.Address) (struct {
Position uint8
Amount *big.Int
Claimed bool
}, error) {
var out []interface{}
err := _Btcvseth.contract.Call(opts, &out, "ledger", arg0, arg1)
outstruct := new(struct {
Position uint8
Amount *big.Int
Claimed bool
})
if err != nil {
return *outstruct, err
}
outstruct.Position = *abi.ConvertType(out[0], new(uint8)).(*uint8)
outstruct.Amount = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int)
outstruct.Claimed = *abi.ConvertType(out[2], new(bool)).(*bool)
return *outstruct, err
}
// Ledger is a free data retrieval call binding the contract method 0x7285c58b.
//
// Solidity: function ledger(uint256 , address ) view returns(uint8 position, uint256 amount, bool claimed)
func (_Btcvseth *BtcvsethSession) Ledger(arg0 *big.Int, arg1 common.Address) (struct {
Position uint8
Amount *big.Int
Claimed bool
}, error) {
return _Btcvseth.Contract.Ledger(&_Btcvseth.CallOpts, arg0, arg1)
}
// Ledger is a free data retrieval call binding the contract method 0x7285c58b.
//
// Solidity: function ledger(uint256 , address ) view returns(uint8 position, uint256 amount, bool claimed)
func (_Btcvseth *BtcvsethCallerSession) Ledger(arg0 *big.Int, arg1 common.Address) (struct {
Position uint8
Amount *big.Int
Claimed bool
}, error) {
return _Btcvseth.Contract.Ledger(&_Btcvseth.CallOpts, arg0, arg1)
}
// MinBetAmount is a free data retrieval call binding the contract method 0xfa968eea.
//
// Solidity: function minBetAmount() view returns(uint256)
func (_Btcvseth *BtcvsethCaller) MinBetAmount(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _Btcvseth.contract.Call(opts, &out, "minBetAmount")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// MinBetAmount is a free data retrieval call binding the contract method 0xfa968eea.
//
// Solidity: function minBetAmount() view returns(uint256)
func (_Btcvseth *BtcvsethSession) MinBetAmount() (*big.Int, error) {
return _Btcvseth.Contract.MinBetAmount(&_Btcvseth.CallOpts)
}
// MinBetAmount is a free data retrieval call binding the contract method 0xfa968eea.
//
// Solidity: function minBetAmount() view returns(uint256)
func (_Btcvseth *BtcvsethCallerSession) MinBetAmount() (*big.Int, error) {
return _Btcvseth.Contract.MinBetAmount(&_Btcvseth.CallOpts)
}
// OperatorAddress is a free data retrieval call binding the contract method 0x127effb2.
//
// Solidity: function operatorAddress() view returns(address)
func (_Btcvseth *BtcvsethCaller) OperatorAddress(opts *bind.CallOpts) (common.Address, error) {
var out []interface{}
err := _Btcvseth.contract.Call(opts, &out, "operatorAddress")
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// OperatorAddress is a free data retrieval call binding the contract method 0x127effb2.
//
// Solidity: function operatorAddress() view returns(address)
func (_Btcvseth *BtcvsethSession) OperatorAddress() (common.Address, error) {
return _Btcvseth.Contract.OperatorAddress(&_Btcvseth.CallOpts)
}
// OperatorAddress is a free data retrieval call binding the contract method 0x127effb2.
//
// Solidity: function operatorAddress() view returns(address)
func (_Btcvseth *BtcvsethCallerSession) OperatorAddress() (common.Address, error) {
return _Btcvseth.Contract.OperatorAddress(&_Btcvseth.CallOpts)
}
// OracleFirstLatestRoundId is a free data retrieval call binding the contract method 0x91e5ae4f.
//
// Solidity: function oracleFirstLatestRoundId() view returns(uint256)
func (_Btcvseth *BtcvsethCaller) OracleFirstLatestRoundId(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _Btcvseth.contract.Call(opts, &out, "oracleFirstLatestRoundId")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// OracleFirstLatestRoundId is a free data retrieval call binding the contract method 0x91e5ae4f.
//
// Solidity: function oracleFirstLatestRoundId() view returns(uint256)
func (_Btcvseth *BtcvsethSession) OracleFirstLatestRoundId() (*big.Int, error) {
return _Btcvseth.Contract.OracleFirstLatestRoundId(&_Btcvseth.CallOpts)
}
// OracleFirstLatestRoundId is a free data retrieval call binding the contract method 0x91e5ae4f.
//
// Solidity: function oracleFirstLatestRoundId() view returns(uint256)
func (_Btcvseth *BtcvsethCallerSession) OracleFirstLatestRoundId() (*big.Int, error) {
return _Btcvseth.Contract.OracleFirstLatestRoundId(&_Btcvseth.CallOpts)
}
// OracleSecondLatestRoundId is a free data retrieval call binding the contract method 0xb1802631.
//
// Solidity: function oracleSecondLatestRoundId() view returns(uint256)
func (_Btcvseth *BtcvsethCaller) OracleSecondLatestRoundId(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _Btcvseth.contract.Call(opts, &out, "oracleSecondLatestRoundId")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// OracleSecondLatestRoundId is a free data retrieval call binding the contract method 0xb1802631.
//
// Solidity: function oracleSecondLatestRoundId() view returns(uint256)
func (_Btcvseth *BtcvsethSession) OracleSecondLatestRoundId() (*big.Int, error) {
return _Btcvseth.Contract.OracleSecondLatestRoundId(&_Btcvseth.CallOpts)
}
// OracleSecondLatestRoundId is a free data retrieval call binding the contract method 0xb1802631.
//
// Solidity: function oracleSecondLatestRoundId() view returns(uint256)
func (_Btcvseth *BtcvsethCallerSession) OracleSecondLatestRoundId() (*big.Int, error) {
return _Btcvseth.Contract.OracleSecondLatestRoundId(&_Btcvseth.CallOpts)
}
// OracleUpdateAllowance is a free data retrieval call binding the contract method 0x60554011.
//
// Solidity: function oracleUpdateAllowance() view returns(uint256)
func (_Btcvseth *BtcvsethCaller) OracleUpdateAllowance(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _Btcvseth.contract.Call(opts, &out, "oracleUpdateAllowance")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// OracleUpdateAllowance is a free data retrieval call binding the contract method 0x60554011.
//
// Solidity: function oracleUpdateAllowance() view returns(uint256)
func (_Btcvseth *BtcvsethSession) OracleUpdateAllowance() (*big.Int, error) {
return _Btcvseth.Contract.OracleUpdateAllowance(&_Btcvseth.CallOpts)
}
// OracleUpdateAllowance is a free data retrieval call binding the contract method 0x60554011.
//
// Solidity: function oracleUpdateAllowance() view returns(uint256)
func (_Btcvseth *BtcvsethCallerSession) OracleUpdateAllowance() (*big.Int, error) {
return _Btcvseth.Contract.OracleUpdateAllowance(&_Btcvseth.CallOpts)
}
// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
//
// Solidity: function owner() view returns(address)
func (_Btcvseth *BtcvsethCaller) Owner(opts *bind.CallOpts) (common.Address, error) {
var out []interface{}
err := _Btcvseth.contract.Call(opts, &out, "owner")
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
//
// Solidity: function owner() view returns(address)
func (_Btcvseth *BtcvsethSession) Owner() (common.Address, error) {
return _Btcvseth.Contract.Owner(&_Btcvseth.CallOpts)
}
// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
//
// Solidity: function owner() view returns(address)
func (_Btcvseth *BtcvsethCallerSession) Owner() (common.Address, error) {
return _Btcvseth.Contract.Owner(&_Btcvseth.CallOpts)
}
// Paused is a free data retrieval call binding the contract method 0x5c975abb.
//
// Solidity: function paused() view returns(bool)
func (_Btcvseth *BtcvsethCaller) Paused(opts *bind.CallOpts) (bool, error) {
var out []interface{}
err := _Btcvseth.contract.Call(opts, &out, "paused")
if err != nil {
return *new(bool), err
}
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
return out0, err
}
// Paused is a free data retrieval call binding the contract method 0x5c975abb.
//
// Solidity: function paused() view returns(bool)
func (_Btcvseth *BtcvsethSession) Paused() (bool, error) {
return _Btcvseth.Contract.Paused(&_Btcvseth.CallOpts)
}
// Paused is a free data retrieval call binding the contract method 0x5c975abb.
//
// Solidity: function paused() view returns(bool)
func (_Btcvseth *BtcvsethCallerSession) Paused() (bool, error) {
return _Btcvseth.Contract.Paused(&_Btcvseth.CallOpts)
}
// Refundable is a free data retrieval call binding the contract method 0x7bf41254.
//
// Solidity: function refundable(uint256 epoch, address user) view returns(bool)
func (_Btcvseth *BtcvsethCaller) Refundable(opts *bind.CallOpts, epoch *big.Int, user common.Address) (bool, error) {
var out []interface{}
err := _Btcvseth.contract.Call(opts, &out, "refundable", epoch, user)
if err != nil {
return *new(bool), err
}
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
return out0, err
}
// Refundable is a free data retrieval call binding the contract method 0x7bf41254.
//
// Solidity: function refundable(uint256 epoch, address user) view returns(bool)
func (_Btcvseth *BtcvsethSession) Refundable(epoch *big.Int, user common.Address) (bool, error) {
return _Btcvseth.Contract.Refundable(&_Btcvseth.CallOpts, epoch, user)
}
// Refundable is a free data retrieval call binding the contract method 0x7bf41254.
//
// Solidity: function refundable(uint256 epoch, address user) view returns(bool)
func (_Btcvseth *BtcvsethCallerSession) Refundable(epoch *big.Int, user common.Address) (bool, error) {
return _Btcvseth.Contract.Refundable(&_Btcvseth.CallOpts, epoch, user)
}
// RewardRate is a free data retrieval call binding the contract method 0x7b0a47ee.
//
// Solidity: function rewardRate() view returns(uint256)
func (_Btcvseth *BtcvsethCaller) RewardRate(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _Btcvseth.contract.Call(opts, &out, "rewardRate")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// RewardRate is a free data retrieval call binding the contract method 0x7b0a47ee.
//
// Solidity: function rewardRate() view returns(uint256)
func (_Btcvseth *BtcvsethSession) RewardRate() (*big.Int, error) {
return _Btcvseth.Contract.RewardRate(&_Btcvseth.CallOpts)
}
// RewardRate is a free data retrieval call binding the contract method 0x7b0a47ee.
//
// Solidity: function rewardRate() view returns(uint256)
func (_Btcvseth *BtcvsethCallerSession) RewardRate() (*big.Int, error) {
return _Btcvseth.Contract.RewardRate(&_Btcvseth.CallOpts)
}
// Rounds is a free data retrieval call binding the contract method 0x8c65c81f.
//
// Solidity: function rounds(uint256 ) view returns(uint256 epoch, uint256 startBlock, uint256 lockBlock, uint256 endBlock, int256 lockFirstPrice, int256 closeFirstPrice, int256 lockSecondPrice, int256 closeSecondPrice, uint256 totalAmount, uint256 bullAmount, uint256 bearAmount, uint256 rewardBaseCalAmount, uint256 rewardAmount, bool oracleCalled)
func (_Btcvseth *BtcvsethCaller) Rounds(opts *bind.CallOpts, arg0 *big.Int) (struct {
Epoch *big.Int
StartBlock *big.Int
LockBlock *big.Int
EndBlock *big.Int
LockFirstPrice *big.Int
CloseFirstPrice *big.Int
LockSecondPrice *big.Int
CloseSecondPrice *big.Int
TotalAmount *big.Int
BullAmount *big.Int
BearAmount *big.Int
RewardBaseCalAmount *big.Int
RewardAmount *big.Int
OracleCalled bool
}, error) {
var out []interface{}
err := _Btcvseth.contract.Call(opts, &out, "rounds", arg0)
outstruct := new(struct {
Epoch *big.Int
StartBlock *big.Int
LockBlock *big.Int
EndBlock *big.Int
LockFirstPrice *big.Int
CloseFirstPrice *big.Int
LockSecondPrice *big.Int
CloseSecondPrice *big.Int
TotalAmount *big.Int
BullAmount *big.Int
BearAmount *big.Int
RewardBaseCalAmount *big.Int
RewardAmount *big.Int
OracleCalled bool
})
if err != nil {
return *outstruct, err
}
outstruct.Epoch = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
outstruct.StartBlock = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int)
outstruct.LockBlock = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int)
outstruct.EndBlock = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int)
outstruct.LockFirstPrice = *abi.ConvertType(out[4], new(*big.Int)).(**big.Int)
outstruct.CloseFirstPrice = *abi.ConvertType(out[5], new(*big.Int)).(**big.Int)
outstruct.LockSecondPrice = *abi.ConvertType(out[6], new(*big.Int)).(**big.Int)
outstruct.CloseSecondPrice = *abi.ConvertType(out[7], new(*big.Int)).(**big.Int)
outstruct.TotalAmount = *abi.ConvertType(out[8], new(*big.Int)).(**big.Int)
outstruct.BullAmount = *abi.ConvertType(out[9], new(*big.Int)).(**big.Int)
outstruct.BearAmount = *abi.ConvertType(out[10], new(*big.Int)).(**big.Int)
outstruct.RewardBaseCalAmount = *abi.ConvertType(out[11], new(*big.Int)).(**big.Int)
outstruct.RewardAmount = *abi.ConvertType(out[12], new(*big.Int)).(**big.Int)
outstruct.OracleCalled = *abi.ConvertType(out[13], new(bool)).(*bool)
return *outstruct, err
}
// Rounds is a free data retrieval call binding the contract method 0x8c65c81f.
//
// Solidity: function rounds(uint256 ) view returns(uint256 epoch, uint256 startBlock, uint256 lockBlock, uint256 endBlock, int256 lockFirstPrice, int256 closeFirstPrice, int256 lockSecondPrice, int256 closeSecondPrice, uint256 totalAmount, uint256 bullAmount, uint256 bearAmount, uint256 rewardBaseCalAmount, uint256 rewardAmount, bool oracleCalled)
func (_Btcvseth *BtcvsethSession) Rounds(arg0 *big.Int) (struct {
Epoch *big.Int
StartBlock *big.Int
LockBlock *big.Int
EndBlock *big.Int
LockFirstPrice *big.Int
CloseFirstPrice *big.Int
LockSecondPrice *big.Int
CloseSecondPrice *big.Int
TotalAmount *big.Int
BullAmount *big.Int
BearAmount *big.Int
RewardBaseCalAmount *big.Int
RewardAmount *big.Int
OracleCalled bool
}, error) {
return _Btcvseth.Contract.Rounds(&_Btcvseth.CallOpts, arg0)
}
// Rounds is a free data retrieval call binding the contract method 0x8c65c81f.
//
// Solidity: function rounds(uint256 ) view returns(uint256 epoch, uint256 startBlock, uint256 lockBlock, uint256 endBlock, int256 lockFirstPrice, int256 closeFirstPrice, int256 lockSecondPrice, int256 closeSecondPrice, uint256 totalAmount, uint256 bullAmount, uint256 bearAmount, uint256 rewardBaseCalAmount, uint256 rewardAmount, bool oracleCalled)
func (_Btcvseth *BtcvsethCallerSession) Rounds(arg0 *big.Int) (struct {
Epoch *big.Int
StartBlock *big.Int
LockBlock *big.Int
EndBlock *big.Int
LockFirstPrice *big.Int
CloseFirstPrice *big.Int
LockSecondPrice *big.Int
CloseSecondPrice *big.Int
TotalAmount *big.Int
BullAmount *big.Int
BearAmount *big.Int
RewardBaseCalAmount *big.Int
RewardAmount *big.Int
OracleCalled bool
}, error) {
return _Btcvseth.Contract.Rounds(&_Btcvseth.CallOpts, arg0)
}
// TreasuryAmount is a free data retrieval call binding the contract method 0x368acb09.
//
// Solidity: function treasuryAmount() view returns(uint256)
func (_Btcvseth *BtcvsethCaller) TreasuryAmount(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _Btcvseth.contract.Call(opts, &out, "treasuryAmount")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// TreasuryAmount is a free data retrieval call binding the contract method 0x368acb09.
//
// Solidity: function treasuryAmount() view returns(uint256)
func (_Btcvseth *BtcvsethSession) TreasuryAmount() (*big.Int, error) {
return _Btcvseth.Contract.TreasuryAmount(&_Btcvseth.CallOpts)
}
// TreasuryAmount is a free data retrieval call binding the contract method 0x368acb09.
//
// Solidity: function treasuryAmount() view returns(uint256)
func (_Btcvseth *BtcvsethCallerSession) TreasuryAmount() (*big.Int, error) {
return _Btcvseth.Contract.TreasuryAmount(&_Btcvseth.CallOpts)
}
// TreasuryRate is a free data retrieval call binding the contract method 0xe4b72516.
//
// Solidity: function treasuryRate() view returns(uint256)
func (_Btcvseth *BtcvsethCaller) TreasuryRate(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _Btcvseth.contract.Call(opts, &out, "treasuryRate")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// TreasuryRate is a free data retrieval call binding the contract method 0xe4b72516.
//
// Solidity: function treasuryRate() view returns(uint256)
func (_Btcvseth *BtcvsethSession) TreasuryRate() (*big.Int, error) {
return _Btcvseth.Contract.TreasuryRate(&_Btcvseth.CallOpts)
}
// TreasuryRate is a free data retrieval call binding the contract method 0xe4b72516.
//
// Solidity: function treasuryRate() view returns(uint256)
func (_Btcvseth *BtcvsethCallerSession) TreasuryRate() (*big.Int, error) {
return _Btcvseth.Contract.TreasuryRate(&_Btcvseth.CallOpts)
}
// UserRounds is a free data retrieval call binding the contract method 0xdd1f7596.
//
// Solidity: function userRounds(address , uint256 ) view returns(uint256)
func (_Btcvseth *BtcvsethCaller) UserRounds(opts *bind.CallOpts, arg0 common.Address, arg1 *big.Int) (*big.Int, error) {
var out []interface{}
err := _Btcvseth.contract.Call(opts, &out, "userRounds", arg0, arg1)
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// UserRounds is a free data retrieval call binding the contract method 0xdd1f7596.
//
// Solidity: function userRounds(address , uint256 ) view returns(uint256)
func (_Btcvseth *BtcvsethSession) UserRounds(arg0 common.Address, arg1 *big.Int) (*big.Int, error) {
return _Btcvseth.Contract.UserRounds(&_Btcvseth.CallOpts, arg0, arg1)
}
// UserRounds is a free data retrieval call binding the contract method 0xdd1f7596.
//
// Solidity: function userRounds(address , uint256 ) view returns(uint256)
func (_Btcvseth *BtcvsethCallerSession) UserRounds(arg0 common.Address, arg1 *big.Int) (*big.Int, error) {
return _Btcvseth.Contract.UserRounds(&_Btcvseth.CallOpts, arg0, arg1)
}
// BetBear is a paid mutator transaction binding the contract method 0x0088160f.
//
// Solidity: function betBear() payable returns()
func (_Btcvseth *BtcvsethTransactor) BetBear(opts *bind.TransactOpts) (*types.Transaction, error) {
return _Btcvseth.contract.Transact(opts, "betBear")
}
// BetBear is a paid mutator transaction binding the contract method 0x0088160f.
//
// Solidity: function betBear() payable returns()
func (_Btcvseth *BtcvsethSession) BetBear() (*types.Transaction, error) {
return _Btcvseth.Contract.BetBear(&_Btcvseth.TransactOpts)