@pendle/core-v2 2.23.1 → 2.23.3-mantle
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/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/PendleMsgSenderAppUpg.sol/PendleMsgSenderAppUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol/LayerZeroHelper.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributorV2.sol/PendleFeeDistributorV2.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.dbg.json +1 -1
- 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/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.dbg.json +1 -1
- 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/VeHistoryLib.sol/CheckpointHelper.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.dbg.json +1 -1
- package/build/artifacts/contracts/core/BulkSeller/BulkSeller.sol/BulkSeller.dbg.json +1 -1
- package/build/artifacts/contracts/core/BulkSeller/BulkSellerFactory.sol/BulkSellerFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/BulkSeller/BulkSellerMathCore.sol/BulkSellerMathCore.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleExternalRewardDistributor.sol/PendleExternalRewardDistributor.dbg.json +4 -0
- package/build/artifacts/contracts/core/Market/PendleExternalRewardDistributor.sol/PendleExternalRewardDistributor.json +373 -0
- 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 +2 -2
- package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/v2/PendleGaugeV2.sol/PendleGaugeV2.dbg.json +4 -0
- package/build/artifacts/contracts/core/Market/v2/PendleGaugeV2.sol/PendleGaugeV2.json +128 -0
- package/build/artifacts/contracts/core/Market/v2/PendleMarketFactoryV2.sol/PendleMarketFactoryV2.dbg.json +4 -0
- package/build/artifacts/contracts/core/Market/v2/PendleMarketFactoryV2.sol/PendleMarketFactoryV2.json +682 -0
- package/build/artifacts/contracts/core/Market/v2/PendleMarketV2.sol/PendleMarketV2.dbg.json +4 -0
- package/build/artifacts/contracts/core/Market/v2/PendleMarketV2.sol/PendleMarketV2.json +1219 -0
- package/build/artifacts/contracts/core/RewardManager/RewardManager.sol/RewardManager.dbg.json +1 -1
- package/build/artifacts/contracts/core/RewardManager/RewardManagerAbstract.sol/RewardManagerAbstract.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/SYBase.sol/SYBase.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/SYBaseWithRewards.sol/SYBaseWithRewards.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ankr/PendleAnkrBNBSY.sol/PendleAnkrBNBSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ape/sAPE.sol/sAPE.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/AuraEthxBbAWethSY.sol/AuraEthxBbAWethSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/AuraEthxBbAWethSY.sol/AuraEthxBbAWethSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraBbAWethSwethSY.sol/PendleAuraBbAWethSwethSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraBbAWethSwethSY.sol/PendleAuraBbAWethSwethSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethAnkrethSYV2.sol/PendleAuraWethAnkrethSYV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethAnkrethSYV2.sol/PendleAuraWethAnkrethSYV2.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRocketEthSYV2.sol/PendleAuraWethRocketEthSYV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRocketEthSYV2.sol/PendleAuraWethRocketEthSYV2.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethStafiEthSY.sol/PendleAuraWethStafiEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethStafiEthSY.sol/PendleAuraWethStafiEthSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethVethSY.sol/PendleAuraWethVethSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethVethSY.sol/PendleAuraWethVethSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSYV2.sol/PendleAuraWethWstethSYV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSYV2.sol/PendleAuraWethWstethSYV2.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWstethAnkreth.sol/PendleAuraWstethAnkreth.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWstethAnkreth.sol/PendleAuraWstethAnkreth.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStableMath.sol/ComposableStableMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreview.sol/ComposableStablePreview.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/FixedPoint.sol/FixedPoint.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/BbAPoolHelper.sol/BbAPoolHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/BbAPoolHelper.sol/BbAWethHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/LinearMath.sol/LinearMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/LinearPreview.sol/LinearPreview.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStableMath.sol/MetaStableMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStablePreview.sol/MetaStablePreview.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/PendleAuraBalancerStableLPSYV2.sol/PendleAuraBalancerStableLPSYV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol/PendleQiTokenSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol/PendleQiTokenSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotRewardHelper.sol/CamelotRewardHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatileCommon.sol/CamelotV1VolatileCommon.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatileLpHelper.sol/CamelotV1VolatileLpHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatilePreview.sol/CamelotV1VolatilePreview.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/PendleCamelotV1VolatileSY.sol/PendleCamelotV1VolatileSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/PendleCamelotV1VolatileSY.sol/PendleCamelotV1VolatileSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveFraxUsdcSY.sol/PendleCurveFraxUsdcSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveFraxUsdcSY.sol/PendleCurveFraxUsdcSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveUsdd3CrvSY.sol/PendleCurveUsdd3CrvSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveUsdd3CrvSY.sol/PendleCurveUsdd3CrvSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/Curve3CrvPoolHelper.sol/Curve3CrvPoolHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/CurveFraxUsdcPoolHelper.sol/CurveFraxUsdcPoolHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/CurveUsdd3CrvPoolHelper.sol/CurveUsdd3CrvPoolHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/PendleConvexLPSY.sol/PendleConvexLPSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/PendleGlpSY.sol/PendleGlpSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/PendleGlpSY.sol/PendleGlpSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleArbitrumStakedEthSY.sol/PendleArbitrumStakedEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleGdaiSY.sol/PendleGDaiSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleLooksStakingSY.sol/PendleLooksStakingSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleSfrxEthSY.sol/PendleSfrxEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleStargateLPSY.sol/PendleStargateLPSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleStargateLPSY.sol/PendleStargateLPSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWbEthSY.sol/PendleWbEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol/PendleWstEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Swell/PendleSwETH.sol/SwETHSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/PendleThenaSY.sol/PendleThenaSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/PendleThenaSY.sol/PendleThenaSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/ThenaLpHelper.sol/ThenaLpHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/ThenaMath.sol/ThenaMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/ThenaPreview.sol/IThenaSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/ThenaPreview.sol/ThenaPreview.dbg.json +1 -1
- 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/PendleYieldContractFactory.sol/PendleYieldContractFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.json +2 -2
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.json +2 -2
- package/build/artifacts/contracts/core/YieldContractsV2/InterestManagerYTV2.sol/InterestManagerYTV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContractsV2/PendlePrincipalTokenV2.sol/PendlePrincipalTokenV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldContractFactoryV2.sol/PendleYieldContractFactoryV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldContractFactoryV2.sol/PendleYieldContractFactoryV2.json +2 -2
- package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldTokenV2.sol/PendleYieldTokenV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldTokenV2.sol/PendleYieldTokenV2.json +2 -2
- package/build/artifacts/contracts/core/libraries/ArrayLib.sol/ArrayLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/ArrayLib.sol/ArrayLib.json +2 -2
- package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/math/Math.sol/Math.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Ankr/IAnkrBNB.sol/IAnkrBNB.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Ankr/IAnkrLiquidStaking.sol/IAnkrLiquidStaking.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/BinanceEth/IWBETH.sol/IWBETH.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotNFTPool.sol/ICamelotNFTPool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotNitroPool.sol/ICamelotNitroPool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotPair.sol/ICamelotPair.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiq.sol/IPActionAddRemoveLiq.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionInfoStatic.sol/IPActionInfoStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMarketAuxStatic.sol/IPActionMarketAuxStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMarketCoreStatic.sol/IPActionMarketCoreStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMintRedeem.sol/IPActionMintRedeem.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMintRedeemStatic.sol/IPActionMintRedeemStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionStorageStatic.sol/IPActionStorageStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapPT.sol/IPActionSwapPT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapYT.sol/IPActionSwapYT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllAction.sol/IPAllAction.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPBulkSeller.sol/IPBulkSeller.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPExternalRewardDistributor.sol/IPExternalRewardDistributor.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPExternalRewardDistributor.sol/IPExternalRewardDistributor.json +109 -0
- package/build/artifacts/contracts/interfaces/IPGauge.sol/IPGauge.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarketFactoryV2.sol/IPMarketFactoryV2.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPMarketFactoryV2.sol/IPMarketFactoryV2.json +166 -0
- package/build/artifacts/contracts/interfaces/IPRouterHelper.sol/IPRouterHelper.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPRouterStatic.sol/IPRouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPVotingController.sol/IPVotingController.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPVotingEscrowMainchain.sol/IPVotingEscrowMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPendlePreviewHelper.sol/IPendlePreviewHelper.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IStandardizedYield.sol/IStandardizedYield.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ISwETH.sol/ISwETH.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Thena/IThenaFactory.sol/IThenaFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Thena/IThenaGaugeV2.sol/IThenaGaugeV2.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Thena/IThenaPair.sol/IThenaPair.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Thena/IThenaRouter.sol/IThenaRouter.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BoringLpSeller.sol/BoringLpSeller.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BoringPtSeller.sol/BoringPtSeller.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BulkSellerOffchain.sol/BulkSellerOffchain.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/LegacyNFTHelper.sol/LegacyNFTHelper.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/LegacyNFTHelper.sol/StarNFTV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/MarketExchangeRateLib.sol/MarketExchangeRateLib.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PtAndLpToAsset.sol/PtAndLpToAsset.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/StorageLayout.sol/StorageLayout.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PendleLpOracleLib.sol/PendleLpOracleLib.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PendlePtOracle.sol/PendlePtOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PendlePtOracleLib.sol/PendlePtOracleLib.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/samples/PendleLpGlpOracle.sol/PendleLpGlpOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/samples/PendlePtGlpOracle.sol/PendlePtGlpOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/samples/PendlePtUsdChainlinkOracle.sol/PendlePtUsdChainlinkOracle.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionMintRedeem.sol/ActionMintRedeem.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapPT.sol/ActionSwapPT.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapYT.sol/ActionSwapYT.dbg.json +1 -1
- package/build/artifacts/contracts/router/PendleRouter.sol/PendleRouter.dbg.json +1 -1
- package/build/artifacts/contracts/router/PendleRouterHelper.sol/PendleRouterHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/ActionBaseCallback.sol/ActionBaseCallback.dbg.json +1 -1
- 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/MarketApproxPtOutLib.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/1inch/I1inchAggregationRouterV5.sol/I1inchAggregationRouterV5.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/1inch/OneInchAggregationRouterHelper.sol/OneInchAggregationRouterHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwap.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/IExecutorHelper.sol/IExecutorHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/KyberInputScalingHelper.sol/KyberInputScalingHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/ScalingDataLib.sol/ScalingDataLib.dbg.json +1 -1
- package/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol +4 -0
- package/contracts/core/Market/PendleExternalRewardDistributor.sol +135 -0
- package/contracts/core/Market/v2/PendleGaugeV2.sol +142 -0
- package/contracts/core/Market/v2/PendleMarketFactoryV2.sol +177 -0
- package/contracts/core/Market/v2/PendleMarketV2.sol +379 -0
- package/contracts/core/RewardManager/RewardManager.sol +0 -1
- package/contracts/core/RewardManager/RewardManagerAbstract.sol +3 -2
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreview.sol +1 -607
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreviewProxy.sol +53 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreviewV4.sol +600 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreviewV5.sol +621 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/FixedPoint.sol +8 -0
- package/contracts/core/StandardizedYield/implementations/ChainlinkRelayer/PendleChainlinkReceiver.sol +46 -0
- package/contracts/core/StandardizedYield/implementations/ChainlinkRelayer/PendleChainlinkRelayer.sol +43 -0
- package/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleMantleStakedEthSY.sol +120 -0
- package/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleOracleForSyProxy.sol +23 -0
- package/contracts/core/libraries/ArrayLib.sol +32 -0
- package/contracts/core/libraries/Errors.sol +2 -0
- package/contracts/interfaces/Balancer/IPComposableStablePreview.sol +23 -0
- package/contracts/interfaces/Balancer/IVersion.sol +13 -0
- package/contracts/interfaces/IPExternalRewardDistributor.sol +19 -0
- package/contracts/interfaces/IPMarketFactoryV2.sol +8 -0
- package/contracts/interfaces/IPOracleForSy.sol +7 -0
- package/contracts/offchain-helpers/AutomateReady.sol +111 -0
- package/contracts/offchain-helpers/ChainlinkRelayerAutomation.sol +52 -0
- package/contracts/offchain-helpers/ChainlinkRelayerGelato.sol +36 -0
- package/contracts/offchain-helpers/errors/SDKErrorsDirectory.sol +149 -0
- package/contracts/router/swap-aggregator/PendleSwap.sol +7 -2
- package/deployments/5000-core.json +29 -0
- package/deployments/5000-markets/WSTETH-MANTLE-MARCH2024.json +10 -0
- package/package.json +7 -7
- package/typechain-types/AuraSwEthBbAWethSYV2.ts +1532 -0
- package/typechain-types/BotActionCallback.ts +1093 -0
- package/typechain-types/ComposableStablePreviewProxy.ts +352 -0
- package/typechain-types/ComposableStablePreviewV4.ts +217 -0
- package/typechain-types/ComposableStablePreviewV5.ts +217 -0
- package/typechain-types/IPComposableStablePreview.ts +217 -0
- package/typechain-types/IPOracleForSy.ts +87 -0
- package/typechain-types/IVersion.ts +81 -0
- package/typechain-types/LiquiditySeedingHelper.ts +128 -0
- package/typechain-types/LongYieldActionHelper.ts +1093 -0
- package/typechain-types/LongYieldTradingBot.ts +1093 -0
- package/typechain-types/PendleChainlinkReceiver.ts +239 -0
- package/typechain-types/PendleChainlinkRelayer.ts +158 -0
- package/typechain-types/PendleExternalRewardDistributor.ts +49 -0
- package/typechain-types/PendleMantleStakedEthSY.ts +1222 -0
- package/typechain-types/PendleMarketFactoryV2.ts +26 -24
- package/typechain-types/PendleOracleForSyProxy.ts +275 -0
- package/typechain-types/ShortYieldActionHelper.ts +1093 -0
- package/typechain-types/ShortYieldTradingBot.ts +1093 -0
- package/typechain-types/TradingBotBase.ts +1093 -0
- package/typechain-types/factories/AuraEthxBbAWethSY__factory.ts +1 -1
- package/typechain-types/factories/AuraSwEthBbAWethSYV2__factory.ts +1244 -0
- package/typechain-types/factories/BotActionCallback__factory.ts +899 -9
- package/typechain-types/factories/ComposableStablePreviewProxy__factory.ts +288 -0
- package/typechain-types/factories/ComposableStablePreviewV4__factory.ts +190 -0
- package/typechain-types/factories/ComposableStablePreviewV5__factory.ts +190 -0
- package/typechain-types/factories/IPComposableStablePreview__factory.ts +152 -0
- package/typechain-types/factories/IPOracleForSy__factory.ts +36 -0
- package/typechain-types/factories/IVersion__factory.ts +36 -0
- package/typechain-types/factories/LiquiditySeedingHelper__factory.ts +124 -0
- package/typechain-types/factories/LongYieldActionHelper__factory.ts +899 -9
- package/typechain-types/factories/LongYieldTradingBot__factory.ts +923 -33
- package/typechain-types/factories/PendleAuraBbAWethSwethSY__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraWethAnkrethSYV2__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraWethRocketEthSYV2__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraWethStafiEthSY__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraWethVethSY__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraWethWstethSYV2__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraWstethAnkreth__factory.ts +1 -1
- package/typechain-types/factories/PendleCamelotV1VolatileSY__factory.ts +1 -1
- package/typechain-types/factories/PendleChainlinkReceiver__factory.ts +216 -0
- package/typechain-types/factories/PendleChainlinkRelayer__factory.ts +180 -0
- package/typechain-types/factories/PendleCurveFraxUsdcSY__factory.ts +1 -1
- package/typechain-types/factories/PendleCurveUsdd3CrvSY__factory.ts +1 -1
- package/typechain-types/factories/PendleExternalRewardDistributor__factory.ts +29 -1
- package/typechain-types/factories/PendleFeeDistributor__factory.ts +1 -1
- package/typechain-types/factories/PendleGlpSY__factory.ts +1 -1
- package/typechain-types/factories/PendleMantleStakedEthSY__factory.ts +1068 -0
- package/typechain-types/factories/PendleMarketFactoryV2__factory.ts +15 -15
- package/typechain-types/factories/PendleMarketV2__factory.ts +10 -1
- package/typechain-types/factories/PendleMarket__factory.ts +1 -1
- package/typechain-types/factories/PendleOracleForSyProxy__factory.ts +211 -0
- package/typechain-types/factories/PendleQiTokenSY__factory.ts +1 -1
- package/typechain-types/factories/PendleStargateLPSY__factory.ts +1 -1
- package/typechain-types/factories/PendleThenaSY__factory.ts +1 -1
- package/typechain-types/factories/PendleYieldContractFactoryV2__factory.ts +1 -1
- package/typechain-types/factories/PendleYieldContractFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleYieldTokenV2__factory.ts +1 -1
- package/typechain-types/factories/PendleYieldToken__factory.ts +1 -1
- package/typechain-types/factories/ShortYieldActionHelper__factory.ts +899 -9
- package/typechain-types/factories/ShortYieldTradingBot__factory.ts +939 -49
- package/typechain-types/factories/TradingBotBase__factory.ts +899 -9
- package/typechain-types/hardhat.d.ts +162 -9
- package/typechain-types/index.ts +34 -2
- /package/contracts/router/swap-aggregator/{1inch → oneinch}/I1inchAggregationRouterV5.sol +0 -0
- /package/contracts/router/swap-aggregator/{1inch → oneinch}/OneInchAggregationRouterHelper.sol +0 -0
package/contracts/core/StandardizedYield/implementations/ChainlinkRelayer/PendleChainlinkRelayer.sol
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity 0.8.17;
|
|
3
|
+
|
|
4
|
+
import "@openzeppelin/contracts/utils/Address.sol";
|
|
5
|
+
import { AggregatorV2V3Interface as IChainlinkAggregator } from "@chainlink/contracts/src/v0.8/interfaces/AggregatorV2V3Interface.sol";
|
|
6
|
+
|
|
7
|
+
import "../../../../LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol";
|
|
8
|
+
import "../../../../interfaces/ILayerZeroEndpoint.sol";
|
|
9
|
+
import "../../../../interfaces/IWstETH.sol";
|
|
10
|
+
import "../../../libraries/BoringOwnableUpgradeable.sol";
|
|
11
|
+
|
|
12
|
+
contract PendleChainlinkRelayer {
|
|
13
|
+
uint256 private constant DST_EXECUTION_GAS = 50000;
|
|
14
|
+
|
|
15
|
+
address public immutable lzEndpoint;
|
|
16
|
+
address public immutable dstAddress;
|
|
17
|
+
uint256 public immutable dstChainId;
|
|
18
|
+
address public immutable chainlinkFeed;
|
|
19
|
+
|
|
20
|
+
constructor(
|
|
21
|
+
address _lzEndpoint,
|
|
22
|
+
address _dstAddress,
|
|
23
|
+
uint256 _dstChainId,
|
|
24
|
+
address _chainlinkFeed
|
|
25
|
+
) {
|
|
26
|
+
lzEndpoint = _lzEndpoint;
|
|
27
|
+
dstAddress = _dstAddress;
|
|
28
|
+
dstChainId = _dstChainId;
|
|
29
|
+
chainlinkFeed = _chainlinkFeed;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function run() external payable {
|
|
33
|
+
bytes memory path = abi.encodePacked(dstAddress, address(this));
|
|
34
|
+
ILayerZeroEndpoint(lzEndpoint).send{ value: msg.value }(
|
|
35
|
+
LayerZeroHelper._getLayerZeroChainIds(dstChainId),
|
|
36
|
+
path,
|
|
37
|
+
abi.encode(IChainlinkAggregator(chainlinkFeed).latestAnswer()),
|
|
38
|
+
payable(msg.sender),
|
|
39
|
+
address(0),
|
|
40
|
+
abi.encodePacked(uint16(1), DST_EXECUTION_GAS)
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
}
|
package/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleMantleStakedEthSY.sol
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity 0.8.17;
|
|
3
|
+
|
|
4
|
+
import "../../SYBase.sol";
|
|
5
|
+
import "../../../../interfaces/IPOracleForSy.sol";
|
|
6
|
+
|
|
7
|
+
contract PendleMantleStakedEthSY is SYBase {
|
|
8
|
+
using Math for int256;
|
|
9
|
+
|
|
10
|
+
address internal immutable underlyingAssetOnEthAddr;
|
|
11
|
+
uint8 internal immutable underlyingAssetOnEthDecimals;
|
|
12
|
+
address public immutable oracleAddress;
|
|
13
|
+
|
|
14
|
+
constructor(
|
|
15
|
+
string memory _name,
|
|
16
|
+
string memory _symbol,
|
|
17
|
+
address _token,
|
|
18
|
+
address _underlyingAssetOnEthAddr,
|
|
19
|
+
uint8 _underlyingAssetOnEthDecimals,
|
|
20
|
+
address _oracleAddress
|
|
21
|
+
) SYBase(_name, _symbol, _token) {
|
|
22
|
+
underlyingAssetOnEthAddr = _underlyingAssetOnEthAddr;
|
|
23
|
+
underlyingAssetOnEthDecimals = _underlyingAssetOnEthDecimals;
|
|
24
|
+
oracleAddress = _oracleAddress;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/*///////////////////////////////////////////////////////////////
|
|
28
|
+
DEPOSIT/REDEEM USING BASE TOKENS
|
|
29
|
+
//////////////////////////////////////////////////////////////*/
|
|
30
|
+
|
|
31
|
+
function _deposit(address, uint256 amountDeposited)
|
|
32
|
+
internal
|
|
33
|
+
pure
|
|
34
|
+
override
|
|
35
|
+
returns (
|
|
36
|
+
uint256 /*amountSharesOut*/
|
|
37
|
+
)
|
|
38
|
+
{
|
|
39
|
+
return amountDeposited;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function _redeem(
|
|
43
|
+
address receiver,
|
|
44
|
+
address tokenOut,
|
|
45
|
+
uint256 amountSharesToRedeem
|
|
46
|
+
)
|
|
47
|
+
internal
|
|
48
|
+
override
|
|
49
|
+
returns (
|
|
50
|
+
uint256 /*amountTokenOut*/
|
|
51
|
+
)
|
|
52
|
+
{
|
|
53
|
+
_transferOut(tokenOut, receiver, amountSharesToRedeem);
|
|
54
|
+
return amountSharesToRedeem;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/*///////////////////////////////////////////////////////////////
|
|
58
|
+
EXCHANGE-RATE
|
|
59
|
+
//////////////////////////////////////////////////////////////*/
|
|
60
|
+
|
|
61
|
+
function exchangeRate() public view override returns (uint256) {
|
|
62
|
+
return IPOracleForSy(oracleAddress).latestAnswer().Uint();
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/*///////////////////////////////////////////////////////////////
|
|
66
|
+
MISC FUNCTIONS FOR METADATA
|
|
67
|
+
//////////////////////////////////////////////////////////////*/
|
|
68
|
+
|
|
69
|
+
function _previewDeposit(address, uint256 amountTokenToDeposit)
|
|
70
|
+
internal
|
|
71
|
+
pure
|
|
72
|
+
override
|
|
73
|
+
returns (
|
|
74
|
+
uint256 /*amountSharesOut*/
|
|
75
|
+
)
|
|
76
|
+
{
|
|
77
|
+
return amountTokenToDeposit;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function _previewRedeem(address, uint256 amountSharesToRedeem)
|
|
81
|
+
internal
|
|
82
|
+
pure
|
|
83
|
+
override
|
|
84
|
+
returns (
|
|
85
|
+
uint256 /*amountTokenOut*/
|
|
86
|
+
)
|
|
87
|
+
{
|
|
88
|
+
return amountSharesToRedeem;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function getTokensIn() public view override returns (address[] memory res) {
|
|
92
|
+
res = new address[](1);
|
|
93
|
+
res[0] = yieldToken;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function getTokensOut() public view override returns (address[] memory res) {
|
|
97
|
+
res = new address[](1);
|
|
98
|
+
res[0] = yieldToken;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function isValidTokenIn(address token) public view override returns (bool) {
|
|
102
|
+
return token == yieldToken;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function isValidTokenOut(address token) public view override returns (bool) {
|
|
106
|
+
return token == yieldToken;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
function assetInfo()
|
|
110
|
+
external
|
|
111
|
+
view
|
|
112
|
+
returns (
|
|
113
|
+
AssetType assetType,
|
|
114
|
+
address assetAddress,
|
|
115
|
+
uint8 assetDecimals
|
|
116
|
+
)
|
|
117
|
+
{
|
|
118
|
+
return (AssetType.TOKEN, underlyingAssetOnEthAddr, underlyingAssetOnEthDecimals);
|
|
119
|
+
}
|
|
120
|
+
}
|
package/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleOracleForSyProxy.sol
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity 0.8.17;
|
|
3
|
+
|
|
4
|
+
import "../../SYBase.sol";
|
|
5
|
+
import "../../../../interfaces/IPOracleForSy.sol";
|
|
6
|
+
|
|
7
|
+
// the Owner of this will be a timelock
|
|
8
|
+
contract PendleOracleForSyProxy is BoringOwnableUpgradeable, IPOracleForSy {
|
|
9
|
+
address public oracleAddress;
|
|
10
|
+
|
|
11
|
+
constructor(address _oracleAddress) initializer {
|
|
12
|
+
__BoringOwnable_init();
|
|
13
|
+
oracleAddress = _oracleAddress;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function latestAnswer() external view override returns (int256) {
|
|
17
|
+
return IPOracleForSy(oracleAddress).latestAnswer();
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function setOracleAddress(address _oracleAddress) external onlyOwner {
|
|
21
|
+
oracleAddress = _oracleAddress;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -39,6 +39,38 @@ library ArrayLib {
|
|
|
39
39
|
}
|
|
40
40
|
out[length] = element;
|
|
41
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* @dev This function assumes a and b each contains unidentical elements
|
|
44
|
+
* @param a array of addresses a
|
|
45
|
+
* @param b array of addresses b
|
|
46
|
+
* @return out Concatenation of a and b containing unidentical elements
|
|
47
|
+
*/
|
|
48
|
+
function merge(
|
|
49
|
+
address[] memory a,
|
|
50
|
+
address[] memory b
|
|
51
|
+
) internal pure returns (address[] memory out) {
|
|
52
|
+
unchecked {
|
|
53
|
+
uint256 countUnidenticalB = 0;
|
|
54
|
+
bool[] memory isUnidentical = new bool[](b.length);
|
|
55
|
+
for(uint256 i = 0; i < b.length; ++i) {
|
|
56
|
+
if (!contains(a, b[i])) {
|
|
57
|
+
countUnidenticalB++;
|
|
58
|
+
isUnidentical[i] = true;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
out = new address[](a.length + countUnidenticalB);
|
|
63
|
+
for(uint256 i = 0; i < a.length; ++i) {
|
|
64
|
+
out[i] = a[i];
|
|
65
|
+
}
|
|
66
|
+
uint256 id = a.length;
|
|
67
|
+
for(uint256 i = 0; i < b.length; ++i) {
|
|
68
|
+
if (isUnidentical[i]) {
|
|
69
|
+
out[id++] = b[i];
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
42
74
|
|
|
43
75
|
// various version of contains
|
|
44
76
|
function contains(address[] memory array, address element) internal pure returns (bool) {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
pragma solidity 0.8.17;
|
|
2
|
+
|
|
3
|
+
import "./IBalancerStablePreview.sol";
|
|
4
|
+
|
|
5
|
+
interface IPComposableStablePreview is IBalancerStablePreview {
|
|
6
|
+
struct ImmutableData {
|
|
7
|
+
address[] poolTokens;
|
|
8
|
+
address[] rateProviders;
|
|
9
|
+
uint256[] rawScalingFactors;
|
|
10
|
+
bool[] isExemptFromYieldProtocolFee;
|
|
11
|
+
//
|
|
12
|
+
address LP;
|
|
13
|
+
bool noTokensExempt;
|
|
14
|
+
bool allTokensExempt;
|
|
15
|
+
uint256 bptIndex;
|
|
16
|
+
uint256 totalTokens;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
struct TokenRateCache {
|
|
20
|
+
uint256 currentRate;
|
|
21
|
+
uint256 oldRate;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
|
|
3
|
+
pragma solidity 0.8.17;
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @notice Simple interface to retrieve the version of a deployed contract.
|
|
7
|
+
*/
|
|
8
|
+
interface IVersion {
|
|
9
|
+
/**
|
|
10
|
+
* @dev Returns a JSON representation of the contract version containing name, version number and task ID.
|
|
11
|
+
*/
|
|
12
|
+
function version() external view returns (string memory);
|
|
13
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity 0.8.17;
|
|
3
|
+
|
|
4
|
+
interface IPExternalRewardDistributor {
|
|
5
|
+
struct MarketRewardData {
|
|
6
|
+
uint128 rewardPerSec;
|
|
7
|
+
uint128 accumulatedReward;
|
|
8
|
+
uint128 lastUpdated;
|
|
9
|
+
uint128 incentiveEndsAt;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
event DistributeReward(address indexed market, address indexed rewardToken, uint256 amount);
|
|
13
|
+
|
|
14
|
+
event AddRewardToMarket(address indexed market, address indexed token, MarketRewardData data);
|
|
15
|
+
|
|
16
|
+
function getRewardTokens(address market) external view returns (address[] memory);
|
|
17
|
+
|
|
18
|
+
function redeemRewards() external;
|
|
19
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
// SPDX-License-Identifier: UNLICENSED
|
|
2
|
+
pragma solidity ^0.8.14;
|
|
3
|
+
|
|
4
|
+
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
|
|
5
|
+
|
|
6
|
+
enum Module {
|
|
7
|
+
RESOLVER,
|
|
8
|
+
TIME,
|
|
9
|
+
PROXY,
|
|
10
|
+
SINGLE_EXEC
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
struct ModuleData {
|
|
14
|
+
Module[] modules;
|
|
15
|
+
bytes[] args;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
interface IAutomate {
|
|
19
|
+
function createTask(
|
|
20
|
+
address execAddress,
|
|
21
|
+
bytes calldata execDataOrSelector,
|
|
22
|
+
ModuleData calldata moduleData,
|
|
23
|
+
address feeToken
|
|
24
|
+
) external returns (bytes32 taskId);
|
|
25
|
+
|
|
26
|
+
function cancelTask(bytes32 taskId) external;
|
|
27
|
+
|
|
28
|
+
function getFeeDetails() external view returns (uint256, address);
|
|
29
|
+
|
|
30
|
+
function gelato() external view returns (address payable);
|
|
31
|
+
|
|
32
|
+
function taskTreasury() external view returns (ITaskTreasuryUpgradable);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
interface ITaskTreasuryUpgradable {
|
|
36
|
+
function depositFunds(
|
|
37
|
+
address receiver,
|
|
38
|
+
address token,
|
|
39
|
+
uint256 amount
|
|
40
|
+
) external payable;
|
|
41
|
+
|
|
42
|
+
function withdrawFunds(
|
|
43
|
+
address payable receiver,
|
|
44
|
+
address token,
|
|
45
|
+
uint256 amount
|
|
46
|
+
) external;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
interface IOpsProxyFactory {
|
|
50
|
+
function getProxyOf(address account) external view returns (address, bool);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* @dev Inherit this contract to allow your smart contract to
|
|
55
|
+
* - Make synchronous fee payments.
|
|
56
|
+
* - Have call restrictions for functions to be automated.
|
|
57
|
+
*/
|
|
58
|
+
// solhint-disable private-vars-leading-underscore
|
|
59
|
+
abstract contract AutomateReady {
|
|
60
|
+
IAutomate public immutable automate;
|
|
61
|
+
address public immutable dedicatedMsgSender;
|
|
62
|
+
address private immutable _gelato;
|
|
63
|
+
address internal constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
|
|
64
|
+
address private constant OPS_PROXY_FACTORY =
|
|
65
|
+
0xC815dB16D4be6ddf2685C201937905aBf338F5D7;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* @dev
|
|
69
|
+
* Only tasks created by _taskCreator defined in constructor can call
|
|
70
|
+
* the functions with this modifier.
|
|
71
|
+
*/
|
|
72
|
+
modifier onlyDedicatedMsgSender() {
|
|
73
|
+
require(msg.sender == dedicatedMsgSender, "Only dedicated msg.sender");
|
|
74
|
+
_;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* @dev
|
|
79
|
+
* _taskCreator is the address which will create tasks for this contract.
|
|
80
|
+
*/
|
|
81
|
+
constructor(address _automate, address _taskCreator) {
|
|
82
|
+
automate = IAutomate(_automate);
|
|
83
|
+
_gelato = IAutomate(_automate).gelato();
|
|
84
|
+
(dedicatedMsgSender,) = IOpsProxyFactory(OPS_PROXY_FACTORY).getProxyOf(
|
|
85
|
+
_taskCreator
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* @dev
|
|
91
|
+
* Transfers fee to gelato for synchronous fee payments.
|
|
92
|
+
*
|
|
93
|
+
* _fee & _feeToken should be queried from IAutomate.getFeeDetails()
|
|
94
|
+
*/
|
|
95
|
+
function _transfer(uint256 _fee, address _feeToken) internal {
|
|
96
|
+
if (_feeToken == ETH) {
|
|
97
|
+
(bool success,) = _gelato.call{value: _fee}("");
|
|
98
|
+
require(success, "_transfer: ETH transfer failed");
|
|
99
|
+
} else {
|
|
100
|
+
SafeERC20.safeTransfer(IERC20(_feeToken), _gelato, _fee);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function _getFeeDetails()
|
|
105
|
+
internal
|
|
106
|
+
view
|
|
107
|
+
returns (uint256 fee, address feeToken)
|
|
108
|
+
{
|
|
109
|
+
(fee, feeToken) = automate.getFeeDetails();
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
pragma solidity 0.8.17;
|
|
3
|
+
|
|
4
|
+
import "../core/libraries/BoringOwnableUpgradeable.sol";
|
|
5
|
+
import "../core/StandardizedYield/implementations/ChainlinkRelayer/PendleChainlinkRelayer.sol";
|
|
6
|
+
import "@chainlink/contracts/src/v0.8/AutomationCompatible.sol";
|
|
7
|
+
|
|
8
|
+
contract ChainlinkRelayerAutomation is AutomationCompatible, BoringOwnableUpgradeable {
|
|
9
|
+
PendleChainlinkRelayer internal immutable relayer;
|
|
10
|
+
bytes32 internal constant ZERO_BYTES = bytes32(0);
|
|
11
|
+
|
|
12
|
+
int256 public answerLastSent;
|
|
13
|
+
|
|
14
|
+
constructor(PendleChainlinkRelayer _relayer) initializer {
|
|
15
|
+
__BoringOwnable_init();
|
|
16
|
+
relayer = _relayer;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
receive() external payable {}
|
|
20
|
+
|
|
21
|
+
function withdraw() external onlyOwner {
|
|
22
|
+
payable(owner).transfer(address(this).balance);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function checkUpkeep(
|
|
26
|
+
bytes calldata /*checkData*/
|
|
27
|
+
)
|
|
28
|
+
public
|
|
29
|
+
view
|
|
30
|
+
returns (
|
|
31
|
+
bool upkeepNeeded,
|
|
32
|
+
bytes memory /*performData*/
|
|
33
|
+
)
|
|
34
|
+
{
|
|
35
|
+
(upkeepNeeded, ) = _checkUpkeep();
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function performUpkeep(
|
|
39
|
+
bytes calldata /*performData*/
|
|
40
|
+
) public {
|
|
41
|
+
(bool upkeepNeeded, int256 latestAnswer) = _checkUpkeep();
|
|
42
|
+
require(upkeepNeeded, "no upkeep needed");
|
|
43
|
+
|
|
44
|
+
relayer.run{ value: address(this).balance }();
|
|
45
|
+
answerLastSent = latestAnswer;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function _checkUpkeep() internal view returns (bool upkeepNeeded, int256 latestAnswer) {
|
|
49
|
+
latestAnswer = IChainlinkAggregator(relayer.chainlinkFeed()).latestAnswer();
|
|
50
|
+
return (latestAnswer != answerLastSent, latestAnswer);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
pragma solidity 0.8.17;
|
|
3
|
+
|
|
4
|
+
import "./AutomateReady.sol";
|
|
5
|
+
import "../core/libraries/BoringOwnableUpgradeable.sol";
|
|
6
|
+
import "../core/StandardizedYield/implementations/ChainlinkRelayer/PendleChainlinkRelayer.sol";
|
|
7
|
+
|
|
8
|
+
contract ChainlinkRelayerGelato is AutomateReady, BoringOwnableUpgradeable {
|
|
9
|
+
PendleChainlinkRelayer public immutable relayer;
|
|
10
|
+
|
|
11
|
+
int256 public lastSentAnswer;
|
|
12
|
+
|
|
13
|
+
constructor(address _automate, address _taskCreator, PendleChainlinkRelayer _relayer) initializer
|
|
14
|
+
AutomateReady(_automate, _taskCreator) {
|
|
15
|
+
__BoringOwnable_init();
|
|
16
|
+
relayer = _relayer;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
receive() external payable {}
|
|
20
|
+
|
|
21
|
+
function withdraw() external onlyOwner {
|
|
22
|
+
payable(owner).transfer(address(this).balance);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function run() external {
|
|
26
|
+
int256 latestAnswer = IChainlinkAggregator(relayer.chainlinkFeed()).latestAnswer();
|
|
27
|
+
require(lastSentAnswer != latestAnswer, "answer not new");
|
|
28
|
+
|
|
29
|
+
(uint256 fee, address feeToken) = _getFeeDetails();
|
|
30
|
+
_transfer(fee, feeToken);
|
|
31
|
+
|
|
32
|
+
relayer.run{value: address(this).balance}();
|
|
33
|
+
lastSentAnswer = latestAnswer;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
pragma solidity 0.8.17;
|
|
2
|
+
|
|
3
|
+
library SDKErrorsDirectory {
|
|
4
|
+
error BulkInsufficientSyForTrade(uint256 currentAmount, uint256 requiredAmount);
|
|
5
|
+
error BulkInsufficientTokenForTrade(uint256 currentAmount, uint256 requiredAmount);
|
|
6
|
+
error BulkInSufficientSyOut(uint256 actualSyOut, uint256 requiredSyOut);
|
|
7
|
+
error BulkInSufficientTokenOut(uint256 actualTokenOut, uint256 requiredTokenOut);
|
|
8
|
+
error BulkInsufficientSyReceived(uint256 actualBalance, uint256 requiredBalance);
|
|
9
|
+
error BulkNotMaintainer();
|
|
10
|
+
error BulkNotAdmin();
|
|
11
|
+
error BulkSellerAlreadyExisted(address token, address SY, address bulk);
|
|
12
|
+
error BulkSellerInvalidToken(address token, address SY);
|
|
13
|
+
error BulkBadRateTokenToSy(uint256 actualRate, uint256 currentRate, uint256 eps);
|
|
14
|
+
error BulkBadRateSyToToken(uint256 actualRate, uint256 currentRate, uint256 eps);
|
|
15
|
+
error ApproxFail();
|
|
16
|
+
error ApproxParamsInvalid(uint256 guessMin, uint256 guessMax, uint256 eps);
|
|
17
|
+
error ApproxBinarySearchInputInvalid(
|
|
18
|
+
uint256 approxGuessMin,
|
|
19
|
+
uint256 approxGuessMax,
|
|
20
|
+
uint256 minGuessMin,
|
|
21
|
+
uint256 maxGuessMax
|
|
22
|
+
);
|
|
23
|
+
error MarketExpired();
|
|
24
|
+
error MarketZeroAmountsInput();
|
|
25
|
+
error MarketZeroAmountsOutput();
|
|
26
|
+
error MarketZeroLnImpliedRate();
|
|
27
|
+
error MarketInsufficientPtForTrade(int256 currentAmount, int256 requiredAmount);
|
|
28
|
+
error MarketInsufficientPtReceived(uint256 actualBalance, uint256 requiredBalance);
|
|
29
|
+
error MarketInsufficientSyReceived(uint256 actualBalance, uint256 requiredBalance);
|
|
30
|
+
error MarketZeroTotalPtOrTotalAsset(int256 totalPt, int256 totalAsset);
|
|
31
|
+
error MarketExchangeRateBelowOne(int256 exchangeRate);
|
|
32
|
+
error MarketProportionMustNotEqualOne();
|
|
33
|
+
error MarketRateScalarBelowZero(int256 rateScalar);
|
|
34
|
+
error MarketScalarRootBelowZero(int256 scalarRoot);
|
|
35
|
+
error MarketProportionTooHigh(int256 proportion, int256 maxProportion);
|
|
36
|
+
error OracleUninitialized();
|
|
37
|
+
error OracleTargetTooOld(uint32 target, uint32 oldest);
|
|
38
|
+
error OracleZeroCardinality();
|
|
39
|
+
error MarketFactoryExpiredPt();
|
|
40
|
+
error MarketFactoryInvalidPt();
|
|
41
|
+
error MarketFactoryMarketExists();
|
|
42
|
+
error MarketFactoryLnFeeRateRootTooHigh(uint80 lnFeeRateRoot, uint256 maxLnFeeRateRoot);
|
|
43
|
+
error MarketFactoryReserveFeePercentTooHigh(
|
|
44
|
+
uint8 reserveFeePercent,
|
|
45
|
+
uint8 maxReserveFeePercent
|
|
46
|
+
);
|
|
47
|
+
error MarketFactoryZeroTreasury();
|
|
48
|
+
error MarketFactoryInitialAnchorTooLow(int256 initialAnchor, int256 minInitialAnchor);
|
|
49
|
+
error RouterInsufficientLpOut(uint256 actualLpOut, uint256 requiredLpOut);
|
|
50
|
+
error RouterInsufficientSyOut(uint256 actualSyOut, uint256 requiredSyOut);
|
|
51
|
+
error RouterInsufficientPtOut(uint256 actualPtOut, uint256 requiredPtOut);
|
|
52
|
+
error RouterInsufficientYtOut(uint256 actualYtOut, uint256 requiredYtOut);
|
|
53
|
+
error RouterInsufficientPYOut(uint256 actualPYOut, uint256 requiredPYOut);
|
|
54
|
+
error RouterInsufficientTokenOut(uint256 actualTokenOut, uint256 requiredTokenOut);
|
|
55
|
+
error RouterExceededLimitSyIn(uint256 actualSyIn, uint256 limitSyIn);
|
|
56
|
+
error RouterExceededLimitPtIn(uint256 actualPtIn, uint256 limitPtIn);
|
|
57
|
+
error RouterExceededLimitYtIn(uint256 actualYtIn, uint256 limitYtIn);
|
|
58
|
+
error RouterInsufficientSyRepay(uint256 actualSyRepay, uint256 requiredSyRepay);
|
|
59
|
+
error RouterInsufficientPtRepay(uint256 actualPtRepay, uint256 requiredPtRepay);
|
|
60
|
+
error RouterNotAllSyUsed(uint256 netSyDesired, uint256 netSyUsed);
|
|
61
|
+
error RouterTimeRangeZero();
|
|
62
|
+
error RouterCallbackNotPendleMarket(address caller);
|
|
63
|
+
error RouterInvalidAction(bytes4 selector);
|
|
64
|
+
error RouterInvalidFacet(address facet);
|
|
65
|
+
error RouterKyberSwapDataZero();
|
|
66
|
+
error YCExpired();
|
|
67
|
+
error YCNotExpired();
|
|
68
|
+
error YieldContractInsufficientSy(uint256 actualSy, uint256 requiredSy);
|
|
69
|
+
error YCNothingToRedeem();
|
|
70
|
+
error YCPostExpiryDataNotSet();
|
|
71
|
+
error YCNoFloatingSy();
|
|
72
|
+
error YCFactoryInvalidExpiry();
|
|
73
|
+
error YCFactoryYieldContractExisted();
|
|
74
|
+
error YCFactoryZeroExpiryDivisor();
|
|
75
|
+
error YCFactoryZeroTreasury();
|
|
76
|
+
error YCFactoryInterestFeeRateTooHigh(uint256 interestFeeRate, uint256 maxInterestFeeRate);
|
|
77
|
+
error YCFactoryRewardFeeRateTooHigh(uint256 newRewardFeeRate, uint256 maxRewardFeeRate);
|
|
78
|
+
error SYInvalidTokenIn(address token);
|
|
79
|
+
error SYInvalidTokenOut(address token);
|
|
80
|
+
error SYZeroDeposit();
|
|
81
|
+
error SYZeroRedeem();
|
|
82
|
+
error SYInsufficientSharesOut(uint256 actualSharesOut, uint256 requiredSharesOut);
|
|
83
|
+
error SYInsufficientTokenOut(uint256 actualTokenOut, uint256 requiredTokenOut);
|
|
84
|
+
error SYQiTokenMintFailed(uint256 errCode);
|
|
85
|
+
error SYQiTokenRedeemFailed(uint256 errCode);
|
|
86
|
+
error SYQiTokenRedeemRewardsFailed(uint256 rewardAccruedType0, uint256 rewardAccruedType1);
|
|
87
|
+
error SYQiTokenBorrowRateTooHigh(uint256 borrowRate, uint256 borrowRateMax);
|
|
88
|
+
error SYCurveInvalidPid();
|
|
89
|
+
error SYCurve3crvPoolNotFound();
|
|
90
|
+
error SYApeDepositAmountTooSmall(uint256 amountDeposited);
|
|
91
|
+
error SYBalancerInvalidPid();
|
|
92
|
+
error SYInvalidRewardToken(address token);
|
|
93
|
+
error SYStargateRedeemCapExceeded(uint256 amountLpDesired, uint256 amountLpRedeemable);
|
|
94
|
+
error SYBalancerReentrancy();
|
|
95
|
+
error NotFromTrustedRemote(uint16 srcChainId, bytes path);
|
|
96
|
+
error VCInactivePool(address pool);
|
|
97
|
+
error VCPoolAlreadyActive(address pool);
|
|
98
|
+
error VCZeroVePendle(address user);
|
|
99
|
+
error VCExceededMaxWeight(uint256 totalWeight, uint256 maxWeight);
|
|
100
|
+
error VCEpochNotFinalized(uint256 wTime);
|
|
101
|
+
error VCPoolAlreadyAddAndRemoved(address pool);
|
|
102
|
+
error VEInvalidNewExpiry(uint256 newExpiry);
|
|
103
|
+
error VEExceededMaxLockTime();
|
|
104
|
+
error VEInsufficientLockTime();
|
|
105
|
+
error VENotAllowedReduceExpiry();
|
|
106
|
+
error VEZeroAmountLocked();
|
|
107
|
+
error VEPositionNotExpired();
|
|
108
|
+
error VEZeroPosition();
|
|
109
|
+
error VEZeroSlope(uint128 bias, uint128 slope);
|
|
110
|
+
error VEReceiveOldSupply(uint256 msgTime);
|
|
111
|
+
error GCNotPendleMarket(address caller);
|
|
112
|
+
error GCNotVotingController(address caller);
|
|
113
|
+
error InvalidWTime(uint256 wTime);
|
|
114
|
+
error ExpiryInThePast(uint256 expiry);
|
|
115
|
+
error ChainNotSupported(uint256 chainId);
|
|
116
|
+
error FDTotalAmountFundedNotMatch(uint256 actualTotalAmount, uint256 expectedTotalAmount);
|
|
117
|
+
error FDEpochLengthMismatch();
|
|
118
|
+
error FDInvalidPool(address pool);
|
|
119
|
+
error FDPoolAlreadyExists(address pool);
|
|
120
|
+
error FDInvalidNewFinishedEpoch(uint256 oldFinishedEpoch, uint256 newFinishedEpoch);
|
|
121
|
+
error FDInvalidStartEpoch(uint256 startEpoch);
|
|
122
|
+
error FDInvalidWTimeFund(uint256 lastFunded, uint256 wTime);
|
|
123
|
+
error FDFutureFunding(uint256 lastFunded, uint256 currentWTime);
|
|
124
|
+
error BDInvalidEpoch(uint256 epoch, uint256 startTime);
|
|
125
|
+
error MsgNotFromSendEndpoint(uint16 srcChainId, bytes path);
|
|
126
|
+
error MsgNotFromReceiveEndpoint(address sender);
|
|
127
|
+
error InsufficientFeeToSendMsg(uint256 currentFee, uint256 requiredFee);
|
|
128
|
+
error ApproxDstExecutionGasNotSet();
|
|
129
|
+
error InvalidRetryData();
|
|
130
|
+
error ArrayLengthMismatch();
|
|
131
|
+
error ArrayEmpty();
|
|
132
|
+
error ArrayOutOfBounds();
|
|
133
|
+
error ZeroAddress();
|
|
134
|
+
error FailedToSendEther();
|
|
135
|
+
error InvalidMerkleProof();
|
|
136
|
+
error OnlyLayerZeroEndpoint();
|
|
137
|
+
error OnlyYT();
|
|
138
|
+
error OnlyYCFactory();
|
|
139
|
+
error OnlyWhitelisted();
|
|
140
|
+
error SAInsufficientTokenIn(address tokenIn, uint256 amountExpected, uint256 amountActual);
|
|
141
|
+
error UnsupportedSelector(uint256 aggregatorType, bytes4 selector);
|
|
142
|
+
error MinimumStakeAmountNotReached(uint256 amountToStake, uint256 minimumStakeAmount);
|
|
143
|
+
error MinimumRedeemAmountNotReached(uint256 amountToRedeem, uint256 minimumRedeemAmount);
|
|
144
|
+
error UnstakeCapacityTooLow(uint256 amountBondToRedeem, uint256 unstakeCapacity);
|
|
145
|
+
error InvalidTokenId(uint256 tokenId, uint256 positionId);
|
|
146
|
+
error InvalidBlockRate(uint256 blockCycleNumerator);
|
|
147
|
+
error TwapDurationTooLarge(uint32 duration, uint32 cardinalityRequired);
|
|
148
|
+
error OracleNotReady(bool increaseCardinalityRequired, bool oldestObservationSatisfied);
|
|
149
|
+
}
|
|
@@ -4,9 +4,14 @@ pragma solidity 0.8.17;
|
|
|
4
4
|
import "../../core/libraries/TokenHelper.sol";
|
|
5
5
|
import "./IPSwapAggregator.sol";
|
|
6
6
|
import "./kyberswap/KyberInputScalingHelper.sol";
|
|
7
|
-
import "./
|
|
7
|
+
import "./oneinch/OneInchAggregationRouterHelper.sol";
|
|
8
8
|
|
|
9
|
-
contract PendleSwap is
|
|
9
|
+
contract PendleSwap is
|
|
10
|
+
IPSwapAggregator,
|
|
11
|
+
TokenHelper,
|
|
12
|
+
KyberInputScalingHelper,
|
|
13
|
+
OneInchAggregationRouterHelper
|
|
14
|
+
{
|
|
10
15
|
using Address for address;
|
|
11
16
|
|
|
12
17
|
function swap(
|