@pancakeswap/pools 5.1.17 → 5.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +369 -364
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +371 -366
- package/dist/index.mjs.map +1 -1
- package/dist/queries/fetchPools.d.ts +1 -1
- package/dist/queries/fetchPools.d.ts.map +1 -1
- package/dist/queries/fetchUserPoolsData.d.ts.map +1 -1
- package/dist/utils/getPoolContractBySousId.d.ts +2 -2
- package/dist/utils/getPoolContractBySousId.d.ts.map +1 -1
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -4,16 +4,15 @@ var chains = require('@pancakeswap/chains');
|
|
|
4
4
|
var tokens = require('@pancakeswap/tokens');
|
|
5
5
|
var viem = require('viem');
|
|
6
6
|
var BigNumber7 = require('bignumber.js');
|
|
7
|
-
var fromPairs2 = require('lodash/fromPairs');
|
|
8
7
|
var chunk = require('lodash/chunk');
|
|
9
|
-
var
|
|
8
|
+
var fromPairs2 = require('lodash/fromPairs');
|
|
10
9
|
var uniq = require('lodash/uniq');
|
|
11
10
|
|
|
12
11
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
12
|
|
|
14
13
|
var BigNumber7__default = /*#__PURE__*/_interopDefault(BigNumber7);
|
|
15
|
-
var fromPairs2__default = /*#__PURE__*/_interopDefault(fromPairs2);
|
|
16
14
|
var chunk__default = /*#__PURE__*/_interopDefault(chunk);
|
|
15
|
+
var fromPairs2__default = /*#__PURE__*/_interopDefault(fromPairs2);
|
|
17
16
|
var uniq__default = /*#__PURE__*/_interopDefault(uniq);
|
|
18
17
|
|
|
19
18
|
// src/constants/pools/index.ts
|
|
@@ -3772,11 +3771,115 @@ new BigNumber7__default.default(9);
|
|
|
3772
3771
|
new BigNumber7__default.default(10);
|
|
3773
3772
|
new BigNumber7__default.default(100);
|
|
3774
3773
|
|
|
3775
|
-
// src/abis/
|
|
3776
|
-
var
|
|
3774
|
+
// src/abis/ISmartChef.ts
|
|
3775
|
+
var smartChefABI = [
|
|
3776
|
+
{
|
|
3777
|
+
inputs: [
|
|
3778
|
+
{ internalType: "address", name: "_pancakeProfile", type: "address" },
|
|
3779
|
+
{ internalType: "bool", name: "_pancakeProfileIsRequested", type: "bool" },
|
|
3780
|
+
{ internalType: "uint256", name: "_pancakeProfileThresholdPoints", type: "uint256" }
|
|
3781
|
+
],
|
|
3782
|
+
stateMutability: "nonpayable",
|
|
3783
|
+
type: "constructor"
|
|
3784
|
+
},
|
|
3785
|
+
{
|
|
3786
|
+
anonymous: false,
|
|
3787
|
+
inputs: [
|
|
3788
|
+
{ indexed: true, internalType: "address", name: "user", type: "address" },
|
|
3789
|
+
{ indexed: false, internalType: "uint256", name: "amount", type: "uint256" }
|
|
3790
|
+
],
|
|
3791
|
+
name: "Deposit",
|
|
3792
|
+
type: "event"
|
|
3793
|
+
},
|
|
3794
|
+
{
|
|
3795
|
+
anonymous: false,
|
|
3796
|
+
inputs: [
|
|
3797
|
+
{ indexed: true, internalType: "address", name: "user", type: "address" },
|
|
3798
|
+
{ indexed: false, internalType: "uint256", name: "amount", type: "uint256" }
|
|
3799
|
+
],
|
|
3800
|
+
name: "EmergencyWithdraw",
|
|
3801
|
+
type: "event"
|
|
3802
|
+
},
|
|
3803
|
+
{
|
|
3804
|
+
anonymous: false,
|
|
3805
|
+
inputs: [{ indexed: false, internalType: "uint256", name: "poolLimitPerUser", type: "uint256" }],
|
|
3806
|
+
name: "NewPoolLimit",
|
|
3807
|
+
type: "event"
|
|
3808
|
+
},
|
|
3809
|
+
{
|
|
3810
|
+
anonymous: false,
|
|
3811
|
+
inputs: [{ indexed: false, internalType: "uint256", name: "rewardPerSecond", type: "uint256" }],
|
|
3812
|
+
name: "NewRewardPerSecond",
|
|
3813
|
+
type: "event"
|
|
3814
|
+
},
|
|
3815
|
+
{
|
|
3816
|
+
anonymous: false,
|
|
3817
|
+
inputs: [
|
|
3818
|
+
{ indexed: false, internalType: "uint256", name: "startTimestamp", type: "uint256" },
|
|
3819
|
+
{ indexed: false, internalType: "uint256", name: "endTimestamp", type: "uint256" }
|
|
3820
|
+
],
|
|
3821
|
+
name: "NewStartAndEndTimestamp",
|
|
3822
|
+
type: "event"
|
|
3823
|
+
},
|
|
3824
|
+
{
|
|
3825
|
+
anonymous: false,
|
|
3826
|
+
inputs: [
|
|
3827
|
+
{ indexed: true, internalType: "address", name: "previousOwner", type: "address" },
|
|
3828
|
+
{ indexed: true, internalType: "address", name: "newOwner", type: "address" }
|
|
3829
|
+
],
|
|
3830
|
+
name: "OwnershipTransferred",
|
|
3831
|
+
type: "event"
|
|
3832
|
+
},
|
|
3833
|
+
{
|
|
3834
|
+
anonymous: false,
|
|
3835
|
+
inputs: [{ indexed: false, internalType: "uint256", name: "blockNumber", type: "uint256" }],
|
|
3836
|
+
name: "RewardsStop",
|
|
3837
|
+
type: "event"
|
|
3838
|
+
},
|
|
3839
|
+
{
|
|
3840
|
+
anonymous: false,
|
|
3841
|
+
inputs: [
|
|
3842
|
+
{ indexed: true, internalType: "address", name: "token", type: "address" },
|
|
3843
|
+
{ indexed: false, internalType: "uint256", name: "amount", type: "uint256" }
|
|
3844
|
+
],
|
|
3845
|
+
name: "TokenRecovery",
|
|
3846
|
+
type: "event"
|
|
3847
|
+
},
|
|
3848
|
+
{
|
|
3849
|
+
anonymous: false,
|
|
3850
|
+
inputs: [
|
|
3851
|
+
{ indexed: false, internalType: "bool", name: "isProfileRequested", type: "bool" },
|
|
3852
|
+
{ indexed: false, internalType: "uint256", name: "thresholdPoints", type: "uint256" }
|
|
3853
|
+
],
|
|
3854
|
+
name: "UpdateProfileAndThresholdPointsRequirement",
|
|
3855
|
+
type: "event"
|
|
3856
|
+
},
|
|
3857
|
+
{
|
|
3858
|
+
anonymous: false,
|
|
3859
|
+
inputs: [
|
|
3860
|
+
{ indexed: true, internalType: "address", name: "user", type: "address" },
|
|
3861
|
+
{ indexed: false, internalType: "uint256", name: "amount", type: "uint256" }
|
|
3862
|
+
],
|
|
3863
|
+
name: "Withdraw",
|
|
3864
|
+
type: "event"
|
|
3865
|
+
},
|
|
3777
3866
|
{
|
|
3778
3867
|
inputs: [],
|
|
3779
|
-
name: "
|
|
3868
|
+
name: "PRECISION_FACTOR",
|
|
3869
|
+
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
3870
|
+
stateMutability: "view",
|
|
3871
|
+
type: "function"
|
|
3872
|
+
},
|
|
3873
|
+
{
|
|
3874
|
+
inputs: [],
|
|
3875
|
+
name: "SMART_CHEF_FACTORY",
|
|
3876
|
+
outputs: [{ internalType: "address", name: "", type: "address" }],
|
|
3877
|
+
stateMutability: "view",
|
|
3878
|
+
type: "function"
|
|
3879
|
+
},
|
|
3880
|
+
{
|
|
3881
|
+
inputs: [],
|
|
3882
|
+
name: "accTokenPerShare",
|
|
3780
3883
|
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
3781
3884
|
stateMutability: "view",
|
|
3782
3885
|
type: "function"
|
|
@@ -3796,17 +3899,57 @@ var sousChefABI = [
|
|
|
3796
3899
|
type: "function"
|
|
3797
3900
|
},
|
|
3798
3901
|
{ inputs: [], name: "emergencyWithdraw", outputs: [], stateMutability: "nonpayable", type: "function" },
|
|
3902
|
+
{
|
|
3903
|
+
inputs: [],
|
|
3904
|
+
name: "endTimestamp",
|
|
3905
|
+
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
3906
|
+
stateMutability: "view",
|
|
3907
|
+
type: "function"
|
|
3908
|
+
},
|
|
3909
|
+
{
|
|
3910
|
+
inputs: [],
|
|
3911
|
+
name: "hasUserLimit",
|
|
3912
|
+
outputs: [{ internalType: "bool", name: "", type: "bool" }],
|
|
3913
|
+
stateMutability: "view",
|
|
3914
|
+
type: "function"
|
|
3915
|
+
},
|
|
3799
3916
|
{
|
|
3800
3917
|
inputs: [
|
|
3801
|
-
{ internalType: "
|
|
3802
|
-
{ internalType: "
|
|
3918
|
+
{ internalType: "contract IERC20Metadata", name: "_stakedToken", type: "address" },
|
|
3919
|
+
{ internalType: "contract IERC20Metadata", name: "_rewardToken", type: "address" },
|
|
3920
|
+
{ internalType: "uint256", name: "_rewardPerSecond", type: "uint256" },
|
|
3921
|
+
{ internalType: "uint256", name: "_startTimestamp", type: "uint256" },
|
|
3922
|
+
{ internalType: "uint256", name: "_endTimestamp", type: "uint256" },
|
|
3923
|
+
{ internalType: "uint256", name: "_poolLimitPerUser", type: "uint256" },
|
|
3924
|
+
{ internalType: "uint256", name: "_numberSecondsForUserLimit", type: "uint256" },
|
|
3925
|
+
{ internalType: "address", name: "_admin", type: "address" }
|
|
3803
3926
|
],
|
|
3804
|
-
name: "
|
|
3927
|
+
name: "initialize",
|
|
3928
|
+
outputs: [],
|
|
3929
|
+
stateMutability: "nonpayable",
|
|
3930
|
+
type: "function"
|
|
3931
|
+
},
|
|
3932
|
+
{
|
|
3933
|
+
inputs: [],
|
|
3934
|
+
name: "isInitialized",
|
|
3935
|
+
outputs: [{ internalType: "bool", name: "", type: "bool" }],
|
|
3936
|
+
stateMutability: "view",
|
|
3937
|
+
type: "function"
|
|
3938
|
+
},
|
|
3939
|
+
{
|
|
3940
|
+
inputs: [],
|
|
3941
|
+
name: "lastRewardTimestamp",
|
|
3942
|
+
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
3943
|
+
stateMutability: "view",
|
|
3944
|
+
type: "function"
|
|
3945
|
+
},
|
|
3946
|
+
{
|
|
3947
|
+
inputs: [],
|
|
3948
|
+
name: "numberSecondsForUserLimit",
|
|
3805
3949
|
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
3806
3950
|
stateMutability: "view",
|
|
3807
3951
|
type: "function"
|
|
3808
3952
|
},
|
|
3809
|
-
{ inputs: [], name: "massUpdatePools", outputs: [], stateMutability: "nonpayable", type: "function" },
|
|
3810
3953
|
{
|
|
3811
3954
|
inputs: [],
|
|
3812
3955
|
name: "owner",
|
|
@@ -3814,6 +3957,27 @@ var sousChefABI = [
|
|
|
3814
3957
|
stateMutability: "view",
|
|
3815
3958
|
type: "function"
|
|
3816
3959
|
},
|
|
3960
|
+
{
|
|
3961
|
+
inputs: [],
|
|
3962
|
+
name: "pancakeProfile",
|
|
3963
|
+
outputs: [{ internalType: "address", name: "", type: "address" }],
|
|
3964
|
+
stateMutability: "view",
|
|
3965
|
+
type: "function"
|
|
3966
|
+
},
|
|
3967
|
+
{
|
|
3968
|
+
inputs: [],
|
|
3969
|
+
name: "pancakeProfileIsRequested",
|
|
3970
|
+
outputs: [{ internalType: "bool", name: "", type: "bool" }],
|
|
3971
|
+
stateMutability: "view",
|
|
3972
|
+
type: "function"
|
|
3973
|
+
},
|
|
3974
|
+
{
|
|
3975
|
+
inputs: [],
|
|
3976
|
+
name: "pancakeProfileThresholdPoints",
|
|
3977
|
+
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
3978
|
+
stateMutability: "view",
|
|
3979
|
+
type: "function"
|
|
3980
|
+
},
|
|
3817
3981
|
{
|
|
3818
3982
|
inputs: [{ internalType: "address", name: "_user", type: "address" }],
|
|
3819
3983
|
name: "pendingReward",
|
|
@@ -3822,21 +3986,23 @@ var sousChefABI = [
|
|
|
3822
3986
|
type: "function"
|
|
3823
3987
|
},
|
|
3824
3988
|
{
|
|
3825
|
-
inputs: [
|
|
3826
|
-
name: "
|
|
3827
|
-
outputs: [
|
|
3828
|
-
{ internalType: "contract IBEP20", name: "lpToken", type: "address" },
|
|
3829
|
-
{ internalType: "uint256", name: "allocPoint", type: "uint256" },
|
|
3830
|
-
{ internalType: "uint256", name: "lastRewardBlock", type: "uint256" },
|
|
3831
|
-
{ internalType: "uint256", name: "accCakePerShare", type: "uint256" }
|
|
3832
|
-
],
|
|
3989
|
+
inputs: [],
|
|
3990
|
+
name: "poolLimitPerUser",
|
|
3991
|
+
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
3833
3992
|
stateMutability: "view",
|
|
3834
3993
|
type: "function"
|
|
3835
3994
|
},
|
|
3995
|
+
{
|
|
3996
|
+
inputs: [{ internalType: "address", name: "_token", type: "address" }],
|
|
3997
|
+
name: "recoverToken",
|
|
3998
|
+
outputs: [],
|
|
3999
|
+
stateMutability: "nonpayable",
|
|
4000
|
+
type: "function"
|
|
4001
|
+
},
|
|
3836
4002
|
{ inputs: [], name: "renounceOwnership", outputs: [], stateMutability: "nonpayable", type: "function" },
|
|
3837
4003
|
{
|
|
3838
4004
|
inputs: [],
|
|
3839
|
-
name: "
|
|
4005
|
+
name: "rewardPerSecond",
|
|
3840
4006
|
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
3841
4007
|
stateMutability: "view",
|
|
3842
4008
|
type: "function"
|
|
@@ -3844,25 +4010,25 @@ var sousChefABI = [
|
|
|
3844
4010
|
{
|
|
3845
4011
|
inputs: [],
|
|
3846
4012
|
name: "rewardToken",
|
|
3847
|
-
outputs: [{ internalType: "contract
|
|
4013
|
+
outputs: [{ internalType: "contract IERC20Metadata", name: "", type: "address" }],
|
|
3848
4014
|
stateMutability: "view",
|
|
3849
4015
|
type: "function"
|
|
3850
4016
|
},
|
|
3851
4017
|
{
|
|
3852
4018
|
inputs: [],
|
|
3853
|
-
name: "
|
|
3854
|
-
outputs: [{ internalType: "
|
|
4019
|
+
name: "stakedToken",
|
|
4020
|
+
outputs: [{ internalType: "contract IERC20Metadata", name: "", type: "address" }],
|
|
3855
4021
|
stateMutability: "view",
|
|
3856
4022
|
type: "function"
|
|
3857
4023
|
},
|
|
3858
|
-
{ inputs: [], name: "stopReward", outputs: [], stateMutability: "nonpayable", type: "function" },
|
|
3859
4024
|
{
|
|
3860
4025
|
inputs: [],
|
|
3861
|
-
name: "
|
|
3862
|
-
outputs: [{ internalType: "
|
|
4026
|
+
name: "startTimestamp",
|
|
4027
|
+
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
3863
4028
|
stateMutability: "view",
|
|
3864
4029
|
type: "function"
|
|
3865
4030
|
},
|
|
4031
|
+
{ inputs: [], name: "stopReward", outputs: [], stateMutability: "nonpayable", type: "function" },
|
|
3866
4032
|
{
|
|
3867
4033
|
inputs: [{ internalType: "address", name: "newOwner", type: "address" }],
|
|
3868
4034
|
name: "transferOwnership",
|
|
@@ -3871,8 +4037,169 @@ var sousChefABI = [
|
|
|
3871
4037
|
type: "function"
|
|
3872
4038
|
},
|
|
3873
4039
|
{
|
|
3874
|
-
inputs: [
|
|
3875
|
-
|
|
4040
|
+
inputs: [
|
|
4041
|
+
{ internalType: "bool", name: "_userLimit", type: "bool" },
|
|
4042
|
+
{ internalType: "uint256", name: "_poolLimitPerUser", type: "uint256" }
|
|
4043
|
+
],
|
|
4044
|
+
name: "updatePoolLimitPerUser",
|
|
4045
|
+
outputs: [],
|
|
4046
|
+
stateMutability: "nonpayable",
|
|
4047
|
+
type: "function"
|
|
4048
|
+
},
|
|
4049
|
+
{
|
|
4050
|
+
inputs: [
|
|
4051
|
+
{ internalType: "bool", name: "_isRequested", type: "bool" },
|
|
4052
|
+
{ internalType: "uint256", name: "_thresholdPoints", type: "uint256" }
|
|
4053
|
+
],
|
|
4054
|
+
name: "updateProfileAndThresholdPointsRequirement",
|
|
4055
|
+
outputs: [],
|
|
4056
|
+
stateMutability: "nonpayable",
|
|
4057
|
+
type: "function"
|
|
4058
|
+
},
|
|
4059
|
+
{
|
|
4060
|
+
inputs: [{ internalType: "uint256", name: "_rewardPerSecond", type: "uint256" }],
|
|
4061
|
+
name: "updateRewardPerSecond",
|
|
4062
|
+
outputs: [],
|
|
4063
|
+
stateMutability: "nonpayable",
|
|
4064
|
+
type: "function"
|
|
4065
|
+
},
|
|
4066
|
+
{
|
|
4067
|
+
inputs: [
|
|
4068
|
+
{ internalType: "uint256", name: "_startTimestamp", type: "uint256" },
|
|
4069
|
+
{ internalType: "uint256", name: "_endTimestamp", type: "uint256" }
|
|
4070
|
+
],
|
|
4071
|
+
name: "updateStartAndEndTimestamp",
|
|
4072
|
+
outputs: [],
|
|
4073
|
+
stateMutability: "nonpayable",
|
|
4074
|
+
type: "function"
|
|
4075
|
+
},
|
|
4076
|
+
{
|
|
4077
|
+
inputs: [{ internalType: "address", name: "", type: "address" }],
|
|
4078
|
+
name: "userInfo",
|
|
4079
|
+
outputs: [
|
|
4080
|
+
{ internalType: "uint256", name: "amount", type: "uint256" },
|
|
4081
|
+
{ internalType: "uint256", name: "rewardDebt", type: "uint256" }
|
|
4082
|
+
],
|
|
4083
|
+
stateMutability: "view",
|
|
4084
|
+
type: "function"
|
|
4085
|
+
},
|
|
4086
|
+
{
|
|
4087
|
+
inputs: [],
|
|
4088
|
+
name: "userLimit",
|
|
4089
|
+
outputs: [{ internalType: "bool", name: "", type: "bool" }],
|
|
4090
|
+
stateMutability: "view",
|
|
4091
|
+
type: "function"
|
|
4092
|
+
},
|
|
4093
|
+
{
|
|
4094
|
+
inputs: [{ internalType: "uint256", name: "_amount", type: "uint256" }],
|
|
4095
|
+
name: "withdraw",
|
|
4096
|
+
outputs: [],
|
|
4097
|
+
stateMutability: "nonpayable",
|
|
4098
|
+
type: "function"
|
|
4099
|
+
}
|
|
4100
|
+
];
|
|
4101
|
+
|
|
4102
|
+
// src/abis/ISousChef.ts
|
|
4103
|
+
var sousChefABI = [
|
|
4104
|
+
{
|
|
4105
|
+
inputs: [],
|
|
4106
|
+
name: "bonusEndBlock",
|
|
4107
|
+
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
4108
|
+
stateMutability: "view",
|
|
4109
|
+
type: "function"
|
|
4110
|
+
},
|
|
4111
|
+
{
|
|
4112
|
+
inputs: [{ internalType: "uint256", name: "_amount", type: "uint256" }],
|
|
4113
|
+
name: "deposit",
|
|
4114
|
+
outputs: [],
|
|
4115
|
+
stateMutability: "nonpayable",
|
|
4116
|
+
type: "function"
|
|
4117
|
+
},
|
|
4118
|
+
{
|
|
4119
|
+
inputs: [{ internalType: "uint256", name: "_amount", type: "uint256" }],
|
|
4120
|
+
name: "emergencyRewardWithdraw",
|
|
4121
|
+
outputs: [],
|
|
4122
|
+
stateMutability: "nonpayable",
|
|
4123
|
+
type: "function"
|
|
4124
|
+
},
|
|
4125
|
+
{ inputs: [], name: "emergencyWithdraw", outputs: [], stateMutability: "nonpayable", type: "function" },
|
|
4126
|
+
{
|
|
4127
|
+
inputs: [
|
|
4128
|
+
{ internalType: "uint256", name: "_from", type: "uint256" },
|
|
4129
|
+
{ internalType: "uint256", name: "_to", type: "uint256" }
|
|
4130
|
+
],
|
|
4131
|
+
name: "getMultiplier",
|
|
4132
|
+
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
4133
|
+
stateMutability: "view",
|
|
4134
|
+
type: "function"
|
|
4135
|
+
},
|
|
4136
|
+
{ inputs: [], name: "massUpdatePools", outputs: [], stateMutability: "nonpayable", type: "function" },
|
|
4137
|
+
{
|
|
4138
|
+
inputs: [],
|
|
4139
|
+
name: "owner",
|
|
4140
|
+
outputs: [{ internalType: "address", name: "", type: "address" }],
|
|
4141
|
+
stateMutability: "view",
|
|
4142
|
+
type: "function"
|
|
4143
|
+
},
|
|
4144
|
+
{
|
|
4145
|
+
inputs: [{ internalType: "address", name: "_user", type: "address" }],
|
|
4146
|
+
name: "pendingReward",
|
|
4147
|
+
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
4148
|
+
stateMutability: "view",
|
|
4149
|
+
type: "function"
|
|
4150
|
+
},
|
|
4151
|
+
{
|
|
4152
|
+
inputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
4153
|
+
name: "poolInfo",
|
|
4154
|
+
outputs: [
|
|
4155
|
+
{ internalType: "contract IBEP20", name: "lpToken", type: "address" },
|
|
4156
|
+
{ internalType: "uint256", name: "allocPoint", type: "uint256" },
|
|
4157
|
+
{ internalType: "uint256", name: "lastRewardBlock", type: "uint256" },
|
|
4158
|
+
{ internalType: "uint256", name: "accCakePerShare", type: "uint256" }
|
|
4159
|
+
],
|
|
4160
|
+
stateMutability: "view",
|
|
4161
|
+
type: "function"
|
|
4162
|
+
},
|
|
4163
|
+
{ inputs: [], name: "renounceOwnership", outputs: [], stateMutability: "nonpayable", type: "function" },
|
|
4164
|
+
{
|
|
4165
|
+
inputs: [],
|
|
4166
|
+
name: "rewardPerBlock",
|
|
4167
|
+
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
4168
|
+
stateMutability: "view",
|
|
4169
|
+
type: "function"
|
|
4170
|
+
},
|
|
4171
|
+
{
|
|
4172
|
+
inputs: [],
|
|
4173
|
+
name: "rewardToken",
|
|
4174
|
+
outputs: [{ internalType: "contract IBEP20", name: "", type: "address" }],
|
|
4175
|
+
stateMutability: "view",
|
|
4176
|
+
type: "function"
|
|
4177
|
+
},
|
|
4178
|
+
{
|
|
4179
|
+
inputs: [],
|
|
4180
|
+
name: "startBlock",
|
|
4181
|
+
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
4182
|
+
stateMutability: "view",
|
|
4183
|
+
type: "function"
|
|
4184
|
+
},
|
|
4185
|
+
{ inputs: [], name: "stopReward", outputs: [], stateMutability: "nonpayable", type: "function" },
|
|
4186
|
+
{
|
|
4187
|
+
inputs: [],
|
|
4188
|
+
name: "syrup",
|
|
4189
|
+
outputs: [{ internalType: "contract IBEP20", name: "", type: "address" }],
|
|
4190
|
+
stateMutability: "view",
|
|
4191
|
+
type: "function"
|
|
4192
|
+
},
|
|
4193
|
+
{
|
|
4194
|
+
inputs: [{ internalType: "address", name: "newOwner", type: "address" }],
|
|
4195
|
+
name: "transferOwnership",
|
|
4196
|
+
outputs: [],
|
|
4197
|
+
stateMutability: "nonpayable",
|
|
4198
|
+
type: "function"
|
|
4199
|
+
},
|
|
4200
|
+
{
|
|
4201
|
+
inputs: [{ internalType: "uint256", name: "_pid", type: "uint256" }],
|
|
4202
|
+
name: "updatePool",
|
|
3876
4203
|
outputs: [],
|
|
3877
4204
|
stateMutability: "nonpayable",
|
|
3878
4205
|
type: "function"
|
|
@@ -4239,334 +4566,6 @@ var sousChefV2ABI = [
|
|
|
4239
4566
|
}
|
|
4240
4567
|
];
|
|
4241
4568
|
|
|
4242
|
-
// src/abis/ISmartChef.ts
|
|
4243
|
-
var smartChefABI = [
|
|
4244
|
-
{
|
|
4245
|
-
inputs: [
|
|
4246
|
-
{ internalType: "address", name: "_pancakeProfile", type: "address" },
|
|
4247
|
-
{ internalType: "bool", name: "_pancakeProfileIsRequested", type: "bool" },
|
|
4248
|
-
{ internalType: "uint256", name: "_pancakeProfileThresholdPoints", type: "uint256" }
|
|
4249
|
-
],
|
|
4250
|
-
stateMutability: "nonpayable",
|
|
4251
|
-
type: "constructor"
|
|
4252
|
-
},
|
|
4253
|
-
{
|
|
4254
|
-
anonymous: false,
|
|
4255
|
-
inputs: [
|
|
4256
|
-
{ indexed: true, internalType: "address", name: "user", type: "address" },
|
|
4257
|
-
{ indexed: false, internalType: "uint256", name: "amount", type: "uint256" }
|
|
4258
|
-
],
|
|
4259
|
-
name: "Deposit",
|
|
4260
|
-
type: "event"
|
|
4261
|
-
},
|
|
4262
|
-
{
|
|
4263
|
-
anonymous: false,
|
|
4264
|
-
inputs: [
|
|
4265
|
-
{ indexed: true, internalType: "address", name: "user", type: "address" },
|
|
4266
|
-
{ indexed: false, internalType: "uint256", name: "amount", type: "uint256" }
|
|
4267
|
-
],
|
|
4268
|
-
name: "EmergencyWithdraw",
|
|
4269
|
-
type: "event"
|
|
4270
|
-
},
|
|
4271
|
-
{
|
|
4272
|
-
anonymous: false,
|
|
4273
|
-
inputs: [{ indexed: false, internalType: "uint256", name: "poolLimitPerUser", type: "uint256" }],
|
|
4274
|
-
name: "NewPoolLimit",
|
|
4275
|
-
type: "event"
|
|
4276
|
-
},
|
|
4277
|
-
{
|
|
4278
|
-
anonymous: false,
|
|
4279
|
-
inputs: [{ indexed: false, internalType: "uint256", name: "rewardPerSecond", type: "uint256" }],
|
|
4280
|
-
name: "NewRewardPerSecond",
|
|
4281
|
-
type: "event"
|
|
4282
|
-
},
|
|
4283
|
-
{
|
|
4284
|
-
anonymous: false,
|
|
4285
|
-
inputs: [
|
|
4286
|
-
{ indexed: false, internalType: "uint256", name: "startTimestamp", type: "uint256" },
|
|
4287
|
-
{ indexed: false, internalType: "uint256", name: "endTimestamp", type: "uint256" }
|
|
4288
|
-
],
|
|
4289
|
-
name: "NewStartAndEndTimestamp",
|
|
4290
|
-
type: "event"
|
|
4291
|
-
},
|
|
4292
|
-
{
|
|
4293
|
-
anonymous: false,
|
|
4294
|
-
inputs: [
|
|
4295
|
-
{ indexed: true, internalType: "address", name: "previousOwner", type: "address" },
|
|
4296
|
-
{ indexed: true, internalType: "address", name: "newOwner", type: "address" }
|
|
4297
|
-
],
|
|
4298
|
-
name: "OwnershipTransferred",
|
|
4299
|
-
type: "event"
|
|
4300
|
-
},
|
|
4301
|
-
{
|
|
4302
|
-
anonymous: false,
|
|
4303
|
-
inputs: [{ indexed: false, internalType: "uint256", name: "blockNumber", type: "uint256" }],
|
|
4304
|
-
name: "RewardsStop",
|
|
4305
|
-
type: "event"
|
|
4306
|
-
},
|
|
4307
|
-
{
|
|
4308
|
-
anonymous: false,
|
|
4309
|
-
inputs: [
|
|
4310
|
-
{ indexed: true, internalType: "address", name: "token", type: "address" },
|
|
4311
|
-
{ indexed: false, internalType: "uint256", name: "amount", type: "uint256" }
|
|
4312
|
-
],
|
|
4313
|
-
name: "TokenRecovery",
|
|
4314
|
-
type: "event"
|
|
4315
|
-
},
|
|
4316
|
-
{
|
|
4317
|
-
anonymous: false,
|
|
4318
|
-
inputs: [
|
|
4319
|
-
{ indexed: false, internalType: "bool", name: "isProfileRequested", type: "bool" },
|
|
4320
|
-
{ indexed: false, internalType: "uint256", name: "thresholdPoints", type: "uint256" }
|
|
4321
|
-
],
|
|
4322
|
-
name: "UpdateProfileAndThresholdPointsRequirement",
|
|
4323
|
-
type: "event"
|
|
4324
|
-
},
|
|
4325
|
-
{
|
|
4326
|
-
anonymous: false,
|
|
4327
|
-
inputs: [
|
|
4328
|
-
{ indexed: true, internalType: "address", name: "user", type: "address" },
|
|
4329
|
-
{ indexed: false, internalType: "uint256", name: "amount", type: "uint256" }
|
|
4330
|
-
],
|
|
4331
|
-
name: "Withdraw",
|
|
4332
|
-
type: "event"
|
|
4333
|
-
},
|
|
4334
|
-
{
|
|
4335
|
-
inputs: [],
|
|
4336
|
-
name: "PRECISION_FACTOR",
|
|
4337
|
-
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
4338
|
-
stateMutability: "view",
|
|
4339
|
-
type: "function"
|
|
4340
|
-
},
|
|
4341
|
-
{
|
|
4342
|
-
inputs: [],
|
|
4343
|
-
name: "SMART_CHEF_FACTORY",
|
|
4344
|
-
outputs: [{ internalType: "address", name: "", type: "address" }],
|
|
4345
|
-
stateMutability: "view",
|
|
4346
|
-
type: "function"
|
|
4347
|
-
},
|
|
4348
|
-
{
|
|
4349
|
-
inputs: [],
|
|
4350
|
-
name: "accTokenPerShare",
|
|
4351
|
-
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
4352
|
-
stateMutability: "view",
|
|
4353
|
-
type: "function"
|
|
4354
|
-
},
|
|
4355
|
-
{
|
|
4356
|
-
inputs: [{ internalType: "uint256", name: "_amount", type: "uint256" }],
|
|
4357
|
-
name: "deposit",
|
|
4358
|
-
outputs: [],
|
|
4359
|
-
stateMutability: "nonpayable",
|
|
4360
|
-
type: "function"
|
|
4361
|
-
},
|
|
4362
|
-
{
|
|
4363
|
-
inputs: [{ internalType: "uint256", name: "_amount", type: "uint256" }],
|
|
4364
|
-
name: "emergencyRewardWithdraw",
|
|
4365
|
-
outputs: [],
|
|
4366
|
-
stateMutability: "nonpayable",
|
|
4367
|
-
type: "function"
|
|
4368
|
-
},
|
|
4369
|
-
{ inputs: [], name: "emergencyWithdraw", outputs: [], stateMutability: "nonpayable", type: "function" },
|
|
4370
|
-
{
|
|
4371
|
-
inputs: [],
|
|
4372
|
-
name: "endTimestamp",
|
|
4373
|
-
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
4374
|
-
stateMutability: "view",
|
|
4375
|
-
type: "function"
|
|
4376
|
-
},
|
|
4377
|
-
{
|
|
4378
|
-
inputs: [],
|
|
4379
|
-
name: "hasUserLimit",
|
|
4380
|
-
outputs: [{ internalType: "bool", name: "", type: "bool" }],
|
|
4381
|
-
stateMutability: "view",
|
|
4382
|
-
type: "function"
|
|
4383
|
-
},
|
|
4384
|
-
{
|
|
4385
|
-
inputs: [
|
|
4386
|
-
{ internalType: "contract IERC20Metadata", name: "_stakedToken", type: "address" },
|
|
4387
|
-
{ internalType: "contract IERC20Metadata", name: "_rewardToken", type: "address" },
|
|
4388
|
-
{ internalType: "uint256", name: "_rewardPerSecond", type: "uint256" },
|
|
4389
|
-
{ internalType: "uint256", name: "_startTimestamp", type: "uint256" },
|
|
4390
|
-
{ internalType: "uint256", name: "_endTimestamp", type: "uint256" },
|
|
4391
|
-
{ internalType: "uint256", name: "_poolLimitPerUser", type: "uint256" },
|
|
4392
|
-
{ internalType: "uint256", name: "_numberSecondsForUserLimit", type: "uint256" },
|
|
4393
|
-
{ internalType: "address", name: "_admin", type: "address" }
|
|
4394
|
-
],
|
|
4395
|
-
name: "initialize",
|
|
4396
|
-
outputs: [],
|
|
4397
|
-
stateMutability: "nonpayable",
|
|
4398
|
-
type: "function"
|
|
4399
|
-
},
|
|
4400
|
-
{
|
|
4401
|
-
inputs: [],
|
|
4402
|
-
name: "isInitialized",
|
|
4403
|
-
outputs: [{ internalType: "bool", name: "", type: "bool" }],
|
|
4404
|
-
stateMutability: "view",
|
|
4405
|
-
type: "function"
|
|
4406
|
-
},
|
|
4407
|
-
{
|
|
4408
|
-
inputs: [],
|
|
4409
|
-
name: "lastRewardTimestamp",
|
|
4410
|
-
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
4411
|
-
stateMutability: "view",
|
|
4412
|
-
type: "function"
|
|
4413
|
-
},
|
|
4414
|
-
{
|
|
4415
|
-
inputs: [],
|
|
4416
|
-
name: "numberSecondsForUserLimit",
|
|
4417
|
-
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
4418
|
-
stateMutability: "view",
|
|
4419
|
-
type: "function"
|
|
4420
|
-
},
|
|
4421
|
-
{
|
|
4422
|
-
inputs: [],
|
|
4423
|
-
name: "owner",
|
|
4424
|
-
outputs: [{ internalType: "address", name: "", type: "address" }],
|
|
4425
|
-
stateMutability: "view",
|
|
4426
|
-
type: "function"
|
|
4427
|
-
},
|
|
4428
|
-
{
|
|
4429
|
-
inputs: [],
|
|
4430
|
-
name: "pancakeProfile",
|
|
4431
|
-
outputs: [{ internalType: "address", name: "", type: "address" }],
|
|
4432
|
-
stateMutability: "view",
|
|
4433
|
-
type: "function"
|
|
4434
|
-
},
|
|
4435
|
-
{
|
|
4436
|
-
inputs: [],
|
|
4437
|
-
name: "pancakeProfileIsRequested",
|
|
4438
|
-
outputs: [{ internalType: "bool", name: "", type: "bool" }],
|
|
4439
|
-
stateMutability: "view",
|
|
4440
|
-
type: "function"
|
|
4441
|
-
},
|
|
4442
|
-
{
|
|
4443
|
-
inputs: [],
|
|
4444
|
-
name: "pancakeProfileThresholdPoints",
|
|
4445
|
-
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
4446
|
-
stateMutability: "view",
|
|
4447
|
-
type: "function"
|
|
4448
|
-
},
|
|
4449
|
-
{
|
|
4450
|
-
inputs: [{ internalType: "address", name: "_user", type: "address" }],
|
|
4451
|
-
name: "pendingReward",
|
|
4452
|
-
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
4453
|
-
stateMutability: "view",
|
|
4454
|
-
type: "function"
|
|
4455
|
-
},
|
|
4456
|
-
{
|
|
4457
|
-
inputs: [],
|
|
4458
|
-
name: "poolLimitPerUser",
|
|
4459
|
-
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
4460
|
-
stateMutability: "view",
|
|
4461
|
-
type: "function"
|
|
4462
|
-
},
|
|
4463
|
-
{
|
|
4464
|
-
inputs: [{ internalType: "address", name: "_token", type: "address" }],
|
|
4465
|
-
name: "recoverToken",
|
|
4466
|
-
outputs: [],
|
|
4467
|
-
stateMutability: "nonpayable",
|
|
4468
|
-
type: "function"
|
|
4469
|
-
},
|
|
4470
|
-
{ inputs: [], name: "renounceOwnership", outputs: [], stateMutability: "nonpayable", type: "function" },
|
|
4471
|
-
{
|
|
4472
|
-
inputs: [],
|
|
4473
|
-
name: "rewardPerSecond",
|
|
4474
|
-
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
4475
|
-
stateMutability: "view",
|
|
4476
|
-
type: "function"
|
|
4477
|
-
},
|
|
4478
|
-
{
|
|
4479
|
-
inputs: [],
|
|
4480
|
-
name: "rewardToken",
|
|
4481
|
-
outputs: [{ internalType: "contract IERC20Metadata", name: "", type: "address" }],
|
|
4482
|
-
stateMutability: "view",
|
|
4483
|
-
type: "function"
|
|
4484
|
-
},
|
|
4485
|
-
{
|
|
4486
|
-
inputs: [],
|
|
4487
|
-
name: "stakedToken",
|
|
4488
|
-
outputs: [{ internalType: "contract IERC20Metadata", name: "", type: "address" }],
|
|
4489
|
-
stateMutability: "view",
|
|
4490
|
-
type: "function"
|
|
4491
|
-
},
|
|
4492
|
-
{
|
|
4493
|
-
inputs: [],
|
|
4494
|
-
name: "startTimestamp",
|
|
4495
|
-
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
4496
|
-
stateMutability: "view",
|
|
4497
|
-
type: "function"
|
|
4498
|
-
},
|
|
4499
|
-
{ inputs: [], name: "stopReward", outputs: [], stateMutability: "nonpayable", type: "function" },
|
|
4500
|
-
{
|
|
4501
|
-
inputs: [{ internalType: "address", name: "newOwner", type: "address" }],
|
|
4502
|
-
name: "transferOwnership",
|
|
4503
|
-
outputs: [],
|
|
4504
|
-
stateMutability: "nonpayable",
|
|
4505
|
-
type: "function"
|
|
4506
|
-
},
|
|
4507
|
-
{
|
|
4508
|
-
inputs: [
|
|
4509
|
-
{ internalType: "bool", name: "_userLimit", type: "bool" },
|
|
4510
|
-
{ internalType: "uint256", name: "_poolLimitPerUser", type: "uint256" }
|
|
4511
|
-
],
|
|
4512
|
-
name: "updatePoolLimitPerUser",
|
|
4513
|
-
outputs: [],
|
|
4514
|
-
stateMutability: "nonpayable",
|
|
4515
|
-
type: "function"
|
|
4516
|
-
},
|
|
4517
|
-
{
|
|
4518
|
-
inputs: [
|
|
4519
|
-
{ internalType: "bool", name: "_isRequested", type: "bool" },
|
|
4520
|
-
{ internalType: "uint256", name: "_thresholdPoints", type: "uint256" }
|
|
4521
|
-
],
|
|
4522
|
-
name: "updateProfileAndThresholdPointsRequirement",
|
|
4523
|
-
outputs: [],
|
|
4524
|
-
stateMutability: "nonpayable",
|
|
4525
|
-
type: "function"
|
|
4526
|
-
},
|
|
4527
|
-
{
|
|
4528
|
-
inputs: [{ internalType: "uint256", name: "_rewardPerSecond", type: "uint256" }],
|
|
4529
|
-
name: "updateRewardPerSecond",
|
|
4530
|
-
outputs: [],
|
|
4531
|
-
stateMutability: "nonpayable",
|
|
4532
|
-
type: "function"
|
|
4533
|
-
},
|
|
4534
|
-
{
|
|
4535
|
-
inputs: [
|
|
4536
|
-
{ internalType: "uint256", name: "_startTimestamp", type: "uint256" },
|
|
4537
|
-
{ internalType: "uint256", name: "_endTimestamp", type: "uint256" }
|
|
4538
|
-
],
|
|
4539
|
-
name: "updateStartAndEndTimestamp",
|
|
4540
|
-
outputs: [],
|
|
4541
|
-
stateMutability: "nonpayable",
|
|
4542
|
-
type: "function"
|
|
4543
|
-
},
|
|
4544
|
-
{
|
|
4545
|
-
inputs: [{ internalType: "address", name: "", type: "address" }],
|
|
4546
|
-
name: "userInfo",
|
|
4547
|
-
outputs: [
|
|
4548
|
-
{ internalType: "uint256", name: "amount", type: "uint256" },
|
|
4549
|
-
{ internalType: "uint256", name: "rewardDebt", type: "uint256" }
|
|
4550
|
-
],
|
|
4551
|
-
stateMutability: "view",
|
|
4552
|
-
type: "function"
|
|
4553
|
-
},
|
|
4554
|
-
{
|
|
4555
|
-
inputs: [],
|
|
4556
|
-
name: "userLimit",
|
|
4557
|
-
outputs: [{ internalType: "bool", name: "", type: "bool" }],
|
|
4558
|
-
stateMutability: "view",
|
|
4559
|
-
type: "function"
|
|
4560
|
-
},
|
|
4561
|
-
{
|
|
4562
|
-
inputs: [{ internalType: "uint256", name: "_amount", type: "uint256" }],
|
|
4563
|
-
name: "withdraw",
|
|
4564
|
-
outputs: [],
|
|
4565
|
-
stateMutability: "nonpayable",
|
|
4566
|
-
type: "function"
|
|
4567
|
-
}
|
|
4568
|
-
];
|
|
4569
|
-
|
|
4570
4569
|
// src/abis/ISousChefV3.ts
|
|
4571
4570
|
var sousChefV3ABI = [
|
|
4572
4571
|
{
|
|
@@ -5107,8 +5106,10 @@ function getSousChefBNBContract({
|
|
|
5107
5106
|
...viem.getContract({
|
|
5108
5107
|
abi: sousChefBnbABI,
|
|
5109
5108
|
address,
|
|
5110
|
-
|
|
5111
|
-
|
|
5109
|
+
client: {
|
|
5110
|
+
public: publicClient,
|
|
5111
|
+
wallet: signer
|
|
5112
|
+
}
|
|
5112
5113
|
}),
|
|
5113
5114
|
abi: sousChefBnbABI,
|
|
5114
5115
|
address,
|
|
@@ -5125,8 +5126,10 @@ function getSousChefV2Contract({
|
|
|
5125
5126
|
...viem.getContract({
|
|
5126
5127
|
abi: sousChefV2ABI,
|
|
5127
5128
|
address,
|
|
5128
|
-
|
|
5129
|
-
|
|
5129
|
+
client: {
|
|
5130
|
+
public: publicClient,
|
|
5131
|
+
wallet: signer
|
|
5132
|
+
}
|
|
5130
5133
|
}),
|
|
5131
5134
|
abi: sousChefV2ABI,
|
|
5132
5135
|
address,
|
|
@@ -5143,8 +5146,10 @@ function getSmartChefChefV2Contract({
|
|
|
5143
5146
|
...viem.getContract({
|
|
5144
5147
|
abi: smartChefABI,
|
|
5145
5148
|
address,
|
|
5146
|
-
|
|
5147
|
-
|
|
5149
|
+
client: {
|
|
5150
|
+
public: publicClient,
|
|
5151
|
+
wallet: signer
|
|
5152
|
+
}
|
|
5148
5153
|
}),
|
|
5149
5154
|
abi: smartChefABI,
|
|
5150
5155
|
address,
|
|
@@ -5365,7 +5370,7 @@ var fetchPoolsTotalStaking = async (chainId, provider) => {
|
|
|
5365
5370
|
}
|
|
5366
5371
|
const poolsBalanceOf = poolsConfig.map(({ contractAddress, stakingToken }) => {
|
|
5367
5372
|
return {
|
|
5368
|
-
abi:
|
|
5373
|
+
abi: viem.erc20Abi,
|
|
5369
5374
|
address: stakingToken.address,
|
|
5370
5375
|
functionName: "balanceOf",
|
|
5371
5376
|
args: [contractAddress]
|
|
@@ -5516,7 +5521,7 @@ var fetchPoolsAllowance = async ({ account, chainId, provider }) => {
|
|
|
5516
5521
|
contracts: nonBnbPools.map(
|
|
5517
5522
|
({ contractAddress, stakingToken }) => ({
|
|
5518
5523
|
address: stakingToken.address,
|
|
5519
|
-
abi:
|
|
5524
|
+
abi: viem.erc20Abi,
|
|
5520
5525
|
functionName: "allowance",
|
|
5521
5526
|
args: [account, contractAddress]
|
|
5522
5527
|
})
|
|
@@ -5551,7 +5556,7 @@ var fetchUserBalances = async ({ account, chainId, provider }) => {
|
|
|
5551
5556
|
},
|
|
5552
5557
|
...tokens.map(
|
|
5553
5558
|
(token) => ({
|
|
5554
|
-
abi:
|
|
5559
|
+
abi: viem.erc20Abi,
|
|
5555
5560
|
address: token,
|
|
5556
5561
|
functionName: "balanceOf",
|
|
5557
5562
|
args: [account]
|