/
PancakeStakePool.go
2163 lines (1853 loc) · 86.2 KB
/
PancakeStakePool.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 pancake
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
)
// PancakeABI is the input ABI used to generate the binding from.
const PancakeABI = "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"tokenRecovered\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"AdminTokenRecovery\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"EmergencyWithdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"poolLimitPerUser\",\"type\":\"uint256\"}],\"name\":\"NewPoolLimit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"rewardPerBlock\",\"type\":\"uint256\"}],\"name\":\"NewRewardPerBlock\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"startBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"endBlock\",\"type\":\"uint256\"}],\"name\":\"NewStartAndEndBlocks\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"RewardsStop\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"PRECISION_FACTOR\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SMART_CHEF_FACTORY\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"accTokenPerShare\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bonusEndBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"emergencyRewardWithdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"emergencyWithdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hasUserLimit\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIBEP20\",\"name\":\"_stakedToken\",\"type\":\"address\"},{\"internalType\":\"contractIBEP20\",\"name\":\"_rewardToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_rewardPerBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_startBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_bonusEndBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_poolLimitPerUser\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_admin\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isInitialized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastRewardBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"}],\"name\":\"pendingReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"poolLimitPerUser\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenAmount\",\"type\":\"uint256\"}],\"name\":\"recoverWrongTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardPerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardToken\",\"outputs\":[{\"internalType\":\"contractIBEP20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stakedToken\",\"outputs\":[{\"internalType\":\"contractIBEP20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stopReward\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_hasUserLimit\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_poolLimitPerUser\",\"type\":\"uint256\"}],\"name\":\"updatePoolLimitPerUser\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_rewardPerBlock\",\"type\":\"uint256\"}],\"name\":\"updateRewardPerBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_startBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_bonusEndBlock\",\"type\":\"uint256\"}],\"name\":\"updateStartAndEndBlocks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rewardDebt\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]"
// Pancake is an auto generated Go binding around an Ethereum contract.
type Pancake struct {
PancakeCaller // Read-only binding to the contract
PancakeTransactor // Write-only binding to the contract
PancakeFilterer // Log filterer for contract events
}
// PancakeCaller is an auto generated read-only Go binding around an Ethereum contract.
type PancakeCaller struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// PancakeTransactor is an auto generated write-only Go binding around an Ethereum contract.
type PancakeTransactor struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// PancakeFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
type PancakeFilterer struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// PancakeSession is an auto generated Go binding around an Ethereum contract,
// with pre-set call and transact options.
type PancakeSession struct {
Contract *Pancake // 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
}
// PancakeCallerSession is an auto generated read-only Go binding around an Ethereum contract,
// with pre-set call options.
type PancakeCallerSession struct {
Contract *PancakeCaller // Generic contract caller binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
}
// PancakeTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
// with pre-set transact options.
type PancakeTransactorSession struct {
Contract *PancakeTransactor // Generic contract transactor binding to set the session for
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
// PancakeRaw is an auto generated low-level Go binding around an Ethereum contract.
type PancakeRaw struct {
Contract *Pancake // Generic contract binding to access the raw methods on
}
// PancakeCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
type PancakeCallerRaw struct {
Contract *PancakeCaller // Generic read-only contract binding to access the raw methods on
}
// PancakeTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
type PancakeTransactorRaw struct {
Contract *PancakeTransactor // Generic write-only contract binding to access the raw methods on
}
// NewPancake creates a new instance of Pancake, bound to a specific deployed contract.
func NewPancake(address common.Address, backend bind.ContractBackend) (*Pancake, error) {
contract, err := bindPancake(address, backend, backend, backend)
if err != nil {
return nil, err
}
return &Pancake{PancakeCaller: PancakeCaller{contract: contract}, PancakeTransactor: PancakeTransactor{contract: contract}, PancakeFilterer: PancakeFilterer{contract: contract}}, nil
}
// NewPancakeCaller creates a new read-only instance of Pancake, bound to a specific deployed contract.
func NewPancakeCaller(address common.Address, caller bind.ContractCaller) (*PancakeCaller, error) {
contract, err := bindPancake(address, caller, nil, nil)
if err != nil {
return nil, err
}
return &PancakeCaller{contract: contract}, nil
}
// NewPancakeTransactor creates a new write-only instance of Pancake, bound to a specific deployed contract.
func NewPancakeTransactor(address common.Address, transactor bind.ContractTransactor) (*PancakeTransactor, error) {
contract, err := bindPancake(address, nil, transactor, nil)
if err != nil {
return nil, err
}
return &PancakeTransactor{contract: contract}, nil
}
// NewPancakeFilterer creates a new log filterer instance of Pancake, bound to a specific deployed contract.
func NewPancakeFilterer(address common.Address, filterer bind.ContractFilterer) (*PancakeFilterer, error) {
contract, err := bindPancake(address, nil, nil, filterer)
if err != nil {
return nil, err
}
return &PancakeFilterer{contract: contract}, nil
}
// bindPancake binds a generic wrapper to an already deployed contract.
func bindPancake(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
parsed, err := abi.JSON(strings.NewReader(PancakeABI))
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 (_Pancake *PancakeRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _Pancake.Contract.PancakeCaller.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 (_Pancake *PancakeRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _Pancake.Contract.PancakeTransactor.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_Pancake *PancakeRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _Pancake.Contract.PancakeTransactor.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 (_Pancake *PancakeCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _Pancake.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 (_Pancake *PancakeTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _Pancake.Contract.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_Pancake *PancakeTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _Pancake.Contract.contract.Transact(opts, method, params...)
}
// PRECISIONFACTOR is a free data retrieval call binding the contract method 0xccd34cd5.
//
// Solidity: function PRECISION_FACTOR() view returns(uint256)
func (_Pancake *PancakeCaller) PRECISIONFACTOR(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _Pancake.contract.Call(opts, &out, "PRECISION_FACTOR")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// PRECISIONFACTOR is a free data retrieval call binding the contract method 0xccd34cd5.
//
// Solidity: function PRECISION_FACTOR() view returns(uint256)
func (_Pancake *PancakeSession) PRECISIONFACTOR() (*big.Int, error) {
return _Pancake.Contract.PRECISIONFACTOR(&_Pancake.CallOpts)
}
// PRECISIONFACTOR is a free data retrieval call binding the contract method 0xccd34cd5.
//
// Solidity: function PRECISION_FACTOR() view returns(uint256)
func (_Pancake *PancakeCallerSession) PRECISIONFACTOR() (*big.Int, error) {
return _Pancake.Contract.PRECISIONFACTOR(&_Pancake.CallOpts)
}
// SMARTCHEFFACTORY is a free data retrieval call binding the contract method 0xbd617191.
//
// Solidity: function SMART_CHEF_FACTORY() view returns(address)
func (_Pancake *PancakeCaller) SMARTCHEFFACTORY(opts *bind.CallOpts) (common.Address, error) {
var out []interface{}
err := _Pancake.contract.Call(opts, &out, "SMART_CHEF_FACTORY")
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// SMARTCHEFFACTORY is a free data retrieval call binding the contract method 0xbd617191.
//
// Solidity: function SMART_CHEF_FACTORY() view returns(address)
func (_Pancake *PancakeSession) SMARTCHEFFACTORY() (common.Address, error) {
return _Pancake.Contract.SMARTCHEFFACTORY(&_Pancake.CallOpts)
}
// SMARTCHEFFACTORY is a free data retrieval call binding the contract method 0xbd617191.
//
// Solidity: function SMART_CHEF_FACTORY() view returns(address)
func (_Pancake *PancakeCallerSession) SMARTCHEFFACTORY() (common.Address, error) {
return _Pancake.Contract.SMARTCHEFFACTORY(&_Pancake.CallOpts)
}
// AccTokenPerShare is a free data retrieval call binding the contract method 0x8f662915.
//
// Solidity: function accTokenPerShare() view returns(uint256)
func (_Pancake *PancakeCaller) AccTokenPerShare(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _Pancake.contract.Call(opts, &out, "accTokenPerShare")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// AccTokenPerShare is a free data retrieval call binding the contract method 0x8f662915.
//
// Solidity: function accTokenPerShare() view returns(uint256)
func (_Pancake *PancakeSession) AccTokenPerShare() (*big.Int, error) {
return _Pancake.Contract.AccTokenPerShare(&_Pancake.CallOpts)
}
// AccTokenPerShare is a free data retrieval call binding the contract method 0x8f662915.
//
// Solidity: function accTokenPerShare() view returns(uint256)
func (_Pancake *PancakeCallerSession) AccTokenPerShare() (*big.Int, error) {
return _Pancake.Contract.AccTokenPerShare(&_Pancake.CallOpts)
}
// BonusEndBlock is a free data retrieval call binding the contract method 0x1aed6553.
//
// Solidity: function bonusEndBlock() view returns(uint256)
func (_Pancake *PancakeCaller) BonusEndBlock(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _Pancake.contract.Call(opts, &out, "bonusEndBlock")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// BonusEndBlock is a free data retrieval call binding the contract method 0x1aed6553.
//
// Solidity: function bonusEndBlock() view returns(uint256)
func (_Pancake *PancakeSession) BonusEndBlock() (*big.Int, error) {
return _Pancake.Contract.BonusEndBlock(&_Pancake.CallOpts)
}
// BonusEndBlock is a free data retrieval call binding the contract method 0x1aed6553.
//
// Solidity: function bonusEndBlock() view returns(uint256)
func (_Pancake *PancakeCallerSession) BonusEndBlock() (*big.Int, error) {
return _Pancake.Contract.BonusEndBlock(&_Pancake.CallOpts)
}
// HasUserLimit is a free data retrieval call binding the contract method 0x92e8990e.
//
// Solidity: function hasUserLimit() view returns(bool)
func (_Pancake *PancakeCaller) HasUserLimit(opts *bind.CallOpts) (bool, error) {
var out []interface{}
err := _Pancake.contract.Call(opts, &out, "hasUserLimit")
if err != nil {
return *new(bool), err
}
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
return out0, err
}
// HasUserLimit is a free data retrieval call binding the contract method 0x92e8990e.
//
// Solidity: function hasUserLimit() view returns(bool)
func (_Pancake *PancakeSession) HasUserLimit() (bool, error) {
return _Pancake.Contract.HasUserLimit(&_Pancake.CallOpts)
}
// HasUserLimit is a free data retrieval call binding the contract method 0x92e8990e.
//
// Solidity: function hasUserLimit() view returns(bool)
func (_Pancake *PancakeCallerSession) HasUserLimit() (bool, error) {
return _Pancake.Contract.HasUserLimit(&_Pancake.CallOpts)
}
// IsInitialized is a free data retrieval call binding the contract method 0x392e53cd.
//
// Solidity: function isInitialized() view returns(bool)
func (_Pancake *PancakeCaller) IsInitialized(opts *bind.CallOpts) (bool, error) {
var out []interface{}
err := _Pancake.contract.Call(opts, &out, "isInitialized")
if err != nil {
return *new(bool), err
}
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
return out0, err
}
// IsInitialized is a free data retrieval call binding the contract method 0x392e53cd.
//
// Solidity: function isInitialized() view returns(bool)
func (_Pancake *PancakeSession) IsInitialized() (bool, error) {
return _Pancake.Contract.IsInitialized(&_Pancake.CallOpts)
}
// IsInitialized is a free data retrieval call binding the contract method 0x392e53cd.
//
// Solidity: function isInitialized() view returns(bool)
func (_Pancake *PancakeCallerSession) IsInitialized() (bool, error) {
return _Pancake.Contract.IsInitialized(&_Pancake.CallOpts)
}
// LastRewardBlock is a free data retrieval call binding the contract method 0xa9f8d181.
//
// Solidity: function lastRewardBlock() view returns(uint256)
func (_Pancake *PancakeCaller) LastRewardBlock(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _Pancake.contract.Call(opts, &out, "lastRewardBlock")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// LastRewardBlock is a free data retrieval call binding the contract method 0xa9f8d181.
//
// Solidity: function lastRewardBlock() view returns(uint256)
func (_Pancake *PancakeSession) LastRewardBlock() (*big.Int, error) {
return _Pancake.Contract.LastRewardBlock(&_Pancake.CallOpts)
}
// LastRewardBlock is a free data retrieval call binding the contract method 0xa9f8d181.
//
// Solidity: function lastRewardBlock() view returns(uint256)
func (_Pancake *PancakeCallerSession) LastRewardBlock() (*big.Int, error) {
return _Pancake.Contract.LastRewardBlock(&_Pancake.CallOpts)
}
// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
//
// Solidity: function owner() view returns(address)
func (_Pancake *PancakeCaller) Owner(opts *bind.CallOpts) (common.Address, error) {
var out []interface{}
err := _Pancake.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 (_Pancake *PancakeSession) Owner() (common.Address, error) {
return _Pancake.Contract.Owner(&_Pancake.CallOpts)
}
// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
//
// Solidity: function owner() view returns(address)
func (_Pancake *PancakeCallerSession) Owner() (common.Address, error) {
return _Pancake.Contract.Owner(&_Pancake.CallOpts)
}
// PendingReward is a free data retrieval call binding the contract method 0xf40f0f52.
//
// Solidity: function pendingReward(address _user) view returns(uint256)
func (_Pancake *PancakeCaller) PendingReward(opts *bind.CallOpts, _user common.Address) (*big.Int, error) {
var out []interface{}
err := _Pancake.contract.Call(opts, &out, "pendingReward", _user)
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// PendingReward is a free data retrieval call binding the contract method 0xf40f0f52.
//
// Solidity: function pendingReward(address _user) view returns(uint256)
func (_Pancake *PancakeSession) PendingReward(_user common.Address) (*big.Int, error) {
return _Pancake.Contract.PendingReward(&_Pancake.CallOpts, _user)
}
// PendingReward is a free data retrieval call binding the contract method 0xf40f0f52.
//
// Solidity: function pendingReward(address _user) view returns(uint256)
func (_Pancake *PancakeCallerSession) PendingReward(_user common.Address) (*big.Int, error) {
return _Pancake.Contract.PendingReward(&_Pancake.CallOpts, _user)
}
// PoolLimitPerUser is a free data retrieval call binding the contract method 0x66fe9f8a.
//
// Solidity: function poolLimitPerUser() view returns(uint256)
func (_Pancake *PancakeCaller) PoolLimitPerUser(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _Pancake.contract.Call(opts, &out, "poolLimitPerUser")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// PoolLimitPerUser is a free data retrieval call binding the contract method 0x66fe9f8a.
//
// Solidity: function poolLimitPerUser() view returns(uint256)
func (_Pancake *PancakeSession) PoolLimitPerUser() (*big.Int, error) {
return _Pancake.Contract.PoolLimitPerUser(&_Pancake.CallOpts)
}
// PoolLimitPerUser is a free data retrieval call binding the contract method 0x66fe9f8a.
//
// Solidity: function poolLimitPerUser() view returns(uint256)
func (_Pancake *PancakeCallerSession) PoolLimitPerUser() (*big.Int, error) {
return _Pancake.Contract.PoolLimitPerUser(&_Pancake.CallOpts)
}
// RewardPerBlock is a free data retrieval call binding the contract method 0x8ae39cac.
//
// Solidity: function rewardPerBlock() view returns(uint256)
func (_Pancake *PancakeCaller) RewardPerBlock(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _Pancake.contract.Call(opts, &out, "rewardPerBlock")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// RewardPerBlock is a free data retrieval call binding the contract method 0x8ae39cac.
//
// Solidity: function rewardPerBlock() view returns(uint256)
func (_Pancake *PancakeSession) RewardPerBlock() (*big.Int, error) {
return _Pancake.Contract.RewardPerBlock(&_Pancake.CallOpts)
}
// RewardPerBlock is a free data retrieval call binding the contract method 0x8ae39cac.
//
// Solidity: function rewardPerBlock() view returns(uint256)
func (_Pancake *PancakeCallerSession) RewardPerBlock() (*big.Int, error) {
return _Pancake.Contract.RewardPerBlock(&_Pancake.CallOpts)
}
// RewardToken is a free data retrieval call binding the contract method 0xf7c618c1.
//
// Solidity: function rewardToken() view returns(address)
func (_Pancake *PancakeCaller) RewardToken(opts *bind.CallOpts) (common.Address, error) {
var out []interface{}
err := _Pancake.contract.Call(opts, &out, "rewardToken")
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// RewardToken is a free data retrieval call binding the contract method 0xf7c618c1.
//
// Solidity: function rewardToken() view returns(address)
func (_Pancake *PancakeSession) RewardToken() (common.Address, error) {
return _Pancake.Contract.RewardToken(&_Pancake.CallOpts)
}
// RewardToken is a free data retrieval call binding the contract method 0xf7c618c1.
//
// Solidity: function rewardToken() view returns(address)
func (_Pancake *PancakeCallerSession) RewardToken() (common.Address, error) {
return _Pancake.Contract.RewardToken(&_Pancake.CallOpts)
}
// StakedToken is a free data retrieval call binding the contract method 0xcc7a262e.
//
// Solidity: function stakedToken() view returns(address)
func (_Pancake *PancakeCaller) StakedToken(opts *bind.CallOpts) (common.Address, error) {
var out []interface{}
err := _Pancake.contract.Call(opts, &out, "stakedToken")
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// StakedToken is a free data retrieval call binding the contract method 0xcc7a262e.
//
// Solidity: function stakedToken() view returns(address)
func (_Pancake *PancakeSession) StakedToken() (common.Address, error) {
return _Pancake.Contract.StakedToken(&_Pancake.CallOpts)
}
// StakedToken is a free data retrieval call binding the contract method 0xcc7a262e.
//
// Solidity: function stakedToken() view returns(address)
func (_Pancake *PancakeCallerSession) StakedToken() (common.Address, error) {
return _Pancake.Contract.StakedToken(&_Pancake.CallOpts)
}
// StartBlock is a free data retrieval call binding the contract method 0x48cd4cb1.
//
// Solidity: function startBlock() view returns(uint256)
func (_Pancake *PancakeCaller) StartBlock(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
err := _Pancake.contract.Call(opts, &out, "startBlock")
if err != nil {
return *new(*big.Int), err
}
out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
return out0, err
}
// StartBlock is a free data retrieval call binding the contract method 0x48cd4cb1.
//
// Solidity: function startBlock() view returns(uint256)
func (_Pancake *PancakeSession) StartBlock() (*big.Int, error) {
return _Pancake.Contract.StartBlock(&_Pancake.CallOpts)
}
// StartBlock is a free data retrieval call binding the contract method 0x48cd4cb1.
//
// Solidity: function startBlock() view returns(uint256)
func (_Pancake *PancakeCallerSession) StartBlock() (*big.Int, error) {
return _Pancake.Contract.StartBlock(&_Pancake.CallOpts)
}
// UserInfo is a free data retrieval call binding the contract method 0x1959a002.
//
// Solidity: function userInfo(address ) view returns(uint256 amount, uint256 rewardDebt)
func (_Pancake *PancakeCaller) UserInfo(opts *bind.CallOpts, arg0 common.Address) (struct {
Amount *big.Int
RewardDebt *big.Int
}, error) {
var out []interface{}
err := _Pancake.contract.Call(opts, &out, "userInfo", arg0)
outstruct := new(struct {
Amount *big.Int
RewardDebt *big.Int
})
if err != nil {
return *outstruct, err
}
outstruct.Amount = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
outstruct.RewardDebt = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int)
return *outstruct, err
}
// UserInfo is a free data retrieval call binding the contract method 0x1959a002.
//
// Solidity: function userInfo(address ) view returns(uint256 amount, uint256 rewardDebt)
func (_Pancake *PancakeSession) UserInfo(arg0 common.Address) (struct {
Amount *big.Int
RewardDebt *big.Int
}, error) {
return _Pancake.Contract.UserInfo(&_Pancake.CallOpts, arg0)
}
// UserInfo is a free data retrieval call binding the contract method 0x1959a002.
//
// Solidity: function userInfo(address ) view returns(uint256 amount, uint256 rewardDebt)
func (_Pancake *PancakeCallerSession) UserInfo(arg0 common.Address) (struct {
Amount *big.Int
RewardDebt *big.Int
}, error) {
return _Pancake.Contract.UserInfo(&_Pancake.CallOpts, arg0)
}
// Deposit is a paid mutator transaction binding the contract method 0xb6b55f25.
//
// Solidity: function deposit(uint256 _amount) returns()
func (_Pancake *PancakeTransactor) Deposit(opts *bind.TransactOpts, _amount *big.Int) (*types.Transaction, error) {
return _Pancake.contract.Transact(opts, "deposit", _amount)
}
// Deposit is a paid mutator transaction binding the contract method 0xb6b55f25.
//
// Solidity: function deposit(uint256 _amount) returns()
func (_Pancake *PancakeSession) Deposit(_amount *big.Int) (*types.Transaction, error) {
return _Pancake.Contract.Deposit(&_Pancake.TransactOpts, _amount)
}
// Deposit is a paid mutator transaction binding the contract method 0xb6b55f25.
//
// Solidity: function deposit(uint256 _amount) returns()
func (_Pancake *PancakeTransactorSession) Deposit(_amount *big.Int) (*types.Transaction, error) {
return _Pancake.Contract.Deposit(&_Pancake.TransactOpts, _amount)
}
// EmergencyRewardWithdraw is a paid mutator transaction binding the contract method 0x3279beab.
//
// Solidity: function emergencyRewardWithdraw(uint256 _amount) returns()
func (_Pancake *PancakeTransactor) EmergencyRewardWithdraw(opts *bind.TransactOpts, _amount *big.Int) (*types.Transaction, error) {
return _Pancake.contract.Transact(opts, "emergencyRewardWithdraw", _amount)
}
// EmergencyRewardWithdraw is a paid mutator transaction binding the contract method 0x3279beab.
//
// Solidity: function emergencyRewardWithdraw(uint256 _amount) returns()
func (_Pancake *PancakeSession) EmergencyRewardWithdraw(_amount *big.Int) (*types.Transaction, error) {
return _Pancake.Contract.EmergencyRewardWithdraw(&_Pancake.TransactOpts, _amount)
}
// EmergencyRewardWithdraw is a paid mutator transaction binding the contract method 0x3279beab.
//
// Solidity: function emergencyRewardWithdraw(uint256 _amount) returns()
func (_Pancake *PancakeTransactorSession) EmergencyRewardWithdraw(_amount *big.Int) (*types.Transaction, error) {
return _Pancake.Contract.EmergencyRewardWithdraw(&_Pancake.TransactOpts, _amount)
}
// EmergencyWithdraw is a paid mutator transaction binding the contract method 0xdb2e21bc.
//
// Solidity: function emergencyWithdraw() returns()
func (_Pancake *PancakeTransactor) EmergencyWithdraw(opts *bind.TransactOpts) (*types.Transaction, error) {
return _Pancake.contract.Transact(opts, "emergencyWithdraw")
}
// EmergencyWithdraw is a paid mutator transaction binding the contract method 0xdb2e21bc.
//
// Solidity: function emergencyWithdraw() returns()
func (_Pancake *PancakeSession) EmergencyWithdraw() (*types.Transaction, error) {
return _Pancake.Contract.EmergencyWithdraw(&_Pancake.TransactOpts)
}
// EmergencyWithdraw is a paid mutator transaction binding the contract method 0xdb2e21bc.
//
// Solidity: function emergencyWithdraw() returns()
func (_Pancake *PancakeTransactorSession) EmergencyWithdraw() (*types.Transaction, error) {
return _Pancake.Contract.EmergencyWithdraw(&_Pancake.TransactOpts)
}
// Initialize is a paid mutator transaction binding the contract method 0x83a5041c.
//
// Solidity: function initialize(address _stakedToken, address _rewardToken, uint256 _rewardPerBlock, uint256 _startBlock, uint256 _bonusEndBlock, uint256 _poolLimitPerUser, address _admin) returns()
func (_Pancake *PancakeTransactor) Initialize(opts *bind.TransactOpts, _stakedToken common.Address, _rewardToken common.Address, _rewardPerBlock *big.Int, _startBlock *big.Int, _bonusEndBlock *big.Int, _poolLimitPerUser *big.Int, _admin common.Address) (*types.Transaction, error) {
return _Pancake.contract.Transact(opts, "initialize", _stakedToken, _rewardToken, _rewardPerBlock, _startBlock, _bonusEndBlock, _poolLimitPerUser, _admin)
}
// Initialize is a paid mutator transaction binding the contract method 0x83a5041c.
//
// Solidity: function initialize(address _stakedToken, address _rewardToken, uint256 _rewardPerBlock, uint256 _startBlock, uint256 _bonusEndBlock, uint256 _poolLimitPerUser, address _admin) returns()
func (_Pancake *PancakeSession) Initialize(_stakedToken common.Address, _rewardToken common.Address, _rewardPerBlock *big.Int, _startBlock *big.Int, _bonusEndBlock *big.Int, _poolLimitPerUser *big.Int, _admin common.Address) (*types.Transaction, error) {
return _Pancake.Contract.Initialize(&_Pancake.TransactOpts, _stakedToken, _rewardToken, _rewardPerBlock, _startBlock, _bonusEndBlock, _poolLimitPerUser, _admin)
}
// Initialize is a paid mutator transaction binding the contract method 0x83a5041c.
//
// Solidity: function initialize(address _stakedToken, address _rewardToken, uint256 _rewardPerBlock, uint256 _startBlock, uint256 _bonusEndBlock, uint256 _poolLimitPerUser, address _admin) returns()
func (_Pancake *PancakeTransactorSession) Initialize(_stakedToken common.Address, _rewardToken common.Address, _rewardPerBlock *big.Int, _startBlock *big.Int, _bonusEndBlock *big.Int, _poolLimitPerUser *big.Int, _admin common.Address) (*types.Transaction, error) {
return _Pancake.Contract.Initialize(&_Pancake.TransactOpts, _stakedToken, _rewardToken, _rewardPerBlock, _startBlock, _bonusEndBlock, _poolLimitPerUser, _admin)
}
// RecoverWrongTokens is a paid mutator transaction binding the contract method 0x3f138d4b.
//
// Solidity: function recoverWrongTokens(address _tokenAddress, uint256 _tokenAmount) returns()
func (_Pancake *PancakeTransactor) RecoverWrongTokens(opts *bind.TransactOpts, _tokenAddress common.Address, _tokenAmount *big.Int) (*types.Transaction, error) {
return _Pancake.contract.Transact(opts, "recoverWrongTokens", _tokenAddress, _tokenAmount)
}
// RecoverWrongTokens is a paid mutator transaction binding the contract method 0x3f138d4b.
//
// Solidity: function recoverWrongTokens(address _tokenAddress, uint256 _tokenAmount) returns()
func (_Pancake *PancakeSession) RecoverWrongTokens(_tokenAddress common.Address, _tokenAmount *big.Int) (*types.Transaction, error) {
return _Pancake.Contract.RecoverWrongTokens(&_Pancake.TransactOpts, _tokenAddress, _tokenAmount)
}
// RecoverWrongTokens is a paid mutator transaction binding the contract method 0x3f138d4b.
//
// Solidity: function recoverWrongTokens(address _tokenAddress, uint256 _tokenAmount) returns()
func (_Pancake *PancakeTransactorSession) RecoverWrongTokens(_tokenAddress common.Address, _tokenAmount *big.Int) (*types.Transaction, error) {
return _Pancake.Contract.RecoverWrongTokens(&_Pancake.TransactOpts, _tokenAddress, _tokenAmount)
}
// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
//
// Solidity: function renounceOwnership() returns()
func (_Pancake *PancakeTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) {
return _Pancake.contract.Transact(opts, "renounceOwnership")
}
// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
//
// Solidity: function renounceOwnership() returns()
func (_Pancake *PancakeSession) RenounceOwnership() (*types.Transaction, error) {
return _Pancake.Contract.RenounceOwnership(&_Pancake.TransactOpts)
}
// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
//
// Solidity: function renounceOwnership() returns()
func (_Pancake *PancakeTransactorSession) RenounceOwnership() (*types.Transaction, error) {
return _Pancake.Contract.RenounceOwnership(&_Pancake.TransactOpts)
}
// StopReward is a paid mutator transaction binding the contract method 0x80dc0672.
//
// Solidity: function stopReward() returns()
func (_Pancake *PancakeTransactor) StopReward(opts *bind.TransactOpts) (*types.Transaction, error) {
return _Pancake.contract.Transact(opts, "stopReward")
}
// StopReward is a paid mutator transaction binding the contract method 0x80dc0672.
//
// Solidity: function stopReward() returns()
func (_Pancake *PancakeSession) StopReward() (*types.Transaction, error) {
return _Pancake.Contract.StopReward(&_Pancake.TransactOpts)
}
// StopReward is a paid mutator transaction binding the contract method 0x80dc0672.
//
// Solidity: function stopReward() returns()
func (_Pancake *PancakeTransactorSession) StopReward() (*types.Transaction, error) {
return _Pancake.Contract.StopReward(&_Pancake.TransactOpts)
}
// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
//
// Solidity: function transferOwnership(address newOwner) returns()
func (_Pancake *PancakeTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) {
return _Pancake.contract.Transact(opts, "transferOwnership", newOwner)
}
// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
//
// Solidity: function transferOwnership(address newOwner) returns()
func (_Pancake *PancakeSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) {
return _Pancake.Contract.TransferOwnership(&_Pancake.TransactOpts, newOwner)
}
// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
//
// Solidity: function transferOwnership(address newOwner) returns()
func (_Pancake *PancakeTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) {
return _Pancake.Contract.TransferOwnership(&_Pancake.TransactOpts, newOwner)
}
// UpdatePoolLimitPerUser is a paid mutator transaction binding the contract method 0xa0b40905.
//
// Solidity: function updatePoolLimitPerUser(bool _hasUserLimit, uint256 _poolLimitPerUser) returns()
func (_Pancake *PancakeTransactor) UpdatePoolLimitPerUser(opts *bind.TransactOpts, _hasUserLimit bool, _poolLimitPerUser *big.Int) (*types.Transaction, error) {
return _Pancake.contract.Transact(opts, "updatePoolLimitPerUser", _hasUserLimit, _poolLimitPerUser)
}
// UpdatePoolLimitPerUser is a paid mutator transaction binding the contract method 0xa0b40905.
//
// Solidity: function updatePoolLimitPerUser(bool _hasUserLimit, uint256 _poolLimitPerUser) returns()
func (_Pancake *PancakeSession) UpdatePoolLimitPerUser(_hasUserLimit bool, _poolLimitPerUser *big.Int) (*types.Transaction, error) {
return _Pancake.Contract.UpdatePoolLimitPerUser(&_Pancake.TransactOpts, _hasUserLimit, _poolLimitPerUser)
}
// UpdatePoolLimitPerUser is a paid mutator transaction binding the contract method 0xa0b40905.
//
// Solidity: function updatePoolLimitPerUser(bool _hasUserLimit, uint256 _poolLimitPerUser) returns()
func (_Pancake *PancakeTransactorSession) UpdatePoolLimitPerUser(_hasUserLimit bool, _poolLimitPerUser *big.Int) (*types.Transaction, error) {
return _Pancake.Contract.UpdatePoolLimitPerUser(&_Pancake.TransactOpts, _hasUserLimit, _poolLimitPerUser)
}
// UpdateRewardPerBlock is a paid mutator transaction binding the contract method 0x01f8a976.
//
// Solidity: function updateRewardPerBlock(uint256 _rewardPerBlock) returns()
func (_Pancake *PancakeTransactor) UpdateRewardPerBlock(opts *bind.TransactOpts, _rewardPerBlock *big.Int) (*types.Transaction, error) {
return _Pancake.contract.Transact(opts, "updateRewardPerBlock", _rewardPerBlock)
}
// UpdateRewardPerBlock is a paid mutator transaction binding the contract method 0x01f8a976.
//
// Solidity: function updateRewardPerBlock(uint256 _rewardPerBlock) returns()
func (_Pancake *PancakeSession) UpdateRewardPerBlock(_rewardPerBlock *big.Int) (*types.Transaction, error) {
return _Pancake.Contract.UpdateRewardPerBlock(&_Pancake.TransactOpts, _rewardPerBlock)
}
// UpdateRewardPerBlock is a paid mutator transaction binding the contract method 0x01f8a976.
//
// Solidity: function updateRewardPerBlock(uint256 _rewardPerBlock) returns()
func (_Pancake *PancakeTransactorSession) UpdateRewardPerBlock(_rewardPerBlock *big.Int) (*types.Transaction, error) {
return _Pancake.Contract.UpdateRewardPerBlock(&_Pancake.TransactOpts, _rewardPerBlock)
}
// UpdateStartAndEndBlocks is a paid mutator transaction binding the contract method 0x9513997f.
//
// Solidity: function updateStartAndEndBlocks(uint256 _startBlock, uint256 _bonusEndBlock) returns()
func (_Pancake *PancakeTransactor) UpdateStartAndEndBlocks(opts *bind.TransactOpts, _startBlock *big.Int, _bonusEndBlock *big.Int) (*types.Transaction, error) {
return _Pancake.contract.Transact(opts, "updateStartAndEndBlocks", _startBlock, _bonusEndBlock)
}
// UpdateStartAndEndBlocks is a paid mutator transaction binding the contract method 0x9513997f.
//
// Solidity: function updateStartAndEndBlocks(uint256 _startBlock, uint256 _bonusEndBlock) returns()
func (_Pancake *PancakeSession) UpdateStartAndEndBlocks(_startBlock *big.Int, _bonusEndBlock *big.Int) (*types.Transaction, error) {
return _Pancake.Contract.UpdateStartAndEndBlocks(&_Pancake.TransactOpts, _startBlock, _bonusEndBlock)
}
// UpdateStartAndEndBlocks is a paid mutator transaction binding the contract method 0x9513997f.
//
// Solidity: function updateStartAndEndBlocks(uint256 _startBlock, uint256 _bonusEndBlock) returns()
func (_Pancake *PancakeTransactorSession) UpdateStartAndEndBlocks(_startBlock *big.Int, _bonusEndBlock *big.Int) (*types.Transaction, error) {
return _Pancake.Contract.UpdateStartAndEndBlocks(&_Pancake.TransactOpts, _startBlock, _bonusEndBlock)
}
// Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d.
//
// Solidity: function withdraw(uint256 _amount) returns()
func (_Pancake *PancakeTransactor) Withdraw(opts *bind.TransactOpts, _amount *big.Int) (*types.Transaction, error) {
return _Pancake.contract.Transact(opts, "withdraw", _amount)
}
// Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d.
//
// Solidity: function withdraw(uint256 _amount) returns()
func (_Pancake *PancakeSession) Withdraw(_amount *big.Int) (*types.Transaction, error) {
return _Pancake.Contract.Withdraw(&_Pancake.TransactOpts, _amount)
}
// Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d.
//
// Solidity: function withdraw(uint256 _amount) returns()
func (_Pancake *PancakeTransactorSession) Withdraw(_amount *big.Int) (*types.Transaction, error) {
return _Pancake.Contract.Withdraw(&_Pancake.TransactOpts, _amount)
}
// PancakeAdminTokenRecoveryIterator is returned from FilterAdminTokenRecovery and is used to iterate over the raw logs and unpacked data for AdminTokenRecovery events raised by the Pancake contract.
type PancakeAdminTokenRecoveryIterator struct {
Event *PancakeAdminTokenRecovery // Event containing the contract specifics and raw log
contract *bind.BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data
logs chan types.Log // Log channel receiving the found contract events
sub ethereum.Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
// Next advances the iterator to the subsequent event, returning whether there
// are any more events found. In case of a retrieval or parsing error, false is
// returned and Error() can be queried for the exact failure.
func (it *PancakeAdminTokenRecoveryIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
}
// If the iterator completed, deliver directly whatever's available
if it.done {
select {
case log := <-it.logs:
it.Event = new(PancakeAdminTokenRecovery)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
default:
return false
}
}
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
it.Event = new(PancakeAdminTokenRecovery)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
}
it.Event.Raw = log
return true
case err := <-it.sub.Err():
it.done = true
it.fail = err
return it.Next()
}
}
// Error returns any retrieval or parsing error occurred during filtering.
func (it *PancakeAdminTokenRecoveryIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
func (it *PancakeAdminTokenRecoveryIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
// PancakeAdminTokenRecovery represents a AdminTokenRecovery event raised by the Pancake contract.
type PancakeAdminTokenRecovery struct {
TokenRecovered common.Address
Amount *big.Int
Raw types.Log // Blockchain specific contextual infos
}
// FilterAdminTokenRecovery is a free log retrieval operation binding the contract event 0x74545154aac348a3eac92596bd1971957ca94795f4e954ec5f613b55fab78129.
//
// Solidity: event AdminTokenRecovery(address tokenRecovered, uint256 amount)
func (_Pancake *PancakeFilterer) FilterAdminTokenRecovery(opts *bind.FilterOpts) (*PancakeAdminTokenRecoveryIterator, error) {
logs, sub, err := _Pancake.contract.FilterLogs(opts, "AdminTokenRecovery")
if err != nil {
return nil, err
}
return &PancakeAdminTokenRecoveryIterator{contract: _Pancake.contract, event: "AdminTokenRecovery", logs: logs, sub: sub}, nil
}
// WatchAdminTokenRecovery is a free log subscription operation binding the contract event 0x74545154aac348a3eac92596bd1971957ca94795f4e954ec5f613b55fab78129.
//
// Solidity: event AdminTokenRecovery(address tokenRecovered, uint256 amount)
func (_Pancake *PancakeFilterer) WatchAdminTokenRecovery(opts *bind.WatchOpts, sink chan<- *PancakeAdminTokenRecovery) (event.Subscription, error) {
logs, sub, err := _Pancake.contract.WatchLogs(opts, "AdminTokenRecovery")
if err != nil {
return nil, err
}
return event.NewSubscription(func(quit <-chan struct{}) error {