@pendle/core-v2 1.2.1-testnet → 1.3.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 +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol/VotingEscrowTokenBase.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/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/PYIndex.sol/PYIndexLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.json +2 -2
- 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/SYUtils.sol/SYUtils.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/SYUtils.sol/SYUtils.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/StEthHelper.sol/StEthHelper.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/Ape/sAPE.sol/sAPE.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethAnkrethSY.sol/PendleAuraWethAnkrethSY.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethAnkrethSY.sol/PendleAuraWethAnkrethSY.json +1192 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRethSY.sol/PendleAuraWethRethSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRethSY.sol/PendleAuraWethRethSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSY.sol/PendleAuraWethWstethSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSY.sol/PendleAuraWethWstethSY.json +2 -2
- 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/MetaStableMath.sol/MetaStableMath.json +2 -2
- 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/MetaStable/MetaStablePreview.sol/MetaStablePreview.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/PendleAuraBalancerStableLPSY.sol/PendleAuraBalancerStableLPSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePoolUserData.sol/StablePoolUserData.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePoolUserData.sol/StablePoolUserData.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePreviewBase.sol/StablePreviewBase.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/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/Curve3CrvPoolHelper.sol/Curve3CrvPoolHelper.json +2 -2
- 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/CurveFraxUsdcPoolHelper.sol/CurveFraxUsdcPoolHelper.json +2 -2
- 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/CurveUsdd3CrvPoolHelper.sol/CurveUsdd3CrvPoolHelper.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/PendleConvexLPSY.sol/PendleConvexLPSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/GLPPreviewHelper.sol/GLPPreviewHelper.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/PendleGdaiSY.sol/PendleGDaiSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleGdaiSY.sol/PendleGDaiSY.json +2 -2
- 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 +2 -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 +2 -2
- package/build/artifacts/contracts/core/YieldContracts/InterestManagerYT.sol/InterestManagerYT.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.json +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/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/PendlePrincipalTokenV2.sol/PendlePrincipalTokenV2.json +2 -2
- 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/erc20/PendleERC20.sol/PendleERC20.dbg.json +1 -1
- package/build/artifacts/contracts/core/erc20/PendleERC20.sol/PendleERC20.json +2 -2
- package/build/artifacts/contracts/core/erc20/PendleERC20Permit.sol/PendleERC20Permit.dbg.json +1 -1
- package/build/artifacts/contracts/core/erc20/PendleERC20Permit.sol/PendleERC20Permit.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/BaseSplitCodeFactory.sol/BaseSplitCodeFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/BaseSplitCodeFactory.json +2 -2
- package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/CodeDeployer.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/CodeDeployer.json +2 -2
- package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeable.sol/BoringOwnableUpgradeable.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeable.sol/BoringOwnableUpgradeableData.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeable.sol/BoringOwnableUpgradeableData.json +2 -2
- package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/StringLib.sol/StringLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/StringLib.sol/StringLib.json +2 -2
- package/build/artifacts/contracts/core/libraries/TokenHelper.sol/TokenHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/math/LogExpMath.sol/LogExpMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/math/LogExpMath.sol/LogExpMath.json +2 -2
- package/build/artifacts/contracts/core/libraries/math/Math.sol/Math.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/math/Math.sol/Math.json +2 -2
- package/build/artifacts/contracts/interfaces/Balancer/IBalancerStablePreview.sol/IBalancerStablePreview.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/IComposableStable.sol/IComposableStable.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/IMetaStablePool.sol/IMetaStablePool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/IVault.sol/IVault.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ConvexCurve/IBooster.sol/IBooster.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ConvexCurve/ICrvDepositor.sol/ICrvDepositor.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ConvexCurve/IRewards.sol/IRewards.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Curve/ICrvPool.sol/ICrvPool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Curve/ITriCrvPool.sol/ITriCrvPool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/GMX/IGMXVault.sol/IGMXVault.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/GMX/IRewardRouterV2.sol/IRewardRouterV2.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IApeStaking.sol/IApeStaking.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IDiamondLoupe.sol/IDiamondLoupe.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IERC4626.sol/IERC4626.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/IPActionMarketCoreStatic.sol/IPActionMarketCoreStatic.json +0 -10
- 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/IPActionStorageStatic.sol/IPActionStorageStatic.json +2 -2
- 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/IPActionVePendleStatic.sol/IPActionVePendleStatic.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/IPBulkSellerSYCallback.sol/IPBulkSellerCallback.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPFeeDistributor.sol/IPFeeDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPGaugeController.sol/IPGaugeController.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPGaugeControllerMainchain.sol/IPGaugeControllerMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPInterestManagerYT.sol/IPInterestManagerYT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPInterestManagerYTV2.sol/IPInterestManagerYTV2.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPLiquidityMigrator.sol/IPLiquidityMigrator.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPLiquidityMigrator.sol/IPLiquidityMigrator.json +655 -0
- package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarketFactory.sol/IPMarketFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarketSwapCallback.sol/IPMarketSwapCallback.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMiniDiamond.sol/IPMiniDiamond.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPRouterStatic.sol/IPRouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPRouterStatic.sol/IPRouterStatic.json +2 -12
- 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/IPYieldToken.sol/IPYieldToken.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPYieldTokenV2.sol/IPYieldTokenV2.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IRewardManager.sol/IRewardManager.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IStETH.sol/IStETH.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IStandardizedYield.sol/IStandardizedYield.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IStargateLPStaking.sol/IStargateLPStaking.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IStargatePool.sol/IStargatePool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IStargateRouter.sol/IStargateRouter.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AddressProvider.sol/AddressProvider.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AddressProvider.sol/AddressProvider.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol/BaseSplitCodeFactoryContract.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol/BaseSplitCodeFactoryContract.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.json +2 -2
- 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/Multicall2.sol/Multicall2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/Multicall2.sol/Multicall2.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.json +2 -2
- 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/ActionInfoStatic.sol/ActionInfoStatic.json +2 -2
- 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/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.json +2 -2
- 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/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.json +2 -12
- 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/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.json +2 -2
- 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/ActionStorageStatic.sol/ActionStorageStatic.json +4 -4
- 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/ActionVePendleStatic.sol/ActionVePendleStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/StorageLayout.sol/StorageLayout.dbg.json +4 -0
- package/build/artifacts/contracts/{router/swap-aggregator/kyberswap/KyberAggregationRouterHelper.sol/KyberAggregationRouterHelper.json → offchain-helpers/router-static/base/StorageLayout.sol/StorageLayout.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/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/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/PendleRouterHelper.sol/PendleRouterHelper.dbg.json +4 -0
- package/build/artifacts/contracts/router/PendleRouterHelper.sol/PendleRouterHelper.json +773 -0
- 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/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/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/IPSwapAggregator.sol/IPSwapAggregator.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwapArbitrum.sol/PendleSwapArbitrum.dbg.json +4 -0
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwapArbitrum.sol/PendleSwapArbitrum.json +76 -0
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwapEthereum.sol/PendleSwapEthereum.dbg.json +4 -0
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwapEthereum.sol/PendleSwapEthereum.json +76 -0
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/arbitrum/IAggregationExecutor.sol/IAggregationExecutor.dbg.json +4 -0
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/{interfaces → arbitrum}/IAggregationExecutor.sol/IAggregationExecutor.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/arbitrum/IExecutorHelper1.sol/IExecutorHelper1.dbg.json +4 -0
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/arbitrum/IExecutorHelper1.sol/IExecutorHelper1.json +388 -0
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/arbitrum/IExecutorHelper2.sol/IExecutorHelper2.dbg.json +4 -0
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/arbitrum/IExecutorHelper2.sol/IExecutorHelper2.json +40 -0
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/arbitrum/IHashflow.sol/IHashflow.dbg.json +4 -0
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/{interfaces → arbitrum}/IHashflow.sol/IHashflow.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/arbitrum/IMetaAggregationRouterV2.sol/IMetaAggregationRouterV2.dbg.json +4 -0
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/{interfaces → arbitrum}/IMetaAggregationRouterV2.sol/IMetaAggregationRouterV2.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/arbitrum/KyberHelperArbitrum.sol/KyberHelperArbitrum.dbg.json +4 -0
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/arbitrum/KyberHelperArbitrum.sol/KyberHelperArbitrum.json +10 -0
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/arbitrum/ScaleDataHelperArbitrum.sol/ScaleDataHelperArbitrum.dbg.json +4 -0
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/arbitrum/ScaleDataHelperArbitrum.sol/ScaleDataHelperArbitrum.json +10 -0
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/ethereum/IAggregationExecutor.sol/IAggregationExecutor.dbg.json +4 -0
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/ethereum/IAggregationExecutor.sol/IAggregationExecutor.json +65 -0
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/ethereum/IExecutorHelperEthereum1.sol/IExecutorHelperEthereum1.dbg.json +4 -0
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/{interfaces → ethereum}/IExecutorHelperEthereum1.sol/IExecutorHelperEthereum1.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/ethereum/IHashflow.sol/IHashflow.dbg.json +4 -0
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/ethereum/IHashflow.sol/IHashflow.json +101 -0
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/ethereum/IMetaAggregationRouterV2.sol/IMetaAggregationRouterV2.dbg.json +4 -0
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/ethereum/IMetaAggregationRouterV2.sol/IMetaAggregationRouterV2.json +215 -0
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/ethereum/KyberHelperEthereum.sol/KyberHelperEthereum.dbg.json +4 -0
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/ethereum/KyberHelperEthereum.sol/KyberHelperEthereum.json +10 -0
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/ethereum/ScaleDataHelperEthereum.sol/ScaleDataHelperEthereum.dbg.json +4 -0
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/ethereum/ScaleDataHelperEthereum.sol/ScaleDataHelperEthereum.json +10 -0
- package/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol +4 -5
- package/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiverAppUpg.sol +3 -5
- package/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol +7 -10
- package/contracts/LiquidityMining/CrossChainMsg/PendleMsgSenderAppUpg.sol +8 -10
- package/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol +16 -8
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol +3 -5
- package/contracts/LiquidityMining/README.md +49 -46
- package/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol +9 -14
- package/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol +4 -10
- package/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol +23 -36
- package/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol +18 -24
- package/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol +3 -4
- package/contracts/LiquidityMining/libraries/VeBalanceLib.sol +20 -26
- package/contracts/core/BulkSeller/BulkSeller.sol +1 -5
- package/contracts/core/BulkSeller/BulkSellerFactory.sol +4 -5
- package/contracts/core/BulkSeller/BulkSellerMathCore.sol +20 -25
- package/contracts/core/Market/MarketMathCore.sol +23 -69
- package/contracts/core/Market/OracleLib.sol +4 -4
- package/contracts/core/Market/PendleGauge.sol +7 -20
- package/contracts/core/Market/PendleMarket.sol +5 -15
- package/contracts/core/Market/PendleMarketFactory.sol +3 -9
- package/contracts/core/RewardManager/RewardManager.sol +4 -6
- package/contracts/core/RewardManager/RewardManagerAbstract.sol +4 -4
- package/contracts/core/StandardizedYield/PYIndex.sol +7 -36
- package/contracts/core/StandardizedYield/SYBase.sol +20 -26
- package/contracts/core/StandardizedYield/SYBaseWithRewards.sol +7 -19
- package/contracts/core/StandardizedYield/SYUtils.sol +4 -5
- package/contracts/core/StandardizedYield/StEthHelper.sol +12 -16
- package/contracts/core/StandardizedYield/implementations/Ape/sAPE.sol +14 -24
- package/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethAnkrethSY.sol +127 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRethSY.sol +12 -20
- package/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSY.sol +12 -20
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStableMath.sol +1 -5
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStablePreview.sol +28 -44
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/PendleAuraBalancerStableLPSY.sol +28 -47
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePoolUserData.sol +6 -10
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePreviewBase.sol +6 -10
- package/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol +13 -22
- package/contracts/core/StandardizedYield/implementations/Convex/PendleCurveFraxUsdcSY.sol +20 -27
- package/contracts/core/StandardizedYield/implementations/Convex/PendleCurveUsdd3CrvSY.sol +20 -27
- package/contracts/core/StandardizedYield/implementations/Convex/README.md +4 -4
- package/contracts/core/StandardizedYield/implementations/Convex/base/Curve3CrvPoolHelper.sol +32 -40
- package/contracts/core/StandardizedYield/implementations/Convex/base/CurveFraxUsdcPoolHelper.sol +10 -12
- package/contracts/core/StandardizedYield/implementations/Convex/base/CurveUsdd3CrvPoolHelper.sol +14 -18
- package/contracts/core/StandardizedYield/implementations/Convex/base/PendleConvexLPSY.sol +32 -48
- package/contracts/core/StandardizedYield/implementations/GLP/GLPPreviewHelper.sol +6 -7
- package/contracts/core/StandardizedYield/implementations/GLP/PendleGlpSY.sol +14 -24
- package/contracts/core/StandardizedYield/implementations/GLP/README.md +15 -13
- package/contracts/core/StandardizedYield/implementations/PendleGdaiSY.sol +12 -38
- package/contracts/core/StandardizedYield/implementations/PendleLooksStakingSY.sol +13 -23
- package/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol +13 -23
- package/contracts/core/YieldContracts/PendleYieldContractFactory.sol +0 -10
- package/contracts/core/YieldContracts/PendleYieldToken.sol +28 -44
- package/contracts/core/YieldContractsV2/InterestManagerYTV2.sol +4 -4
- package/contracts/core/YieldContractsV2/PendleYieldContractFactoryV2.sol +1 -1
- package/contracts/core/YieldContractsV2/PendleYieldTokenV2.sol +24 -38
- package/contracts/core/erc20/PendleERC20.sol +14 -44
- package/contracts/core/libraries/ArrayLib.sol +4 -5
- package/contracts/core/libraries/BaseSplitCodeFactory.sol +5 -7
- package/contracts/core/libraries/BoringOwnableUpgradeable.sol +1 -5
- package/contracts/core/libraries/StringLib.sol +14 -20
- package/contracts/core/libraries/TokenHelper.sol +6 -31
- package/contracts/core/libraries/math/LogExpMath.sol +2 -2
- package/contracts/core/libraries/math/Math.sol +3 -15
- package/contracts/interfaces/Balancer/IComposableStable.sol +4 -14
- package/contracts/interfaces/Balancer/IMetaStablePool.sol +4 -13
- package/contracts/interfaces/Balancer/IVault.sol +4 -6
- package/contracts/interfaces/ConvexCurve/IBooster.sol +4 -16
- package/contracts/interfaces/ConvexCurve/ICrvDepositor.sol +1 -5
- package/contracts/interfaces/ConvexCurve/IRewards.sol +1 -4
- package/contracts/interfaces/Curve/ICrvPool.sol +12 -11
- package/contracts/interfaces/Curve/ITriCrvPool.sol +4 -4
- package/contracts/interfaces/GMX/IGMXVault.sol +4 -4
- package/contracts/interfaces/GMX/IRewardRouterV2.sol +4 -4
- package/contracts/interfaces/IApeStaking.sol +3 -4
- package/contracts/interfaces/IDiamondLoupe.sol +3 -1
- package/contracts/interfaces/IERC4626.sol +1 -5
- package/contracts/interfaces/IPActionAddRemoveLiq.sol +2 -15
- package/contracts/interfaces/IPActionInfoStatic.sol +7 -7
- package/contracts/interfaces/IPActionMarketAuxStatic.sol +11 -7
- package/contracts/interfaces/IPActionMarketCoreStatic.sol +67 -49
- package/contracts/interfaces/IPActionMintRedeemStatic.sol +10 -15
- package/contracts/interfaces/IPActionStorageStatic.sol +5 -6
- package/contracts/interfaces/IPBulkSellerSYCallback.sol +1 -5
- package/contracts/interfaces/IPFeeDistributor.sol +4 -3
- package/contracts/interfaces/IPGaugeController.sol +3 -9
- package/contracts/interfaces/IPInterestManagerYT.sol +3 -4
- package/contracts/interfaces/IPInterestManagerYTV2.sol +4 -6
- package/contracts/interfaces/IPLiquidityMigrator.sol +130 -0
- package/contracts/interfaces/IPMarket.sol +5 -16
- package/contracts/interfaces/IPMarketFactory.sol +3 -8
- package/contracts/interfaces/IPMarketSwapCallback.sol +1 -5
- package/contracts/interfaces/IPVotingController.sol +5 -6
- package/contracts/interfaces/IPVotingEscrowMainchain.sol +8 -7
- package/contracts/interfaces/IPYieldToken.sol +4 -3
- package/contracts/interfaces/IPYieldTokenV2.sol +4 -3
- package/contracts/interfaces/IRewardManager.sol +4 -4
- package/contracts/interfaces/IStETH.sol +4 -3
- package/contracts/interfaces/IStandardizedYield.sol +9 -13
- package/contracts/interfaces/IStargateRouter.sol +1 -5
- package/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol +4 -1
- package/contracts/offchain-helpers/BulkSellerOffchain.sol +7 -11
- package/contracts/offchain-helpers/Multicall2.sol +14 -24
- package/contracts/offchain-helpers/router-static/PendleRouterStatic.sol +1 -1
- package/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol +11 -14
- package/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol +31 -32
- package/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol +76 -65
- package/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol +12 -20
- package/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol +13 -12
- package/contracts/offchain-helpers/router-static/{StorageLayout.sol → base/StorageLayout.sol} +3 -3
- package/contracts/router/ActionAddRemoveLiq.sol +2 -18
- package/contracts/router/ActionSwapYT.sol +9 -3
- package/contracts/router/PendleRouterHelper.sol +315 -0
- package/contracts/router/base/ActionBaseCallback.sol +2 -2
- package/contracts/router/base/ActionBaseMintRedeem.sol +8 -9
- package/contracts/router/base/CallbackHelper.sol +16 -27
- package/contracts/router/base/MarketApproxLib.sol +18 -82
- package/contracts/router/swap-aggregator/1inch/I1inchAggregationRouterV5.sol +4 -10
- package/contracts/router/swap-aggregator/1inch/OneInchAggregationRouterHelper.sol +4 -5
- package/contracts/router/swap-aggregator/IPSwapAggregator.sol +1 -5
- package/contracts/router/swap-aggregator/{PendleSwapAggregator.sol → PendleSwapArbitrum.sol} +7 -8
- package/contracts/router/swap-aggregator/PendleSwapEthereum.sol +44 -0
- package/contracts/router/swap-aggregator/kyberswap/arbitrum/IAggregationExecutor.sol +17 -0
- package/contracts/router/swap-aggregator/kyberswap/arbitrum/IExecutorHelper1.sol +195 -0
- package/contracts/router/swap-aggregator/kyberswap/arbitrum/IExecutorHelper2.sol +10 -0
- package/contracts/router/swap-aggregator/kyberswap/arbitrum/IMetaAggregationRouterV2.sol +41 -0
- package/contracts/router/swap-aggregator/kyberswap/arbitrum/KyberHelperArbitrum.sol +200 -0
- package/contracts/router/swap-aggregator/kyberswap/arbitrum/ScaleDataHelperArbitrum.sol +135 -0
- package/contracts/router/swap-aggregator/kyberswap/ethereum/IAggregationExecutor.sol +17 -0
- package/contracts/router/swap-aggregator/kyberswap/ethereum/IHashflow.sol +30 -0
- package/contracts/router/swap-aggregator/kyberswap/{interfaces → ethereum}/IMetaAggregationRouterV2.sol +3 -4
- package/contracts/router/swap-aggregator/kyberswap/{KyberAggregationRouterHelper.sol → ethereum/KyberHelperEthereum.sol} +20 -33
- package/contracts/router/swap-aggregator/kyberswap/{ScaleDataHelperEthereum1.sol → ethereum/ScaleDataHelperEthereum.sol} +2 -2
- package/deployments/43113-core.json +1 -0
- package/deployments/80001-core.json +1 -0
- package/package.json +6 -5
- package/typechain-types/ActionMarketCoreStatic.ts +0 -4
- package/typechain-types/ActionStorageStatic.ts +5 -3
- package/typechain-types/IChainlinkAggregator.ts +246 -0
- package/typechain-types/IExecutorHelper1.ts +643 -0
- package/typechain-types/IExecutorHelper2.ts +115 -0
- package/typechain-types/IPActionMarketCoreStatic.ts +0 -4
- package/typechain-types/IPActionStorageStatic.ts +5 -3
- package/typechain-types/IPLiquidityMigrator.ts +565 -0
- package/typechain-types/IPRouterStatic.ts +5 -7
- package/typechain-types/IStargateLP.ts +306 -0
- package/typechain-types/IStargateStaking.ts +232 -0
- package/typechain-types/InputScalingHelper.ts +108 -0
- package/typechain-types/PendleAuraWethAnkrethSY.ts +1523 -0
- package/typechain-types/PendlePtOracleBase.ts +139 -0
- package/typechain-types/PendleRouterHelper.ts +647 -0
- package/typechain-types/PendleStargateLP.ts +1442 -0
- package/typechain-types/PendleSwapArbitrum.ts +126 -0
- package/typechain-types/PendleSwapEthereum.ts +126 -0
- package/typechain-types/PtFraxUsdcOracle.ts +176 -0
- package/typechain-types/PtStETHOracle.ts +163 -0
- package/typechain-types/RouterStatic.ts +92 -0
- package/typechain-types/factories/ActionAddRemoveLiq__factory.ts +1 -1
- package/typechain-types/factories/ActionInfoStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionMarketAuxStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionMarketCoreStatic__factory.ts +1 -11
- package/typechain-types/factories/ActionMintRedeemStatic__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/ActionStorageStatic__factory.ts +3 -3
- package/typechain-types/factories/ActionSwapPT__factory.ts +1 -1
- package/typechain-types/factories/ActionSwapYT__factory.ts +1 -1
- package/typechain-types/factories/ActionVePendleStatic__factory.ts +1 -1
- package/typechain-types/factories/AddressProvider__factory.ts +1 -1
- package/typechain-types/factories/BaseSplitCodeFactoryContract__factory.ts +1 -1
- package/typechain-types/factories/BoringOwnableUpgradeableData__factory.ts +1 -1
- package/typechain-types/factories/Broadcaster__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/IChainlinkAggregator__factory.ts +170 -0
- package/typechain-types/factories/IExecutorHelper1__factory.ts +403 -0
- package/typechain-types/factories/IExecutorHelper2__factory.ts +55 -0
- package/typechain-types/factories/IPActionMarketCoreStatic__factory.ts +0 -10
- package/typechain-types/factories/IPActionStorageStatic__factory.ts +2 -2
- package/typechain-types/factories/IPLiquidityMigrator__factory.ts +677 -0
- package/typechain-types/factories/IPRouterStatic__factory.ts +2 -12
- package/typechain-types/factories/IStargateLP__factory.ts +212 -0
- package/typechain-types/factories/IStargateStaking__factory.ts +145 -0
- package/typechain-types/factories/InputScalingHelper__factory.ts +88 -0
- package/typechain-types/factories/MarketMathStatic__factory.ts +1 -1
- package/typechain-types/factories/MetaStableMath__factory.ts +1 -1
- package/typechain-types/factories/MetaStablePreview__factory.ts +1 -1
- package/typechain-types/factories/Multicall2__factory.ts +1 -1
- package/typechain-types/factories/OracleLib__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraWethAnkrethSY__factory.ts +1265 -0
- package/typechain-types/factories/PendleAuraWethRethSY__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraWethWstethSY__factory.ts +1 -1
- package/typechain-types/factories/PendleCurveFraxUsdcSY__factory.ts +1 -1
- package/typechain-types/factories/PendleCurveUsdd3CrvSY__factory.ts +1 -1
- package/typechain-types/factories/PendleERC20Permit__factory.ts +1 -1
- package/typechain-types/factories/PendleERC20__factory.ts +1 -1
- package/typechain-types/factories/PendleFeeDistributor__factory.ts +1 -1
- package/typechain-types/factories/PendleGDaiSY__factory.ts +1 -1
- package/typechain-types/factories/PendleGaugeControllerMainchainUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleGaugeControllerSidechainUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleGlpSY__factory.ts +1 -1
- package/typechain-types/factories/PendleLooksStakingSY__factory.ts +1 -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/PendlePrincipalTokenV2__factory.ts +1 -1
- package/typechain-types/factories/PendlePrincipalToken__factory.ts +1 -1
- package/typechain-types/factories/PendlePtOracleBase__factory.ts +78 -0
- package/typechain-types/factories/PendleQiTokenSY__factory.ts +1 -1
- package/typechain-types/factories/PendleRouterHelper__factory.ts +841 -0
- package/typechain-types/factories/PendleRouterStatic__factory.ts +1 -1
- package/typechain-types/factories/PendleRouter__factory.ts +1 -1
- package/typechain-types/factories/PendleStargateLP__factory.ts +1241 -0
- package/typechain-types/factories/PendleSwapAggregator__factory.ts +1 -1
- package/typechain-types/factories/PendleSwapArbitrum__factory.ts +129 -0
- package/typechain-types/factories/PendleSwapEthereum__factory.ts +129 -0
- package/typechain-types/factories/PendleVotingControllerUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleWstEthSY__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/PtFraxUsdcOracle__factory.ts +226 -0
- package/typechain-types/factories/PtStETHOracle__factory.ts +201 -0
- package/typechain-types/factories/RouterStatic__factory.ts +72 -4
- package/typechain-types/factories/SAPE__factory.ts +1 -1
- package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +1 -1
- package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +1 -1
- package/typechain-types/hardhat.d.ts +146 -146
- package/typechain-types/index.ts +24 -34
- package/build/artifacts/contracts/interfaces/IAToken.sol/IAToken.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IAToken.sol/IAToken.json +0 -252
- package/build/artifacts/contracts/interfaces/IAavePool.sol/IAavePool.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IAavePool.sol/IAavePool.json +0 -87
- package/build/artifacts/contracts/interfaces/IAaveRewardsController.sol/IAaveRewardsController.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IAaveRewardsController.sol/IAaveRewardsController.json +0 -59
- package/build/artifacts/contracts/interfaces/IEulerEToken.sol/IEulerEToken.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IEulerEToken.sol/IEulerEToken.json +0 -162
- package/build/artifacts/contracts/interfaces/IEulerMarkets.sol/IEulerMarkets.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IEulerMarkets.sol/IEulerMarkets.json +0 -87
- package/build/artifacts/contracts/interfaces/IPGovernanceManager.sol/IPGovernanceManager.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IPGovernanceManager.sol/IPGovernanceManager.json +0 -24
- package/build/artifacts/contracts/interfaces/IPPermissionsV2Upg.sol/IPermissionsV2Upg.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IPPermissionsV2Upg.sol/IPermissionsV2Upg.json +0 -24
- package/build/artifacts/contracts/interfaces/IREDACTEDStaking.sol/IREDACTEDStaking.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IREDACTEDStaking.sol/IREDACTEDStaking.json +0 -92
- package/build/artifacts/contracts/interfaces/ISAvax.sol/ISAvax.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/ISAvax.sol/ISAvax.json +0 -199
- package/build/artifacts/contracts/interfaces/ISJoe.sol/ISJoe.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/ISJoe.sol/ISJoe.json +0 -168
- package/build/artifacts/contracts/interfaces/IWAvax.sol/IWAvax.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IWAvax.sol/IWAvax.json +0 -252
- package/build/artifacts/contracts/interfaces/IWXBTRFLY.sol/IWXBTRFLY.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IWXBTRFLY.sol/IWXBTRFLY.json +0 -132
- package/build/artifacts/contracts/interfaces/IYearnVault.sol/IYearnVault.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IYearnVault.sol/IYearnVault.json +0 -148
- package/build/artifacts/contracts/offchain-helpers/legacy/MarketMathStatic.sol/MarketMathStatic.dbg.json +0 -4
- package/build/artifacts/contracts/offchain-helpers/legacy/MarketMathStatic.sol/MarketMathStatic.json +0 -259
- package/build/artifacts/contracts/offchain-helpers/legacy/RouterStatic.sol/RouterStatic.dbg.json +0 -4
- package/build/artifacts/contracts/offchain-helpers/legacy/RouterStatic.sol/RouterStatic.json +0 -2741
- package/build/artifacts/contracts/offchain-helpers/router-static/StorageLayout.sol/StorageLayout.dbg.json +0 -4
- package/build/artifacts/contracts/offchain-helpers/router-static/StorageLayout.sol/StorageLayout.json +0 -10
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwapAggregator.sol/PendleSwapAggregator.dbg.json +0 -4
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwapAggregator.sol/PendleSwapAggregator.json +0 -72
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/KyberAggregationRouterHelper.sol/KyberAggregationRouterHelper.dbg.json +0 -4
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/ScaleDataHelperEthereum1.sol/ScaleDataHelperEthereum1.dbg.json +0 -4
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/ScaleDataHelperEthereum1.sol/ScaleDataHelperEthereum1.json +0 -10
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/interfaces/IAggregationExecutor.sol/IAggregationExecutor.dbg.json +0 -4
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/interfaces/IExecutorHelperEthereum1.sol/IExecutorHelperEthereum1.dbg.json +0 -4
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/interfaces/IHashflow.sol/IHashflow.dbg.json +0 -4
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/interfaces/IMetaAggregationRouterV2.sol/IMetaAggregationRouterV2.dbg.json +0 -4
- package/contracts/interfaces/IAToken.sol +0 -44
- package/contracts/interfaces/IAavePool.sol +0 -41
- package/contracts/interfaces/IAaveRewardsController.sol +0 -32
- package/contracts/interfaces/IEulerEToken.sol +0 -60
- package/contracts/interfaces/IEulerMarkets.sol +0 -46
- package/contracts/interfaces/IPGovernanceManager.sol +0 -28
- package/contracts/interfaces/IPPermissionsV2Upg.sol +0 -28
- package/contracts/interfaces/IREDACTEDStaking.sol +0 -35
- package/contracts/interfaces/ISAvax.sol +0 -61
- package/contracts/interfaces/ISJoe.sol +0 -57
- package/contracts/interfaces/IWAvax.sol +0 -34
- package/contracts/interfaces/IWXBTRFLY.sol +0 -39
- package/contracts/interfaces/IYearnVault.sol +0 -46
- package/contracts/offchain-helpers/legacy/MarketMathStatic.sol +0 -557
- package/contracts/offchain-helpers/legacy/RouterStatic.sol +0 -903
- package/contracts/router/swap-aggregator/kyberswap/interfaces/IAggregationExecutor.sol +0 -17
- /package/contracts/router/swap-aggregator/kyberswap/{interfaces → arbitrum}/IHashflow.sol +0 -0
- /package/contracts/router/swap-aggregator/kyberswap/{interfaces → ethereum}/IExecutorHelperEthereum1.sol +0 -0
|
@@ -146,15 +146,15 @@ interface IStandardizedYield is IERC20Metadata {
|
|
|
146
146
|
|
|
147
147
|
function isValidTokenOut(address token) external view returns (bool);
|
|
148
148
|
|
|
149
|
-
function previewDeposit(
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
149
|
+
function previewDeposit(
|
|
150
|
+
address tokenIn,
|
|
151
|
+
uint256 amountTokenToDeposit
|
|
152
|
+
) external view returns (uint256 amountSharesOut);
|
|
153
153
|
|
|
154
|
-
function previewRedeem(
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
154
|
+
function previewRedeem(
|
|
155
|
+
address tokenOut,
|
|
156
|
+
uint256 amountSharesToRedeem
|
|
157
|
+
) external view returns (uint256 amountTokenOut);
|
|
158
158
|
|
|
159
159
|
/**
|
|
160
160
|
* @notice This function contains information to interpret what the asset is
|
|
@@ -165,9 +165,5 @@ interface IStandardizedYield is IERC20Metadata {
|
|
|
165
165
|
function assetInfo()
|
|
166
166
|
external
|
|
167
167
|
view
|
|
168
|
-
returns (
|
|
169
|
-
AssetType assetType,
|
|
170
|
-
address assetAddress,
|
|
171
|
-
uint8 assetDecimals
|
|
172
|
-
);
|
|
168
|
+
returns (AssetType assetType, address assetAddress, uint8 assetDecimals);
|
|
173
169
|
}
|
|
@@ -23,11 +23,7 @@
|
|
|
23
23
|
pragma solidity 0.8.17;
|
|
24
24
|
|
|
25
25
|
interface IStargateRouter {
|
|
26
|
-
function addLiquidity(
|
|
27
|
-
uint256 _poolId,
|
|
28
|
-
uint256 _amountLD,
|
|
29
|
-
address _to
|
|
30
|
-
) external;
|
|
26
|
+
function addLiquidity(uint256 _poolId, uint256 _amountLD, address _to) external;
|
|
31
27
|
|
|
32
28
|
function instantRedeemLocal(
|
|
33
29
|
uint16 _srcPoolId,
|
|
@@ -17,7 +17,10 @@ contract BaseSplitCodeFactoryContract is BoringOwnableUpgradeable {
|
|
|
17
17
|
__BoringOwnable_init();
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
function deploy(
|
|
20
|
+
function deploy(
|
|
21
|
+
string memory name,
|
|
22
|
+
bytes calldata creationCode
|
|
23
|
+
)
|
|
21
24
|
external
|
|
22
25
|
onlyOwner
|
|
23
26
|
returns (
|
|
@@ -9,11 +9,9 @@ contract BulkSellerOffchain {
|
|
|
9
9
|
using BulkSellerMathCore for BulkSellerState;
|
|
10
10
|
using Math for uint256;
|
|
11
11
|
|
|
12
|
-
function calcCurrentRates(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
returns (uint256 rateTokenToSy, uint256 rateSyToToken)
|
|
16
|
-
{
|
|
12
|
+
function calcCurrentRates(
|
|
13
|
+
IPBulkSeller bulk
|
|
14
|
+
) external view returns (uint256 rateTokenToSy, uint256 rateSyToToken) {
|
|
17
15
|
BulkSellerState memory state = bulk.readState();
|
|
18
16
|
address SY = bulk.SY();
|
|
19
17
|
address token = bulk.token();
|
|
@@ -32,14 +30,12 @@ contract BulkSellerOffchain {
|
|
|
32
30
|
}
|
|
33
31
|
}
|
|
34
32
|
|
|
35
|
-
function getCurrentState(
|
|
33
|
+
function getCurrentState(
|
|
34
|
+
IPBulkSeller bulk
|
|
35
|
+
)
|
|
36
36
|
external
|
|
37
37
|
view
|
|
38
|
-
returns (
|
|
39
|
-
BulkSellerState memory state,
|
|
40
|
-
uint256 tokenProp,
|
|
41
|
-
uint256 hypoTokenBal
|
|
42
|
-
)
|
|
38
|
+
returns (BulkSellerState memory state, uint256 tokenProp, uint256 hypoTokenBal)
|
|
43
39
|
{
|
|
44
40
|
state = bulk.readState();
|
|
45
41
|
|
|
@@ -16,10 +16,9 @@ contract Multicall2 {
|
|
|
16
16
|
bytes returnData;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
function aggregate(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
{
|
|
19
|
+
function aggregate(
|
|
20
|
+
Call[] memory calls
|
|
21
|
+
) public returns (uint256 blockNumber, bytes[] memory returnData) {
|
|
23
22
|
blockNumber = block.number;
|
|
24
23
|
returnData = new bytes[](calls.length);
|
|
25
24
|
for (uint256 i = 0; i < calls.length; i++) {
|
|
@@ -29,14 +28,9 @@ contract Multicall2 {
|
|
|
29
28
|
}
|
|
30
29
|
}
|
|
31
30
|
|
|
32
|
-
function blockAndAggregate(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
uint256 blockNumber,
|
|
36
|
-
bytes32 blockHash,
|
|
37
|
-
Result[] memory returnData
|
|
38
|
-
)
|
|
39
|
-
{
|
|
31
|
+
function blockAndAggregate(
|
|
32
|
+
Call[] memory calls
|
|
33
|
+
) public returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData) {
|
|
40
34
|
(blockNumber, blockHash, returnData) = tryBlockAndAggregate(true, calls);
|
|
41
35
|
}
|
|
42
36
|
|
|
@@ -72,10 +66,10 @@ contract Multicall2 {
|
|
|
72
66
|
blockHash = blockhash(block.number - 1);
|
|
73
67
|
}
|
|
74
68
|
|
|
75
|
-
function tryAggregate(
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
{
|
|
69
|
+
function tryAggregate(
|
|
70
|
+
bool requireSuccess,
|
|
71
|
+
Call[] memory calls
|
|
72
|
+
) public returns (Result[] memory returnData) {
|
|
79
73
|
returnData = new Result[](calls.length);
|
|
80
74
|
for (uint256 i = 0; i < calls.length; i++) {
|
|
81
75
|
(bool success, bytes memory ret) = calls[i].target.call(calls[i].callData);
|
|
@@ -88,14 +82,10 @@ contract Multicall2 {
|
|
|
88
82
|
}
|
|
89
83
|
}
|
|
90
84
|
|
|
91
|
-
function tryBlockAndAggregate(
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
bytes32 blockHash,
|
|
96
|
-
Result[] memory returnData
|
|
97
|
-
)
|
|
98
|
-
{
|
|
85
|
+
function tryBlockAndAggregate(
|
|
86
|
+
bool requireSuccess,
|
|
87
|
+
Call[] memory calls
|
|
88
|
+
) public returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData) {
|
|
99
89
|
blockNumber = block.number;
|
|
100
90
|
blockHash = blockhash(block.number);
|
|
101
91
|
returnData = tryAggregate(requireSuccess, calls);
|
|
@@ -3,7 +3,7 @@ pragma solidity 0.8.17;
|
|
|
3
3
|
|
|
4
4
|
import "@openzeppelin/contracts/proxy/Proxy.sol";
|
|
5
5
|
import "../../interfaces/IPRouterStatic.sol";
|
|
6
|
-
import "./StorageLayout.sol";
|
|
6
|
+
import "./base/StorageLayout.sol";
|
|
7
7
|
|
|
8
8
|
// solhint-disable no-empty-blocks
|
|
9
9
|
contract PendleRouterStatic is Proxy, StorageLayout {
|
|
@@ -21,11 +21,9 @@ contract ActionInfoStatic is IPActionInfoStatic {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
/// can be SY, PY or Market
|
|
24
|
-
function getTokensInOut(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
returns (address[] memory tokensIn, address[] memory tokensOut)
|
|
28
|
-
{
|
|
24
|
+
function getTokensInOut(
|
|
25
|
+
address token
|
|
26
|
+
) external view returns (address[] memory tokensIn, address[] memory tokensOut) {
|
|
29
27
|
try IStandardizedYield(token).getTokensIn() returns (address[] memory res) {
|
|
30
28
|
return (res, IStandardizedYield(token).getTokensOut());
|
|
31
29
|
} catch {}
|
|
@@ -80,10 +78,10 @@ contract ActionInfoStatic is IPActionInfoStatic {
|
|
|
80
78
|
res.unclaimedRewards = _zipTokenAmounts(rewardTokens, rewardsOut);
|
|
81
79
|
}
|
|
82
80
|
|
|
83
|
-
function getUserMarketInfo(
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
{
|
|
81
|
+
function getUserMarketInfo(
|
|
82
|
+
address market,
|
|
83
|
+
address user
|
|
84
|
+
) external returns (UserMarketInfo memory res) {
|
|
87
85
|
IPMarket _market = IPMarket(market);
|
|
88
86
|
MarketState memory state = _market.readState(address(this));
|
|
89
87
|
|
|
@@ -107,11 +105,10 @@ contract ActionInfoStatic is IPActionInfoStatic {
|
|
|
107
105
|
res.unclaimedRewards = _zipTokenAmounts(rewardTokens, rewardsOut);
|
|
108
106
|
}
|
|
109
107
|
|
|
110
|
-
function _zipTokenAmounts(
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
{
|
|
108
|
+
function _zipTokenAmounts(
|
|
109
|
+
address[] memory tokens,
|
|
110
|
+
uint256[] memory amounts
|
|
111
|
+
) internal pure returns (TokenAmount[] memory res) {
|
|
115
112
|
res = new TokenAmount[](tokens.length);
|
|
116
113
|
|
|
117
114
|
for (uint256 i = 0; i < tokens.length; i++) {
|
|
@@ -3,7 +3,7 @@ pragma solidity 0.8.17;
|
|
|
3
3
|
|
|
4
4
|
import "../../../interfaces/IPMarket.sol";
|
|
5
5
|
import "../../../interfaces/IPRouterStatic.sol";
|
|
6
|
-
import "
|
|
6
|
+
import "./StorageLayout.sol";
|
|
7
7
|
|
|
8
8
|
contract ActionMarketAuxStatic is IPActionMarketAuxStatic {
|
|
9
9
|
using MarketMathCore for MarketState;
|
|
@@ -13,7 +13,9 @@ contract ActionMarketAuxStatic is IPActionMarketAuxStatic {
|
|
|
13
13
|
using PYIndexLib for PYIndex;
|
|
14
14
|
using PYIndexLib for IPYieldToken;
|
|
15
15
|
|
|
16
|
-
function getMarketState(
|
|
16
|
+
function getMarketState(
|
|
17
|
+
address market
|
|
18
|
+
)
|
|
17
19
|
public
|
|
18
20
|
returns (
|
|
19
21
|
address pt,
|
|
@@ -35,10 +37,10 @@ contract ActionMarketAuxStatic is IPActionMarketAuxStatic {
|
|
|
35
37
|
marketExchangeRateExcludeFee = getTradeExchangeRateExcludeFee(market, state);
|
|
36
38
|
}
|
|
37
39
|
|
|
38
|
-
function getTradeExchangeRateExcludeFee(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
{
|
|
40
|
+
function getTradeExchangeRateExcludeFee(
|
|
41
|
+
address market,
|
|
42
|
+
MarketState memory state
|
|
43
|
+
) public returns (uint256) {
|
|
42
44
|
if (IPMarket(market).isExpired()) return Math.ONE;
|
|
43
45
|
|
|
44
46
|
MarketPreCompute memory comp = state.getMarketPreCompute(
|
|
@@ -55,10 +57,10 @@ contract ActionMarketAuxStatic is IPActionMarketAuxStatic {
|
|
|
55
57
|
return preFeeExchangeRate.Uint();
|
|
56
58
|
}
|
|
57
59
|
|
|
58
|
-
function getTradeExchangeRateIncludeFee(
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
{
|
|
60
|
+
function getTradeExchangeRateIncludeFee(
|
|
61
|
+
address market,
|
|
62
|
+
int256 netPtOut
|
|
63
|
+
) public returns (uint256) {
|
|
62
64
|
if (IPMarket(market).isExpired()) return Math.ONE;
|
|
63
65
|
|
|
64
66
|
int256 netPtToAccount = netPtOut;
|
|
@@ -86,19 +88,19 @@ contract ActionMarketAuxStatic is IPActionMarketAuxStatic {
|
|
|
86
88
|
}
|
|
87
89
|
}
|
|
88
90
|
|
|
89
|
-
function calcPriceImpactPt(
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
{
|
|
91
|
+
function calcPriceImpactPt(
|
|
92
|
+
address market,
|
|
93
|
+
int256 netPtOut
|
|
94
|
+
) public returns (uint256 priceImpact) {
|
|
93
95
|
uint256 preTradeRate = getTradeExchangeRateIncludeFee(market, _getSign(netPtOut));
|
|
94
96
|
uint256 tradedRate = getTradeExchangeRateIncludeFee(market, netPtOut);
|
|
95
97
|
priceImpact = _calculateImpact(preTradeRate, tradedRate);
|
|
96
98
|
}
|
|
97
99
|
|
|
98
|
-
function calcPriceImpactYt(
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
{
|
|
100
|
+
function calcPriceImpactYt(
|
|
101
|
+
address market,
|
|
102
|
+
int256 netPtOut
|
|
103
|
+
) public returns (uint256 priceImpact) {
|
|
102
104
|
uint256 ytPreTradeRate = _calcVirtualYTPrice(
|
|
103
105
|
getTradeExchangeRateIncludeFee(market, _getSign(netPtOut))
|
|
104
106
|
);
|
|
@@ -108,10 +110,10 @@ contract ActionMarketAuxStatic is IPActionMarketAuxStatic {
|
|
|
108
110
|
priceImpact = _calculateImpact(ytPreTradeRate, ytTradedRate);
|
|
109
111
|
}
|
|
110
112
|
|
|
111
|
-
function calcPriceImpactPY(
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
{
|
|
113
|
+
function calcPriceImpactPY(
|
|
114
|
+
address market,
|
|
115
|
+
int256 netPtOut
|
|
116
|
+
) public returns (uint256 priceImpact) {
|
|
115
117
|
uint256 ptPreTradeRate = getTradeExchangeRateIncludeFee(market, _getSign(netPtOut));
|
|
116
118
|
uint256 ytPreTradeRate = _calcVirtualYTPrice(ptPreTradeRate);
|
|
117
119
|
uint256 ptTradeRate = getTradeExchangeRateIncludeFee(market, netPtOut);
|
|
@@ -129,11 +131,9 @@ contract ActionMarketAuxStatic is IPActionMarketAuxStatic {
|
|
|
129
131
|
return lnImpliedRate.exp();
|
|
130
132
|
}
|
|
131
133
|
|
|
132
|
-
function _calcVirtualYTPrice(
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
returns (uint256 ytAssetExchangeRate)
|
|
136
|
-
{
|
|
134
|
+
function _calcVirtualYTPrice(
|
|
135
|
+
uint256 ptAssetExchangeRate
|
|
136
|
+
) private pure returns (uint256 ytAssetExchangeRate) {
|
|
137
137
|
// 1 asset = EX pt
|
|
138
138
|
// 1 pt = 1/EX Asset
|
|
139
139
|
// 1 yt + 1/EX Asset = 1 Asset
|
|
@@ -150,11 +150,10 @@ contract ActionMarketAuxStatic is IPActionMarketAuxStatic {
|
|
|
150
150
|
return netPtOut > 0 ? int256(1) : int256(-1);
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
function _calculateImpact(
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
{
|
|
153
|
+
function _calculateImpact(
|
|
154
|
+
uint256 rateBefore,
|
|
155
|
+
uint256 rateTraded
|
|
156
|
+
) private pure returns (uint256 impact) {
|
|
158
157
|
impact = (rateBefore.Int() - rateTraded.Int()).abs().divDown(rateBefore);
|
|
159
158
|
}
|
|
160
159
|
|
|
@@ -3,7 +3,7 @@ pragma solidity 0.8.17;
|
|
|
3
3
|
|
|
4
4
|
import "../../../interfaces/IPMarket.sol";
|
|
5
5
|
import "../../../interfaces/IPRouterStatic.sol";
|
|
6
|
-
import "
|
|
6
|
+
import "./StorageLayout.sol";
|
|
7
7
|
|
|
8
8
|
contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
9
9
|
using Math for uint256;
|
|
@@ -22,15 +22,7 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
22
22
|
address market,
|
|
23
23
|
uint256 netSyDesired,
|
|
24
24
|
uint256 netPtDesired
|
|
25
|
-
)
|
|
26
|
-
public
|
|
27
|
-
view
|
|
28
|
-
returns (
|
|
29
|
-
uint256 netLpOut,
|
|
30
|
-
uint256 netSyUsed,
|
|
31
|
-
uint256 netPtUsed
|
|
32
|
-
)
|
|
33
|
-
{
|
|
25
|
+
) public view returns (uint256 netLpOut, uint256 netSyUsed, uint256 netPtUsed) {
|
|
34
26
|
MarketState memory state = _readState(market);
|
|
35
27
|
(, netLpOut, netSyUsed, netPtUsed) = state.addLiquidity(
|
|
36
28
|
netSyDesired,
|
|
@@ -71,7 +63,10 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
71
63
|
}
|
|
72
64
|
|
|
73
65
|
/// @dev netPtToSwap is the parameter to approx
|
|
74
|
-
function addLiquiditySinglePtStatic(
|
|
66
|
+
function addLiquiditySinglePtStatic(
|
|
67
|
+
address market,
|
|
68
|
+
uint256 netPtIn
|
|
69
|
+
)
|
|
75
70
|
public
|
|
76
71
|
returns (
|
|
77
72
|
uint256 netLpOut,
|
|
@@ -110,7 +105,10 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
110
105
|
}
|
|
111
106
|
|
|
112
107
|
/// @dev netPtFromSwap is the parameter to approx
|
|
113
|
-
function addLiquiditySingleSyStatic(
|
|
108
|
+
function addLiquiditySingleSyStatic(
|
|
109
|
+
address market,
|
|
110
|
+
uint256 netSyIn
|
|
111
|
+
)
|
|
114
112
|
public
|
|
115
113
|
returns (
|
|
116
114
|
uint256 netLpOut,
|
|
@@ -196,7 +194,10 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
196
194
|
(netLpOut, netYtOut, netSyToPY) = addLiquiditySingleSyKeepYtStatic(market, netSyMinted);
|
|
197
195
|
}
|
|
198
196
|
|
|
199
|
-
function addLiquiditySingleSyKeepYtStatic(
|
|
197
|
+
function addLiquiditySingleSyKeepYtStatic(
|
|
198
|
+
address market,
|
|
199
|
+
uint256 netSyIn
|
|
200
|
+
)
|
|
200
201
|
public
|
|
201
202
|
returns (
|
|
202
203
|
uint256 netLpOut,
|
|
@@ -217,11 +218,10 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
217
218
|
(, netLpOut, , ) = state.addLiquidity(netSyIn - netSyToPY, netYtOut, block.timestamp);
|
|
218
219
|
}
|
|
219
220
|
|
|
220
|
-
function removeLiquidityDualSyAndPtStatic(
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
{
|
|
221
|
+
function removeLiquidityDualSyAndPtStatic(
|
|
222
|
+
address market,
|
|
223
|
+
uint256 netLpToRemove
|
|
224
|
+
) public view returns (uint256 netSyOut, uint256 netPtOut) {
|
|
225
225
|
MarketState memory state = _readState(market);
|
|
226
226
|
(netSyOut, netPtOut) = state.removeLiquidity(netLpToRemove);
|
|
227
227
|
}
|
|
@@ -231,22 +231,17 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
231
231
|
uint256 netLpToRemove,
|
|
232
232
|
address tokenOut,
|
|
233
233
|
address bulk
|
|
234
|
-
)
|
|
235
|
-
public
|
|
236
|
-
view
|
|
237
|
-
returns (
|
|
238
|
-
uint256 netTokenOut,
|
|
239
|
-
uint256 netPtOut,
|
|
240
|
-
uint256 netSyToRedeem
|
|
241
|
-
)
|
|
242
|
-
{
|
|
234
|
+
) public view returns (uint256 netTokenOut, uint256 netPtOut, uint256 netSyToRedeem) {
|
|
243
235
|
(netSyToRedeem, netPtOut) = removeLiquidityDualSyAndPtStatic(market, netLpToRemove);
|
|
244
236
|
netTokenOut = _redeemSyToTokenStatic(market, tokenOut, netSyToRedeem, bulk);
|
|
245
237
|
}
|
|
246
238
|
|
|
247
239
|
/// @dev netPtFromSwap is the parameter to approx
|
|
248
240
|
/// @notice should revert post-expiry
|
|
249
|
-
function removeLiquiditySinglePtStatic(
|
|
241
|
+
function removeLiquiditySinglePtStatic(
|
|
242
|
+
address market,
|
|
243
|
+
uint256 netLpToRemove
|
|
244
|
+
)
|
|
250
245
|
public
|
|
251
246
|
returns (
|
|
252
247
|
uint256 netPtOut,
|
|
@@ -277,7 +272,10 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
277
272
|
exchangeRateAfter = _getTradeExchangeRateExcludeFee(market, state);
|
|
278
273
|
}
|
|
279
274
|
|
|
280
|
-
function removeLiquiditySingleSyStatic(
|
|
275
|
+
function removeLiquiditySingleSyStatic(
|
|
276
|
+
address market,
|
|
277
|
+
uint256 netLpToRemove
|
|
278
|
+
)
|
|
281
279
|
public
|
|
282
280
|
returns (
|
|
283
281
|
uint256 netSyOut,
|
|
@@ -321,7 +319,6 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
321
319
|
public
|
|
322
320
|
returns (
|
|
323
321
|
uint256 netTokenOut,
|
|
324
|
-
uint256 netSyToRedeem,
|
|
325
322
|
uint256 netSyFee,
|
|
326
323
|
uint256 priceImpact,
|
|
327
324
|
uint256 exchangeRateAfter,
|
|
@@ -342,12 +339,15 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
342
339
|
netSyFromSwap
|
|
343
340
|
) = removeLiquiditySingleSyStatic(market, netLpToRemove);
|
|
344
341
|
|
|
345
|
-
netTokenOut = _redeemSyToTokenStatic(market, tokenOut,
|
|
342
|
+
netTokenOut = _redeemSyToTokenStatic(market, tokenOut, netSyOut, bulk);
|
|
346
343
|
}
|
|
347
344
|
|
|
348
345
|
// ============ SWAP PT ============
|
|
349
346
|
|
|
350
|
-
function swapExactPtForSyStatic(
|
|
347
|
+
function swapExactPtForSyStatic(
|
|
348
|
+
address market,
|
|
349
|
+
uint256 exactPtIn
|
|
350
|
+
)
|
|
351
351
|
public
|
|
352
352
|
returns (
|
|
353
353
|
uint256 netSyOut,
|
|
@@ -366,14 +366,12 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
366
366
|
exchangeRateAfter = _getTradeExchangeRateExcludeFee(market, state);
|
|
367
367
|
}
|
|
368
368
|
|
|
369
|
-
function swapSyForExactPtStatic(
|
|
369
|
+
function swapSyForExactPtStatic(
|
|
370
|
+
address market,
|
|
371
|
+
uint256 exactPtOut
|
|
372
|
+
)
|
|
370
373
|
public
|
|
371
|
-
returns (
|
|
372
|
-
uint256 netSyIn,
|
|
373
|
-
uint256 netSyFee,
|
|
374
|
-
uint256 priceImpact,
|
|
375
|
-
uint256 exchangeRateAfter
|
|
376
|
-
)
|
|
374
|
+
returns (uint256 netSyIn, uint256 netSyFee, uint256 priceImpact, uint256 exchangeRateAfter)
|
|
377
375
|
{
|
|
378
376
|
MarketState memory state = _readState(market);
|
|
379
377
|
(netSyIn, netSyFee, ) = state.swapSyForExactPt(
|
|
@@ -386,7 +384,10 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
386
384
|
}
|
|
387
385
|
|
|
388
386
|
/// @dev netPtOut is the parameter to approx
|
|
389
|
-
function swapExactSyForPtStatic(
|
|
387
|
+
function swapExactSyForPtStatic(
|
|
388
|
+
address market,
|
|
389
|
+
uint256 exactSyIn
|
|
390
|
+
)
|
|
390
391
|
public
|
|
391
392
|
returns (
|
|
392
393
|
uint256 netPtOut,
|
|
@@ -410,14 +411,12 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
410
411
|
}
|
|
411
412
|
|
|
412
413
|
/// @dev netPtIn is the parameter to approx
|
|
413
|
-
function swapPtForExactSyStatic(
|
|
414
|
+
function swapPtForExactSyStatic(
|
|
415
|
+
address market,
|
|
416
|
+
uint256 exactSyOut
|
|
417
|
+
)
|
|
414
418
|
public
|
|
415
|
-
returns (
|
|
416
|
-
uint256 netPtIn,
|
|
417
|
-
uint256 netSyFee,
|
|
418
|
-
uint256 priceImpact,
|
|
419
|
-
uint256 exchangeRateAfter
|
|
420
|
-
)
|
|
419
|
+
returns (uint256 netPtIn, uint256 netSyFee, uint256 priceImpact, uint256 exchangeRateAfter)
|
|
421
420
|
{
|
|
422
421
|
MarketState memory state = _readState(market);
|
|
423
422
|
|
|
@@ -482,7 +481,10 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
482
481
|
|
|
483
482
|
// ============ SWAP YT ============
|
|
484
483
|
|
|
485
|
-
function swapSyForExactYtStatic(
|
|
484
|
+
function swapSyForExactYtStatic(
|
|
485
|
+
address market,
|
|
486
|
+
uint256 exactYtOut
|
|
487
|
+
)
|
|
486
488
|
public
|
|
487
489
|
returns (
|
|
488
490
|
uint256 netSyIn,
|
|
@@ -512,7 +514,10 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
512
514
|
}
|
|
513
515
|
|
|
514
516
|
/// @dev netYtOut is the parameter to approx
|
|
515
|
-
function swapExactSyForYtStatic(
|
|
517
|
+
function swapExactSyForYtStatic(
|
|
518
|
+
address market,
|
|
519
|
+
uint256 exactSyIn
|
|
520
|
+
)
|
|
516
521
|
public
|
|
517
522
|
returns (
|
|
518
523
|
uint256 netYtOut,
|
|
@@ -538,7 +543,10 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
538
543
|
exchangeRateAfter = _getTradeExchangeRateExcludeFee(market, state);
|
|
539
544
|
}
|
|
540
545
|
|
|
541
|
-
function swapExactYtForSyStatic(
|
|
546
|
+
function swapExactYtForSyStatic(
|
|
547
|
+
address market,
|
|
548
|
+
uint256 exactYtIn
|
|
549
|
+
)
|
|
542
550
|
public
|
|
543
551
|
returns (
|
|
544
552
|
uint256 netSyOut,
|
|
@@ -575,7 +583,6 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
575
583
|
public
|
|
576
584
|
returns (
|
|
577
585
|
uint256 netTokenOut,
|
|
578
|
-
uint256 netSyToRedeem,
|
|
579
586
|
uint256 netSyFee,
|
|
580
587
|
uint256 priceImpact,
|
|
581
588
|
uint256 exchangeRateAfter,
|
|
@@ -596,18 +603,16 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
596
603
|
netPYToRedeemSyOutInt
|
|
597
604
|
) = swapExactYtForSyStatic(market, exactYtIn);
|
|
598
605
|
|
|
599
|
-
netTokenOut = _redeemSyToTokenStatic(market, tokenOut,
|
|
606
|
+
netTokenOut = _redeemSyToTokenStatic(market, tokenOut, netSyOut, bulk);
|
|
600
607
|
}
|
|
601
608
|
|
|
602
609
|
/// @dev netYtIn is the parameter to approx
|
|
603
|
-
function swapYtForExactSyStatic(
|
|
610
|
+
function swapYtForExactSyStatic(
|
|
611
|
+
address market,
|
|
612
|
+
uint256 exactSyOut
|
|
613
|
+
)
|
|
604
614
|
public
|
|
605
|
-
returns (
|
|
606
|
-
uint256 netYtIn,
|
|
607
|
-
uint256 netSyFee,
|
|
608
|
-
uint256 priceImpact,
|
|
609
|
-
uint256 exchangeRateAfter
|
|
610
|
-
)
|
|
615
|
+
returns (uint256 netYtIn, uint256 netSyFee, uint256 priceImpact, uint256 exchangeRateAfter)
|
|
611
616
|
{
|
|
612
617
|
MarketState memory state = _readState(market);
|
|
613
618
|
|
|
@@ -649,7 +654,10 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
649
654
|
}
|
|
650
655
|
|
|
651
656
|
// totalPtToSwap is the param to approx
|
|
652
|
-
function swapExactPtForYtStatic(
|
|
657
|
+
function swapExactPtForYtStatic(
|
|
658
|
+
address market,
|
|
659
|
+
uint256 exactPtIn
|
|
660
|
+
)
|
|
653
661
|
public
|
|
654
662
|
returns (
|
|
655
663
|
uint256 netYtOut,
|
|
@@ -676,7 +684,10 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
676
684
|
}
|
|
677
685
|
|
|
678
686
|
// totalPtSwapped is the param to approx
|
|
679
|
-
function swapExactYtForPtStatic(
|
|
687
|
+
function swapExactYtForPtStatic(
|
|
688
|
+
address market,
|
|
689
|
+
uint256 exactYtIn
|
|
690
|
+
)
|
|
680
691
|
public
|
|
681
692
|
returns (
|
|
682
693
|
uint256 netPtOut,
|
|
@@ -745,10 +756,10 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
745
756
|
);
|
|
746
757
|
}
|
|
747
758
|
|
|
748
|
-
function _getTradeExchangeRateExcludeFee(
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
{
|
|
759
|
+
function _getTradeExchangeRateExcludeFee(
|
|
760
|
+
address market,
|
|
761
|
+
MarketState memory state
|
|
762
|
+
) internal returns (uint256) {
|
|
752
763
|
return IPRouterStatic(address(this)).getTradeExchangeRateExcludeFee(market, state);
|
|
753
764
|
}
|
|
754
765
|
|