@pendle/core-v2 0.20.1-testnet → 0.21.0-testnet
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol/PendleMsgReceiveEndpointUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol/PendleMsgReceiveEndpointUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiverAppUpg.sol/PendleMsgReceiverAppUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol/PendleMsgSendEndpointUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol/PendleMsgSendEndpointUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSenderAppUpg.sol/PendleMsgSenderAppUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol/LayerZeroHelper.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol/LayerZeroHelper.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.json +34 -2
- package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol/VotingEscrowTokenBase.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.json +2 -2
- package/build/artifacts/contracts/core/BulkSeller/BulkSeller.sol/BulkSeller.dbg.json +1 -1
- package/build/artifacts/contracts/core/BulkSeller/BulkSeller.sol/BulkSeller.json +2 -2
- package/build/artifacts/contracts/core/BulkSeller/BulkSellerFactory.sol/BulkSellerFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/BulkSeller/BulkSellerFactory.sol/BulkSellerFactory.json +2 -2
- package/build/artifacts/contracts/core/BulkSeller/BulkSellerMathCore.sol/BulkSellerMathCore.dbg.json +1 -1
- package/build/artifacts/contracts/core/BulkSeller/BulkSellerMathCore.sol/BulkSellerMathCore.json +2 -2
- package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.json +2 -2
- package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.json +2 -2
- package/build/artifacts/contracts/core/Market/PendleGauge.sol/PendleGauge.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.json +2 -2
- package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.json +2 -2
- package/build/artifacts/contracts/core/RewardManager/RewardManager.sol/RewardManager.dbg.json +1 -1
- package/build/artifacts/contracts/core/RewardManager/RewardManagerAbstract.sol/RewardManagerAbstract.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/SYBase.sol/SYBase.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/SYBase.sol/SYBase.json +141 -0
- package/build/artifacts/contracts/core/StandardizedYield/SYBaseWithRewards.sol/SYBaseWithRewards.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/SYBaseWithRewards.sol/SYBaseWithRewards.json +141 -0
- package/build/artifacts/contracts/core/StandardizedYield/StEthHelper.sol/StEthHelper.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/StEthHelper.sol/StEthHelper.json +10 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ape/sAPE.sol/sAPE.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ape/sAPE.sol/sAPE.json +143 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAura3EthSY.sol/PendleAura3EthSY.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAura3EthSY.sol/PendleAura3EthSY.json +1257 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraCbethWstethSY.sol/PendleAuraCbethWstethSY.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraCbethWstethSY.sol/PendleAuraCbethWstethSY.json +1244 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRethSY.sol/PendleAuraWethRethSY.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRethSY.sol/PendleAuraWethRethSY.json +1218 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSY.sol/PendleAuraWethWstethSY.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSY.sol/PendleAuraWethWstethSY.json +1192 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStableMath.sol/ComposableStableMath.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStableMath.sol/ComposableStableMath.json +10 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreview.sol/ComposableStablePreview.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreview.sol/ComposableStablePreview.json +133 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/FixedPoint.sol/FixedPoint.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/FixedPoint.sol/FixedPoint.json +10 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStableMath.sol/MetaStableMath.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStableMath.sol/MetaStableMath.json +40 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStablePreview.sol/MetaStablePreview.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStablePreview.sol/MetaStablePreview.json +322 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/PendleAuraBalancerStableLPSY.sol/PendleAuraBalancerStableLPSY.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/PendleAuraBalancerStableLPSY.sol/PendleAuraBalancerStableLPSY.json +1171 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePoolUserData.sol/StablePoolUserData.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePoolUserData.sol/StablePoolUserData.json +10 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePreviewBase.sol/StablePreviewBase.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePreviewBase.sol/StablePreviewBase.json +133 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.json +2 -2
- 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 +143 -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 +143 -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 +143 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/PendleConvexLPSY.sol/PendleConvexLPSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/PendleConvexLPSY.sol/PendleConvexLPSY.json +141 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleLooksStakingSY.sol/PendleLooksStakingSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleLooksStakingSY.sol/PendleLooksStakingSY.json +143 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol/PendleWstEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol/PendleWstEthSY.json +143 -2
- package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.json +2 -2
- 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/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/Errors.sol/Errors.json +39 -2
- package/build/artifacts/contracts/interfaces/Balancer/IAsset.sol/IAsset.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Balancer/IAsset.sol/IAsset.json +10 -0
- package/build/artifacts/contracts/interfaces/Balancer/IBalancerFees.sol/IBalancerFees.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Balancer/IBalancerFees.sol/IBalancerFees.json +24 -0
- package/build/artifacts/contracts/interfaces/Balancer/IBalancerStablePreview.sol/IBalancerStablePreview.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Balancer/IBalancerStablePreview.sol/IBalancerStablePreview.json +133 -0
- package/build/artifacts/contracts/interfaces/Balancer/IBasePool.sol/IBasePool.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Balancer/IBasePool.sol/IBasePool.json +328 -0
- package/build/artifacts/contracts/interfaces/Balancer/IComposableStable.sol/IComposableStable.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Balancer/IComposableStable.sol/IComposableStable.json +467 -0
- package/build/artifacts/contracts/interfaces/Balancer/IGauge.sol/IGauge.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Balancer/IGauge.sol/IGauge.json +61 -0
- package/build/artifacts/contracts/interfaces/Balancer/ILiquidityGaugeFactory.sol/ILiquidityGaugeFactory.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Balancer/ILiquidityGaugeFactory.sol/ILiquidityGaugeFactory.json +30 -0
- package/build/artifacts/contracts/interfaces/Balancer/IMetaStablePool.sol/IMetaStablePool.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Balancer/IMetaStablePool.sol/IMetaStablePool.json +398 -0
- package/build/artifacts/contracts/interfaces/Balancer/IRateProvider.sol/IRateProvider.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Balancer/IRateProvider.sol/IRateProvider.json +24 -0
- package/build/artifacts/contracts/interfaces/Balancer/IVault.sol/IVault.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Balancer/IVault.sol/IVault.json +278 -0
- package/build/artifacts/contracts/interfaces/ConvexCurve/IRewards.sol/IRewards.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ConvexCurve/IRewards.sol/IRewards.json +18 -0
- package/build/artifacts/contracts/interfaces/IApeStaking.sol/IApeStaking.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiq.sol/IPActionAddRemoveLiq.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMintRedeem.sol/IPActionMintRedeem.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapPT.sol/IPActionSwapPT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapPTYT.sol/IPActionSwapPTYT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapYT.sol/IPActionSwapYT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllAction.sol/IPAllAction.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPBulkSeller.sol/IPBulkSeller.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPFeeDistributor.sol/IPFeeDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPFeeDistributor.sol/IPFeeDistributor.json +19 -0
- package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPVotingController.sol/IPVotingController.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPVotingEscrowMainchain.sol/IPVotingEscrowMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BulkSellerOffchain.sol/BulkSellerOffchain.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BulkSellerOffchain.sol/BulkSellerOffchain.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/MarketMathStatic.sol/MarketMathStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/MarketMathStatic.sol/MarketMathStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/Multicall2.sol/Multicall2.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/Multicall2.sol/Multicall2.json +322 -0
- package/build/artifacts/contracts/offchain-helpers/PendleMulticall.sol/PendleMulticall.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/PendleMulticall.sol/PendleMulticall.json +47 -0
- package/build/artifacts/contracts/offchain-helpers/RouterStatic.sol/RouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/RouterStatic.sol/RouterStatic.json +2 -2
- package/build/artifacts/contracts/router/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.json +2 -2
- package/build/artifacts/contracts/router/ActionCallback.sol/ActionCallback.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionCallback.sol/ActionCallback.json +2 -2
- package/build/artifacts/contracts/router/ActionMintRedeem.sol/ActionMintRedeem.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionMintRedeem.sol/ActionMintRedeem.json +2 -2
- package/build/artifacts/contracts/router/ActionMisc.sol/ActionMisc.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionMisc.sol/ActionMisc.json +2 -2
- package/build/artifacts/contracts/router/ActionSwapPT.sol/ActionSwapPT.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapPT.sol/ActionSwapPT.json +2 -2
- package/build/artifacts/contracts/router/ActionSwapPTYT.sol/ActionSwapPTYT.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapPTYT.sol/ActionSwapPTYT.json +2 -2
- package/build/artifacts/contracts/router/ActionSwapYT.sol/ActionSwapYT.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapYT.sol/ActionSwapYT.json +2 -2
- package/build/artifacts/contracts/router/PendleRouter.sol/PendleRouter.dbg.json +1 -1
- package/build/artifacts/contracts/router/PendleRouter.sol/PendleRouter.json +2 -2
- package/build/artifacts/contracts/router/base/ActionBaseMintRedeem.sol/ActionBaseMintRedeem.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtInLib.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtInLib.json +2 -2
- package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtOutLib.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtOutLib.json +2 -2
- package/build/artifacts/contracts/router/kyberswap/AggregationRouterHelper.sol/AggregationRouterHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/kyberswap/AggregationRouterHelper.sol/AggregationRouterHelper.json +2 -2
- package/build/artifacts/contracts/router/kyberswap/IAggregatorRouterHelper.sol/IAggregationRouterHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/kyberswap/KyberSwapHelper.sol/KyberSwapHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/kyberswap/ScaleDataHelperEthereum1.sol/ScaleDataHelperEthereum1.dbg.json +4 -0
- package/build/artifacts/contracts/router/kyberswap/ScaleDataHelperEthereum1.sol/ScaleDataHelperEthereum1.json +10 -0
- package/build/artifacts/contracts/router/kyberswap/interfaces/IAggregationExecutor.sol/IAggregationExecutor.dbg.json +4 -0
- package/build/artifacts/contracts/router/kyberswap/interfaces/IAggregationExecutor.sol/IAggregationExecutor.json +65 -0
- package/build/artifacts/contracts/router/kyberswap/interfaces/IExecutorHelperEthereum1.sol/IExecutorHelperEthereum1.dbg.json +4 -0
- package/build/artifacts/contracts/router/kyberswap/interfaces/IExecutorHelperEthereum1.sol/IExecutorHelperEthereum1.json +388 -0
- package/build/artifacts/contracts/router/kyberswap/interfaces/IHashflow.sol/IHashflow.dbg.json +4 -0
- package/build/artifacts/contracts/router/kyberswap/interfaces/IHashflow.sol/IHashflow.json +101 -0
- package/build/artifacts/contracts/router/kyberswap/interfaces/IMetaAggregationRouter.sol/IMetaAggregationRouter.dbg.json +4 -0
- package/build/artifacts/contracts/router/kyberswap/interfaces/IMetaAggregationRouter.sol/IMetaAggregationRouter.json +183 -0
- package/build/artifacts/contracts/router/kyberswap/interfaces/IMetaAggregationRouterV2.sol/IMetaAggregationRouterV2.dbg.json +4 -0
- package/build/artifacts/contracts/router/kyberswap/interfaces/IMetaAggregationRouterV2.sol/IMetaAggregationRouterV2.json +215 -0
- package/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol +7 -9
- package/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol +10 -0
- package/contracts/core/StandardizedYield/SYBase.sol +23 -5
- package/contracts/core/StandardizedYield/StEthHelper.sol +71 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAura3EthSY.sol +170 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraCbethWstethSY.sol +162 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRethSY.sol +134 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSY.sol +154 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStableMath.sol +289 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreview.sol +618 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/FixedPoint.sol +68 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStableMath.sol +322 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStablePreview.sol +390 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/PendleAuraBalancerStableLPSY.sol +329 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePoolUserData.sol +30 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePreviewBase.sol +189 -0
- package/contracts/core/libraries/ArrayLib.sol +6 -3
- package/contracts/core/libraries/Errors.sol +4 -0
- package/contracts/interfaces/Balancer/IAsset.sol +4 -0
- package/contracts/interfaces/Balancer/IBalancerFees.sol +6 -0
- package/contracts/interfaces/Balancer/IBalancerStablePreview.sol +22 -0
- package/contracts/interfaces/Balancer/IBasePool.sol +30 -0
- package/contracts/interfaces/Balancer/IComposableStable.sol +39 -0
- package/contracts/interfaces/Balancer/IGauge.sol +10 -0
- package/contracts/interfaces/Balancer/ILiquidityGaugeFactory.sol +6 -0
- package/contracts/interfaces/Balancer/IMetaStablePool.sol +31 -0
- package/contracts/interfaces/Balancer/IRateProvider.sol +6 -0
- package/contracts/interfaces/Balancer/IVault.sol +78 -0
- package/contracts/interfaces/ConvexCurve/IRewards.sol +5 -0
- package/contracts/interfaces/IApeStaking.sol +1 -1
- package/contracts/interfaces/IPFeeDistributor.sol +2 -0
- package/contracts/offchain-helpers/Multicall2.sol +103 -0
- package/contracts/offchain-helpers/PendleMulticall.sol +26 -0
- package/contracts/router/kyberswap/AggregationRouterHelper.sol +193 -205
- package/contracts/router/kyberswap/ScaleDataHelperEthereum1.sol +147 -0
- package/contracts/router/kyberswap/interfaces/IAggregationExecutor.sol +17 -0
- package/contracts/router/kyberswap/interfaces/IExecutorHelperEthereum1.sol +191 -0
- package/contracts/router/kyberswap/interfaces/IHashflow.sol +30 -0
- package/contracts/router/kyberswap/interfaces/IMetaAggregationRouter.sol +33 -0
- package/contracts/router/kyberswap/interfaces/IMetaAggregationRouterV2.sol +42 -0
- package/deployments/43113-helper.json +2 -1
- package/deployments/80001-helper.json +2 -1
- package/deployments/80001-markets/USDC-DEC-8TH.json +10 -0
- package/package.json +6 -6
- package/typechain-types/GMXPreviewHelper.ts +134 -0
- package/typechain-types/I1inchAggregationRouterV5.ts +257 -0
- package/typechain-types/IAggregationExecutor.ts +182 -0
- package/typechain-types/IExecutorHelperEthereum1.ts +643 -0
- package/typechain-types/IGMXVault.ts +494 -0
- package/typechain-types/IGlpManager.ts +115 -0
- package/typechain-types/IHashflow.ts +159 -0
- package/typechain-types/IKyberSwapAggregationRouterHelper.ts +109 -0
- package/typechain-types/IMetaAggregationRouter.ts +213 -0
- package/typechain-types/IMetaAggregationRouterV2.ts +221 -0
- package/typechain-types/IPFeeDistributor.ts +18 -0
- package/typechain-types/IPYieldTokenV2.ts +915 -0
- package/typechain-types/IRewardRouterV2.ts +303 -0
- package/typechain-types/IRewards.ts +35 -5
- package/typechain-types/ISwapAggregator.ts +124 -0
- package/typechain-types/IVaultPriceFeed.ts +114 -0
- package/typechain-types/InterestManagerYTV2.ts +124 -0
- package/typechain-types/PendleAura3EthSY.ts +0 -39
- package/typechain-types/PendleAuraCbethWstethSY.ts +0 -39
- package/typechain-types/PendleAuraWethWstethSY.ts +0 -39
- package/typechain-types/PendleConvexLPSY.ts +204 -0
- package/typechain-types/PendleCurveFraxUsdcSY.ts +204 -0
- package/typechain-types/PendleCurveUsdd3CrvSY.ts +204 -0
- package/typechain-types/PendleFeeDistributor.ts +37 -0
- package/typechain-types/PendleGlpSY.ts +1449 -0
- package/typechain-types/PendleLooksStakingSY.ts +204 -0
- package/typechain-types/PendleMulticall.ts +110 -0
- package/typechain-types/PendlePrincipalTokenV2.ts +614 -0
- package/typechain-types/PendleQiTokenSY.ts +204 -0
- package/typechain-types/PendleWstEthSY.ts +204 -0
- package/typechain-types/PendleYieldContractFactoryV2.ts +801 -0
- package/typechain-types/PendleYieldTokenV2.ts +1304 -0
- package/typechain-types/SAPE.ts +204 -0
- package/typechain-types/SYBase.ts +204 -0
- package/typechain-types/SYBaseWithRewards.ts +204 -0
- package/typechain-types/SwapAggregator.ts +406 -0
- package/typechain-types/factories/ActionAddRemoveLiq__factory.ts +1 -1
- package/typechain-types/factories/ActionCallback__factory.ts +1 -1
- package/typechain-types/factories/ActionMintRedeem__factory.ts +1 -1
- package/typechain-types/factories/ActionMisc__factory.ts +1 -1
- package/typechain-types/factories/ActionSwapPTYT__factory.ts +1 -1
- package/typechain-types/factories/ActionSwapPT__factory.ts +1 -1
- package/typechain-types/factories/ActionSwapYT__factory.ts +1 -1
- package/typechain-types/factories/AggregationRouterHelper__factory.ts +1 -1
- package/typechain-types/factories/BulkSellerFactory__factory.ts +1 -1
- package/typechain-types/factories/BulkSellerOffchain__factory.ts +1 -1
- package/typechain-types/factories/BulkSeller__factory.ts +1 -1
- package/typechain-types/factories/Errors__factory.ts +38 -1
- package/typechain-types/factories/GMXPreviewHelper__factory.ts +78 -0
- package/typechain-types/factories/I1inchAggregationRouterV5__factory.ts +179 -0
- package/typechain-types/factories/IAggregationExecutor__factory.ts +84 -0
- package/typechain-types/factories/IExecutorHelperEthereum1__factory.ts +407 -0
- package/typechain-types/factories/IGMXVault__factory.ts +320 -0
- package/typechain-types/factories/IGlpManager__factory.ts +55 -0
- package/typechain-types/factories/IHashflow__factory.ts +113 -0
- package/typechain-types/factories/IKyberSwapAggregationRouterHelper__factory.ts +56 -0
- package/typechain-types/factories/IMetaAggregationRouterV2__factory.ts +234 -0
- package/typechain-types/factories/IMetaAggregationRouter__factory.ts +202 -0
- package/typechain-types/factories/IPFeeDistributor__factory.ts +19 -0
- package/typechain-types/factories/IPYieldTokenV2__factory.ts +702 -0
- package/typechain-types/factories/IRewardRouterV2__factory.ts +180 -0
- package/typechain-types/factories/IRewards__factory.ts +18 -0
- package/typechain-types/factories/ISwapAggregator__factory.ts +66 -0
- package/typechain-types/factories/IVaultPriceFeed__factory.ts +60 -0
- package/typechain-types/factories/InterestManagerYTV2__factory.ts +63 -0
- package/typechain-types/factories/MarketMathStatic__factory.ts +1 -1
- package/typechain-types/factories/OracleLib__factory.ts +1 -1
- package/typechain-types/factories/PendleAura3EthSY__factory.ts +1 -40
- package/typechain-types/factories/PendleAuraCbethWstethSY__factory.ts +1 -40
- package/typechain-types/factories/PendleAuraWethWstethSY__factory.ts +1 -40
- package/typechain-types/factories/PendleConvexLPSY__factory.ts +141 -0
- package/typechain-types/factories/PendleCurveFraxUsdcSY__factory.ts +142 -1
- package/typechain-types/factories/PendleCurveUsdd3CrvSY__factory.ts +142 -1
- package/typechain-types/factories/PendleFeeDistributor__factory.ts +33 -1
- package/typechain-types/factories/PendleGaugeControllerMainchainUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleGaugeControllerSidechainUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleGlpSY__factory.ts +1255 -0
- package/typechain-types/factories/PendleLooksStakingSY__factory.ts +142 -1
- package/typechain-types/factories/PendleMarketFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleMarket__factory.ts +1 -1
- package/typechain-types/factories/PendleMsgReceiveEndpointUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleMsgSendEndpointUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleMulticall__factory.ts +100 -0
- package/typechain-types/factories/PendlePrincipalTokenV2__factory.ts +564 -0
- package/typechain-types/factories/PendlePrincipalToken__factory.ts +1 -1
- package/typechain-types/factories/PendleQiTokenHelper__factory.ts +1 -1
- package/typechain-types/factories/PendleQiTokenSY__factory.ts +142 -1
- package/typechain-types/factories/PendleRouter__factory.ts +1 -1
- package/typechain-types/factories/PendleVotingControllerUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleWstEthSY__factory.ts +142 -1
- package/typechain-types/factories/PendleYieldContractFactoryV2__factory.ts +674 -0
- package/typechain-types/factories/PendleYieldContractFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleYieldTokenV2__factory.ts +1122 -0
- package/typechain-types/factories/PendleYieldToken__factory.ts +1 -1
- package/typechain-types/factories/RouterStatic__factory.ts +1 -1
- package/typechain-types/factories/SAPE__factory.ts +142 -1
- package/typechain-types/factories/SYBaseWithRewards__factory.ts +141 -0
- package/typechain-types/factories/SYBase__factory.ts +141 -0
- package/typechain-types/factories/SwapAggregator__factory.ts +309 -0
- package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +1 -1
- package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +1 -1
- package/typechain-types/hardhat.d.ts +103 -13
- package/typechain-types/index.ts +24 -4
- package/build/artifacts/contracts/router/kyberswap/IMultihopRouterEthereum.sol/IMultihopRouterEthereum.dbg.json +0 -4
- package/build/artifacts/contracts/router/kyberswap/IMultihopRouterEthereum.sol/IMultihopRouterEthereum.json +0 -136
- package/contracts/router/kyberswap/IMultihopRouterEthereum.sol +0 -141
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity 0.8.17;
|
|
3
|
+
|
|
4
|
+
import "./IBasePool.sol";
|
|
5
|
+
import "./IRateProvider.sol";
|
|
6
|
+
|
|
7
|
+
interface IComposableStable is IBasePool {
|
|
8
|
+
function getLastJoinExitData()
|
|
9
|
+
external
|
|
10
|
+
view
|
|
11
|
+
returns (uint256 lastJoinExitAmplification, uint256 lastPostJoinExitInvariant);
|
|
12
|
+
|
|
13
|
+
function getAmplificationParameter()
|
|
14
|
+
external
|
|
15
|
+
view
|
|
16
|
+
returns (
|
|
17
|
+
uint256 value,
|
|
18
|
+
bool isUpdating,
|
|
19
|
+
uint256 precision
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
function getProtocolFeePercentageCache(uint256 feeType) external view returns (uint256);
|
|
23
|
+
|
|
24
|
+
function isTokenExemptFromYieldProtocolFee(IERC20 token) external view returns (bool);
|
|
25
|
+
|
|
26
|
+
function getTokenRateCache(IERC20 token)
|
|
27
|
+
external
|
|
28
|
+
view
|
|
29
|
+
returns (
|
|
30
|
+
uint256 rate,
|
|
31
|
+
uint256 oldRate,
|
|
32
|
+
uint256 duration,
|
|
33
|
+
uint256 expires
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
function getRateProviders() external view returns (IRateProvider[] memory);
|
|
37
|
+
|
|
38
|
+
function getBptIndex() external view returns (uint256);
|
|
39
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity 0.8.17;
|
|
3
|
+
|
|
4
|
+
interface IGauge {
|
|
5
|
+
function claim_rewards(address _addr, address _receiver) external;
|
|
6
|
+
|
|
7
|
+
function reward_count() external view returns (uint256);
|
|
8
|
+
|
|
9
|
+
function reward_tokens(uint256 arg0) external view returns (address);
|
|
10
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity 0.8.17;
|
|
3
|
+
|
|
4
|
+
import "./IBasePool.sol";
|
|
5
|
+
|
|
6
|
+
interface IMetaStablePool is IBasePool {
|
|
7
|
+
function getLastInvariant()
|
|
8
|
+
external
|
|
9
|
+
view
|
|
10
|
+
returns (uint256 lastInvariant, uint256 lastInvariantAmp);
|
|
11
|
+
|
|
12
|
+
function getAmplificationParameter()
|
|
13
|
+
external
|
|
14
|
+
view
|
|
15
|
+
returns (
|
|
16
|
+
uint256 value,
|
|
17
|
+
bool isUpdating,
|
|
18
|
+
uint256 precision
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
function getSwapFeePercentage() external view returns (uint256);
|
|
22
|
+
|
|
23
|
+
function getPriceRateCache(IERC20 token)
|
|
24
|
+
external
|
|
25
|
+
view
|
|
26
|
+
returns (
|
|
27
|
+
uint256 rate,
|
|
28
|
+
uint256 duration,
|
|
29
|
+
uint256 expires
|
|
30
|
+
);
|
|
31
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity 0.8.17;
|
|
3
|
+
|
|
4
|
+
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
|
5
|
+
import "./IAsset.sol";
|
|
6
|
+
|
|
7
|
+
interface IVault {
|
|
8
|
+
struct JoinPoolRequest {
|
|
9
|
+
address[] assets;
|
|
10
|
+
uint256[] maxAmountsIn;
|
|
11
|
+
bytes userData;
|
|
12
|
+
bool fromInternalBalance;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function joinPool(
|
|
16
|
+
bytes32 poolId,
|
|
17
|
+
address sender,
|
|
18
|
+
address recipient,
|
|
19
|
+
JoinPoolRequest memory request
|
|
20
|
+
) external payable;
|
|
21
|
+
|
|
22
|
+
struct ExitPoolRequest {
|
|
23
|
+
address[] assets;
|
|
24
|
+
uint256[] minAmountsOut;
|
|
25
|
+
bytes userData;
|
|
26
|
+
bool toInternalBalance;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function exitPool(
|
|
30
|
+
bytes32 poolId,
|
|
31
|
+
address sender,
|
|
32
|
+
address payable recipient,
|
|
33
|
+
ExitPoolRequest memory request
|
|
34
|
+
) external;
|
|
35
|
+
|
|
36
|
+
enum SwapKind {
|
|
37
|
+
GIVEN_IN,
|
|
38
|
+
GIVEN_OUT
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
struct SingleSwap {
|
|
42
|
+
bytes32 poolId;
|
|
43
|
+
SwapKind kind;
|
|
44
|
+
IAsset assetIn;
|
|
45
|
+
IAsset assetOut;
|
|
46
|
+
uint256 amount;
|
|
47
|
+
bytes userData;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
struct FundManagement {
|
|
51
|
+
address sender;
|
|
52
|
+
bool fromInternalBalance;
|
|
53
|
+
address payable recipient;
|
|
54
|
+
bool toInternalBalance;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function swap(
|
|
58
|
+
SingleSwap memory singleSwap,
|
|
59
|
+
FundManagement memory funds,
|
|
60
|
+
uint256 limit,
|
|
61
|
+
uint256 deadline
|
|
62
|
+
) external payable returns (uint256);
|
|
63
|
+
|
|
64
|
+
function getPoolTokens(bytes32 poolId)
|
|
65
|
+
external
|
|
66
|
+
view
|
|
67
|
+
returns (
|
|
68
|
+
IERC20[] memory tokens,
|
|
69
|
+
uint256[] memory balances,
|
|
70
|
+
uint256 lastChangeBlock
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
function WETH() external view returns (IERC20);
|
|
74
|
+
|
|
75
|
+
function getPool(bytes32 poolId) external view returns (address, uint8);
|
|
76
|
+
|
|
77
|
+
function getProtocolFeesCollector() external view returns (address);
|
|
78
|
+
}
|
|
@@ -6,6 +6,8 @@ interface IPFeeDistributor {
|
|
|
6
6
|
|
|
7
7
|
event ClaimReward(address indexed pool, address indexed user, uint256 wTime, uint256 amount);
|
|
8
8
|
|
|
9
|
+
event PoolAdded(address indexed pool, uint256 indexed startWeek);
|
|
10
|
+
|
|
9
11
|
struct UserInfo {
|
|
10
12
|
uint128 firstUnclaimedWeek;
|
|
11
13
|
uint128 iter;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
pragma solidity >=0.5.0;
|
|
2
|
+
pragma experimental ABIEncoderV2;
|
|
3
|
+
|
|
4
|
+
/// @title Multicall2 - Aggregate results from multiple read-only function calls
|
|
5
|
+
/// @author Michael Elliot <mike@makerdao.com>
|
|
6
|
+
/// @author Joshua Levine <joshua@makerdao.com>
|
|
7
|
+
/// @author Nick Johnson <arachnid@notdot.net>
|
|
8
|
+
|
|
9
|
+
contract Multicall2 {
|
|
10
|
+
struct Call {
|
|
11
|
+
address target;
|
|
12
|
+
bytes callData;
|
|
13
|
+
}
|
|
14
|
+
struct Result {
|
|
15
|
+
bool success;
|
|
16
|
+
bytes returnData;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function aggregate(Call[] memory calls)
|
|
20
|
+
public
|
|
21
|
+
returns (uint256 blockNumber, bytes[] memory returnData)
|
|
22
|
+
{
|
|
23
|
+
blockNumber = block.number;
|
|
24
|
+
returnData = new bytes[](calls.length);
|
|
25
|
+
for (uint256 i = 0; i < calls.length; i++) {
|
|
26
|
+
(bool success, bytes memory ret) = calls[i].target.call(calls[i].callData);
|
|
27
|
+
require(success, "Multicall aggregate: call failed");
|
|
28
|
+
returnData[i] = ret;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function blockAndAggregate(Call[] memory calls)
|
|
33
|
+
public
|
|
34
|
+
returns (
|
|
35
|
+
uint256 blockNumber,
|
|
36
|
+
bytes32 blockHash,
|
|
37
|
+
Result[] memory returnData
|
|
38
|
+
)
|
|
39
|
+
{
|
|
40
|
+
(blockNumber, blockHash, returnData) = tryBlockAndAggregate(true, calls);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function getBlockHash(uint256 blockNumber) public view returns (bytes32 blockHash) {
|
|
44
|
+
blockHash = blockhash(blockNumber);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function getBlockNumber() public view returns (uint256 blockNumber) {
|
|
48
|
+
blockNumber = block.number;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function getCurrentBlockCoinbase() public view returns (address coinbase) {
|
|
52
|
+
coinbase = block.coinbase;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function getCurrentBlockDifficulty() public view returns (uint256 difficulty) {
|
|
56
|
+
difficulty = block.difficulty;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function getCurrentBlockGasLimit() public view returns (uint256 gaslimit) {
|
|
60
|
+
gaslimit = block.gaslimit;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function getCurrentBlockTimestamp() public view returns (uint256 timestamp) {
|
|
64
|
+
timestamp = block.timestamp;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function getEthBalance(address addr) public view returns (uint256 balance) {
|
|
68
|
+
balance = addr.balance;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function getLastBlockHash() public view returns (bytes32 blockHash) {
|
|
72
|
+
blockHash = blockhash(block.number - 1);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function tryAggregate(bool requireSuccess, Call[] memory calls)
|
|
76
|
+
public
|
|
77
|
+
returns (Result[] memory returnData)
|
|
78
|
+
{
|
|
79
|
+
returnData = new Result[](calls.length);
|
|
80
|
+
for (uint256 i = 0; i < calls.length; i++) {
|
|
81
|
+
(bool success, bytes memory ret) = calls[i].target.call(calls[i].callData);
|
|
82
|
+
|
|
83
|
+
if (requireSuccess) {
|
|
84
|
+
require(success, "Multicall2 aggregate: call failed");
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
returnData[i] = Result(success, ret);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function tryBlockAndAggregate(bool requireSuccess, Call[] memory calls)
|
|
92
|
+
public
|
|
93
|
+
returns (
|
|
94
|
+
uint256 blockNumber,
|
|
95
|
+
bytes32 blockHash,
|
|
96
|
+
Result[] memory returnData
|
|
97
|
+
)
|
|
98
|
+
{
|
|
99
|
+
blockNumber = block.number;
|
|
100
|
+
blockHash = blockhash(block.number);
|
|
101
|
+
returnData = tryAggregate(requireSuccess, calls);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
pragma solidity 0.8.17;
|
|
3
|
+
|
|
4
|
+
/// @title PendleMulticall - A more gas-efficient version of Multicall3 (~700 gas saved for each call)
|
|
5
|
+
/// @author UncleGrandpa925 <longvh@pendle.finance>
|
|
6
|
+
contract PendleMulticall {
|
|
7
|
+
error MulticallFailed(uint256 index);
|
|
8
|
+
|
|
9
|
+
struct Call {
|
|
10
|
+
address target;
|
|
11
|
+
bytes callData;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function aggregate(Call[] calldata calls) external payable {
|
|
15
|
+
uint256 length = calls.length;
|
|
16
|
+
Call calldata call;
|
|
17
|
+
for (uint256 i = 0; i < length; ) {
|
|
18
|
+
call = calls[i];
|
|
19
|
+
(bool success, ) = call.target.call(call.callData);
|
|
20
|
+
if (!success) revert MulticallFailed(i);
|
|
21
|
+
unchecked {
|
|
22
|
+
++i;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|