@pendle/core-v2 0.17.0-testnet → 0.17.1-daily
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/build/artifacts/contracts/LiquidityMining/FeeDistributor/EpochResultManager.sol/EpochResultManager.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributorFactory.sol/PendleFeeDistributorFactory.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributorFactory.sol/PendleFeeDistributorFactory.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol/VotingEscrowTokenBase.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/libraries/WeekMath.sol/WeekMath.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/WeekMath.sol/WeekMath.json +2 -2
- package/build/artifacts/contracts/core/BulkSeller/BulkSeller.sol/BulkSeller.dbg.json +1 -1
- package/build/artifacts/contracts/core/BulkSeller/BulkSeller.sol/BulkSeller.json +2 -40
- package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiq.sol/IPActionAddRemoveLiq.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMintRedeem.sol/IPActionMintRedeem.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapPT.sol/IPActionSwapPT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapPTYT.sol/IPActionSwapPTYT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapYT.sol/IPActionSwapYT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllAction.sol/IPAllAction.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPBulkSeller.sol/IPBulkSeller.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPBulkSeller.sol/IPBulkSeller.json +0 -38
- package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPVotingController.sol/IPVotingController.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPVotingEscrowMainchain.sol/IPVotingEscrowMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BulkSellerOffchain.sol/BulkSellerOffchain.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BulkSellerOffchain.sol/BulkSellerOffchain.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/MarketMathStatic.sol/MarketMathStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/MarketMathStatic.sol/MarketMathStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/RouterStatic.sol/RouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/RouterStatic.sol/RouterStatic.json +136 -60
- package/build/artifacts/contracts/router/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.json +2 -2
- package/build/artifacts/contracts/router/ActionCallback.sol/ActionCallback.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionCallback.sol/ActionCallback.json +2 -2
- package/build/artifacts/contracts/router/ActionMintRedeem.sol/ActionMintRedeem.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionMintRedeem.sol/ActionMintRedeem.json +2 -2
- package/build/artifacts/contracts/router/ActionMisc.sol/ActionMisc.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapPT.sol/ActionSwapPT.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapPT.sol/ActionSwapPT.json +2 -2
- package/build/artifacts/contracts/router/ActionSwapPTYT.sol/ActionSwapPTYT.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapPTYT.sol/ActionSwapPTYT.json +2 -2
- package/build/artifacts/contracts/router/ActionSwapYT.sol/ActionSwapYT.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapYT.sol/ActionSwapYT.json +2 -2
- package/build/artifacts/contracts/router/PendleRouter.sol/PendleRouter.dbg.json +1 -1
- package/build/artifacts/contracts/router/PendleRouter.sol/PendleRouter.json +2 -2
- package/build/artifacts/contracts/router/base/ActionBaseMintRedeem.sol/ActionBaseMintRedeem.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtInLib.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtInLib.json +2 -2
- package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtOutLib.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtOutLib.json +2 -2
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol +1 -1
- package/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol +1 -1
- package/contracts/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol +2 -2
- package/contracts/LiquidityMining/libraries/WeekMath.sol +1 -1
- package/contracts/core/BulkSeller/BulkSeller.sol +0 -10
- package/contracts/interfaces/IPBulkSeller.sol +0 -4
- package/contracts/offchain-helpers/RouterStatic.sol +41 -3
- package/contracts/router/base/MarketApproxLib.sol +9 -3
- package/deployments/43113-core.json +15 -13
- package/deployments/43113-markets/USDC-FEB-2ND.json +4 -4
- package/deployments/43113-markets/WETH-FEB-2ND.json +5 -4
- package/package.json +3 -3
- package/typechain-types/BulkSeller.ts +0 -68
- package/typechain-types/IPBulkSeller.ts +0 -68
- package/typechain-types/RouterStatic.ts +63 -5
- package/typechain-types/factories/ActionAddRemoveLiq__factory.ts +1 -1
- package/typechain-types/factories/ActionCallback__factory.ts +1 -1
- package/typechain-types/factories/ActionMintRedeem__factory.ts +1 -1
- package/typechain-types/factories/ActionSwapPTYT__factory.ts +1 -1
- package/typechain-types/factories/ActionSwapPT__factory.ts +1 -1
- package/typechain-types/factories/ActionSwapYT__factory.ts +1 -1
- package/typechain-types/factories/BulkSellerOffchain__factory.ts +1 -1
- package/typechain-types/factories/BulkSeller__factory.ts +1 -39
- package/typechain-types/factories/IPBulkSeller__factory.ts +0 -38
- package/typechain-types/factories/MarketMathStatic__factory.ts +1 -1
- package/typechain-types/factories/PendleFeeDistributorFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleFeeDistributor__factory.ts +1 -1
- package/typechain-types/factories/PendleGaugeControllerMainchainUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleGaugeControllerSidechainUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleRouter__factory.ts +1 -1
- package/typechain-types/factories/PendleVotingControllerUpg__factory.ts +1 -1
- package/typechain-types/factories/RouterStatic__factory.ts +77 -1
- package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +1 -1
- package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +1 -1
|
@@ -49,7 +49,7 @@ abstract contract VotingControllerStorageUpg is IPVotingController {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
uint128 public constant MAX_LOCK_TIME = 104 weeks;
|
|
52
|
-
uint128 public constant WEEK = 1
|
|
52
|
+
uint128 public constant WEEK = 1 days;
|
|
53
53
|
uint128 public constant GOVERNANCE_PENDLE_VOTE = 10**24;
|
|
54
54
|
|
|
55
55
|
IPVeToken public immutable vePendle;
|
|
@@ -25,9 +25,9 @@ abstract contract VotingEscrowTokenBase is IPVeToken {
|
|
|
25
25
|
using VeBalanceLib for VeBalance;
|
|
26
26
|
using VeBalanceLib for LockedPosition;
|
|
27
27
|
|
|
28
|
-
uint128 public constant WEEK = 1
|
|
28
|
+
uint128 public constant WEEK = 1 days;
|
|
29
29
|
uint128 public constant MAX_LOCK_TIME = 104 weeks;
|
|
30
|
-
uint128 public constant MIN_LOCK_TIME = 1
|
|
30
|
+
uint128 public constant MIN_LOCK_TIME = 1 days;
|
|
31
31
|
|
|
32
32
|
VeBalance internal _totalSupply;
|
|
33
33
|
|
|
@@ -120,16 +120,6 @@ contract BulkSeller is IPBulkSeller, Initializable, TokenHelper, ReentrancyGuard
|
|
|
120
120
|
emit SwapExactSyForToken(receiver, exactSyIn, netTokenOut);
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
function calcSwapExactTokenForSy(uint256 netTokenIn) external view returns (uint256 netSyOut) {
|
|
124
|
-
assert(_storage.rateTokenToSy != 0);
|
|
125
|
-
netSyOut = netTokenIn.mulDown(_storage.rateTokenToSy);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
function calcSwapExactSyForToken(uint256 netSyIn) external view returns (uint256 netTokenOut) {
|
|
129
|
-
assert(_storage.rateSyToToken != 0);
|
|
130
|
-
netTokenOut = netSyIn.mulDown(_storage.rateSyToToken);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
123
|
function readState() public view returns (BulkSellerState memory state) {
|
|
134
124
|
BulkSellerStorage storage s = _storage;
|
|
135
125
|
|
|
@@ -16,10 +16,6 @@ interface IPBulkSeller {
|
|
|
16
16
|
uint256 minSyOut
|
|
17
17
|
) external returns (uint256 netSyOut);
|
|
18
18
|
|
|
19
|
-
function calcSwapExactTokenForSy(uint256 netTokenIn) external view returns (uint256 netSyOut);
|
|
20
|
-
|
|
21
|
-
function calcSwapExactSyForToken(uint256 netSyIn) external view returns (uint256 netTokenOut);
|
|
22
|
-
|
|
23
19
|
function SY() external view returns (address);
|
|
24
20
|
|
|
25
21
|
function token() external view returns (address);
|
|
@@ -20,9 +20,10 @@ contract RouterStatic is Initializable, BoringOwnableUpgradeable, UUPSUpgradeabl
|
|
|
20
20
|
using Math for uint256;
|
|
21
21
|
using VeBalanceLib for VeBalance;
|
|
22
22
|
using VeBalanceLib for LockedPosition;
|
|
23
|
+
using BulkSellerMathCore for BulkSellerState;
|
|
23
24
|
|
|
24
25
|
uint128 public constant MAX_LOCK_TIME = 104 weeks;
|
|
25
|
-
uint128 public constant MIN_LOCK_TIME = 1
|
|
26
|
+
uint128 public constant MIN_LOCK_TIME = 1 days;
|
|
26
27
|
|
|
27
28
|
struct TokenAmount {
|
|
28
29
|
address token;
|
|
@@ -733,7 +734,8 @@ contract RouterStatic is Initializable, BoringOwnableUpgradeable, UUPSUpgradeabl
|
|
|
733
734
|
address bulk
|
|
734
735
|
) public view returns (uint256 amountSy) {
|
|
735
736
|
if (bulk != address(0)) {
|
|
736
|
-
|
|
737
|
+
BulkSellerState memory state = IPBulkSeller(bulk).readState();
|
|
738
|
+
return state.calcSwapExactTokenForSy(amountToken);
|
|
737
739
|
} else {
|
|
738
740
|
return SY.previewDeposit(baseToken, amountToken);
|
|
739
741
|
}
|
|
@@ -746,7 +748,8 @@ contract RouterStatic is Initializable, BoringOwnableUpgradeable, UUPSUpgradeabl
|
|
|
746
748
|
address bulk
|
|
747
749
|
) public view returns (uint256 amountBaseToken) {
|
|
748
750
|
if (bulk != address(0)) {
|
|
749
|
-
|
|
751
|
+
BulkSellerState memory state = IPBulkSeller(bulk).readState();
|
|
752
|
+
return state.calcSwapExactSyForToken(amountSy);
|
|
750
753
|
} else {
|
|
751
754
|
return SY.previewRedeem(baseToken, amountSy);
|
|
752
755
|
}
|
|
@@ -858,4 +861,39 @@ contract RouterStatic is Initializable, BoringOwnableUpgradeable, UUPSUpgradeabl
|
|
|
858
861
|
}
|
|
859
862
|
}
|
|
860
863
|
}
|
|
864
|
+
|
|
865
|
+
function getBulkSellerInfo(
|
|
866
|
+
address token,
|
|
867
|
+
address SY,
|
|
868
|
+
uint256 netTokenIn,
|
|
869
|
+
uint256 netSyIn
|
|
870
|
+
)
|
|
871
|
+
external
|
|
872
|
+
view
|
|
873
|
+
returns (
|
|
874
|
+
address bulk,
|
|
875
|
+
uint256 totalToken,
|
|
876
|
+
uint256 totalSy
|
|
877
|
+
)
|
|
878
|
+
{
|
|
879
|
+
bulk = IPBulkSellerFactory(bulkFactory).get(token, SY);
|
|
880
|
+
if (bulk != address(0)) {
|
|
881
|
+
BulkSellerState memory state = IPBulkSeller(bulk).readState();
|
|
882
|
+
if (state.rateTokenToSy != 0 || state.rateSyToToken != 0) {
|
|
883
|
+
totalToken = state.totalToken;
|
|
884
|
+
totalSy = state.totalSy;
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
uint256 postFeeRateTokenToSy = state.rateTokenToSy.mulDown(Math.ONE - state.feeRate);
|
|
888
|
+
uint256 postFeeRateSyToToken = state.rateSyToToken.mulDown(Math.ONE - state.feeRate);
|
|
889
|
+
if (
|
|
890
|
+
netTokenIn.mulDown(postFeeRateTokenToSy) > state.totalSy ||
|
|
891
|
+
netSyIn.mulDown(postFeeRateSyToToken) > state.totalToken
|
|
892
|
+
) {
|
|
893
|
+
bulk = address(0);
|
|
894
|
+
totalToken = 0;
|
|
895
|
+
totalSy = 0;
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
}
|
|
861
899
|
}
|
|
@@ -24,7 +24,8 @@ struct ApproxParams {
|
|
|
24
24
|
|
|
25
25
|
/// for guessOffchain, this is to provide a shortcut to guessing. The offchain SDK can precalculate the exact result
|
|
26
26
|
/// before the tx is sent. When the tx reaches the contract, the guessOffchain will be checked first, and if it satisfies the
|
|
27
|
-
/// approximation, it will be used (and save all the guessing).
|
|
27
|
+
/// approximation, it will be used (and save all the guessing). It's expected that this shortcut will be used in most cases
|
|
28
|
+
/// except in cases that there is a trade in the same market right before the tx
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
library MarketApproxPtInLib {
|
|
@@ -155,7 +156,7 @@ library MarketApproxPtInLib {
|
|
|
155
156
|
bool isAnswerAccepted = Math.isASmallerApproxB(guess, maxPtPayable, p.eps);
|
|
156
157
|
if (isAnswerAccepted) return (guess, netSyFee);
|
|
157
158
|
} else {
|
|
158
|
-
p.guessMax = guess;
|
|
159
|
+
p.guessMax = guess - 1;
|
|
159
160
|
}
|
|
160
161
|
}
|
|
161
162
|
revert Errors.ApproxFail();
|
|
@@ -724,7 +725,12 @@ library MarketApproxPtOutLib {
|
|
|
724
725
|
res.guessMax = Math.min(_approx.guessMax, maxGuessMax);
|
|
725
726
|
|
|
726
727
|
if (res.guessMin > res.guessMax)
|
|
727
|
-
revert Errors.ApproxBinarySearchInputInvalid(
|
|
728
|
+
revert Errors.ApproxBinarySearchInputInvalid(
|
|
729
|
+
_approx.guessMin,
|
|
730
|
+
_approx.guessMax,
|
|
731
|
+
minGuessMin,
|
|
732
|
+
maxGuessMax
|
|
733
|
+
);
|
|
728
734
|
|
|
729
735
|
res.guessOffchain = _approx.guessOffchain;
|
|
730
736
|
res.maxIteration = _approx.maxIteration;
|
|
@@ -4,18 +4,20 @@
|
|
|
4
4
|
"chainId": 43113,
|
|
5
5
|
"treasury": "0x243b7CFD29AcAF9cDe98C1958902FAA3B1F095D5",
|
|
6
6
|
"governance": "0x1FcCC097db89A86Bfc474A1028F93958295b1Fb7",
|
|
7
|
-
"pendle": "
|
|
8
|
-
"lzEndpoint": "0x93f54D755A063cE7bB9e6Ac47Eccc8e33411d706"
|
|
7
|
+
"pendle": "0xB7609dec1C926204c3B67345cbCd54bc4aa7a940",
|
|
8
|
+
"lzEndpoint": "0x93f54D755A063cE7bB9e6Ac47Eccc8e33411d706",
|
|
9
|
+
"wrappedNative": "0xe43a7aD7C09d8fAE3ADe7361f0b847b23adD5094"
|
|
9
10
|
},
|
|
10
|
-
"splitter": "
|
|
11
|
-
"PENDLE": "
|
|
12
|
-
"yieldContractFactory": "
|
|
13
|
-
"marketFactory": "
|
|
14
|
-
"bulkSellerFactory": "
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
11
|
+
"splitter": "0x7705919aAA74108D06fA9800D48B0AaC6D74d4ae",
|
|
12
|
+
"PENDLE": "0xB7609dec1C926204c3B67345cbCd54bc4aa7a940",
|
|
13
|
+
"yieldContractFactory": "0xbe79FdF72e7b21dd4D4e18D9D1B208a5Df0E7A54",
|
|
14
|
+
"marketFactory": "0x927a47f2e3124b6f94dA38FA366Aea4EaDfD5684",
|
|
15
|
+
"bulkSellerFactory": "0x2003B557193cD1e62A118DeB57f47d083B4a282d",
|
|
16
|
+
"bulkSellerOffchain": "0x6b0a8cd00117f2C30decE99818525258E565ed3E",
|
|
17
|
+
"router": "0x837CA09Dd56AF718076fC43480f5466914ef59B5",
|
|
18
|
+
"routerStatic": "0xBED8b7EC6fa736fe641B7D94c38E5254bE14aa83",
|
|
19
|
+
"vePendle": "0xA049ac4620f75945E44de17892B437630B09f579",
|
|
20
|
+
"senderEndpoint": "0x2982db3C22733780F109ac255bA7C48cC1114355",
|
|
21
|
+
"votingController": "0xc71693Bf326F0cE471129E4EDae38D2d405E103B",
|
|
22
|
+
"gaugeController": "0x2dd2414dB9fEc50dB2E7160165a89facBd936136"
|
|
21
23
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "SY Benqi USDC",
|
|
3
|
-
"SY": "
|
|
4
|
-
"YT": "
|
|
5
|
-
"PT": "
|
|
6
|
-
"market": "
|
|
3
|
+
"SY": "0x1223Ebf2EC58aeb6A4886d033b1Be7AB0b02130c",
|
|
4
|
+
"YT": "0x0966975352EB04752965b7171746D6d8077B03cC",
|
|
5
|
+
"PT": "0x93C89e08D04589a0F75AcB2c66D9A3eab8922220",
|
|
6
|
+
"market": "0xEa222548dBF096814a4D2b454260368cA53F6d53",
|
|
7
7
|
"expiry": 1675382400,
|
|
8
8
|
"scalarRoot": "62000000000000000000",
|
|
9
9
|
"initAnchor": "1012600000000000000"
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "SY Benqi WETH",
|
|
3
|
-
"SY": "
|
|
4
|
-
"YT": "
|
|
5
|
-
"PT": "
|
|
6
|
-
"market": "
|
|
3
|
+
"SY": "0x8B66a7664267E5CFe40B498601194f36110651B7",
|
|
4
|
+
"YT": "0xf5d23f38Da28637B8d595968AA3863bA54454a77",
|
|
5
|
+
"PT": "0xBa3C57f9d2A945db0BDB5f280C863655d4582bD3",
|
|
6
|
+
"market": "0xb08c0a69D12c3d6E34f3723b11F3057D2FBc1515",
|
|
7
7
|
"expiry": 1675382400,
|
|
8
|
+
"bulkSeller": "0xd3487a6cf536020cf647ECb19dC4Ef60bedee8d1",
|
|
8
9
|
"scalarRoot": "62000000000000000000",
|
|
9
10
|
"initAnchor": "1012600000000000000"
|
|
10
11
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@pendle/core-v2",
|
|
3
3
|
"description": "Core smart contracts of Pendle Protocol.",
|
|
4
4
|
"license": "BUSL-1.1",
|
|
5
|
-
"version": "0.17.
|
|
5
|
+
"version": "0.17.1-daily",
|
|
6
6
|
"homepage": "https://pendle.finance",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"pendle",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"packageManager": "yarn@3.2.2",
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@openzeppelin/contracts": "
|
|
48
|
-
"@openzeppelin/contracts-upgradeable": "
|
|
47
|
+
"@openzeppelin/contracts": "4.7.3",
|
|
48
|
+
"@openzeppelin/contracts-upgradeable": "4.7.3"
|
|
49
49
|
}
|
|
50
50
|
}
|
|
@@ -50,8 +50,6 @@ export interface BulkSellerInterface extends utils.Interface {
|
|
|
50
50
|
functions: {
|
|
51
51
|
"SY()": FunctionFragment;
|
|
52
52
|
"_storage()": FunctionFragment;
|
|
53
|
-
"calcSwapExactSyForToken(uint256)": FunctionFragment;
|
|
54
|
-
"calcSwapExactTokenForSy(uint256)": FunctionFragment;
|
|
55
53
|
"decreaseReserve(uint256,uint256)": FunctionFragment;
|
|
56
54
|
"factory()": FunctionFragment;
|
|
57
55
|
"feeRate()": FunctionFragment;
|
|
@@ -68,14 +66,6 @@ export interface BulkSellerInterface extends utils.Interface {
|
|
|
68
66
|
|
|
69
67
|
encodeFunctionData(functionFragment: "SY", values?: undefined): string;
|
|
70
68
|
encodeFunctionData(functionFragment: "_storage", values?: undefined): string;
|
|
71
|
-
encodeFunctionData(
|
|
72
|
-
functionFragment: "calcSwapExactSyForToken",
|
|
73
|
-
values: [BigNumberish]
|
|
74
|
-
): string;
|
|
75
|
-
encodeFunctionData(
|
|
76
|
-
functionFragment: "calcSwapExactTokenForSy",
|
|
77
|
-
values: [BigNumberish]
|
|
78
|
-
): string;
|
|
79
69
|
encodeFunctionData(
|
|
80
70
|
functionFragment: "decreaseReserve",
|
|
81
71
|
values: [BigNumberish, BigNumberish]
|
|
@@ -115,14 +105,6 @@ export interface BulkSellerInterface extends utils.Interface {
|
|
|
115
105
|
|
|
116
106
|
decodeFunctionResult(functionFragment: "SY", data: BytesLike): Result;
|
|
117
107
|
decodeFunctionResult(functionFragment: "_storage", data: BytesLike): Result;
|
|
118
|
-
decodeFunctionResult(
|
|
119
|
-
functionFragment: "calcSwapExactSyForToken",
|
|
120
|
-
data: BytesLike
|
|
121
|
-
): Result;
|
|
122
|
-
decodeFunctionResult(
|
|
123
|
-
functionFragment: "calcSwapExactTokenForSy",
|
|
124
|
-
data: BytesLike
|
|
125
|
-
): Result;
|
|
126
108
|
decodeFunctionResult(
|
|
127
109
|
functionFragment: "decreaseReserve",
|
|
128
110
|
data: BytesLike
|
|
@@ -282,16 +264,6 @@ export interface BulkSeller extends BaseContract {
|
|
|
282
264
|
}
|
|
283
265
|
>;
|
|
284
266
|
|
|
285
|
-
calcSwapExactSyForToken(
|
|
286
|
-
netSyIn: BigNumberish,
|
|
287
|
-
overrides?: CallOverrides
|
|
288
|
-
): Promise<[BigNumber] & { netTokenOut: BigNumber }>;
|
|
289
|
-
|
|
290
|
-
calcSwapExactTokenForSy(
|
|
291
|
-
netTokenIn: BigNumberish,
|
|
292
|
-
overrides?: CallOverrides
|
|
293
|
-
): Promise<[BigNumber] & { netSyOut: BigNumber }>;
|
|
294
|
-
|
|
295
267
|
decreaseReserve(
|
|
296
268
|
netTokenOut: BigNumberish,
|
|
297
269
|
netSyOut: BigNumberish,
|
|
@@ -369,16 +341,6 @@ export interface BulkSeller extends BaseContract {
|
|
|
369
341
|
}
|
|
370
342
|
>;
|
|
371
343
|
|
|
372
|
-
calcSwapExactSyForToken(
|
|
373
|
-
netSyIn: BigNumberish,
|
|
374
|
-
overrides?: CallOverrides
|
|
375
|
-
): Promise<BigNumber>;
|
|
376
|
-
|
|
377
|
-
calcSwapExactTokenForSy(
|
|
378
|
-
netTokenIn: BigNumberish,
|
|
379
|
-
overrides?: CallOverrides
|
|
380
|
-
): Promise<BigNumber>;
|
|
381
|
-
|
|
382
344
|
decreaseReserve(
|
|
383
345
|
netTokenOut: BigNumberish,
|
|
384
346
|
netSyOut: BigNumberish,
|
|
@@ -452,16 +414,6 @@ export interface BulkSeller extends BaseContract {
|
|
|
452
414
|
}
|
|
453
415
|
>;
|
|
454
416
|
|
|
455
|
-
calcSwapExactSyForToken(
|
|
456
|
-
netSyIn: BigNumberish,
|
|
457
|
-
overrides?: CallOverrides
|
|
458
|
-
): Promise<BigNumber>;
|
|
459
|
-
|
|
460
|
-
calcSwapExactTokenForSy(
|
|
461
|
-
netTokenIn: BigNumberish,
|
|
462
|
-
overrides?: CallOverrides
|
|
463
|
-
): Promise<BigNumber>;
|
|
464
|
-
|
|
465
417
|
decreaseReserve(
|
|
466
418
|
netTokenOut: BigNumberish,
|
|
467
419
|
netSyOut: BigNumberish,
|
|
@@ -611,16 +563,6 @@ export interface BulkSeller extends BaseContract {
|
|
|
611
563
|
|
|
612
564
|
_storage(overrides?: CallOverrides): Promise<BigNumber>;
|
|
613
565
|
|
|
614
|
-
calcSwapExactSyForToken(
|
|
615
|
-
netSyIn: BigNumberish,
|
|
616
|
-
overrides?: CallOverrides
|
|
617
|
-
): Promise<BigNumber>;
|
|
618
|
-
|
|
619
|
-
calcSwapExactTokenForSy(
|
|
620
|
-
netTokenIn: BigNumberish,
|
|
621
|
-
overrides?: CallOverrides
|
|
622
|
-
): Promise<BigNumber>;
|
|
623
|
-
|
|
624
566
|
decreaseReserve(
|
|
625
567
|
netTokenOut: BigNumberish,
|
|
626
568
|
netSyOut: BigNumberish,
|
|
@@ -686,16 +628,6 @@ export interface BulkSeller extends BaseContract {
|
|
|
686
628
|
|
|
687
629
|
_storage(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
688
630
|
|
|
689
|
-
calcSwapExactSyForToken(
|
|
690
|
-
netSyIn: BigNumberish,
|
|
691
|
-
overrides?: CallOverrides
|
|
692
|
-
): Promise<PopulatedTransaction>;
|
|
693
|
-
|
|
694
|
-
calcSwapExactTokenForSy(
|
|
695
|
-
netTokenIn: BigNumberish,
|
|
696
|
-
overrides?: CallOverrides
|
|
697
|
-
): Promise<PopulatedTransaction>;
|
|
698
|
-
|
|
699
631
|
decreaseReserve(
|
|
700
632
|
netTokenOut: BigNumberish,
|
|
701
633
|
netSyOut: BigNumberish,
|
|
@@ -48,8 +48,6 @@ export interface IPBulkSellerInterface extends utils.Interface {
|
|
|
48
48
|
contractName: "IPBulkSeller";
|
|
49
49
|
functions: {
|
|
50
50
|
"SY()": FunctionFragment;
|
|
51
|
-
"calcSwapExactSyForToken(uint256)": FunctionFragment;
|
|
52
|
-
"calcSwapExactTokenForSy(uint256)": FunctionFragment;
|
|
53
51
|
"readState()": FunctionFragment;
|
|
54
52
|
"swapExactSyForToken(address,uint256,uint256)": FunctionFragment;
|
|
55
53
|
"swapExactTokenForSy(address,uint256,uint256)": FunctionFragment;
|
|
@@ -57,14 +55,6 @@ export interface IPBulkSellerInterface extends utils.Interface {
|
|
|
57
55
|
};
|
|
58
56
|
|
|
59
57
|
encodeFunctionData(functionFragment: "SY", values?: undefined): string;
|
|
60
|
-
encodeFunctionData(
|
|
61
|
-
functionFragment: "calcSwapExactSyForToken",
|
|
62
|
-
values: [BigNumberish]
|
|
63
|
-
): string;
|
|
64
|
-
encodeFunctionData(
|
|
65
|
-
functionFragment: "calcSwapExactTokenForSy",
|
|
66
|
-
values: [BigNumberish]
|
|
67
|
-
): string;
|
|
68
58
|
encodeFunctionData(functionFragment: "readState", values?: undefined): string;
|
|
69
59
|
encodeFunctionData(
|
|
70
60
|
functionFragment: "swapExactSyForToken",
|
|
@@ -77,14 +67,6 @@ export interface IPBulkSellerInterface extends utils.Interface {
|
|
|
77
67
|
encodeFunctionData(functionFragment: "token", values?: undefined): string;
|
|
78
68
|
|
|
79
69
|
decodeFunctionResult(functionFragment: "SY", data: BytesLike): Result;
|
|
80
|
-
decodeFunctionResult(
|
|
81
|
-
functionFragment: "calcSwapExactSyForToken",
|
|
82
|
-
data: BytesLike
|
|
83
|
-
): Result;
|
|
84
|
-
decodeFunctionResult(
|
|
85
|
-
functionFragment: "calcSwapExactTokenForSy",
|
|
86
|
-
data: BytesLike
|
|
87
|
-
): Result;
|
|
88
70
|
decodeFunctionResult(functionFragment: "readState", data: BytesLike): Result;
|
|
89
71
|
decodeFunctionResult(
|
|
90
72
|
functionFragment: "swapExactSyForToken",
|
|
@@ -129,16 +111,6 @@ export interface IPBulkSeller extends BaseContract {
|
|
|
129
111
|
functions: {
|
|
130
112
|
SY(overrides?: CallOverrides): Promise<[string]>;
|
|
131
113
|
|
|
132
|
-
calcSwapExactSyForToken(
|
|
133
|
-
netSyIn: BigNumberish,
|
|
134
|
-
overrides?: CallOverrides
|
|
135
|
-
): Promise<[BigNumber] & { netTokenOut: BigNumber }>;
|
|
136
|
-
|
|
137
|
-
calcSwapExactTokenForSy(
|
|
138
|
-
netTokenIn: BigNumberish,
|
|
139
|
-
overrides?: CallOverrides
|
|
140
|
-
): Promise<[BigNumber] & { netSyOut: BigNumber }>;
|
|
141
|
-
|
|
142
114
|
readState(
|
|
143
115
|
overrides?: CallOverrides
|
|
144
116
|
): Promise<[BulkSellerStateStructOutput]>;
|
|
@@ -162,16 +134,6 @@ export interface IPBulkSeller extends BaseContract {
|
|
|
162
134
|
|
|
163
135
|
SY(overrides?: CallOverrides): Promise<string>;
|
|
164
136
|
|
|
165
|
-
calcSwapExactSyForToken(
|
|
166
|
-
netSyIn: BigNumberish,
|
|
167
|
-
overrides?: CallOverrides
|
|
168
|
-
): Promise<BigNumber>;
|
|
169
|
-
|
|
170
|
-
calcSwapExactTokenForSy(
|
|
171
|
-
netTokenIn: BigNumberish,
|
|
172
|
-
overrides?: CallOverrides
|
|
173
|
-
): Promise<BigNumber>;
|
|
174
|
-
|
|
175
137
|
readState(overrides?: CallOverrides): Promise<BulkSellerStateStructOutput>;
|
|
176
138
|
|
|
177
139
|
swapExactSyForToken(
|
|
@@ -193,16 +155,6 @@ export interface IPBulkSeller extends BaseContract {
|
|
|
193
155
|
callStatic: {
|
|
194
156
|
SY(overrides?: CallOverrides): Promise<string>;
|
|
195
157
|
|
|
196
|
-
calcSwapExactSyForToken(
|
|
197
|
-
netSyIn: BigNumberish,
|
|
198
|
-
overrides?: CallOverrides
|
|
199
|
-
): Promise<BigNumber>;
|
|
200
|
-
|
|
201
|
-
calcSwapExactTokenForSy(
|
|
202
|
-
netTokenIn: BigNumberish,
|
|
203
|
-
overrides?: CallOverrides
|
|
204
|
-
): Promise<BigNumber>;
|
|
205
|
-
|
|
206
158
|
readState(overrides?: CallOverrides): Promise<BulkSellerStateStructOutput>;
|
|
207
159
|
|
|
208
160
|
swapExactSyForToken(
|
|
@@ -227,16 +179,6 @@ export interface IPBulkSeller extends BaseContract {
|
|
|
227
179
|
estimateGas: {
|
|
228
180
|
SY(overrides?: CallOverrides): Promise<BigNumber>;
|
|
229
181
|
|
|
230
|
-
calcSwapExactSyForToken(
|
|
231
|
-
netSyIn: BigNumberish,
|
|
232
|
-
overrides?: CallOverrides
|
|
233
|
-
): Promise<BigNumber>;
|
|
234
|
-
|
|
235
|
-
calcSwapExactTokenForSy(
|
|
236
|
-
netTokenIn: BigNumberish,
|
|
237
|
-
overrides?: CallOverrides
|
|
238
|
-
): Promise<BigNumber>;
|
|
239
|
-
|
|
240
182
|
readState(overrides?: CallOverrides): Promise<BigNumber>;
|
|
241
183
|
|
|
242
184
|
swapExactSyForToken(
|
|
@@ -259,16 +201,6 @@ export interface IPBulkSeller extends BaseContract {
|
|
|
259
201
|
populateTransaction: {
|
|
260
202
|
SY(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
261
203
|
|
|
262
|
-
calcSwapExactSyForToken(
|
|
263
|
-
netSyIn: BigNumberish,
|
|
264
|
-
overrides?: CallOverrides
|
|
265
|
-
): Promise<PopulatedTransaction>;
|
|
266
|
-
|
|
267
|
-
calcSwapExactTokenForSy(
|
|
268
|
-
netTokenIn: BigNumberish,
|
|
269
|
-
overrides?: CallOverrides
|
|
270
|
-
): Promise<PopulatedTransaction>;
|
|
271
|
-
|
|
272
204
|
readState(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
273
205
|
|
|
274
206
|
swapExactSyForToken(
|
|
@@ -814,7 +814,7 @@ export interface RouterStatic extends BaseContract {
|
|
|
814
814
|
overrides?: CallOverrides
|
|
815
815
|
): Promise<[BigNumber] & { netTokenIn: BigNumber }>;
|
|
816
816
|
|
|
817
|
-
getBulkSellerInfo(
|
|
817
|
+
"getBulkSellerInfo(address,address)"(
|
|
818
818
|
token: string,
|
|
819
819
|
SY: string,
|
|
820
820
|
overrides?: CallOverrides
|
|
@@ -826,6 +826,20 @@ export interface RouterStatic extends BaseContract {
|
|
|
826
826
|
}
|
|
827
827
|
>;
|
|
828
828
|
|
|
829
|
+
"getBulkSellerInfo(address,address,uint256,uint256)"(
|
|
830
|
+
token: string,
|
|
831
|
+
SY: string,
|
|
832
|
+
netTokenIn: BigNumberish,
|
|
833
|
+
netSyIn: BigNumberish,
|
|
834
|
+
overrides?: CallOverrides
|
|
835
|
+
): Promise<
|
|
836
|
+
[string, BigNumber, BigNumber] & {
|
|
837
|
+
bulk: string;
|
|
838
|
+
totalToken: BigNumber;
|
|
839
|
+
totalSy: BigNumber;
|
|
840
|
+
}
|
|
841
|
+
>;
|
|
842
|
+
|
|
829
843
|
getDefaultApproxParams(
|
|
830
844
|
overrides?: CallOverrides
|
|
831
845
|
): Promise<[ApproxParamsStructOutput]>;
|
|
@@ -1223,7 +1237,7 @@ export interface RouterStatic extends BaseContract {
|
|
|
1223
1237
|
overrides?: CallOverrides
|
|
1224
1238
|
): Promise<BigNumber>;
|
|
1225
1239
|
|
|
1226
|
-
getBulkSellerInfo(
|
|
1240
|
+
"getBulkSellerInfo(address,address)"(
|
|
1227
1241
|
token: string,
|
|
1228
1242
|
SY: string,
|
|
1229
1243
|
overrides?: CallOverrides
|
|
@@ -1235,6 +1249,20 @@ export interface RouterStatic extends BaseContract {
|
|
|
1235
1249
|
}
|
|
1236
1250
|
>;
|
|
1237
1251
|
|
|
1252
|
+
"getBulkSellerInfo(address,address,uint256,uint256)"(
|
|
1253
|
+
token: string,
|
|
1254
|
+
SY: string,
|
|
1255
|
+
netTokenIn: BigNumberish,
|
|
1256
|
+
netSyIn: BigNumberish,
|
|
1257
|
+
overrides?: CallOverrides
|
|
1258
|
+
): Promise<
|
|
1259
|
+
[string, BigNumber, BigNumber] & {
|
|
1260
|
+
bulk: string;
|
|
1261
|
+
totalToken: BigNumber;
|
|
1262
|
+
totalSy: BigNumber;
|
|
1263
|
+
}
|
|
1264
|
+
>;
|
|
1265
|
+
|
|
1238
1266
|
getDefaultApproxParams(
|
|
1239
1267
|
overrides?: CallOverrides
|
|
1240
1268
|
): Promise<ApproxParamsStructOutput>;
|
|
@@ -1635,7 +1663,7 @@ export interface RouterStatic extends BaseContract {
|
|
|
1635
1663
|
overrides?: CallOverrides
|
|
1636
1664
|
): Promise<BigNumber>;
|
|
1637
1665
|
|
|
1638
|
-
getBulkSellerInfo(
|
|
1666
|
+
"getBulkSellerInfo(address,address)"(
|
|
1639
1667
|
token: string,
|
|
1640
1668
|
SY: string,
|
|
1641
1669
|
overrides?: CallOverrides
|
|
@@ -1647,6 +1675,20 @@ export interface RouterStatic extends BaseContract {
|
|
|
1647
1675
|
}
|
|
1648
1676
|
>;
|
|
1649
1677
|
|
|
1678
|
+
"getBulkSellerInfo(address,address,uint256,uint256)"(
|
|
1679
|
+
token: string,
|
|
1680
|
+
SY: string,
|
|
1681
|
+
netTokenIn: BigNumberish,
|
|
1682
|
+
netSyIn: BigNumberish,
|
|
1683
|
+
overrides?: CallOverrides
|
|
1684
|
+
): Promise<
|
|
1685
|
+
[string, BigNumber, BigNumber] & {
|
|
1686
|
+
bulk: string;
|
|
1687
|
+
totalToken: BigNumber;
|
|
1688
|
+
totalSy: BigNumber;
|
|
1689
|
+
}
|
|
1690
|
+
>;
|
|
1691
|
+
|
|
1650
1692
|
getDefaultApproxParams(
|
|
1651
1693
|
overrides?: CallOverrides
|
|
1652
1694
|
): Promise<ApproxParamsStructOutput>;
|
|
@@ -2162,12 +2204,20 @@ export interface RouterStatic extends BaseContract {
|
|
|
2162
2204
|
overrides?: CallOverrides
|
|
2163
2205
|
): Promise<BigNumber>;
|
|
2164
2206
|
|
|
2165
|
-
getBulkSellerInfo(
|
|
2207
|
+
"getBulkSellerInfo(address,address)"(
|
|
2166
2208
|
token: string,
|
|
2167
2209
|
SY: string,
|
|
2168
2210
|
overrides?: CallOverrides
|
|
2169
2211
|
): Promise<BigNumber>;
|
|
2170
2212
|
|
|
2213
|
+
"getBulkSellerInfo(address,address,uint256,uint256)"(
|
|
2214
|
+
token: string,
|
|
2215
|
+
SY: string,
|
|
2216
|
+
netTokenIn: BigNumberish,
|
|
2217
|
+
netSyIn: BigNumberish,
|
|
2218
|
+
overrides?: CallOverrides
|
|
2219
|
+
): Promise<BigNumber>;
|
|
2220
|
+
|
|
2171
2221
|
getDefaultApproxParams(overrides?: CallOverrides): Promise<BigNumber>;
|
|
2172
2222
|
|
|
2173
2223
|
getExchangeRate(
|
|
@@ -2516,12 +2566,20 @@ export interface RouterStatic extends BaseContract {
|
|
|
2516
2566
|
overrides?: CallOverrides
|
|
2517
2567
|
): Promise<PopulatedTransaction>;
|
|
2518
2568
|
|
|
2519
|
-
getBulkSellerInfo(
|
|
2569
|
+
"getBulkSellerInfo(address,address)"(
|
|
2520
2570
|
token: string,
|
|
2521
2571
|
SY: string,
|
|
2522
2572
|
overrides?: CallOverrides
|
|
2523
2573
|
): Promise<PopulatedTransaction>;
|
|
2524
2574
|
|
|
2575
|
+
"getBulkSellerInfo(address,address,uint256,uint256)"(
|
|
2576
|
+
token: string,
|
|
2577
|
+
SY: string,
|
|
2578
|
+
netTokenIn: BigNumberish,
|
|
2579
|
+
netSyIn: BigNumberish,
|
|
2580
|
+
overrides?: CallOverrides
|
|
2581
|
+
): Promise<PopulatedTransaction>;
|
|
2582
|
+
|
|
2525
2583
|
getDefaultApproxParams(
|
|
2526
2584
|
overrides?: CallOverrides
|
|
2527
2585
|
): Promise<PopulatedTransaction>;
|