@pendle/core-v2 0.13.1-testnet → 0.14.0-testnet
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/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol/PendleMsgReceiveEndpointUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol/PendleMsgReceiveEndpointUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiverAppUpg.sol/PendleMsgReceiverAppUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol/PendleMsgSendEndpointUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol/PendleMsgSendEndpointUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSenderAppUpg.sol/PendleMsgSenderAppUpg.dbg.json +1 -1
- 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/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.json +89 -0
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.json +91 -2
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.json +91 -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/VeBalanceLib.sol/VeBalanceLib.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.json +2 -2
- 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/core/Market/MarketMathCore.sol/MarketMathCore.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.json +2 -2
- package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.json +2 -2
- package/build/artifacts/contracts/core/Market/PendleGauge.sol/PendleGauge.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.json +26 -26
- package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.json +2 -2
- package/build/artifacts/contracts/core/RewardManager/RewardManager.sol/RewardManager.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.dbg.json +4 -0
- package/build/artifacts/contracts/core/{SuperComposableYield → StandardizedYield}/PYIndex.sol/PYIndexLib.json +3 -3
- package/build/artifacts/contracts/core/StandardizedYield/SYBase.sol/SYBase.dbg.json +4 -0
- package/build/artifacts/contracts/core/{SuperComposableYield/SCYBase.sol/SCYBase.json → StandardizedYield/SYBase.sol/SYBase.json} +11 -11
- package/build/artifacts/contracts/core/StandardizedYield/SYBaseWithRewards.sol/SYBaseWithRewards.dbg.json +4 -0
- package/build/artifacts/contracts/core/{SuperComposableYield/SCYBaseWithRewards.sol/SCYBaseWithRewards.json → StandardizedYield/SYBaseWithRewards.sol/SYBaseWithRewards.json} +11 -11
- package/build/artifacts/contracts/core/StandardizedYield/SYUtils.sol/SYUtils.dbg.json +4 -0
- package/build/artifacts/contracts/core/{SuperComposableYield/SCYUtils.sol/SCYUtils.json → StandardizedYield/SYUtils.sol/SYUtils.json} +4 -4
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.dbg.json +4 -0
- package/build/artifacts/contracts/core/{SuperComposableYield → StandardizedYield}/implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.json +3 -3
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol/PendleQiTokenSY.dbg.json +4 -0
- package/build/artifacts/contracts/core/{SuperComposableYield/implementations/BenQi/PendleQiTokenSCY.sol/PendleQiTokenSCY.json → StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol/PendleQiTokenSY.json} +17 -17
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/ConvexCurveLP/Pendle3CrvAndTokenSY.sol/Pendle3CrvAndTokenSY.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/ConvexCurveLP/Pendle3CrvAndTokenSY.sol/Pendle3CrvAndTokenSY.json +1028 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/ConvexCurveLP/PendleConvexLPSY.sol/PendleConvexLPSY.dbg.json +4 -0
- package/build/artifacts/contracts/core/{SuperComposableYield/implementations/Convex/ConvexCurveLP/PendleConvexCurveLPSCY.sol/PendleConvexCurveLPSCY.json → StandardizedYield/implementations/Convex/ConvexCurveLP/PendleConvexLPSY.sol/PendleConvexLPSY.json} +47 -47
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/Pendle3CrvHelper.sol/Pendle3CrvHelper.dbg.json +4 -0
- package/build/artifacts/contracts/core/{SuperComposableYield → StandardizedYield}/implementations/Convex/Pendle3CrvHelper.sol/Pendle3CrvHelper.json +5 -5
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol/PendleWstEthSY.dbg.json +4 -0
- package/build/artifacts/contracts/core/{SuperComposableYield/implementations/PendleWstEthSCY.sol/PendleWstEthSCY.json → StandardizedYield/implementations/PendleWstEthSY.sol/PendleWstEthSY.json} +13 -13
- package/build/artifacts/contracts/core/YieldContracts/InterestManagerYT.sol/InterestManagerYT.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.json +4 -4
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.json +4 -4
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.json +24 -24
- package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.json +28 -28
- package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiq.sol/IPActionAddRemoveLiq.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiq.sol/IPActionAddRemoveLiq.json +30 -30
- package/build/artifacts/contracts/interfaces/IPActionMintRedeem.sol/IPActionMintRedeem.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMintRedeem.sol/IPActionMintRedeem.json +34 -34
- package/build/artifacts/contracts/interfaces/IPActionSwapPT.sol/IPActionSwapPT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapPT.sol/IPActionSwapPT.json +20 -20
- package/build/artifacts/contracts/interfaces/IPActionSwapPTYT.sol/IPActionSwapPTYT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapPTYT.sol/IPActionSwapPTYT.json +2 -2
- package/build/artifacts/contracts/interfaces/IPActionSwapYT.sol/IPActionSwapYT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapYT.sol/IPActionSwapYT.json +20 -20
- package/build/artifacts/contracts/interfaces/IPAllAction.sol/IPAllAction.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllAction.sol/IPAllAction.json +106 -106
- package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.json +18 -18
- package/build/artifacts/contracts/interfaces/IPMarketSwapCallback.sol/IPMarketSwapCallback.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarketSwapCallback.sol/IPMarketSwapCallback.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPrincipalToken.sol/IPPrincipalToken.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPrincipalToken.sol/IPPrincipalToken.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/interfaces/IPYieldContractFactory.sol/IPYieldContractFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPYieldContractFactory.sol/IPYieldContractFactory.json +3 -3
- package/build/artifacts/contracts/interfaces/IPYieldToken.sol/IPYieldToken.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPYieldToken.sol/IPYieldToken.json +6 -6
- package/build/artifacts/contracts/interfaces/IStandardizedYield.sol/IStandardizedYield.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/{ISuperComposableYield.sol/ISuperComposableYield.json → IStandardizedYield.sol/IStandardizedYield.json} +5 -5
- package/build/artifacts/contracts/offchain-helpers/MarketMathStatic.sol/MarketMathStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/MarketMathStatic.sol/MarketMathStatic.json +7 -7
- package/build/artifacts/contracts/offchain-helpers/RouterStatic.sol/RouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/RouterStatic.sol/RouterStatic.json +116 -116
- package/build/artifacts/contracts/router/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.json +35 -35
- package/build/artifacts/contracts/router/ActionCallback.sol/ActionCallback.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionCallback.sol/ActionCallback.json +12 -12
- package/build/artifacts/contracts/router/ActionMintRedeem.sol/ActionMintRedeem.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionMintRedeem.sol/ActionMintRedeem.json +41 -41
- package/build/artifacts/contracts/router/ActionMisc.sol/ActionMisc.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionMisc.sol/ActionMisc.json +2 -2
- package/build/artifacts/contracts/router/ActionSwapPT.sol/ActionSwapPT.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapPT.sol/ActionSwapPT.json +28 -28
- package/build/artifacts/contracts/router/ActionSwapPTYT.sol/ActionSwapPTYT.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapPTYT.sol/ActionSwapPTYT.json +4 -4
- package/build/artifacts/contracts/router/ActionSwapYT.sol/ActionSwapYT.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapYT.sol/ActionSwapYT.json +22 -22
- 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/CallbackHelper.sol/CallbackHelper.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/build/artifacts/contracts/router/kyberswap/KyberSwapHelper.sol/KyberSwapHelper.dbg.json +1 -1
- package/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol +96 -27
- package/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol +40 -12
- package/contracts/LiquidityMining/CrossChainMsg/PendleMsgSenderAppUpg.sol +24 -5
- package/contracts/LiquidityMining/CrossChainMsg/libraries/ExcessivelySafeCall.sol +133 -0
- package/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol +33 -0
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol +8 -1
- package/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol +3 -3
- package/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol +2 -7
- package/contracts/core/Market/MarketMathCore.sol +50 -53
- package/contracts/core/Market/PendleGauge.sol +8 -8
- package/contracts/core/Market/PendleMarket.sol +49 -49
- package/contracts/core/Market/PendleMarketFactory.sol +1 -1
- package/contracts/core/RewardManager/RewardManager.sol +1 -1
- package/contracts/core/{SuperComposableYield → StandardizedYield}/PYIndex.sol +16 -16
- package/contracts/core/{SuperComposableYield/SCYBase.sol → StandardizedYield/SYBase.sol} +17 -17
- package/contracts/core/{SuperComposableYield/SCYBaseWithRewards.sol → StandardizedYield/SYBaseWithRewards.sol} +9 -9
- package/contracts/core/StandardizedYield/SYUtils.sol +26 -0
- package/contracts/core/{SuperComposableYield → StandardizedYield}/implementations/BenQi/PendleQiTokenHelper.sol +1 -1
- package/contracts/core/{SuperComposableYield/implementations/BenQi/PendleQiTokenSCY.sol → StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol} +10 -10
- package/contracts/core/StandardizedYield/implementations/Convex/ConvexCurveLP/Pendle3CrvAndTokenSY.sol +167 -0
- package/contracts/core/{SuperComposableYield/implementations/Convex/ConvexCurveLP/PendleConvexCurveLPSCY.sol → StandardizedYield/implementations/Convex/ConvexCurveLP/PendleConvexLPSY.sol} +51 -70
- package/contracts/core/{SuperComposableYield → StandardizedYield}/implementations/Convex/Pendle3CrvHelper.sol +7 -7
- package/contracts/core/{SuperComposableYield/implementations/PendleWstEthSCY.sol → StandardizedYield/implementations/PendleWstEthSY.sol} +5 -5
- package/contracts/core/YieldContracts/InterestManagerYT.sol +7 -7
- package/contracts/core/YieldContracts/PendlePrincipalToken.sol +3 -3
- package/contracts/core/YieldContracts/PendleYieldContractFactory.sol +15 -15
- package/contracts/core/YieldContracts/PendleYieldToken.sol +71 -71
- package/contracts/core/libraries/Errors.sol +23 -21
- package/contracts/core/libraries/TokenHelper.sol +0 -33
- package/contracts/interfaces/Curve/ICrvPool.sol +2 -0
- package/contracts/interfaces/ILayerZeroEndpoint.sol +39 -0
- package/contracts/interfaces/ILayerZeroReceiver.sol +12 -0
- package/contracts/interfaces/IPActionAddRemoveLiq.sol +27 -27
- package/contracts/interfaces/IPActionMintRedeem.sol +30 -30
- package/contracts/interfaces/IPActionSwapPT.sol +16 -16
- package/contracts/interfaces/IPActionSwapPTYT.sol +2 -2
- package/contracts/interfaces/IPActionSwapYT.sol +16 -16
- package/contracts/interfaces/IPMarket.sol +14 -19
- package/contracts/interfaces/IPMarketSwapCallback.sol +1 -1
- package/contracts/interfaces/IPMsgSendEndpoint.sol +4 -2
- package/contracts/interfaces/IPPrincipalToken.sol +1 -1
- package/contracts/interfaces/IPYieldContractFactory.sol +3 -3
- package/contracts/interfaces/IPYieldToken.sol +7 -9
- package/contracts/interfaces/{ISuperComposableYield.sol → IStandardizedYield.sol} +6 -6
- package/contracts/offchain-helpers/MarketMathStatic.sol +116 -131
- package/contracts/offchain-helpers/RouterStatic.sol +80 -93
- package/contracts/router/ActionAddRemoveLiq.sol +99 -111
- package/contracts/router/ActionCallback.sol +46 -46
- package/contracts/router/ActionMintRedeem.sol +58 -58
- package/contracts/router/ActionSwapPT.sol +61 -69
- package/contracts/router/ActionSwapPTYT.sol +7 -7
- package/contracts/router/ActionSwapYT.sol +72 -79
- package/contracts/router/PendleRouter.sol +16 -16
- package/contracts/router/base/ActionBaseMintRedeem.sol +43 -43
- package/contracts/router/base/CallbackHelper.sol +20 -20
- package/contracts/router/base/MarketApproxLib.sol +166 -143
- package/contracts/router/kyberswap/KyberSwapHelper.sol +2 -2
- package/deployments/43113-core.json +16 -0
- package/{contracts/deployments → deployments}/43113-helper.json +0 -0
- package/deployments/43113-markets/benqi-market-QI-USDC-FEB-2ND.json +8 -0
- package/deployments/43113-markets/benqi-market-QI-WETH-DEC-1ST.json +8 -0
- package/{contracts/deployments → deployments}/43113-testenv.json +0 -0
- package/deployments/80001-core.json +15 -0
- package/{contracts/deployments → deployments}/80001-testenv.json +0 -0
- package/package.json +2 -2
- package/typechain-types/ActionAddRemoveLiq.ts +127 -129
- package/typechain-types/ActionCallback.ts +5 -5
- package/typechain-types/ActionMintRedeem.ts +139 -141
- package/typechain-types/ActionSwapPT.ts +73 -73
- package/typechain-types/ActionSwapPTYT.ts +2 -2
- package/typechain-types/ActionSwapYT.ts +73 -73
- package/typechain-types/IPActionAddRemoveLiq.ts +127 -129
- package/typechain-types/IPActionMintRedeem.ts +139 -141
- package/typechain-types/IPActionSwapPT.ts +73 -73
- package/typechain-types/IPActionSwapPTYT.ts +2 -2
- package/typechain-types/IPActionSwapYT.ts +73 -73
- package/typechain-types/IPAllAction.ts +402 -406
- package/typechain-types/IPMarket.ts +51 -54
- package/typechain-types/IPMarketSwapCallback.ts +5 -5
- package/typechain-types/IPPrincipalToken.ts +8 -8
- package/typechain-types/IPYieldContractFactory.ts +13 -13
- package/typechain-types/IPYieldToken.ts +17 -17
- package/typechain-types/IStandardizedYield.ts +895 -0
- package/typechain-types/MarketMathStatic.ts +27 -27
- package/typechain-types/Pendle3CrvAndTokenSY.ts +1243 -0
- package/typechain-types/Pendle3CrvHelper.ts +13 -13
- package/typechain-types/PendleConvexLPSY.ts +1189 -0
- package/typechain-types/PendleGaugeControllerBaseUpg.ts +125 -0
- package/typechain-types/PendleGaugeControllerMainchainUpg.ts +125 -0
- package/typechain-types/PendleGaugeControllerSidechainUpg.ts +124 -0
- package/typechain-types/PendleMarket.ts +54 -57
- package/typechain-types/PendlePrincipalToken.ts +8 -8
- package/typechain-types/PendleQiTokenSY.ts +1166 -0
- package/typechain-types/PendleWstEthSY.ts +1040 -0
- package/typechain-types/PendleYieldContractFactory.ts +8 -8
- package/typechain-types/PendleYieldToken.ts +41 -44
- package/typechain-types/RouterStatic.ts +196 -196
- package/typechain-types/SYBase.ts +1001 -0
- package/typechain-types/SYBaseWithRewards.ts +1094 -0
- package/typechain-types/factories/ActionAddRemoveLiq__factory.ts +34 -34
- package/typechain-types/factories/ActionCallback__factory.ts +11 -11
- package/typechain-types/factories/ActionMintRedeem__factory.ts +38 -38
- package/typechain-types/factories/ActionMisc__factory.ts +1 -1
- package/typechain-types/factories/ActionSwapPTYT__factory.ts +3 -3
- package/typechain-types/factories/ActionSwapPT__factory.ts +27 -27
- package/typechain-types/factories/ActionSwapYT__factory.ts +21 -21
- package/typechain-types/factories/Errors__factory.ts +27 -27
- package/typechain-types/factories/IPActionAddRemoveLiq__factory.ts +30 -30
- package/typechain-types/factories/IPActionMintRedeem__factory.ts +34 -34
- package/typechain-types/factories/IPActionSwapPTYT__factory.ts +2 -2
- package/typechain-types/factories/IPActionSwapPT__factory.ts +20 -20
- package/typechain-types/factories/IPActionSwapYT__factory.ts +20 -20
- package/typechain-types/factories/IPAllAction__factory.ts +106 -106
- package/typechain-types/factories/IPMarketSwapCallback__factory.ts +1 -1
- package/typechain-types/factories/IPMarket__factory.ts +18 -18
- package/typechain-types/factories/IPPrincipalToken__factory.ts +1 -1
- package/typechain-types/factories/IPYieldContractFactory__factory.ts +3 -3
- package/typechain-types/factories/IPYieldToken__factory.ts +6 -6
- package/typechain-types/factories/IStandardizedYield__factory.ts +658 -0
- package/typechain-types/factories/MarketMathStatic__factory.ts +6 -6
- package/typechain-types/factories/OracleLib__factory.ts +1 -1
- package/typechain-types/factories/Pendle3CrvAndTokenSY__factory.ts +1124 -0
- package/typechain-types/factories/Pendle3CrvHelper__factory.ts +3 -3
- package/typechain-types/factories/PendleConvexLPSY__factory.ts +963 -0
- package/typechain-types/factories/PendleFeeDistributorFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleFeeDistributor__factory.ts +1 -1
- package/typechain-types/factories/PendleGaugeControllerBaseUpg__factory.ts +89 -0
- package/typechain-types/factories/PendleGaugeControllerMainchainUpg__factory.ts +90 -1
- package/typechain-types/factories/PendleGaugeControllerSidechainUpg__factory.ts +90 -1
- package/typechain-types/factories/PendleMarketFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleMarket__factory.ts +21 -21
- package/typechain-types/factories/PendleMsgReceiveEndpointUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleMsgSendEndpointUpg__factory.ts +1 -1
- package/typechain-types/factories/PendlePrincipalToken__factory.ts +7 -7
- package/typechain-types/factories/PendleQiTokenHelper__factory.ts +1 -1
- package/typechain-types/factories/PendleQiTokenSY__factory.ts +1095 -0
- package/typechain-types/factories/PendleRouter__factory.ts +1 -1
- package/typechain-types/factories/PendleVotingControllerUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleWstEthSY__factory.ts +924 -0
- package/typechain-types/factories/PendleYieldContractFactory__factory.ts +3 -3
- package/typechain-types/factories/PendleYieldToken__factory.ts +27 -27
- package/typechain-types/factories/RouterStatic__factory.ts +57 -57
- package/typechain-types/factories/SYBaseWithRewards__factory.ts +867 -0
- package/typechain-types/factories/SYBase__factory.ts +795 -0
- package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +1 -1
- package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +1 -1
- package/typechain-types/hardhat.d.ts +33 -51
- package/typechain-types/index.ts +14 -18
- package/build/artifacts/contracts/core/SuperComposableYield/PYIndex.sol/PYIndexLib.dbg.json +0 -4
- package/build/artifacts/contracts/core/SuperComposableYield/SCYBase.sol/SCYBase.dbg.json +0 -4
- package/build/artifacts/contracts/core/SuperComposableYield/SCYBaseWithRewards.sol/SCYBaseWithRewards.dbg.json +0 -4
- package/build/artifacts/contracts/core/SuperComposableYield/SCYUtils.sol/SCYUtils.dbg.json +0 -4
- package/build/artifacts/contracts/core/SuperComposableYield/implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.dbg.json +0 -4
- package/build/artifacts/contracts/core/SuperComposableYield/implementations/BenQi/PendleQiTokenSCY.sol/PendleQiTokenSCY.dbg.json +0 -4
- package/build/artifacts/contracts/core/SuperComposableYield/implementations/Convex/ConvexCurveLP/Pendle3CrvAndTokenSCY.sol/Pendle3CrvAndTokenSCY.dbg.json +0 -4
- package/build/artifacts/contracts/core/SuperComposableYield/implementations/Convex/ConvexCurveLP/Pendle3CrvAndTokenSCY.sol/Pendle3CrvAndTokenSCY.json +0 -1030
- package/build/artifacts/contracts/core/SuperComposableYield/implementations/Convex/ConvexCurveLP/PendleConvexCurveLP2PoolSCY.sol/PendleConvexCurveLP2PoolSCY.dbg.json +0 -4
- package/build/artifacts/contracts/core/SuperComposableYield/implementations/Convex/ConvexCurveLP/PendleConvexCurveLP2PoolSCY.sol/PendleConvexCurveLP2PoolSCY.json +0 -1025
- package/build/artifacts/contracts/core/SuperComposableYield/implementations/Convex/ConvexCurveLP/PendleConvexCurveLPSCY.sol/PendleConvexCurveLPSCY.dbg.json +0 -4
- package/build/artifacts/contracts/core/SuperComposableYield/implementations/Convex/Pendle3CrvHelper.sol/Pendle3CrvHelper.dbg.json +0 -4
- package/build/artifacts/contracts/core/SuperComposableYield/implementations/PendleWstEthSCY.sol/PendleWstEthSCY.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/ISuperComposableYield.sol/ISuperComposableYield.dbg.json +0 -4
- package/build/artifacts/contracts/offchain-helpers/ImplicitSwapfeeContract.sol/ImplicitSwapfeeContract.dbg.json +0 -4
- package/build/artifacts/contracts/offchain-helpers/ImplicitSwapfeeContract.sol/ImplicitSwapfeeContract.json +0 -190
- package/contracts/core/SuperComposableYield/SCYUtils.sol +0 -34
- package/contracts/core/SuperComposableYield/implementations/Convex/ConvexCurveLP/Pendle3CrvAndTokenSCY.sol +0 -135
- package/contracts/core/SuperComposableYield/implementations/Convex/ConvexCurveLP/PendleConvexCurveLP2PoolSCY.sol +0 -96
- package/contracts/deployments/43113-core.json +0 -16
- package/contracts/deployments/43113-markets/benqi-market-QI-USDC-FEB-2ND.json +0 -8
- package/contracts/deployments/43113-markets/benqi-market-QI-WETH-DEC-1ST.json +0 -8
- package/contracts/deployments/80001-core.json +0 -15
- package/contracts/deployments/80001-markets/benqi-market-QI-USDC-FEB-2ND.json +0 -8
- package/contracts/deployments/80001-markets/benqi-market-QI-WETH-DEC-1ST.json +0 -8
- package/contracts/interfaces/ICelerMessageBus.sol +0 -28
- package/contracts/interfaces/ICelerMessageReceiverApp.sol +0 -25
- package/contracts/offchain-helpers/ImplicitSwapfeeContract.sol +0 -26
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"_format": "hh-sol-artifact-1",
|
|
3
|
-
"contractName": "ImplicitSwapfeeContract",
|
|
4
|
-
"sourceName": "contracts/offchain-helpers/ImplicitSwapfeeContract.sol",
|
|
5
|
-
"abi": [
|
|
6
|
-
{
|
|
7
|
-
"inputs": [],
|
|
8
|
-
"stateMutability": "nonpayable",
|
|
9
|
-
"type": "constructor"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"inputs": [
|
|
13
|
-
{
|
|
14
|
-
"internalType": "int256",
|
|
15
|
-
"name": "exchangeRate",
|
|
16
|
-
"type": "int256"
|
|
17
|
-
}
|
|
18
|
-
],
|
|
19
|
-
"name": "MarketExchangeRateBelowOne",
|
|
20
|
-
"type": "error"
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"inputs": [],
|
|
24
|
-
"name": "MarketExpired",
|
|
25
|
-
"type": "error"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"inputs": [
|
|
29
|
-
{
|
|
30
|
-
"internalType": "int256",
|
|
31
|
-
"name": "currentAmount",
|
|
32
|
-
"type": "int256"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"internalType": "int256",
|
|
36
|
-
"name": "requiredAmount",
|
|
37
|
-
"type": "int256"
|
|
38
|
-
}
|
|
39
|
-
],
|
|
40
|
-
"name": "MarketInsufficientPtForTrade",
|
|
41
|
-
"type": "error"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"inputs": [],
|
|
45
|
-
"name": "MarketProportionMustNotEqualOne",
|
|
46
|
-
"type": "error"
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
"inputs": [
|
|
50
|
-
{
|
|
51
|
-
"internalType": "int256",
|
|
52
|
-
"name": "proportion",
|
|
53
|
-
"type": "int256"
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"internalType": "int256",
|
|
57
|
-
"name": "maxProportion",
|
|
58
|
-
"type": "int256"
|
|
59
|
-
}
|
|
60
|
-
],
|
|
61
|
-
"name": "MarketProportionTooHigh",
|
|
62
|
-
"type": "error"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
"inputs": [
|
|
66
|
-
{
|
|
67
|
-
"internalType": "int256",
|
|
68
|
-
"name": "rateScalar",
|
|
69
|
-
"type": "int256"
|
|
70
|
-
}
|
|
71
|
-
],
|
|
72
|
-
"name": "MarketRateScalarBelowZero",
|
|
73
|
-
"type": "error"
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
"inputs": [],
|
|
77
|
-
"name": "MarketZeroLnImpliedRate",
|
|
78
|
-
"type": "error"
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
"inputs": [
|
|
82
|
-
{
|
|
83
|
-
"internalType": "int256",
|
|
84
|
-
"name": "totalPt",
|
|
85
|
-
"type": "int256"
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
"internalType": "int256",
|
|
89
|
-
"name": "totalAsset",
|
|
90
|
-
"type": "int256"
|
|
91
|
-
}
|
|
92
|
-
],
|
|
93
|
-
"name": "MarketZeroTotalPtOrTotalAsset",
|
|
94
|
-
"type": "error"
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
"inputs": [],
|
|
98
|
-
"name": "K",
|
|
99
|
-
"outputs": [
|
|
100
|
-
{
|
|
101
|
-
"internalType": "int256",
|
|
102
|
-
"name": "",
|
|
103
|
-
"type": "int256"
|
|
104
|
-
}
|
|
105
|
-
],
|
|
106
|
-
"stateMutability": "view",
|
|
107
|
-
"type": "function"
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
"inputs": [
|
|
111
|
-
{
|
|
112
|
-
"internalType": "address",
|
|
113
|
-
"name": "market",
|
|
114
|
-
"type": "address"
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
"components": [
|
|
118
|
-
{
|
|
119
|
-
"internalType": "int256",
|
|
120
|
-
"name": "totalPt",
|
|
121
|
-
"type": "int256"
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
"internalType": "int256",
|
|
125
|
-
"name": "totalScy",
|
|
126
|
-
"type": "int256"
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
"internalType": "int256",
|
|
130
|
-
"name": "totalLp",
|
|
131
|
-
"type": "int256"
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
"internalType": "address",
|
|
135
|
-
"name": "treasury",
|
|
136
|
-
"type": "address"
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
"internalType": "int256",
|
|
140
|
-
"name": "scalarRoot",
|
|
141
|
-
"type": "int256"
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
"internalType": "uint256",
|
|
145
|
-
"name": "lnFeeRateRoot",
|
|
146
|
-
"type": "uint256"
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
"internalType": "uint256",
|
|
150
|
-
"name": "expiry",
|
|
151
|
-
"type": "uint256"
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
"internalType": "uint256",
|
|
155
|
-
"name": "reserveFeePercent",
|
|
156
|
-
"type": "uint256"
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
"internalType": "uint256",
|
|
160
|
-
"name": "lastLnImpliedRate",
|
|
161
|
-
"type": "uint256"
|
|
162
|
-
}
|
|
163
|
-
],
|
|
164
|
-
"internalType": "struct MarketState",
|
|
165
|
-
"name": "prevState",
|
|
166
|
-
"type": "tuple"
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
"internalType": "int256",
|
|
170
|
-
"name": "netPtToAccount",
|
|
171
|
-
"type": "int256"
|
|
172
|
-
}
|
|
173
|
-
],
|
|
174
|
-
"name": "execute",
|
|
175
|
-
"outputs": [
|
|
176
|
-
{
|
|
177
|
-
"internalType": "int256",
|
|
178
|
-
"name": "netScyToAccount",
|
|
179
|
-
"type": "int256"
|
|
180
|
-
}
|
|
181
|
-
],
|
|
182
|
-
"stateMutability": "view",
|
|
183
|
-
"type": "function"
|
|
184
|
-
}
|
|
185
|
-
],
|
|
186
|
-
"bytecode": "0x608060405234801561001057600080fd5b50611615806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063755bb5751461003b578063a932492f14610060575b600080fd5b61004e61004936600461130e565b610068565b60405190815260200160405180910390f35b61004e606481565b600080846001600160a01b0316632c8ce6bc6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156100a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100cd919061135b565b925050506000816001600160a01b031663d2a3584e6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610111573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061013591906113a8565b905060005b606481121561018d57600061016c836101546064896113ed565b42610164368c90038c018c611452565b929190610197565b50905061017981866114d4565b94505080610186906114fc565b905061013a565b5050509392505050565b6000806101a88660c0015184610232565b156101c65760405163b2094b5960e01b815260040160405180910390fd5b855184126101f9578551604051632185509b60e21b81526004810191909152602481018590526044015b60405180910390fd5b600061020687878661023d565b905061021487828888610346565b90935091506102288782888887878a61048c565b5094509492505050565b808211155b92915050565b6102686040518060800160405280600081526020016000815260200160008152602001600081525090565b6102768460c0015183610232565b156102945760405163b2094b5960e01b815260040160405180910390fd5b6000828560c001516102a6919061151b565b90506102b2858261051e565b825260208501516102c490859061057f565b6020830152845115806102d957506020820151155b15610307578451602083015160405163b1c4aefb60e01b8152600481019290925260248201526044016101f0565b610325856000015186610100015184602001518560000151856105be565b604083015260a0850151610339908261063f565b6060830152509392505050565b6000806000610368876000015187602001518860000151896040015188610678565b9050600061037e6103798684610735565b610764565b606088015190915060008613156103ed57600061039b8483610735565b9050670de0b6b3a76400008112156103c95760405163329e322960e21b8152600481018290526024016101f0565b6103e56103de83670de0b6b3a764000061152e565b8490610772565b91505061041a565b6104178161040381670de0b6b3a764000061152e565b61040d9085611555565b61037991906113ed565b90505b6000606461042b8b60e00151610790565b6104359084611555565b61043f91906113ed565b9050600061044d838561152e565b9050600081126104665761046189826107aa565b610470565b61047089826107d7565b965061047c89836107aa565b9550505050505094509492505050565b6000818860c0015161049e919061151b565b88519091506104ad9086610804565b88526104c76104bc84866114d4565b60208a015190610804565b6020890181905288516104ec916104df90899061057f565b895160408b015185610852565b610100890181905260000361051457604051635534d70f60e11b815260040160405180910390fd5b5050505050505050565b600061052982610790565b61054061053b6201518061016d611585565b610790565b846080015161054f9190611555565b61055991906113ed565b90506000811361023757604051630e520c3b60e11b8152600481018290526024016101f0565b60008060008312610591576001610595565b6000195b90506105ac61053b856105a7866108aa565b6108c1565b6105b69082611555565b949350505050565b6000806105cb868461063f565b9050670de0b6b3a76400008112156105f95760405163329e322960e21b8152600481018290526024016101f0565b600061060f610608878a6114d4565b8990610735565b9050600061061c826108e0565b90506106288187610735565b610632908461152e565b9998505050505050505050565b6000806106516201518061016d611585565b61065b8486611585565b610665919061159c565b90506105b661067382610790565b610933565b6000806106858784610804565b9050600061069d610696888a6114d4565b8390610735565b9050670d529ae9e86000008113156106d957604051637e34684f60e11b815260048101829052670d529ae9e860000060248201526044016101f0565b60006106e4826108e0565b9050856106f18289610735565b6106fb91906114d4565b9350670de0b6b3a76400008412156107295760405163329e322960e21b8152600481018590526024016101f0565b50505095945050505050565b60008061074a670de0b6b3a764000085611555565b905082818161075b5761075b6113c1565b05949350505050565b600061023782600019611555565b60008061077f8385611555565b9050670de0b6b3a76400008161075b565b60006001600160ff1b038211156107a657600080fd5b5090565b600080600083126107bc5760016107c0565b6000195b90506105ac61053b856107d2866108aa565b610d48565b600080600083126107e95760016107ed565b6000195b90506105ac61053b856107ff866108aa565b610d5d565b6000818312156108415760405162461bcd60e51b81526020600482015260086024820152676e6567617469766560c01b60448201526064016101f0565b61084b828461152e565b9392505050565b600080610863878787876000610678565b9050600061087861087383610d89565b610e1a565b90508361088a6201518061016d611585565b6108949083611585565b61089e919061159c565b98975050505050505050565b60008082136107a6576108bc826115b0565b610237565b6000670de0b6b3a76400006108d68484611585565b61084b919061159c565b6000670de0b6b3a7640000820361090a5760405163a9c8b14d60e01b815260040160405180910390fd5b600061092861092184670de0b6b3a764000061152e565b8490610735565b905061084b81610d89565b6000680238fd42c5cf03ffff198212158015610958575068070c1cc73b00c800008213155b6109975760405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a5908195e1c1bdb995b9d60821b60448201526064016101f0565b60008212156109cf576109ac82600003610933565b6a0c097ce7bc90715b34b9f160241b816109c8576109c86113c1565b0592915050565b60006806f05b59d3b20000008312610a0d57506806f05b59d3b1ffffff199091019072195e54c5dd42177f53a27172fa9ec63026282760241b610a43565b6803782dace9d90000008312610a3f57506803782dace9d8ffffff19909101906b1425982cf597cd205cef7380610a43565b5060015b6064929092029168056bc75e2d6310000068ad78ebc5ac620000008412610a935768ad78ebc5ac61ffffff199093019268056bc75e2d631000006e01855144814a7ff805980ff008400082020590505b6856bc75e2d6310000008412610acf576856bc75e2d630ffffff199093019268056bc75e2d631000006b02df0ab5a80a22c61ab5a70082020590505b682b5e3af16b188000008412610b0957682b5e3af16b187fffff199093019268056bc75e2d63100000693f1fce3da636ea5cf85082020590505b6815af1d78b58c4000008412610b43576815af1d78b58c3fffff199093019268056bc75e2d63100000690127fa27722cc06cc5e282020590505b680ad78ebc5ac62000008412610b7c57680ad78ebc5ac61fffff199093019268056bc75e2d6310000068280e60114edb805d0382020590505b68056bc75e2d631000008412610bb55768056bc75e2d630fffff199093019268056bc75e2d63100000680ebc5fb4174612111082020590505b6802b5e3af16b18800008412610bee576802b5e3af16b187ffff199093019268056bc75e2d631000006808f00f760a4b2db55d82020590505b68015af1d78b58c400008412610c275768015af1d78b58c3ffff199093019268056bc75e2d631000006806f5f177578893793782020590505b68056bc75e2d631000008481019085906002908280020505918201919050600368056bc75e2d631000008783020505918201919050600468056bc75e2d631000008783020505918201919050600568056bc75e2d631000008783020505918201919050600668056bc75e2d631000008783020505918201919050600768056bc75e2d631000008783020505918201919050600868056bc75e2d631000008783020505918201919050600968056bc75e2d631000008783020505918201919050600a68056bc75e2d631000008783020505918201919050600b68056bc75e2d631000008783020505918201919050600c68056bc75e2d631000008783020505918201919050606468056bc75e2d63100000848402058502059695505050505050565b6000826108d6670de0b6b3a764000084611585565b600082600181610d75670de0b6b3a764000086611585565b610d7f91906115cc565b6108d6919061151b565b6000808213610dca5760405162461bcd60e51b815260206004820152600d60248201526c6f7574206f6620626f756e647360981b60448201526064016101f0565b670c7d713b49da000082138015610de85750670f43fc2c04ee000082125b15610e0c57670de0b6b3a7640000610dff83610e29565b816109c8576109c86113c1565b61023782610f48565b919050565b6000808212156107a657600080fd5b670de0b6b3a7640000026000806a0c097ce7bc90715b34b9f160241b808401906ec097ce7bc90715b34b9f0fffffffff1985010281610e6a57610e6a6113c1565b05905060006a0c097ce7bc90715b34b9f160241b82800205905081806a0c097ce7bc90715b34b9f160241b81840205915060038205016a0c097ce7bc90715b34b9f160241b82840205915060058205016a0c097ce7bc90715b34b9f160241b82840205915060078205016a0c097ce7bc90715b34b9f160241b82840205915060098205016a0c097ce7bc90715b34b9f160241b828402059150600b8205016a0c097ce7bc90715b34b9f160241b828402059150600d8205016a0c097ce7bc90715b34b9f160241b828402059150600f82050160020295945050505050565b6000670de0b6b3a7640000821215610f8957610f80826a0c097ce7bc90715b34b9f160241b81610f7a57610f7a6113c1565b05610f48565b60000392915050565b6000775803bcc5cb9634ba4cfb2213f784019318ed4dcb6017880f60361b8312610fd45772195e54c5dd42177f53a27172fa9ec63026282760241b830592506806f05b59d3b2000000015b6f8bcc0026baae9e45e470190267a230cf60191b831261100b576b1425982cf597cd205cef7380830592506803782dace9d9000000015b606492830292026e01855144814a7ff805980ff00840008312611053576e01855144814a7ff805980ff008400068056bc75e2d63100000840205925068ad78ebc5ac62000000015b6b02df0ab5a80a22c61ab5a700831261108e576b02df0ab5a80a22c61ab5a70068056bc75e2d6310000084020592506856bc75e2d631000000015b693f1fce3da636ea5cf85083126110c557693f1fce3da636ea5cf85068056bc75e2d631000008402059250682b5e3af16b18800000015b690127fa27722cc06cc5e283126110fc57690127fa27722cc06cc5e268056bc75e2d6310000084020592506815af1d78b58c400000015b68280e60114edb805d0383126111315768280e60114edb805d0368056bc75e2d631000008402059250680ad78ebc5ac6200000015b680ebc5fb41746121110831261115c57680ebc5fb4174612111068056bc75e2d631000009384020592015b6808f00f760a4b2db55d8312611191576808f00f760a4b2db55d68056bc75e2d6310000084020592506802b5e3af16b1880000015b6806f5f177578893793783126111c6576806f5f177578893793768056bc75e2d63100000840205925068015af1d78b58c40000015b6806248f33704b28660383126111fa576806248f33704b28660368056bc75e2d63100000840205925067ad78ebc5ac620000015b6805c548670b9510e7ac831261122e576805c548670b9510e7ac68056bc75e2d6310000084020592506756bc75e2d6310000015b600068056bc75e2d63100000840168056bc75e2d631000008086030281611257576112576113c1565b059050600068056bc75e2d63100000828002059050818068056bc75e2d63100000818402059150600382050168056bc75e2d63100000828402059150600582050168056bc75e2d63100000828402059150600782050168056bc75e2d63100000828402059150600982050168056bc75e2d63100000828402059150600b820501600202606485820105979650505050505050565b6001600160a01b038116811461130057600080fd5b50565b8035610e15816112eb565b600080600083850361016081121561132557600080fd5b8435611330816112eb565b9350610120601f198201121561134557600080fd5b5060208401915061014084013590509250925092565b60008060006060848603121561137057600080fd5b835161137b816112eb565b602085015190935061138c816112eb565b604085015190925061139d816112eb565b809150509250925092565b6000602082840312156113ba57600080fd5b5051919050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000826113fc576113fc6113c1565b600160ff1b821460001984141615611416576114166113d7565b500590565b60405161012081016001600160401b038111828210171561144c57634e487b7160e01b600052604160045260246000fd5b60405290565b6000610120828403121561146557600080fd5b61146d61141b565b82358152602083013560208201526040830135604082015261149160608401611303565b60608201526080830135608082015260a083013560a082015260c083013560c082015260e083013560e08201526101008084013581830152508091505092915050565b80820182811260008312801582168215821617156114f4576114f46113d7565b505092915050565b60006001600160ff1b018201611514576115146113d7565b5060010190565b81810381811115610237576102376113d7565b818103600083128015838313168383128216171561154e5761154e6113d7565b5092915050565b80820260008212600160ff1b84141615611571576115716113d7565b8181058314821517610237576102376113d7565b8082028115828204841417610237576102376113d7565b6000826115ab576115ab6113c1565b500490565b6000600160ff1b82016115c5576115c56113d7565b5060000390565b80820180821115610237576102376113d756fea26469706673582212201b4ef25ff8ebae0bd00e3267cc339a4a20e17e3ed9dd6ddafab6591a9e5733f764736f6c63430008110033",
|
|
187
|
-
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c8063755bb5751461003b578063a932492f14610060575b600080fd5b61004e61004936600461130e565b610068565b60405190815260200160405180910390f35b61004e606481565b600080846001600160a01b0316632c8ce6bc6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156100a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100cd919061135b565b925050506000816001600160a01b031663d2a3584e6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610111573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061013591906113a8565b905060005b606481121561018d57600061016c836101546064896113ed565b42610164368c90038c018c611452565b929190610197565b50905061017981866114d4565b94505080610186906114fc565b905061013a565b5050509392505050565b6000806101a88660c0015184610232565b156101c65760405163b2094b5960e01b815260040160405180910390fd5b855184126101f9578551604051632185509b60e21b81526004810191909152602481018590526044015b60405180910390fd5b600061020687878661023d565b905061021487828888610346565b90935091506102288782888887878a61048c565b5094509492505050565b808211155b92915050565b6102686040518060800160405280600081526020016000815260200160008152602001600081525090565b6102768460c0015183610232565b156102945760405163b2094b5960e01b815260040160405180910390fd5b6000828560c001516102a6919061151b565b90506102b2858261051e565b825260208501516102c490859061057f565b6020830152845115806102d957506020820151155b15610307578451602083015160405163b1c4aefb60e01b8152600481019290925260248201526044016101f0565b610325856000015186610100015184602001518560000151856105be565b604083015260a0850151610339908261063f565b6060830152509392505050565b6000806000610368876000015187602001518860000151896040015188610678565b9050600061037e6103798684610735565b610764565b606088015190915060008613156103ed57600061039b8483610735565b9050670de0b6b3a76400008112156103c95760405163329e322960e21b8152600481018290526024016101f0565b6103e56103de83670de0b6b3a764000061152e565b8490610772565b91505061041a565b6104178161040381670de0b6b3a764000061152e565b61040d9085611555565b61037991906113ed565b90505b6000606461042b8b60e00151610790565b6104359084611555565b61043f91906113ed565b9050600061044d838561152e565b9050600081126104665761046189826107aa565b610470565b61047089826107d7565b965061047c89836107aa565b9550505050505094509492505050565b6000818860c0015161049e919061151b565b88519091506104ad9086610804565b88526104c76104bc84866114d4565b60208a015190610804565b6020890181905288516104ec916104df90899061057f565b895160408b015185610852565b610100890181905260000361051457604051635534d70f60e11b815260040160405180910390fd5b5050505050505050565b600061052982610790565b61054061053b6201518061016d611585565b610790565b846080015161054f9190611555565b61055991906113ed565b90506000811361023757604051630e520c3b60e11b8152600481018290526024016101f0565b60008060008312610591576001610595565b6000195b90506105ac61053b856105a7866108aa565b6108c1565b6105b69082611555565b949350505050565b6000806105cb868461063f565b9050670de0b6b3a76400008112156105f95760405163329e322960e21b8152600481018290526024016101f0565b600061060f610608878a6114d4565b8990610735565b9050600061061c826108e0565b90506106288187610735565b610632908461152e565b9998505050505050505050565b6000806106516201518061016d611585565b61065b8486611585565b610665919061159c565b90506105b661067382610790565b610933565b6000806106858784610804565b9050600061069d610696888a6114d4565b8390610735565b9050670d529ae9e86000008113156106d957604051637e34684f60e11b815260048101829052670d529ae9e860000060248201526044016101f0565b60006106e4826108e0565b9050856106f18289610735565b6106fb91906114d4565b9350670de0b6b3a76400008412156107295760405163329e322960e21b8152600481018590526024016101f0565b50505095945050505050565b60008061074a670de0b6b3a764000085611555565b905082818161075b5761075b6113c1565b05949350505050565b600061023782600019611555565b60008061077f8385611555565b9050670de0b6b3a76400008161075b565b60006001600160ff1b038211156107a657600080fd5b5090565b600080600083126107bc5760016107c0565b6000195b90506105ac61053b856107d2866108aa565b610d48565b600080600083126107e95760016107ed565b6000195b90506105ac61053b856107ff866108aa565b610d5d565b6000818312156108415760405162461bcd60e51b81526020600482015260086024820152676e6567617469766560c01b60448201526064016101f0565b61084b828461152e565b9392505050565b600080610863878787876000610678565b9050600061087861087383610d89565b610e1a565b90508361088a6201518061016d611585565b6108949083611585565b61089e919061159c565b98975050505050505050565b60008082136107a6576108bc826115b0565b610237565b6000670de0b6b3a76400006108d68484611585565b61084b919061159c565b6000670de0b6b3a7640000820361090a5760405163a9c8b14d60e01b815260040160405180910390fd5b600061092861092184670de0b6b3a764000061152e565b8490610735565b905061084b81610d89565b6000680238fd42c5cf03ffff198212158015610958575068070c1cc73b00c800008213155b6109975760405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a5908195e1c1bdb995b9d60821b60448201526064016101f0565b60008212156109cf576109ac82600003610933565b6a0c097ce7bc90715b34b9f160241b816109c8576109c86113c1565b0592915050565b60006806f05b59d3b20000008312610a0d57506806f05b59d3b1ffffff199091019072195e54c5dd42177f53a27172fa9ec63026282760241b610a43565b6803782dace9d90000008312610a3f57506803782dace9d8ffffff19909101906b1425982cf597cd205cef7380610a43565b5060015b6064929092029168056bc75e2d6310000068ad78ebc5ac620000008412610a935768ad78ebc5ac61ffffff199093019268056bc75e2d631000006e01855144814a7ff805980ff008400082020590505b6856bc75e2d6310000008412610acf576856bc75e2d630ffffff199093019268056bc75e2d631000006b02df0ab5a80a22c61ab5a70082020590505b682b5e3af16b188000008412610b0957682b5e3af16b187fffff199093019268056bc75e2d63100000693f1fce3da636ea5cf85082020590505b6815af1d78b58c4000008412610b43576815af1d78b58c3fffff199093019268056bc75e2d63100000690127fa27722cc06cc5e282020590505b680ad78ebc5ac62000008412610b7c57680ad78ebc5ac61fffff199093019268056bc75e2d6310000068280e60114edb805d0382020590505b68056bc75e2d631000008412610bb55768056bc75e2d630fffff199093019268056bc75e2d63100000680ebc5fb4174612111082020590505b6802b5e3af16b18800008412610bee576802b5e3af16b187ffff199093019268056bc75e2d631000006808f00f760a4b2db55d82020590505b68015af1d78b58c400008412610c275768015af1d78b58c3ffff199093019268056bc75e2d631000006806f5f177578893793782020590505b68056bc75e2d631000008481019085906002908280020505918201919050600368056bc75e2d631000008783020505918201919050600468056bc75e2d631000008783020505918201919050600568056bc75e2d631000008783020505918201919050600668056bc75e2d631000008783020505918201919050600768056bc75e2d631000008783020505918201919050600868056bc75e2d631000008783020505918201919050600968056bc75e2d631000008783020505918201919050600a68056bc75e2d631000008783020505918201919050600b68056bc75e2d631000008783020505918201919050600c68056bc75e2d631000008783020505918201919050606468056bc75e2d63100000848402058502059695505050505050565b6000826108d6670de0b6b3a764000084611585565b600082600181610d75670de0b6b3a764000086611585565b610d7f91906115cc565b6108d6919061151b565b6000808213610dca5760405162461bcd60e51b815260206004820152600d60248201526c6f7574206f6620626f756e647360981b60448201526064016101f0565b670c7d713b49da000082138015610de85750670f43fc2c04ee000082125b15610e0c57670de0b6b3a7640000610dff83610e29565b816109c8576109c86113c1565b61023782610f48565b919050565b6000808212156107a657600080fd5b670de0b6b3a7640000026000806a0c097ce7bc90715b34b9f160241b808401906ec097ce7bc90715b34b9f0fffffffff1985010281610e6a57610e6a6113c1565b05905060006a0c097ce7bc90715b34b9f160241b82800205905081806a0c097ce7bc90715b34b9f160241b81840205915060038205016a0c097ce7bc90715b34b9f160241b82840205915060058205016a0c097ce7bc90715b34b9f160241b82840205915060078205016a0c097ce7bc90715b34b9f160241b82840205915060098205016a0c097ce7bc90715b34b9f160241b828402059150600b8205016a0c097ce7bc90715b34b9f160241b828402059150600d8205016a0c097ce7bc90715b34b9f160241b828402059150600f82050160020295945050505050565b6000670de0b6b3a7640000821215610f8957610f80826a0c097ce7bc90715b34b9f160241b81610f7a57610f7a6113c1565b05610f48565b60000392915050565b6000775803bcc5cb9634ba4cfb2213f784019318ed4dcb6017880f60361b8312610fd45772195e54c5dd42177f53a27172fa9ec63026282760241b830592506806f05b59d3b2000000015b6f8bcc0026baae9e45e470190267a230cf60191b831261100b576b1425982cf597cd205cef7380830592506803782dace9d9000000015b606492830292026e01855144814a7ff805980ff00840008312611053576e01855144814a7ff805980ff008400068056bc75e2d63100000840205925068ad78ebc5ac62000000015b6b02df0ab5a80a22c61ab5a700831261108e576b02df0ab5a80a22c61ab5a70068056bc75e2d6310000084020592506856bc75e2d631000000015b693f1fce3da636ea5cf85083126110c557693f1fce3da636ea5cf85068056bc75e2d631000008402059250682b5e3af16b18800000015b690127fa27722cc06cc5e283126110fc57690127fa27722cc06cc5e268056bc75e2d6310000084020592506815af1d78b58c400000015b68280e60114edb805d0383126111315768280e60114edb805d0368056bc75e2d631000008402059250680ad78ebc5ac6200000015b680ebc5fb41746121110831261115c57680ebc5fb4174612111068056bc75e2d631000009384020592015b6808f00f760a4b2db55d8312611191576808f00f760a4b2db55d68056bc75e2d6310000084020592506802b5e3af16b1880000015b6806f5f177578893793783126111c6576806f5f177578893793768056bc75e2d63100000840205925068015af1d78b58c40000015b6806248f33704b28660383126111fa576806248f33704b28660368056bc75e2d63100000840205925067ad78ebc5ac620000015b6805c548670b9510e7ac831261122e576805c548670b9510e7ac68056bc75e2d6310000084020592506756bc75e2d6310000015b600068056bc75e2d63100000840168056bc75e2d631000008086030281611257576112576113c1565b059050600068056bc75e2d63100000828002059050818068056bc75e2d63100000818402059150600382050168056bc75e2d63100000828402059150600582050168056bc75e2d63100000828402059150600782050168056bc75e2d63100000828402059150600982050168056bc75e2d63100000828402059150600b820501600202606485820105979650505050505050565b6001600160a01b038116811461130057600080fd5b50565b8035610e15816112eb565b600080600083850361016081121561132557600080fd5b8435611330816112eb565b9350610120601f198201121561134557600080fd5b5060208401915061014084013590509250925092565b60008060006060848603121561137057600080fd5b835161137b816112eb565b602085015190935061138c816112eb565b604085015190925061139d816112eb565b809150509250925092565b6000602082840312156113ba57600080fd5b5051919050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000826113fc576113fc6113c1565b600160ff1b821460001984141615611416576114166113d7565b500590565b60405161012081016001600160401b038111828210171561144c57634e487b7160e01b600052604160045260246000fd5b60405290565b6000610120828403121561146557600080fd5b61146d61141b565b82358152602083013560208201526040830135604082015261149160608401611303565b60608201526080830135608082015260a083013560a082015260c083013560c082015260e083013560e08201526101008084013581830152508091505092915050565b80820182811260008312801582168215821617156114f4576114f46113d7565b505092915050565b60006001600160ff1b018201611514576115146113d7565b5060010190565b81810381811115610237576102376113d7565b818103600083128015838313168383128216171561154e5761154e6113d7565b5092915050565b80820260008212600160ff1b84141615611571576115716113d7565b8181058314821517610237576102376113d7565b8082028115828204841417610237576102376113d7565b6000826115ab576115ab6113c1565b500490565b6000600160ff1b82016115c5576115c56113d7565b5060000390565b80820180821115610237576102376113d756fea26469706673582212201b4ef25ff8ebae0bd00e3267cc339a4a20e17e3ed9dd6ddafab6591a9e5733f764736f6c63430008110033",
|
|
188
|
-
"linkReferences": {},
|
|
189
|
-
"deployedLinkReferences": {}
|
|
190
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
-
pragma solidity 0.8.17;
|
|
3
|
-
|
|
4
|
-
library SCYUtils {
|
|
5
|
-
uint256 internal constant ONE = 1e18;
|
|
6
|
-
|
|
7
|
-
function scyToAsset(uint256 exchangeRate, uint256 scyAmount) internal pure returns (uint256) {
|
|
8
|
-
return (scyAmount * exchangeRate) / ONE;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
function scyToAssetUp(uint256 exchangeRate, uint256 scyAmount)
|
|
12
|
-
internal
|
|
13
|
-
pure
|
|
14
|
-
returns (uint256)
|
|
15
|
-
{
|
|
16
|
-
return (scyAmount * exchangeRate + ONE - 1) / ONE;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function assetToScy(uint256 exchangeRate, uint256 assetAmount)
|
|
20
|
-
internal
|
|
21
|
-
pure
|
|
22
|
-
returns (uint256)
|
|
23
|
-
{
|
|
24
|
-
return (assetAmount * ONE) / exchangeRate;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function assetToScyUp(uint256 exchangeRate, uint256 assetAmount)
|
|
28
|
-
internal
|
|
29
|
-
pure
|
|
30
|
-
returns (uint256)
|
|
31
|
-
{
|
|
32
|
-
return (assetAmount * ONE + exchangeRate - 1) / exchangeRate;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
-
pragma solidity 0.8.17;
|
|
3
|
-
|
|
4
|
-
import "./PendleConvexCurveLP2PoolSCY.sol";
|
|
5
|
-
import "../Pendle3CrvHelper.sol";
|
|
6
|
-
import "../../../../libraries/ArrayLib.sol";
|
|
7
|
-
|
|
8
|
-
contract Pendle3CrvAndTokenSCY is PendleConvexCurveLP2PoolSCY {
|
|
9
|
-
using ArrayLib for address[];
|
|
10
|
-
|
|
11
|
-
constructor(
|
|
12
|
-
string memory _name,
|
|
13
|
-
string memory _symbol,
|
|
14
|
-
uint256 _pid,
|
|
15
|
-
address _convexBooster,
|
|
16
|
-
address _crvLpToken,
|
|
17
|
-
address _cvx,
|
|
18
|
-
address _baseCrvPool,
|
|
19
|
-
address[] memory _basePoolTokens
|
|
20
|
-
)
|
|
21
|
-
PendleConvexCurveLP2PoolSCY(
|
|
22
|
-
_name,
|
|
23
|
-
_symbol,
|
|
24
|
-
_pid,
|
|
25
|
-
_convexBooster,
|
|
26
|
-
_crvLpToken,
|
|
27
|
-
_cvx,
|
|
28
|
-
_baseCrvPool,
|
|
29
|
-
_basePoolTokens
|
|
30
|
-
)
|
|
31
|
-
{
|
|
32
|
-
if (!_basePoolTokens.contains(Pendle3CrvHelper.TOKEN))
|
|
33
|
-
revert Errors.SCYCurve3crvPoolNotFound();
|
|
34
|
-
|
|
35
|
-
_safeApproveInf(Pendle3CrvHelper.DAI, Pendle3CrvHelper.POOL);
|
|
36
|
-
_safeApproveInf(Pendle3CrvHelper.USDC, Pendle3CrvHelper.POOL);
|
|
37
|
-
_safeApproveInf(Pendle3CrvHelper.USDT, Pendle3CrvHelper.POOL);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function _deposit(address tokenIn, uint256 amount)
|
|
41
|
-
internal
|
|
42
|
-
virtual
|
|
43
|
-
override
|
|
44
|
-
returns (uint256 amountSharesOut)
|
|
45
|
-
{
|
|
46
|
-
if (Pendle3CrvHelper.is3CrvToken(tokenIn)) {
|
|
47
|
-
uint256 amountLp = Pendle3CrvHelper.deposit3Crv(tokenIn, amount);
|
|
48
|
-
return super._deposit(Pendle3CrvHelper.TOKEN, amountLp);
|
|
49
|
-
} else {
|
|
50
|
-
return super._deposit(tokenIn, amount);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function _redeem(
|
|
55
|
-
address receiver,
|
|
56
|
-
address tokenOut,
|
|
57
|
-
uint256 amountSharesToRedeem
|
|
58
|
-
) internal virtual override returns (uint256 amountTokenOut) {
|
|
59
|
-
if (Pendle3CrvHelper.is3CrvToken(tokenOut)) {
|
|
60
|
-
uint256 amountLp = super._redeem(
|
|
61
|
-
address(this),
|
|
62
|
-
Pendle3CrvHelper.TOKEN,
|
|
63
|
-
amountSharesToRedeem
|
|
64
|
-
);
|
|
65
|
-
amountTokenOut = Pendle3CrvHelper.redeem3Crv(tokenOut, amountLp);
|
|
66
|
-
_transferOut(tokenOut, receiver, amountTokenOut);
|
|
67
|
-
} else {
|
|
68
|
-
return super._redeem(receiver, tokenOut, amountSharesToRedeem);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function _previewDeposit(address tokenIn, uint256 amountTokenToDeposit)
|
|
73
|
-
internal
|
|
74
|
-
view
|
|
75
|
-
virtual
|
|
76
|
-
override
|
|
77
|
-
returns (uint256)
|
|
78
|
-
{
|
|
79
|
-
if (Pendle3CrvHelper.is3CrvToken(tokenIn)) {
|
|
80
|
-
uint256 amountLp = Pendle3CrvHelper.preview3CrvDeposit(tokenIn, amountTokenToDeposit);
|
|
81
|
-
return super._previewDeposit(Pendle3CrvHelper.TOKEN, amountLp);
|
|
82
|
-
} else {
|
|
83
|
-
return super._previewDeposit(tokenIn, amountTokenToDeposit);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
function _previewRedeem(address tokenOut, uint256 amountSharesToRedeem)
|
|
88
|
-
internal
|
|
89
|
-
view
|
|
90
|
-
virtual
|
|
91
|
-
override
|
|
92
|
-
returns (uint256)
|
|
93
|
-
{
|
|
94
|
-
if (Pendle3CrvHelper.is3CrvToken(tokenOut)) {
|
|
95
|
-
uint256 amountLp = super._previewRedeem(Pendle3CrvHelper.TOKEN, amountSharesToRedeem);
|
|
96
|
-
return Pendle3CrvHelper.preview3CrvRedeem(tokenOut, amountLp);
|
|
97
|
-
} else {
|
|
98
|
-
return super._previewRedeem(tokenOut, amountSharesToRedeem);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
function getTokensIn() public view virtual override returns (address[] memory res) {
|
|
103
|
-
res = new address[](6);
|
|
104
|
-
res[0] = LP;
|
|
105
|
-
res[1] = token1;
|
|
106
|
-
res[2] = token2;
|
|
107
|
-
res[3] = Pendle3CrvHelper.DAI;
|
|
108
|
-
res[4] = Pendle3CrvHelper.USDC;
|
|
109
|
-
res[5] = Pendle3CrvHelper.USDT;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
function getTokensOut() public view virtual override returns (address[] memory res) {
|
|
113
|
-
res = new address[](6);
|
|
114
|
-
res[0] = LP;
|
|
115
|
-
res[1] = token1;
|
|
116
|
-
res[2] = token2;
|
|
117
|
-
res[3] = Pendle3CrvHelper.DAI;
|
|
118
|
-
res[4] = Pendle3CrvHelper.USDC;
|
|
119
|
-
res[5] = Pendle3CrvHelper.USDT;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
function isValidTokenIn(address token) public view virtual override returns (bool res) {
|
|
123
|
-
res = (token == LP ||
|
|
124
|
-
token == token1 ||
|
|
125
|
-
token == token2 ||
|
|
126
|
-
Pendle3CrvHelper.is3CrvToken(token));
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
function isValidTokenOut(address token) public view override returns (bool res) {
|
|
130
|
-
res = (token == LP ||
|
|
131
|
-
token == token1 ||
|
|
132
|
-
token == token2 ||
|
|
133
|
-
Pendle3CrvHelper.is3CrvToken(token));
|
|
134
|
-
}
|
|
135
|
-
}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
-
pragma solidity 0.8.17;
|
|
3
|
-
|
|
4
|
-
import "./PendleConvexCurveLPSCY.sol";
|
|
5
|
-
|
|
6
|
-
contract PendleConvexCurveLP2PoolSCY is PendleConvexCurveLPSCY {
|
|
7
|
-
address public immutable token1;
|
|
8
|
-
address public immutable token2;
|
|
9
|
-
|
|
10
|
-
constructor(
|
|
11
|
-
string memory _name,
|
|
12
|
-
string memory _symbol,
|
|
13
|
-
uint256 _pid,
|
|
14
|
-
address _convexBooster,
|
|
15
|
-
address _crvLpToken,
|
|
16
|
-
address _cvx,
|
|
17
|
-
address _baseCrvPool,
|
|
18
|
-
address[] memory _basePoolTokens
|
|
19
|
-
)
|
|
20
|
-
PendleConvexCurveLPSCY(
|
|
21
|
-
_name,
|
|
22
|
-
_symbol,
|
|
23
|
-
_pid,
|
|
24
|
-
_convexBooster,
|
|
25
|
-
_crvLpToken,
|
|
26
|
-
_cvx,
|
|
27
|
-
_baseCrvPool
|
|
28
|
-
)
|
|
29
|
-
{
|
|
30
|
-
if (_basePoolTokens.length != 2) revert Errors.ArrayLengthMismatch();
|
|
31
|
-
|
|
32
|
-
token1 = _basePoolTokens[0];
|
|
33
|
-
token2 = _basePoolTokens[1];
|
|
34
|
-
|
|
35
|
-
_safeApprove(token1, crvPool, type(uint256).max);
|
|
36
|
-
_safeApprove(token2, crvPool, type(uint256).max);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function getTokensIn() public view virtual override returns (address[] memory res) {
|
|
40
|
-
res = new address[](3);
|
|
41
|
-
res[0] = LP;
|
|
42
|
-
res[1] = token1;
|
|
43
|
-
res[2] = token2;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function getTokensOut() public view virtual override returns (address[] memory res) {
|
|
47
|
-
res = new address[](3);
|
|
48
|
-
res[0] = LP;
|
|
49
|
-
res[1] = token1;
|
|
50
|
-
res[2] = token2;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
function isValidTokenIn(address token) public view virtual override returns (bool res) {
|
|
54
|
-
res = (token == LP || token == token1 || token == token2);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
function isValidTokenOut(address token) public view virtual override returns (bool res) {
|
|
58
|
-
res = (token == LP || token == token1 || token == token2);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
function _getBaseTokenIndex(address crvBaseToken)
|
|
62
|
-
internal
|
|
63
|
-
view
|
|
64
|
-
virtual
|
|
65
|
-
override
|
|
66
|
-
returns (uint256 index)
|
|
67
|
-
{
|
|
68
|
-
if (crvBaseToken == token1) {
|
|
69
|
-
index = 0;
|
|
70
|
-
} else {
|
|
71
|
-
index = 1;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
function _isBaseToken(address token) internal view virtual override returns (bool res) {
|
|
76
|
-
return (token == token1 || token == token2);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
function _depositToCurve(address token, uint256 amount) internal virtual override {
|
|
80
|
-
uint256[2] memory amounts;
|
|
81
|
-
amounts[_getBaseTokenIndex(token)] = amount;
|
|
82
|
-
ICrvPool(crvPool).add_liquidity(amounts, 0);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
function _previewDepositToCurve(address token, uint256 amount)
|
|
86
|
-
internal
|
|
87
|
-
view
|
|
88
|
-
virtual
|
|
89
|
-
override
|
|
90
|
-
returns (uint256)
|
|
91
|
-
{
|
|
92
|
-
uint256[2] memory amounts;
|
|
93
|
-
amounts[_getBaseTokenIndex(token)] = amount;
|
|
94
|
-
return ICrvPool(crvPool).calc_token_amount(amounts, true);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"deployer": "0x1FcCC097db89A86Bfc474A1028F93958295b1Fb7",
|
|
3
|
-
"network": 43113,
|
|
4
|
-
"splitter": "0x81357A3D4F023745a518E4F07b8714e141f84E0a",
|
|
5
|
-
"celerBus": "0xE9533976C590200E32d95C53f06AE12d292cFc47",
|
|
6
|
-
"treasury": "0x243b7CFD29AcAF9cDe98C1958902FAA3B1F095D5",
|
|
7
|
-
"PENDLE": "0xB7609dec1C926204c3B67345cbCd54bc4aa7a940",
|
|
8
|
-
"yieldContractFactory": "0x726dB0396bA75EFeb9362400E6067b7a1D609a19",
|
|
9
|
-
"marketFactory": "0xe5A287C8f3b452fCE796037d5330a8F95904565c",
|
|
10
|
-
"router": "0x475cBfd0AaA1925c54697d817199a6158d8A3682",
|
|
11
|
-
"routerStatic": "0x33A1E626F5abd84De7914B675436026f0d852bEb",
|
|
12
|
-
"vePendle": "0x70Af3E726836ca37093912DCd421b09F113f7332",
|
|
13
|
-
"senderEndpoint": "0x929C252e150391AA25fe766DeB0Eb8145411F7eF",
|
|
14
|
-
"votingController": "0xb754Ab837CC50868339FCb2c6B0d9eD6EC2CEb15",
|
|
15
|
-
"gaugeController": "0xD873Ae14FD850E16593f19754B7f444d3c9451cE"
|
|
16
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"symbol": "SCY-qiUSDC",
|
|
3
|
-
"SCY": "0x7aE7d26Ba0678Ea05aAE62654F8bE2C469AC081F",
|
|
4
|
-
"expiry": 1675382400,
|
|
5
|
-
"PT": "0x2c69304947D158211fdB2ec924E5b239dFcD2200",
|
|
6
|
-
"YT": "0xACD25f1C01466d9eEA7228C0499508BD7d10a79e",
|
|
7
|
-
"market": "0x9dA5097964b266C551B098B8FE4f8E8740525Bad"
|
|
8
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"symbol": "SCY-qiWETH",
|
|
3
|
-
"SCY": "0x1C83741eF60a7Cf111945257C77404dbd07E0939",
|
|
4
|
-
"expiry": 1669852800,
|
|
5
|
-
"PT": "0xC48Fe68553bD5b873Ac4edC875dd0Cb98C29A2A1",
|
|
6
|
-
"YT": "0xE13A96E79ACCF7E7f41a9325E8aFCaBB3cB71224",
|
|
7
|
-
"market": "0x5384f74552C7D5083EA39F341abd1cf1af97E8a1"
|
|
8
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"deployer": "0x1FcCC097db89A86Bfc474A1028F93958295b1Fb7",
|
|
3
|
-
"network": 80001,
|
|
4
|
-
"splitter": "0xC400c9D43a115599677EFde348784393E6E337Fb",
|
|
5
|
-
"celerBus": "0x7d43AABC515C356145049227CeE54B608342c0ad",
|
|
6
|
-
"treasury": "0xbAADca61726613E391b04c00D53ED738bF5282e0",
|
|
7
|
-
"PENDLE": "0x12B1b729024238D9850110dAB3cbBe732edA3151",
|
|
8
|
-
"yieldContractFactory": "0xceC760308Bb2a7672163Cda050a558BcdAE556B0",
|
|
9
|
-
"marketFactory": "0xB8dc44Da586A030fC23ABb6B1B2aa5a1d991B205",
|
|
10
|
-
"router": "0xaF173694aaAbfA708E35c2920e55Aac4A6184A42",
|
|
11
|
-
"routerStatic": "0xD05B49500F35d879F3Bf220c81BE3ff9d73Ca205",
|
|
12
|
-
"receiverEndpoint": "0x32f5b40Ae709314741D3b257c0838F438804Ad74",
|
|
13
|
-
"vePendle": "0x076990Fe896644989d8013AD32C384a6BA3Bb725",
|
|
14
|
-
"gaugeController": "0xEbaD5fc9Cf065FA51BB32D20948ba4A67595c6e5"
|
|
15
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"symbol": "SCY-qiUSDC",
|
|
3
|
-
"SCY": "0x36Bd12bdad524092E6a29540983C546a424A576A",
|
|
4
|
-
"expiry": 1675382400,
|
|
5
|
-
"PT": "0xc1D97E0AfD97dAb97156d6a7e49bdd6773513d63",
|
|
6
|
-
"YT": "0x3ab2B09929e1122e34754E88f93012df0000814d",
|
|
7
|
-
"market": "0x16b0eF5E1d4cEa7E91B7705fC6AdbdC4534288c0"
|
|
8
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"symbol": "SCY-qiWETH",
|
|
3
|
-
"SCY": "0x449f676be160C5C682E1E64934f29641D6096116",
|
|
4
|
-
"expiry": 1669852800,
|
|
5
|
-
"PT": "0x54Ec22Cb36077fdC53D21Db28aE5cBD6E9Dae375",
|
|
6
|
-
"YT": "0x1Ca4eE071FB1d326D60c58188bA562EA971Ed137",
|
|
7
|
-
"market": "0x600B627FBca59a109407065C2991e6fD67a1b312"
|
|
8
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: GPL-3.0-only
|
|
2
|
-
|
|
3
|
-
pragma solidity >=0.8.0;
|
|
4
|
-
|
|
5
|
-
interface ICelerMessageBus {
|
|
6
|
-
/**
|
|
7
|
-
* @notice Calculates the required fee for the message.
|
|
8
|
-
* @param _message Arbitrary message bytes to be decoded by the destination app contract.
|
|
9
|
-
@ @return The required fee.
|
|
10
|
-
*/
|
|
11
|
-
function calcFee(bytes calldata _message) external view returns (uint256);
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* @notice Sends a message to a contract on another chain.
|
|
15
|
-
* Sender needs to make sure the uniqueness of the message Id, which is computed as
|
|
16
|
-
* hash(type.MessageOnly, sender, receiver, srcChainId, srcTxHash, dstChainId, message).
|
|
17
|
-
* If messages with the same Id are sent, only one of them will succeed at dst chain..
|
|
18
|
-
* A fee is charged in the native gas token.
|
|
19
|
-
* @param _receiver The address of the destination app contract.
|
|
20
|
-
* @param _dstChainId The destination chain ID.
|
|
21
|
-
* @param _message Arbitrary message bytes to be decoded by the destination app contract.
|
|
22
|
-
*/
|
|
23
|
-
function sendMessage(
|
|
24
|
-
address _receiver,
|
|
25
|
-
uint256 _dstChainId,
|
|
26
|
-
bytes calldata _message
|
|
27
|
-
) external payable;
|
|
28
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: GPL-3.0-only
|
|
2
|
-
|
|
3
|
-
pragma solidity >=0.8.0;
|
|
4
|
-
|
|
5
|
-
interface ICelerMessageReceiverApp {
|
|
6
|
-
enum ExecutionStatus {
|
|
7
|
-
Fail, // execution failed, finalized
|
|
8
|
-
Success, // execution succeeded, finalized
|
|
9
|
-
Retry // execution rejected, can retry later
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @notice Called by MessageBus (MessageBusReceiver)
|
|
14
|
-
* @param _sender The address of the source app contract
|
|
15
|
-
* @param _srcChainId The source chain ID where the transfer is originated from
|
|
16
|
-
* @param _message Arbitrary message bytes originated from and encoded by the source app contract
|
|
17
|
-
* @param _executor Address who called the MessageBus execution function
|
|
18
|
-
*/
|
|
19
|
-
function executeMessage(
|
|
20
|
-
address _sender,
|
|
21
|
-
uint64 _srcChainId,
|
|
22
|
-
bytes calldata _message,
|
|
23
|
-
address _executor
|
|
24
|
-
) external payable returns (ExecutionStatus);
|
|
25
|
-
}
|