@pendle/core-v2 0.11.11-testnet → 0.12.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/SuperComposableYield/SCY-implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.dbg.json +1 -1
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.json +2 -2
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/BenQi/PendleQiTokenSCY.sol/PendleQiTokenSCY.dbg.json +1 -1
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/BenQi/PendleQiTokenSCY.sol/PendleQiTokenSCY.json +199 -30
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/Convex/ConvexCurveLP/Pendle3CrvAndTokenSCY.sol/Pendle3CrvAndTokenSCY.dbg.json +4 -0
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/Convex/ConvexCurveLP/Pendle3CrvAndTokenSCY.sol/Pendle3CrvAndTokenSCY.json +1030 -0
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/Convex/ConvexCurveLP/PendleConvexCurveLP2PoolSCY.sol/PendleConvexCurveLP2PoolSCY.dbg.json +4 -0
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/Convex/ConvexCurveLP/PendleConvexCurveLP2PoolSCY.sol/PendleConvexCurveLP2PoolSCY.json +1025 -0
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/Convex/ConvexCurveLP/PendleConvexCurveLPSCY.sol/PendleConvexCurveLPSCY.dbg.json +4 -0
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/Convex/ConvexCurveLP/PendleConvexCurveLPSCY.sol/PendleConvexCurveLPSCY.json +948 -0
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/Convex/Pendle3CrvHelper.sol/Pendle3CrvHelper.dbg.json +4 -0
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/Convex/Pendle3CrvHelper.sol/Pendle3CrvHelper.json +76 -0
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/PendleWstEthSCY.sol/PendleWstEthSCY.dbg.json +1 -1
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/PendleWstEthSCY.sol/PendleWstEthSCY.json +140 -25
- package/build/artifacts/contracts/SuperComposableYield/base-implementations/SCYBase.sol/SCYBase.dbg.json +1 -1
- package/build/artifacts/contracts/SuperComposableYield/base-implementations/SCYBase.sol/SCYBase.json +138 -23
- package/build/artifacts/contracts/SuperComposableYield/base-implementations/SCYBaseWithRewards.sol/SCYBaseWithRewards.dbg.json +1 -1
- package/build/artifacts/contracts/SuperComposableYield/base-implementations/SCYBaseWithRewards.sol/SCYBaseWithRewards.json +138 -23
- package/build/artifacts/contracts/core/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol/PendleMsgReceiveEndpointUpg.dbg.json +4 -0
- package/build/artifacts/contracts/core/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol/PendleMsgReceiveEndpointUpg.json +310 -0
- package/build/artifacts/contracts/core/LiquidityMining/CrossChainMsg/PendleMsgReceiverAppUpg.sol/PendleMsgReceiverAppUpg.dbg.json +4 -0
- package/build/artifacts/contracts/core/LiquidityMining/{CelerAbstracts/CelerReceiverUpg.sol/CelerReceiverUpg.json → CrossChainMsg/PendleMsgReceiverAppUpg.sol/PendleMsgReceiverAppUpg.json} +18 -85
- package/build/artifacts/contracts/core/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol/PendleMsgSendEndpointUpg.dbg.json +4 -0
- package/build/artifacts/contracts/core/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol/PendleMsgSendEndpointUpg.json +336 -0
- package/build/artifacts/contracts/core/LiquidityMining/CrossChainMsg/PendleMsgSenderAppUpg.sol/PendleMsgSenderAppUpg.dbg.json +4 -0
- package/build/artifacts/contracts/core/LiquidityMining/{CelerAbstracts/CelerSenderUpg.sol/CelerSenderUpg.json → CrossChainMsg/PendleMsgSenderAppUpg.sol/PendleMsgSenderAppUpg.json} +8 -21
- package/build/artifacts/contracts/core/LiquidityMining/FeeDistributor/EpochResultManager.sol/EpochResultManager.dbg.json +4 -0
- package/build/artifacts/contracts/core/LiquidityMining/FeeDistributor/EpochResultManager.sol/EpochResultManager.json +131 -0
- package/build/artifacts/contracts/core/LiquidityMining/FeeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.dbg.json +4 -0
- package/build/artifacts/contracts/core/LiquidityMining/FeeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.json +297 -0
- package/build/artifacts/contracts/core/LiquidityMining/FeeDistributor/PendleFeeDistributorFactory.sol/PendleFeeDistributorFactory.dbg.json +4 -0
- package/build/artifacts/contracts/core/LiquidityMining/FeeDistributor/PendleFeeDistributorFactory.sol/PendleFeeDistributorFactory.json +376 -0
- package/build/artifacts/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.dbg.json +1 -1
- package/build/artifacts/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.json +11 -0
- package/build/artifacts/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.dbg.json +1 -1
- package/build/artifacts/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.json +29 -2
- package/build/artifacts/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.dbg.json +1 -1
- package/build/artifacts/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.json +40 -86
- package/build/artifacts/contracts/core/LiquidityMining/PendleGauge.sol/PendleGauge.dbg.json +1 -1
- package/build/artifacts/contracts/core/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.dbg.json +1 -1
- package/build/artifacts/contracts/core/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.json +228 -40
- package/build/artifacts/contracts/core/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.dbg.json +1 -1
- package/build/artifacts/contracts/core/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.json +232 -12
- package/build/artifacts/contracts/core/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/core/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.json +164 -47
- package/build/artifacts/contracts/core/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.dbg.json +1 -1
- package/build/artifacts/contracts/core/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.json +25 -93
- package/build/artifacts/contracts/core/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol/VotingEscrowTokenBase.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 +222 -9
- package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.json +106 -5
- package/build/artifacts/contracts/core/PendleERC20Permit.sol/PendleERC20Permit.dbg.json +4 -0
- package/build/artifacts/contracts/core/PendleERC20Permit.sol/PendleERC20Permit.json +329 -0
- package/build/artifacts/contracts/core/PendleRouter.sol/PendleRouter.dbg.json +1 -1
- package/build/artifacts/contracts/core/PendleRouter.sol/PendleRouter.json +13 -2
- 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 +87 -2
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.json +80 -16
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.json +164 -2
- package/build/artifacts/contracts/core/actions/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.dbg.json +1 -1
- package/build/artifacts/contracts/core/actions/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.json +172 -4
- package/build/artifacts/contracts/core/actions/ActionCallback.sol/ActionCallback.dbg.json +1 -1
- package/build/artifacts/contracts/core/actions/ActionCallback.sol/ActionCallback.json +109 -2
- package/build/artifacts/contracts/core/actions/ActionMintRedeem.sol/ActionMintRedeem.dbg.json +1 -1
- package/build/artifacts/contracts/core/actions/ActionMintRedeem.sol/ActionMintRedeem.json +57 -4
- package/build/artifacts/contracts/core/actions/ActionMisc.sol/ActionMisc.dbg.json +1 -1
- package/build/artifacts/contracts/core/actions/ActionMisc.sol/ActionMisc.json +7 -2
- package/build/artifacts/contracts/core/actions/ActionSwapPT.sol/ActionSwapPT.dbg.json +1 -1
- package/build/artifacts/contracts/core/actions/ActionSwapPT.sol/ActionSwapPT.json +199 -4
- package/build/artifacts/contracts/core/actions/ActionSwapPTYT.sol/ActionSwapPTYT.dbg.json +1 -1
- package/build/artifacts/contracts/core/actions/ActionSwapPTYT.sol/ActionSwapPTYT.json +108 -2
- package/build/artifacts/contracts/core/actions/ActionSwapYT.sol/ActionSwapYT.dbg.json +1 -1
- package/build/artifacts/contracts/core/actions/ActionSwapYT.sol/ActionSwapYT.json +146 -4
- package/build/artifacts/contracts/core/actions/base/ActionBaseMintRedeem.sol/ActionBaseMintRedeem.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ConvexCurve/IBooster.sol/IBooster.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/ConvexCurve/IBooster.sol/IBooster.json +177 -0
- package/build/artifacts/contracts/interfaces/ConvexCurve/ICrvDepositor.sol/ICrvDepositor.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/ConvexCurve/ICrvDepositor.sol/ICrvDepositor.json +78 -0
- package/build/artifacts/contracts/interfaces/ConvexCurve/ICvxCrv.sol/ICvxCrv.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/ConvexCurve/ICvxCrv.sol/ICvxCrv.json +24 -0
- package/build/artifacts/contracts/interfaces/ConvexCurve/IRewards.sol/IRewards.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/ConvexCurve/IRewards.sol/IRewards.json +264 -0
- package/build/artifacts/contracts/interfaces/Curve/ICrvPool.sol/ICrvPool.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Curve/ICrvPool.sol/ICrvPool.json +305 -0
- package/build/artifacts/contracts/interfaces/IBoringOwnableUpgradeable.sol/IBoringOwnableUpgradeable.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IBoringOwnableUpgradeable.sol/IBoringOwnableUpgradeable.json +34 -0
- package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiq.sol/IPActionAddRemoveLiq.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiq.sol/IPActionAddRemoveLiq.json +31 -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/IPActionSwapPT.sol/IPActionSwapPT.json +30 -0
- package/build/artifacts/contracts/interfaces/IPActionSwapPTYT.sol/IPActionSwapPTYT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapPTYT.sol/IPActionSwapPTYT.json +10 -0
- package/build/artifacts/contracts/interfaces/IPActionSwapYT.sol/IPActionSwapYT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapYT.sol/IPActionSwapYT.json +30 -0
- package/build/artifacts/contracts/interfaces/IPAllAction.sol/IPAllAction.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllAction.sol/IPAllAction.json +101 -1
- package/build/artifacts/contracts/interfaces/IPFeeDistributor.sol/IPFeeDistributor.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPFeeDistributor.sol/IPFeeDistributor.json +112 -0
- package/build/artifacts/contracts/interfaces/IPFeeDistributorFactory.sol/IPFeeDistributorFactory.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPFeeDistributorFactory.sol/IPFeeDistributorFactory.json +76 -0
- package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.json +13 -0
- package/build/artifacts/contracts/interfaces/IPMsgReceiverApp.sol/IPMsgReceiverApp.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPMsgReceiverApp.sol/IPMsgReceiverApp.json +24 -0
- package/build/artifacts/contracts/interfaces/IPMsgSendEndpoint.sol/IPMsgSendEndpoint.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPMsgSendEndpoint.sol/IPMsgSendEndpoint.json +63 -0
- package/build/artifacts/contracts/interfaces/IPVotingController.sol/IPVotingController.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPVotingController.sol/IPVotingController.json +148 -0
- package/build/artifacts/contracts/interfaces/IPVotingEscrowMainchain.sol/IPVotingEscrowMainchain.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/{IPVotingEscrow.sol/IPVotingEscrow.json → IPVotingEscrowMainchain.sol/IPVotingEscrowMainchain.json} +88 -2
- package/build/artifacts/contracts/interfaces/ISuperComposableYield.sol/ISuperComposableYield.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ISuperComposableYield.sol/ISuperComposableYield.json +4 -28
- package/build/artifacts/contracts/libraries/Errors.sol/Errors.dbg.json +4 -0
- package/build/artifacts/contracts/libraries/Errors.sol/Errors.json +886 -0
- package/build/artifacts/contracts/libraries/OracleLib.sol/OracleLib.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/OracleLib.sol/OracleLib.json +28 -2
- package/build/artifacts/contracts/libraries/RewardManager.sol/RewardManager.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/RewardManagerAbstract.sol/RewardManagerAbstract.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/VeBalanceLib.sol/VeBalanceLib.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/VeBalanceLib.sol/VeBalanceLib.json +2 -2
- package/build/artifacts/contracts/libraries/VeHistoryLib.sol/CheckpointHelper.dbg.json +4 -0
- package/build/artifacts/contracts/libraries/{solmate/SSTORE2.sol/SSTORE2.json → VeHistoryLib.sol/CheckpointHelper.json} +4 -4
- package/build/artifacts/contracts/libraries/VeHistoryLib.sol/Checkpoints.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/VeHistoryLib.sol/Checkpoints.json +2 -2
- package/build/artifacts/contracts/libraries/helpers/ArrayLib.sol/ArrayLib.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/helpers/ArrayLib.sol/ArrayLib.json +2 -2
- package/build/artifacts/contracts/libraries/helpers/BaseSplitCodeFactory.sol/BaseSplitCodeFactory.dbg.json +4 -0
- package/build/artifacts/contracts/libraries/helpers/BaseSplitCodeFactory.sol/BaseSplitCodeFactory.json +45 -0
- package/build/artifacts/contracts/libraries/helpers/BaseSplitCodeFactory.sol/CodeDeployer.dbg.json +4 -0
- package/build/artifacts/contracts/libraries/helpers/{SSTORE2Deployer.sol/SSTORE2Deployer.json → BaseSplitCodeFactory.sol/CodeDeployer.json} +4 -4
- package/build/artifacts/contracts/libraries/helpers/PYIndex.sol/PYIndexLib.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/helpers/PYIndex.sol/PYIndexLib.json +2 -2
- package/build/artifacts/contracts/libraries/helpers/TokenHelper.sol/TokenHelper.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/kyberswap/AggregationRouterHelper.sol/AggregationRouterHelper.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/kyberswap/AggregationRouterHelper.sol/AggregationRouterHelper.json +2 -2
- package/build/artifacts/contracts/libraries/kyberswap/KyberSwapHelper.sol/KyberSwapHelper.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/math/MarketApproxLib.sol/MarketApproxPtInLib.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/math/MarketApproxLib.sol/MarketApproxPtInLib.json +2 -2
- package/build/artifacts/contracts/libraries/math/MarketApproxLib.sol/MarketApproxPtOutLib.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/math/MarketApproxLib.sol/MarketApproxPtOutLib.json +2 -2
- package/build/artifacts/contracts/libraries/math/MarketMathCore.sol/MarketMathCore.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/math/MarketMathCore.sol/MarketMathCore.json +2 -2
- package/build/artifacts/contracts/libraries/math/Math.sol/Math.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/math/Math.sol/Math.json +2 -2
- package/build/artifacts/contracts/libraries/math/WeekMath.sol/WeekMath.dbg.json +1 -1
- package/build/artifacts/contracts/libraries/math/WeekMath.sol/WeekMath.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol/BaseSplitCodeFactoryContract.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol/BaseSplitCodeFactoryContract.json +167 -0
- package/build/artifacts/contracts/offchain-helpers/MarketMathStatic.sol/MarketMathStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/MarketMathStatic.sol/MarketMathStatic.json +182 -4
- package/build/artifacts/contracts/offchain-helpers/RouterStatic.sol/RouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/RouterStatic.sol/RouterStatic.json +126 -79
- package/contracts/SuperComposableYield/SCY-implementations/BenQi/PendleQiTokenHelper.sol +3 -1
- package/contracts/SuperComposableYield/SCY-implementations/BenQi/PendleQiTokenSCY.sol +19 -16
- package/contracts/SuperComposableYield/SCY-implementations/Convex/ConvexCurveLP/Pendle3CrvAndTokenSCY.sol +135 -0
- package/contracts/SuperComposableYield/SCY-implementations/Convex/ConvexCurveLP/PendleConvexCurveLP2PoolSCY.sol +96 -0
- package/contracts/SuperComposableYield/SCY-implementations/Convex/ConvexCurveLP/PendleConvexCurveLPSCY.sol +215 -0
- package/contracts/SuperComposableYield/SCY-implementations/Convex/Pendle3CrvHelper.sol +83 -0
- package/contracts/SuperComposableYield/SCY-implementations/PendleWstEthSCY.sol +10 -15
- package/contracts/SuperComposableYield/base-implementations/SCYBase.sol +30 -43
- package/contracts/core/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol +74 -0
- package/contracts/core/LiquidityMining/CrossChainMsg/PendleMsgReceiverAppUpg.sol +38 -0
- package/contracts/core/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol +83 -0
- package/contracts/core/LiquidityMining/{CelerAbstracts/CelerSenderUpg.sol → CrossChainMsg/PendleMsgSenderAppUpg.sol} +12 -13
- package/contracts/core/LiquidityMining/FeeDistributor/EpochResultManager.sol +159 -0
- package/contracts/core/LiquidityMining/FeeDistributor/PendleFeeDistributor.sol +96 -0
- package/contracts/core/LiquidityMining/FeeDistributor/PendleFeeDistributorFactory.sol +68 -0
- package/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol +4 -3
- package/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol +6 -2
- package/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol +12 -4
- package/contracts/core/LiquidityMining/VotingController/PendleVotingControllerUpg.sol +29 -19
- package/contracts/core/LiquidityMining/VotingController/VotingControllerStorageUpg.sol +27 -19
- package/contracts/core/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol +63 -27
- package/contracts/core/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol +6 -5
- package/contracts/core/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol +2 -2
- package/contracts/core/Market/PendleMarket.sol +26 -24
- package/contracts/core/Market/PendleMarketFactory.sol +41 -20
- package/contracts/core/PendleERC20Permit.sol +84 -0
- package/contracts/core/PendleRouter.sol +2 -1
- package/contracts/core/YieldContracts/PendlePrincipalToken.sol +8 -7
- package/contracts/core/YieldContracts/PendleYieldContractFactory.sol +37 -22
- package/contracts/core/YieldContracts/PendleYieldToken.sol +106 -35
- package/contracts/core/actions/ActionAddRemoveLiq.sol +58 -41
- package/contracts/core/actions/ActionCallback.sol +24 -14
- package/contracts/core/actions/ActionMintRedeem.sol +11 -5
- package/contracts/core/actions/ActionMisc.sol +2 -1
- package/contracts/core/actions/ActionSwapPT.sol +38 -19
- package/contracts/core/actions/ActionSwapPTYT.sol +7 -6
- package/contracts/core/actions/ActionSwapYT.sol +36 -19
- package/contracts/core/actions/base/ActionBaseMintRedeem.sol +15 -8
- package/contracts/interfaces/ConvexCurve/IBooster.sol +32 -0
- package/contracts/interfaces/ConvexCurve/ICrvDepositor.sol +20 -0
- package/contracts/interfaces/ConvexCurve/ICvxCrv.sol +6 -0
- package/contracts/interfaces/ConvexCurve/IRewards.sol +38 -0
- package/contracts/interfaces/Curve/ICrvPool.sol +69 -0
- package/contracts/interfaces/IBoringOwnableUpgradeable.sol +10 -0
- package/contracts/interfaces/IPActionAddRemoveLiq.sol +7 -7
- package/contracts/interfaces/IPActionSwapPT.sol +6 -6
- package/contracts/interfaces/IPActionSwapPTYT.sol +2 -2
- package/contracts/interfaces/IPActionSwapYT.sol +13 -13
- package/contracts/interfaces/IPFeeDistributor.sol +19 -0
- package/contracts/interfaces/IPFeeDistributorFactory.sol +14 -0
- package/contracts/interfaces/IPMarket.sol +2 -0
- package/contracts/interfaces/IPMsgReceiverApp.sol +7 -0
- package/contracts/interfaces/IPMsgSendEndpoint.sol +17 -0
- package/contracts/interfaces/IPVotingController.sol +22 -0
- package/contracts/interfaces/{IPVotingEscrow.sol → IPVotingEscrowMainchain.sol} +11 -1
- package/contracts/interfaces/ISuperComposableYield.sol +2 -7
- package/contracts/libraries/Errors.sol +121 -0
- package/contracts/libraries/OracleLib.sol +6 -3
- package/contracts/libraries/VeBalanceLib.sol +5 -1
- package/contracts/libraries/VeHistoryLib.sol +20 -31
- package/contracts/libraries/helpers/ArrayLib.sol +0 -17
- package/contracts/libraries/helpers/BaseSplitCodeFactory.sol +288 -0
- package/contracts/libraries/helpers/TokenHelper.sol +4 -0
- package/contracts/libraries/kyberswap/AggregationRouterHelper.sol +0 -7
- package/contracts/libraries/math/MarketMathCore.sol +29 -25
- package/contracts/libraries/math/Math.sol +6 -2
- package/contracts/libraries/math/WeekMath.sol +2 -2
- package/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol +43 -0
- package/contracts/offchain-helpers/MarketMathStatic.sol +36 -36
- package/contracts/offchain-helpers/RouterStatic.sol +45 -37
- package/deployments/43113-core.json +11 -10
- 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/deployments/43113-testenv.json +9 -9
- package/deployments/80001-core.json +10 -9
- package/deployments/80001-markets/benqi-market-QI-USDC-FEB-2ND.json +8 -0
- package/deployments/80001-markets/benqi-market-QI-WETH-DEC-1ST.json +8 -0
- package/deployments/80001-testenv.json +16 -16
- package/package.json +1 -1
- package/typechain-types/ActionAddRemoveLiq.ts +18 -6
- package/typechain-types/ActionSwapPT.ts +18 -6
- package/typechain-types/ActionSwapPTYT.ts +6 -2
- package/typechain-types/ActionSwapYT.ts +18 -6
- package/typechain-types/IPActionAddRemoveLiq.ts +19 -7
- package/typechain-types/IPActionSwapPT.ts +18 -6
- package/typechain-types/IPActionSwapPTYT.ts +6 -2
- package/typechain-types/IPActionSwapYT.ts +18 -6
- package/typechain-types/IPAllAction.ts +61 -21
- package/typechain-types/IPMarket.ts +13 -0
- package/typechain-types/IPVotingController.ts +244 -7
- package/typechain-types/ISuperComposableYield.ts +7 -46
- package/typechain-types/MarketMathStatic.ts +139 -10
- package/typechain-types/PendleGaugeControllerSidechainUpg.ts +28 -149
- package/typechain-types/PendleMarket.ts +104 -0
- package/typechain-types/PendleMarketFactory.ts +76 -13
- package/typechain-types/PendlePrincipalToken.ts +104 -0
- package/typechain-types/PendleQiTokenSCY.ts +111 -46
- package/typechain-types/PendleVotingControllerUpg.ts +133 -77
- package/typechain-types/PendleWstEthSCY.ts +111 -46
- package/typechain-types/PendleYieldContractFactory.ts +84 -21
- package/typechain-types/PendleYieldToken.ts +175 -0
- package/typechain-types/RouterStatic.ts +99 -75
- package/typechain-types/SCYBase.ts +111 -46
- package/typechain-types/SCYBaseWithRewards.ts +111 -46
- package/typechain-types/VotingControllerStorageUpg.ts +246 -27
- package/typechain-types/VotingEscrowPendleMainchain.ts +81 -93
- package/typechain-types/VotingEscrowPendleSidechain.ts +26 -171
- package/typechain-types/factories/ActionAddRemoveLiq__factory.ts +169 -1
- package/typechain-types/factories/ActionCallback__factory.ts +108 -1
- package/typechain-types/factories/ActionMintRedeem__factory.ts +54 -1
- package/typechain-types/factories/ActionMisc__factory.ts +6 -1
- package/typechain-types/factories/ActionSwapPTYT__factory.ts +107 -1
- package/typechain-types/factories/ActionSwapPT__factory.ts +196 -1
- package/typechain-types/factories/ActionSwapYT__factory.ts +143 -1
- package/typechain-types/factories/AggregationRouterHelper__factory.ts +1 -1
- package/typechain-types/factories/IPActionAddRemoveLiq__factory.ts +31 -1
- package/typechain-types/factories/IPActionSwapPTYT__factory.ts +10 -0
- package/typechain-types/factories/IPActionSwapPT__factory.ts +30 -0
- package/typechain-types/factories/IPActionSwapYT__factory.ts +30 -0
- package/typechain-types/factories/IPAllAction__factory.ts +101 -1
- package/typechain-types/factories/IPMarket__factory.ts +13 -0
- package/typechain-types/factories/IPVotingController__factory.ts +148 -0
- package/typechain-types/factories/ISuperComposableYield__factory.ts +4 -28
- package/typechain-types/factories/MarketMathStatic__factory.ts +181 -3
- package/typechain-types/factories/OracleLib__factory.ts +27 -1
- package/typechain-types/factories/Pendle3CrvAndTokenSCY__factory.ts +1 -1
- package/typechain-types/factories/Pendle3CrvHelper__factory.ts +1 -1
- package/typechain-types/factories/PendleConvexCurveLP2PoolSCY__factory.ts +1 -1
- package/typechain-types/factories/PendleERC20Permit__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/PendleGaugeControllerBaseUpg__factory.ts +11 -0
- package/typechain-types/factories/PendleGaugeControllerMainchainUpg__factory.ts +28 -1
- package/typechain-types/factories/PendleGaugeControllerSidechainUpg__factory.ts +48 -86
- package/typechain-types/factories/PendleMarketFactory__factory.ts +129 -9
- package/typechain-types/factories/PendleMarket__factory.ts +214 -1
- package/typechain-types/factories/PendlePrincipalToken__factory.ts +86 -1
- package/typechain-types/factories/PendleQiTokenHelper__factory.ts +1 -1
- package/typechain-types/factories/PendleQiTokenSCY__factory.ts +198 -29
- package/typechain-types/factories/PendleRouter__factory.ts +12 -1
- package/typechain-types/factories/PendleVotingControllerUpg__factory.ts +235 -40
- package/typechain-types/factories/PendleWstEthSCY__factory.ts +137 -22
- package/typechain-types/factories/PendleYieldContractFactory__factory.ts +103 -20
- package/typechain-types/factories/PendleYieldToken__factory.ts +163 -1
- package/typechain-types/factories/RouterStatic__factory.ts +67 -20
- package/typechain-types/factories/SCYBaseWithRewards__factory.ts +136 -21
- package/typechain-types/factories/SCYBase__factory.ts +136 -21
- package/typechain-types/factories/VotingControllerStorageUpg__factory.ts +232 -12
- package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +171 -47
- package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +31 -93
- package/typechain-types/hardhat.d.ts +0 -27
- package/typechain-types/index.ts +0 -6
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/AaveV3/PendleAaveV3SCY.sol/PendleAaveV3SCY.dbg.json +0 -4
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/AaveV3/PendleAaveV3SCY.sol/PendleAaveV3SCY.json +0 -810
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/AaveV3/WadRayMath.sol/WadRayMath.dbg.json +0 -4
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/AaveV3/WadRayMath.sol/WadRayMath.json +0 -10
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/BenQi/PendleQiSAvaxSCY.sol/PendleQiSAvaxSCY.dbg.json +0 -4
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/BenQi/PendleQiSAvaxSCY.sol/PendleQiSAvaxSCY.json +0 -833
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/BenQi/PendleSAvaxSCY.sol/PendleSAvaxSCY.dbg.json +0 -4
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/BenQi/PendleSAvaxSCY.sol/PendleSAvaxSCY.json +0 -723
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/Euler/PendleEulerSCY.sol/PendleEulerSCY.dbg.json +0 -4
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/Euler/PendleEulerSCY.sol/PendleEulerSCY.json +0 -728
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/PendleERC4626SCY.sol/PendleERC4626SCY.dbg.json +0 -4
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/PendleERC4626SCY.sol/PendleERC4626SCY.json +0 -705
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/PendleStargateSCY.sol/PendleStargateSCY.dbg.json +0 -4
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/PendleStargateSCY.sol/PendleStargateSCY.json +0 -864
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/PendleYearnVaultSCY.sol/PendleYearnVaultSCY.dbg.json +0 -4
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/PendleYearnVaultSCY.sol/PendleYearnVaultSCY.json +0 -718
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/TraderJoe/PendleSJoeSCY.sol/PendleSJoeSCY.dbg.json +0 -4
- package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/TraderJoe/PendleSJoeSCY.sol/PendleSJoeSCY.json +0 -784
- package/build/artifacts/contracts/core/LiquidityMining/CelerAbstracts/CelerReceiverUpg.sol/CelerReceiverUpg.dbg.json +0 -4
- package/build/artifacts/contracts/core/LiquidityMining/CelerAbstracts/CelerSenderUpg.sol/CelerSenderUpg.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IPVotingEscrow.sol/IPVotingEscrow.dbg.json +0 -4
- package/build/artifacts/contracts/libraries/helpers/SSTORE2Deployer.sol/SSTORE2Deployer.dbg.json +0 -4
- package/build/artifacts/contracts/libraries/solmate/SSTORE2.sol/SSTORE2.dbg.json +0 -4
- package/build/artifacts/contracts/offchain-helpers/SSTORE2DeployerContract.sol/SSTORE2DeployerContract.dbg.json +0 -4
- package/build/artifacts/contracts/offchain-helpers/SSTORE2DeployerContract.sol/SSTORE2DeployerContract.json +0 -134
- package/contracts/SuperComposableYield/SCY-implementations/AaveV3/PendleAaveV3SCY.sol +0 -161
- package/contracts/SuperComposableYield/SCY-implementations/AaveV3/WadRayMath.sol +0 -126
- package/contracts/SuperComposableYield/SCY-implementations/BenQi/PendleQiSAvaxSCY.sol +0 -242
- package/contracts/SuperComposableYield/SCY-implementations/BenQi/PendleSAvaxSCY.sol +0 -146
- package/contracts/SuperComposableYield/SCY-implementations/Euler/PendleEulerSCY.sol +0 -176
- package/contracts/SuperComposableYield/SCY-implementations/PendleERC4626SCY.sol +0 -129
- package/contracts/SuperComposableYield/SCY-implementations/PendleStargateSCY.sol +0 -193
- package/contracts/SuperComposableYield/SCY-implementations/PendleYearnVaultSCY.sol +0 -155
- package/contracts/SuperComposableYield/SCY-implementations/TraderJoe/PendleSJoeSCY.sol +0 -182
- package/contracts/core/LiquidityMining/CelerAbstracts/CelerReceiverUpg.sol +0 -53
- package/contracts/libraries/helpers/SSTORE2Deployer.sol +0 -30
- package/contracts/libraries/solmate/SSTORE2.sol +0 -99
- package/contracts/offchain-helpers/SSTORE2DeployerContract.sol +0 -21
- package/deployments/43113-markets/benqi-market-10D931.json +0 -8
- package/deployments/43113-markets/benqi-market-9fbD64.json +0 -8
- package/deployments/43113-markets/benqi-market-A12361.json +0 -8
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"_format": "hh-sol-artifact-1",
|
|
3
|
-
"contractName": "SSTORE2DeployerContract",
|
|
4
|
-
"sourceName": "contracts/offchain-helpers/SSTORE2DeployerContract.sol",
|
|
5
|
-
"abi": [
|
|
6
|
-
{
|
|
7
|
-
"inputs": [],
|
|
8
|
-
"stateMutability": "nonpayable",
|
|
9
|
-
"type": "constructor"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"anonymous": false,
|
|
13
|
-
"inputs": [
|
|
14
|
-
{
|
|
15
|
-
"indexed": false,
|
|
16
|
-
"internalType": "string",
|
|
17
|
-
"name": "name",
|
|
18
|
-
"type": "string"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"indexed": false,
|
|
22
|
-
"internalType": "address",
|
|
23
|
-
"name": "addr",
|
|
24
|
-
"type": "address"
|
|
25
|
-
}
|
|
26
|
-
],
|
|
27
|
-
"name": "Deployed",
|
|
28
|
-
"type": "event"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"anonymous": false,
|
|
32
|
-
"inputs": [
|
|
33
|
-
{
|
|
34
|
-
"indexed": true,
|
|
35
|
-
"internalType": "address",
|
|
36
|
-
"name": "previousOwner",
|
|
37
|
-
"type": "address"
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"indexed": true,
|
|
41
|
-
"internalType": "address",
|
|
42
|
-
"name": "newOwner",
|
|
43
|
-
"type": "address"
|
|
44
|
-
}
|
|
45
|
-
],
|
|
46
|
-
"name": "OwnershipTransferred",
|
|
47
|
-
"type": "event"
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"inputs": [],
|
|
51
|
-
"name": "claimOwnership",
|
|
52
|
-
"outputs": [],
|
|
53
|
-
"stateMutability": "nonpayable",
|
|
54
|
-
"type": "function"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"inputs": [
|
|
58
|
-
{
|
|
59
|
-
"internalType": "string",
|
|
60
|
-
"name": "name",
|
|
61
|
-
"type": "string"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"internalType": "bytes",
|
|
65
|
-
"name": "creationCode",
|
|
66
|
-
"type": "bytes"
|
|
67
|
-
}
|
|
68
|
-
],
|
|
69
|
-
"name": "deploy",
|
|
70
|
-
"outputs": [
|
|
71
|
-
{
|
|
72
|
-
"internalType": "address",
|
|
73
|
-
"name": "res",
|
|
74
|
-
"type": "address"
|
|
75
|
-
}
|
|
76
|
-
],
|
|
77
|
-
"stateMutability": "nonpayable",
|
|
78
|
-
"type": "function"
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
"inputs": [],
|
|
82
|
-
"name": "owner",
|
|
83
|
-
"outputs": [
|
|
84
|
-
{
|
|
85
|
-
"internalType": "address",
|
|
86
|
-
"name": "",
|
|
87
|
-
"type": "address"
|
|
88
|
-
}
|
|
89
|
-
],
|
|
90
|
-
"stateMutability": "view",
|
|
91
|
-
"type": "function"
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
"inputs": [],
|
|
95
|
-
"name": "pendingOwner",
|
|
96
|
-
"outputs": [
|
|
97
|
-
{
|
|
98
|
-
"internalType": "address",
|
|
99
|
-
"name": "",
|
|
100
|
-
"type": "address"
|
|
101
|
-
}
|
|
102
|
-
],
|
|
103
|
-
"stateMutability": "view",
|
|
104
|
-
"type": "function"
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
"inputs": [
|
|
108
|
-
{
|
|
109
|
-
"internalType": "address",
|
|
110
|
-
"name": "newOwner",
|
|
111
|
-
"type": "address"
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
"internalType": "bool",
|
|
115
|
-
"name": "direct",
|
|
116
|
-
"type": "bool"
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
"internalType": "bool",
|
|
120
|
-
"name": "renounce",
|
|
121
|
-
"type": "bool"
|
|
122
|
-
}
|
|
123
|
-
],
|
|
124
|
-
"name": "transferOwnership",
|
|
125
|
-
"outputs": [],
|
|
126
|
-
"stateMutability": "nonpayable",
|
|
127
|
-
"type": "function"
|
|
128
|
-
}
|
|
129
|
-
],
|
|
130
|
-
"bytecode": "0x608060405234801561001057600080fd5b50600154600160a81b900460ff1661003557600154600160a01b900460ff161561003d565b61003d6100f1565b6100a55760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b600154600160a81b900460ff161580156100cf576001805461ffff60a01b191661010160a01b1790555b6100d761010c565b80156100eb576001805460ff60a81b191690555b5061019c565b60006101063061018d60201b61032b1760201c565b15905090565b600154600160a81b900460ff166101795760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b606482015260840161009c565b600080546001600160a01b03191633179055565b6001600160a01b03163b151590565b610725806101ab6000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c8063078dfbe71461005c5780634e71e0c8146100715780638da5cb5b14610079578063be3397e9146100a8578063e30c3978146100bb575b600080fd5b61006f61006a366004610443565b6100ce565b005b61006f6101d4565b60005461008c906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b61008c6100b63660046104f2565b61027f565b60015461008c906001600160a01b031681565b6000546001600160a01b031633146101015760405162461bcd60e51b81526004016100f8906105cc565b60405180910390fd5b81156101b2576001600160a01b03831615158061011b5750805b61015f5760405162461bcd60e51b81526020600482015260156024820152744f776e61626c653a207a65726f206164647265737360581b60448201526064016100f8565b600080546040516001600160a01b03808716939216916000805160206106d083398151915291a3600080546001600160a01b0385166001600160a01b031991821617909155600180549091169055505050565b600180546001600160a01b0385166001600160a01b0319909116179055505050565b6001546001600160a01b031633811461022f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c657220213d2070656e64696e67206f776e657260448201526064016100f8565b600080546040516001600160a01b03808516939216916000805160206106d083398151915291a3600080546001600160a01b039092166001600160a01b0319928316179055600180549091169055565b600080546001600160a01b031633146102aa5760405162461bcd60e51b81526004016100f8906105cc565b6102e983838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061033a92505050565b90507f2009540abb31a9afba343443e75c244a4fc7cf4348628c3dcfce844220e5eaf3848260405161031c929190610631565b60405180910390a19392505050565b6001600160a01b03163b151590565b60008082511161037a5760405162461bcd60e51b815260206004820152600b60248201526a0f4cae4de40d8cadccee8d60ab1b60448201526064016100f8565b61038382610389565b92915050565b6000808260405160200161039d9190610675565b60405160208183030381529060405290506000816040516020016103c1919061069b565b60405160208183030381529060405290508051602082016000f092506001600160a01b0383166104275760405162461bcd60e51b81526020600482015260116024820152701111541313d65351539517d19052531151607a1b60448201526064016100f8565b5050919050565b8035801515811461043e57600080fd5b919050565b60008060006060848603121561045857600080fd5b83356001600160a01b038116811461046f57600080fd5b925061047d6020850161042e565b915061048b6040850161042e565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b60008083601f8401126104bc57600080fd5b5081356001600160401b038111156104d357600080fd5b6020830191508360208285010111156104eb57600080fd5b9250929050565b60008060006040848603121561050757600080fd5b83356001600160401b038082111561051e57600080fd5b818601915086601f83011261053257600080fd5b81358181111561054457610544610494565b604051601f8201601f19908116603f0116810190838211818310171561056c5761056c610494565b8160405282815289602084870101111561058557600080fd5b8260208601602083013760006020848301015280975050505060208601359150808211156105b257600080fd5b506105bf868287016104aa565b9497909650939450505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60005b8381101561061c578181015183820152602001610604565b8381111561062b576000848401525b50505050565b6040815260008351806040840152610650816060850160208801610601565b6001600160a01b0393909316602083015250601f91909101601f191601606001919050565b600081526000825161068e816001850160208701610601565b9190910160010192915050565b6a600b5981380380925939f360a81b815281516000906106c281600b850160208701610601565b91909101600b019291505056fe8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0a264697066735822122018e961e6ffea6e4766cfb887a7790ff3956958a9c83d8f871ed4562dc9f4325864736f6c634300080f0033",
|
|
131
|
-
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100575760003560e01c8063078dfbe71461005c5780634e71e0c8146100715780638da5cb5b14610079578063be3397e9146100a8578063e30c3978146100bb575b600080fd5b61006f61006a366004610443565b6100ce565b005b61006f6101d4565b60005461008c906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b61008c6100b63660046104f2565b61027f565b60015461008c906001600160a01b031681565b6000546001600160a01b031633146101015760405162461bcd60e51b81526004016100f8906105cc565b60405180910390fd5b81156101b2576001600160a01b03831615158061011b5750805b61015f5760405162461bcd60e51b81526020600482015260156024820152744f776e61626c653a207a65726f206164647265737360581b60448201526064016100f8565b600080546040516001600160a01b03808716939216916000805160206106d083398151915291a3600080546001600160a01b0385166001600160a01b031991821617909155600180549091169055505050565b600180546001600160a01b0385166001600160a01b0319909116179055505050565b6001546001600160a01b031633811461022f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c657220213d2070656e64696e67206f776e657260448201526064016100f8565b600080546040516001600160a01b03808516939216916000805160206106d083398151915291a3600080546001600160a01b039092166001600160a01b0319928316179055600180549091169055565b600080546001600160a01b031633146102aa5760405162461bcd60e51b81526004016100f8906105cc565b6102e983838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061033a92505050565b90507f2009540abb31a9afba343443e75c244a4fc7cf4348628c3dcfce844220e5eaf3848260405161031c929190610631565b60405180910390a19392505050565b6001600160a01b03163b151590565b60008082511161037a5760405162461bcd60e51b815260206004820152600b60248201526a0f4cae4de40d8cadccee8d60ab1b60448201526064016100f8565b61038382610389565b92915050565b6000808260405160200161039d9190610675565b60405160208183030381529060405290506000816040516020016103c1919061069b565b60405160208183030381529060405290508051602082016000f092506001600160a01b0383166104275760405162461bcd60e51b81526020600482015260116024820152701111541313d65351539517d19052531151607a1b60448201526064016100f8565b5050919050565b8035801515811461043e57600080fd5b919050565b60008060006060848603121561045857600080fd5b83356001600160a01b038116811461046f57600080fd5b925061047d6020850161042e565b915061048b6040850161042e565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b60008083601f8401126104bc57600080fd5b5081356001600160401b038111156104d357600080fd5b6020830191508360208285010111156104eb57600080fd5b9250929050565b60008060006040848603121561050757600080fd5b83356001600160401b038082111561051e57600080fd5b818601915086601f83011261053257600080fd5b81358181111561054457610544610494565b604051601f8201601f19908116603f0116810190838211818310171561056c5761056c610494565b8160405282815289602084870101111561058557600080fd5b8260208601602083013760006020848301015280975050505060208601359150808211156105b257600080fd5b506105bf868287016104aa565b9497909650939450505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60005b8381101561061c578181015183820152602001610604565b8381111561062b576000848401525b50505050565b6040815260008351806040840152610650816060850160208801610601565b6001600160a01b0393909316602083015250601f91909101601f191601606001919050565b600081526000825161068e816001850160208701610601565b9190910160010192915050565b6a600b5981380380925939f360a81b815281516000906106c281600b850160208701610601565b91909101600b019291505056fe8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0a264697066735822122018e961e6ffea6e4766cfb887a7790ff3956958a9c83d8f871ed4562dc9f4325864736f6c634300080f0033",
|
|
132
|
-
"linkReferences": {},
|
|
133
|
-
"deployedLinkReferences": {}
|
|
134
|
-
}
|
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
-
pragma solidity 0.8.15;
|
|
3
|
-
import "../../base-implementations/SCYBaseWithRewards.sol";
|
|
4
|
-
import "../../../interfaces/IAToken.sol";
|
|
5
|
-
import "../../../interfaces/IAavePool.sol";
|
|
6
|
-
import "../../../interfaces/IAaveRewardsController.sol";
|
|
7
|
-
import "./WadRayMath.sol";
|
|
8
|
-
|
|
9
|
-
contract PendleAaveV3SCY is SCYBaseWithRewards {
|
|
10
|
-
using Math for uint256;
|
|
11
|
-
using WadRayMath for uint256;
|
|
12
|
-
|
|
13
|
-
address public immutable underlying;
|
|
14
|
-
address public immutable pool;
|
|
15
|
-
address public immutable rewardsController;
|
|
16
|
-
address public immutable aToken;
|
|
17
|
-
|
|
18
|
-
uint256 private constant PRECISION_INDEX = 1e9;
|
|
19
|
-
|
|
20
|
-
constructor(
|
|
21
|
-
string memory _name,
|
|
22
|
-
string memory _symbol,
|
|
23
|
-
address _aToken
|
|
24
|
-
) SCYBaseWithRewards(_name, _symbol, _aToken) {
|
|
25
|
-
aToken = _aToken;
|
|
26
|
-
underlying = IAToken(aToken).UNDERLYING_ASSET_ADDRESS();
|
|
27
|
-
rewardsController = IAToken(aToken).getIncentivesController();
|
|
28
|
-
pool = IAToken(aToken).POOL();
|
|
29
|
-
_safeApprove(underlying, pool, type(uint256).max);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/*///////////////////////////////////////////////////////////////
|
|
33
|
-
DEPOSIT/REDEEM USING BASE TOKENS
|
|
34
|
-
//////////////////////////////////////////////////////////////*/
|
|
35
|
-
|
|
36
|
-
function _deposit(address tokenIn, uint256 amountDeposited)
|
|
37
|
-
internal
|
|
38
|
-
virtual
|
|
39
|
-
override
|
|
40
|
-
returns (uint256 amountSharesOut)
|
|
41
|
-
{
|
|
42
|
-
// aTokenScaled -> SCY is 1:1
|
|
43
|
-
if (tokenIn == aToken) {
|
|
44
|
-
amountSharesOut = _aTokenToScaledBalance(amountDeposited);
|
|
45
|
-
} else {
|
|
46
|
-
uint256 preScaledBalance = IAToken(aToken).scaledBalanceOf(address(this));
|
|
47
|
-
IAavePool(pool).supply(underlying, amountDeposited, address(this), 0);
|
|
48
|
-
amountSharesOut = IAToken(aToken).scaledBalanceOf(address(this)) - preScaledBalance;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
function _redeem(address tokenOut, uint256 amountSharesToRedeem)
|
|
53
|
-
internal
|
|
54
|
-
virtual
|
|
55
|
-
override
|
|
56
|
-
returns (uint256 amountTokenOut)
|
|
57
|
-
{
|
|
58
|
-
if (tokenOut == aToken) {
|
|
59
|
-
amountTokenOut = _scaledBalanceToAToken(amountSharesToRedeem);
|
|
60
|
-
} else {
|
|
61
|
-
uint256 preBalanceUnderlying = _selfBalance(underlying);
|
|
62
|
-
|
|
63
|
-
uint256 amountATokenToWithdraw = _scaledBalanceToAToken(amountSharesToRedeem);
|
|
64
|
-
IAavePool(pool).withdraw(underlying, amountATokenToWithdraw, address(this));
|
|
65
|
-
|
|
66
|
-
// underlying is potentially also rewardToken, hence we need to manually track the balance here
|
|
67
|
-
amountTokenOut = _selfBalance(underlying) - preBalanceUnderlying;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/*///////////////////////////////////////////////////////////////
|
|
72
|
-
EXCHANGE-RATE
|
|
73
|
-
//////////////////////////////////////////////////////////////*/
|
|
74
|
-
|
|
75
|
-
function exchangeRate() public view virtual override returns (uint256) {
|
|
76
|
-
return _getReserveNormalizedIncome() / PRECISION_INDEX;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/*///////////////////////////////////////////////////////////////
|
|
80
|
-
REWARDS-RELATED
|
|
81
|
-
//////////////////////////////////////////////////////////////*/
|
|
82
|
-
|
|
83
|
-
function _getRewardTokens() internal view override returns (address[] memory res) {
|
|
84
|
-
res = IAaveRewardsController(rewardsController).getRewardsByAsset(aToken);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
function _redeemExternalReward() internal override {
|
|
88
|
-
address[] memory assets = new address[](1);
|
|
89
|
-
assets[0] = aToken;
|
|
90
|
-
|
|
91
|
-
IAaveRewardsController(rewardsController).claimAllRewards(assets, address(this));
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
/*///////////////////////////////////////////////////////////////
|
|
95
|
-
INTERNAL-HELPER-FUNCTIONS
|
|
96
|
-
//////////////////////////////////////////////////////////////*/
|
|
97
|
-
|
|
98
|
-
function _getReserveNormalizedIncome() internal view returns (uint256) {
|
|
99
|
-
return IAavePool(pool).getReserveNormalizedIncome(underlying);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
function _aTokenToScaledBalance(uint256 aTokenAmount) internal view returns (uint256) {
|
|
103
|
-
return aTokenAmount.rayDiv(_getReserveNormalizedIncome());
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
function _scaledBalanceToAToken(uint256 scaledAmount) internal view returns (uint256) {
|
|
107
|
-
return scaledAmount.rayMul(_getReserveNormalizedIncome());
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
/*///////////////////////////////////////////////////////////////
|
|
111
|
-
MISC FUNCTIONS FOR METADATA
|
|
112
|
-
//////////////////////////////////////////////////////////////*/
|
|
113
|
-
|
|
114
|
-
function _previewDeposit(
|
|
115
|
-
address, /*tokenIn*/
|
|
116
|
-
uint256 amountTokenToDeposit
|
|
117
|
-
) internal view override returns (uint256 amountSharesOut) {
|
|
118
|
-
// if tokenIn == aToken => convert aToken to scaledBalance
|
|
119
|
-
// if tokenIn == underlying => also convert aToken to scaledBalance since 1 aToken = 1 underlying
|
|
120
|
-
amountSharesOut = _aTokenToScaledBalance(amountTokenToDeposit);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
function _previewRedeem(
|
|
124
|
-
address, /*tokenOut*/
|
|
125
|
-
uint256 amountSharesToRedeem
|
|
126
|
-
) internal view override returns (uint256 amountTokenOut) {
|
|
127
|
-
amountTokenOut = _scaledBalanceToAToken(amountSharesToRedeem);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
function getTokensIn() public view virtual override returns (address[] memory res) {
|
|
131
|
-
res = new address[](2);
|
|
132
|
-
res[0] = underlying;
|
|
133
|
-
res[1] = aToken;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
function getTokensOut() public view virtual override returns (address[] memory res) {
|
|
137
|
-
res = new address[](2);
|
|
138
|
-
res[0] = underlying;
|
|
139
|
-
res[1] = aToken;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
function isValidTokenIn(address token) public view virtual override returns (bool) {
|
|
143
|
-
return token == underlying || token == aToken;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
function isValidTokenOut(address token) public view virtual override returns (bool) {
|
|
147
|
-
return token == underlying || token == aToken;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
function assetInfo()
|
|
151
|
-
external
|
|
152
|
-
view
|
|
153
|
-
returns (
|
|
154
|
-
AssetType assetType,
|
|
155
|
-
address assetAddress,
|
|
156
|
-
uint8 assetDecimals
|
|
157
|
-
)
|
|
158
|
-
{
|
|
159
|
-
return (AssetType.TOKEN, underlying, IERC20Metadata(underlying).decimals());
|
|
160
|
-
}
|
|
161
|
-
}
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: BUSL-1.1
|
|
2
|
-
pragma solidity 0.8.15;
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @title WadRayMath library
|
|
6
|
-
* @author Aave
|
|
7
|
-
* @notice Provides functions to perform calculations with Wad and Ray units
|
|
8
|
-
* @dev Provides mul and div function for wads (decimal numbers with 18 digits of precision) and rays (decimal numbers
|
|
9
|
-
* with 27 digits of precision)
|
|
10
|
-
* @dev Operations are rounded. If a value is >=.5, will be rounded up, otherwise rounded down.
|
|
11
|
-
**/
|
|
12
|
-
library WadRayMath {
|
|
13
|
-
// HALF_WAD and HALF_RAY expressed with extended notation as constant with operations are not supported in Yul assembly
|
|
14
|
-
uint256 internal constant WAD = 1e18;
|
|
15
|
-
uint256 internal constant HALF_WAD = 0.5e18;
|
|
16
|
-
|
|
17
|
-
uint256 internal constant RAY = 1e27;
|
|
18
|
-
uint256 internal constant HALF_RAY = 0.5e27;
|
|
19
|
-
|
|
20
|
-
uint256 internal constant WAD_RAY_RATIO = 1e9;
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* @dev Multiplies two wad, rounding half up to the nearest wad
|
|
24
|
-
* @dev assembly optimized for improved gas savings, see https://twitter.com/transmissions11/status/1451131036377571328
|
|
25
|
-
* @param a Wad
|
|
26
|
-
* @param b Wad
|
|
27
|
-
* @return c = a*b, in wad
|
|
28
|
-
**/
|
|
29
|
-
function wadMul(uint256 a, uint256 b) internal pure returns (uint256 c) {
|
|
30
|
-
// to avoid overflow, a <= (type(uint256).max - HALF_WAD) / b
|
|
31
|
-
assembly {
|
|
32
|
-
if iszero(or(iszero(b), iszero(gt(a, div(sub(not(0), HALF_WAD), b))))) {
|
|
33
|
-
revert(0, 0)
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
c := div(add(mul(a, b), HALF_WAD), WAD)
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* @dev Divides two wad, rounding half up to the nearest wad
|
|
42
|
-
* @dev assembly optimized for improved gas savings, see https://twitter.com/transmissions11/status/1451131036377571328
|
|
43
|
-
* @param a Wad
|
|
44
|
-
* @param b Wad
|
|
45
|
-
* @return c = a/b, in wad
|
|
46
|
-
**/
|
|
47
|
-
function wadDiv(uint256 a, uint256 b) internal pure returns (uint256 c) {
|
|
48
|
-
// to avoid overflow, a <= (type(uint256).max - halfB) / WAD
|
|
49
|
-
assembly {
|
|
50
|
-
if or(iszero(b), iszero(iszero(gt(a, div(sub(not(0), div(b, 2)), WAD))))) {
|
|
51
|
-
revert(0, 0)
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
c := div(add(mul(a, WAD), div(b, 2)), b)
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* @notice Multiplies two ray, rounding half up to the nearest ray
|
|
60
|
-
* @dev assembly optimized for improved gas savings, see https://twitter.com/transmissions11/status/1451131036377571328
|
|
61
|
-
* @param a Ray
|
|
62
|
-
* @param b Ray
|
|
63
|
-
* @return c = a raymul b
|
|
64
|
-
**/
|
|
65
|
-
function rayMul(uint256 a, uint256 b) internal pure returns (uint256 c) {
|
|
66
|
-
// to avoid overflow, a <= (type(uint256).max - HALF_RAY) / b
|
|
67
|
-
assembly {
|
|
68
|
-
if iszero(or(iszero(b), iszero(gt(a, div(sub(not(0), HALF_RAY), b))))) {
|
|
69
|
-
revert(0, 0)
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
c := div(add(mul(a, b), HALF_RAY), RAY)
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* @notice Divides two ray, rounding half up to the nearest ray
|
|
78
|
-
* @dev assembly optimized for improved gas savings, see https://twitter.com/transmissions11/status/1451131036377571328
|
|
79
|
-
* @param a Ray
|
|
80
|
-
* @param b Ray
|
|
81
|
-
* @return c = a raydiv b
|
|
82
|
-
**/
|
|
83
|
-
function rayDiv(uint256 a, uint256 b) internal pure returns (uint256 c) {
|
|
84
|
-
// to avoid overflow, a <= (type(uint256).max - halfB) / RAY
|
|
85
|
-
assembly {
|
|
86
|
-
if or(iszero(b), iszero(iszero(gt(a, div(sub(not(0), div(b, 2)), RAY))))) {
|
|
87
|
-
revert(0, 0)
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
c := div(add(mul(a, RAY), div(b, 2)), b)
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* @dev Casts ray down to wad
|
|
96
|
-
* @dev assembly optimized for improved gas savings, see https://twitter.com/transmissions11/status/1451131036377571328
|
|
97
|
-
* @param a Ray
|
|
98
|
-
* @return b = a converted to wad, rounded half up to the nearest wad
|
|
99
|
-
**/
|
|
100
|
-
function rayToWad(uint256 a) internal pure returns (uint256 b) {
|
|
101
|
-
assembly {
|
|
102
|
-
b := div(a, WAD_RAY_RATIO)
|
|
103
|
-
let remainder := mod(a, WAD_RAY_RATIO)
|
|
104
|
-
if iszero(lt(remainder, div(WAD_RAY_RATIO, 2))) {
|
|
105
|
-
b := add(b, 1)
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* @dev Converts wad up to ray
|
|
112
|
-
* @dev assembly optimized for improved gas savings, see https://twitter.com/transmissions11/status/1451131036377571328
|
|
113
|
-
* @param a Wad
|
|
114
|
-
* @return b = a converted in ray
|
|
115
|
-
**/
|
|
116
|
-
function wadToRay(uint256 a) internal pure returns (uint256 b) {
|
|
117
|
-
// to avoid overflow, b/WAD_RAY_RATIO == a
|
|
118
|
-
assembly {
|
|
119
|
-
b := mul(a, WAD_RAY_RATIO)
|
|
120
|
-
|
|
121
|
-
if iszero(eq(div(b, WAD_RAY_RATIO), a)) {
|
|
122
|
-
revert(0, 0)
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|