@pendle/core-v2 3.0.0-beta-9 → 3.0.0-beta-11
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/ExcessivelySafeCall.sol/ExcessivelySafeCall.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol/LayerZeroHelper.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/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/PendleMerkleDistributor.sol/PendleMerkleDistributor.dbg.json +4 -0
- package/build/artifacts/contracts/LiquidityMining/PendleMerkleDistributor.sol/PendleMerkleDistributor.json +426 -0
- package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributorV2.sol/PendleFeeDistributorV2.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributorV2.sol/PendleFeeDistributorV2.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/LiquidityMining/libraries/WeekMath.sol/WeekMath.dbg.json +1 -1
- 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/PendleExternalRewardDistributor.sol/PendleExternalRewardDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleExternalRewardDistributor.sol/PendleExternalRewardDistributor.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/Market/v2/PendleGaugeV2.sol/PendleGaugeV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/v2/PendleMarketFactoryV2.sol/PendleMarketFactoryV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/v2/PendleMarketFactoryV2.sol/PendleMarketFactoryV2.json +2 -2
- package/build/artifacts/contracts/core/Market/v2/PendleMarketV2.sol/PendleMarketV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/v2/PendleMarketV2.sol/PendleMarketV2.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/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/StEthHelper.sol/StEthHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ankr/PendleAnkrBNBSY.sol/PendleAnkrBNBSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ankr/PendleAnkrBNBSY.sol/PendleAnkrBNBSY.json +2 -2
- 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/AuraEthxBbAWethSY.sol/AuraEthxBbAWethSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/AuraEthxBbAWethSY.sol/AuraEthxBbAWethSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/AuraSwEthBbAWethSYV2.sol/AuraSwEthBbAWethSYV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/AuraSwEthBbAWethSYV2.sol/AuraSwEthBbAWethSYV2.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraBbAWethSwethSY.sol/PendleAuraBbAWethSwethSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraBbAWethSwethSY.sol/PendleAuraBbAWethSwethSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethAnkrethSYV2.sol/PendleAuraWethAnkrethSYV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethAnkrethSYV2.sol/PendleAuraWethAnkrethSYV2.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRocketEthSYV2.sol/PendleAuraWethRocketEthSYV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRocketEthSYV2.sol/PendleAuraWethRocketEthSYV2.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethStafiEthSY.sol/PendleAuraWethStafiEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethStafiEthSY.sol/PendleAuraWethStafiEthSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethVethSY.sol/PendleAuraWethVethSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethVethSY.sol/PendleAuraWethVethSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSYV2.sol/PendleAuraWethWstethSYV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSYV2.sol/PendleAuraWethWstethSYV2.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWstethAnkreth.sol/PendleAuraWstethAnkreth.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWstethAnkreth.sol/PendleAuraWstethAnkreth.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStableMath.sol/ComposableStableMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreview.sol/ComposableStablePreview.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreviewProxy.sol/ComposableStablePreviewProxy.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreviewV4.sol/ComposableStablePreviewV4.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreviewV5.sol/ComposableStablePreviewV5.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/FixedPoint.sol/FixedPoint.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/BbAPoolHelper.sol/BbAPoolHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/BbAPoolHelper.sol/BbAWethHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/LinearMath.sol/LinearMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/LinearPreview.sol/LinearPreview.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStableMath.sol/MetaStableMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStablePreview.sol/MetaStablePreview.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/PendleAuraBalancerStableLPSYV2.sol/PendleAuraBalancerStableLPSYV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePoolUserData.sol/StablePoolUserData.dbg.json +1 -1
- 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/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 +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotRewardHelper.sol/CamelotRewardHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatileCommon.sol/CamelotV1VolatileCommon.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatileLpHelper.sol/CamelotV1VolatileLpHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatilePreview.sol/CamelotV1VolatilePreview.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/PendleCamelotV1VolatileSY.sol/PendleCamelotV1VolatileSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/PendleCamelotV1VolatileSY.sol/PendleCamelotV1VolatileSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/ChainlinkRelayer/PendleChainlinkReceiver.sol/PendleChainlinkReceiver.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/ChainlinkRelayer/PendleChainlinkReceiver.sol/PendleChainlinkReceiver.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/ChainlinkRelayer/PendleChainlinkRelayer.sol/PendleChainlinkRelayer.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveFraxUsdcSY.sol/PendleCurveFraxUsdcSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveFraxUsdcSY.sol/PendleCurveFraxUsdcSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveUsdd3CrvSY.sol/PendleCurveUsdd3CrvSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveUsdd3CrvSY.sol/PendleCurveUsdd3CrvSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/Curve3CrvPoolHelper.sol/Curve3CrvPoolHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/CurveFraxUsdcPoolHelper.sol/CurveFraxUsdcPoolHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/CurveUsdd3CrvPoolHelper.sol/CurveUsdd3CrvPoolHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/PendleConvexLPSY.sol/PendleConvexLPSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Flux/FluxTokenLib.sol/FluxTokenLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Flux/FluxTokenLib.sol/FluxTokenLib.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Flux/PendleFluxLendingSY.sol/PendleFluxLendingSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Flux/PendleFluxLendingSY.sol/PendleFluxLendingSY.json +2 -2
- 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/HMX/HLPPricingHelper.sol/HLPPricingHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/HMX/PendleHlpSY.sol/PendleHlpSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/HMX/PendleHlpSY.sol/PendleHlpSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleMantleStakedEthSY.sol/PendleMantleStakedEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleMantleStakedEthSY.sol/PendleMantleStakedEthSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleOracleForSyProxy.sol/PendleOracleForSyProxy.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleOracleForSyProxy.sol/PendleOracleForSyProxy.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleArbitrumStakedEthSY.sol/PendleArbitrumStakedEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleArbitrumStakedEthSY.sol/PendleArbitrumStakedEthSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleBridgedLSDSY.sol/PendleBridgedLSDSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleBridgedLSDSY.sol/PendleBridgedLSDSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleERC4626SY.sol/PendleERC4626SY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleERC4626SY.sol/PendleERC4626SY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleEUSDSY.sol/PendleEUSDSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleEUSDSY.sol/PendleEUSDSY.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/PendleSfrxEthSY.sol/PendleSfrxEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleSfrxEthSY.sol/PendleSfrxEthSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleStargateLPSY.sol/PendleStargateLPSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleStargateLPSY.sol/PendleStargateLPSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWbEthSY.sol/PendleWbEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWbEthSY.sol/PendleWbEthSY.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/StandardizedYield/implementations/Stader/PendleETHXSY.sol/PendleETHXSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Stader/PendleETHXSY.sol/PendleETHXSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Swell/PendleSwETH.sol/SwETHSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Swell/PendleSwETH.sol/SwETHSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/PendleThenaSY.sol/PendleThenaSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/PendleThenaSY.sol/PendleThenaSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/ThenaLpHelper.sol/ThenaLpHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/ThenaMath.sol/ThenaMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/ThenaPreview.sol/IThenaSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/ThenaPreview.sol/ThenaPreview.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/InterestManagerYT.sol/InterestManagerYT.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/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/PendleERC20Permit.sol/PendleERC20Permit.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/ArrayLib.sol/ArrayLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/BaseSplitCodeFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/CodeDeployer.dbg.json +1 -1
- 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/Errors.sol/Errors.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.json +18 -18
- package/build/artifacts/contracts/core/libraries/ExpiryUtilsLib.sol/ExpiryUtils.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/MiniHelpers.sol/MiniHelpers.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/StringLib.sol/StringLib.dbg.json +1 -1
- 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/PMath.sol/PMath.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Ankr/IAnkrBNB.sol/IAnkrBNB.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Ankr/IAnkrLiquidStaking.sol/IAnkrLiquidStaking.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/IAsset.sol/IAsset.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/IBalancerFees.sol/IBalancerFees.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/IBalancerStablePreview.sol/IBalancerStablePreview.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/IBasePool.sol/IBasePool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/IComposableStable.sol/IComposableStable.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/IERC4626LinearPool.sol/IERC4626LinearPool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/IGauge.sol/IGauge.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/ILiquidityGaugeFactory.sol/ILiquidityGaugeFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/IMetaStablePool.sol/IMetaStablePool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/IPComposableStablePreview.sol/IPComposableStablePreview.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/IRateProvider.sol/IRateProvider.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/IVault.sol/IVault.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/IVersion.sol/IVersion.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/BinanceEth/IWBETH.sol/IWBETH.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotFactory.sol/ICamelotFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotNFTFactory.sol/ICamelotNFTFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotNFTHandler.sol/ICamelotNFTHandler.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotNFTPool.sol/ICamelotNFTPool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotNitroPool.sol/ICamelotNitroPool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotNitroPoolFactory.sol/ICamelotNitroPoolFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotPair.sol/ICamelotPair.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotRouter.sol/ICamelotRouter.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotYieldBooster.sol/ICamelotYieldBooster.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Camelot/IXGrail.sol/IXGrail.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/ICvxCrv.sol/ICvxCrv.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/Flux/IFluxErc20.sol/IFluxErc20.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Flux/IFluxInterestRateModel.sol/IFluxInterestRateModel.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Frax/IFrxEthMinter.sol/IFrxEthMinter.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/GMX/IGMXVault.sol/IGMXVault.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/GMX/IGlpManager.sol/IGlpManager.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/GMX/IRewardRouterV2.sol/IRewardRouterV2.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/GMX/IVaultPriceFeed.sol/IVaultPriceFeed.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/HMX/IHLPStaking.sol/IHLPStaking.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/HMX/IHMXCalculator.sol/IHMXCalculator.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/HMX/IHMXCompounder.sol/IHMXCompounder.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/HMX/IHMXStaking.sol/IHMXStaking.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/HMX/IHMXVester.sol/IHMXVester.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IAddressProvider.sol/IAddressProvider.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IApeStaking.sol/IApeStaking.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IBenQiComptroller.sol/IBenQiComptroller.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IBenQiInterestRateModel.sol/IBenQiInterestRateModel.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IDailLikePermit.sol/IDaiLikePermit.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IDiamondCut.sol/IDiamondCut.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/ILayerZeroEndpoint.sol/ILayerZeroEndpoint.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ILayerZeroReceiver.sol/ILayerZeroReceiver.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ILooksFeeSharing.sol/ILooksFeeSharing.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ILooksStaking.sol/ILooksStaking.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiqV3.sol/IPActionAddRemoveLiqV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionCallbackV3.sol/IPActionCallbackV3.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/{IPLimitRouter.sol/ILimitOrderCallee.json → IPActionCallbackV3.sol/IPActionCallbackV3.json} +19 -28
- 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/IPActionMintRedeemStatic.sol/IPActionMintRedeemStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMiscV3.sol/IPActionMiscV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMiscV3.sol/IPActionMiscV3.json +18 -42
- package/build/artifacts/contracts/interfaces/IPActionStorageStatic.sol/IPActionStorageStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapPTV3.sol/IPActionSwapPTV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapYTV3.sol/IPActionSwapYTV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionVePendleStatic.sol/IPActionVePendleStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllActionV3.sol/IPAllActionV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllActionV3.sol/IPAllActionV3.json +37 -27
- package/build/artifacts/contracts/interfaces/IPExternalRewardDistributor.sol/IPExternalRewardDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPFeeDistributor.sol/IPFeeDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPFeeDistributorV2.sol/IPFeeDistributorV2.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPGauge.sol/IPGauge.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/IPLimitRouter.sol/IPLimitRouter.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouter.json +23 -136
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouterCallback.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouterCallback.json +45 -0
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPOrderMixinType.dbg.json +1 -1
- 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/IPMarketFactoryV2.sol/IPMarketFactoryV2.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarketSwapCallback.sol/IPMarketSwapCallback.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMerkleDistributor.sol/IPMerkleDistributor.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPMerkleDistributor.sol/IPMerkleDistributor.json +150 -0
- package/build/artifacts/contracts/interfaces/IPMiniDiamond.sol/IPMiniDiamond.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMsgReceiverApp.sol/IPMsgReceiverApp.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMsgSendEndpoint.sol/IPMsgSendEndpoint.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPOracleForSy.sol/IPOracleForSy.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPrincipalToken.sol/IPPrincipalToken.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPtOracle.sol/IPPtOracle.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPRouterHelper.sol/IPRouterHelper.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPRouterStatic.sol/IPRouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPVeToken.sol/IPVeToken.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPVotingController.sol/IPVotingController.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPVotingEscrowMainchain.sol/IPVotingEscrowMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPYieldContractFactory.sol/IPYieldContractFactory.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/IPendlePreviewHelper.sol/IPendlePreviewHelper.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IQiAvax.sol/IQiAvax.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IQiErc20.sol/IQiErc20.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IQiToken.sol/IQiToken.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/IStargateLP.sol/IStargateLP.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IStargateRouter.sol/IStargateRouter.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IStargateStaking.sol/IStargateStaking.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ISwETH.sol/ISwETH.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IWETH.sol/IWETH.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IWstETH.sol/IWstETH.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Lybra/IEUSD.sol/IEUSD.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Stader/IStaderStakeManager.sol/IStaderStakeManager.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Thena/IThenaFactory.sol/IThenaFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Thena/IThenaGaugeV2.sol/IThenaGaugeV2.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Thena/IThenaPair.sol/IThenaPair.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Thena/IThenaRouter.sol/IThenaRouter.dbg.json +1 -1
- package/build/artifacts/contracts/limit/LimitMathCore.sol/LimitMathCore.dbg.json +1 -1
- package/build/artifacts/contracts/limit/LimitMathCore.sol/LimitMathCore.json +2 -2
- package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.dbg.json +1 -1
- package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.json +62 -132
- package/build/artifacts/contracts/limit/PendleOrderMixin.sol/PendleOrderMixin.dbg.json +1 -1
- package/build/artifacts/contracts/limit/PendleOrderMixin.sol/PendleOrderMixin.json +255 -130
- package/build/artifacts/contracts/limit/helpers/ArgumentsDecoder.sol/ArgumentsDecoder.dbg.json +1 -1
- package/build/artifacts/contracts/limit/helpers/NonceManager.sol/NonceManager.dbg.json +1 -1
- package/build/artifacts/contracts/limit/helpers/Permitable.sol/Permitable.dbg.json +1 -1
- package/build/artifacts/contracts/limit/helpers/RevertReasonParser.sol/RevertReasonParser.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AddressProvider.sol/AddressProvider.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/AutomateReady.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/IAutomate.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/IOpsProxyFactory.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/ITaskTreasuryUpgradable.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol/BaseSplitCodeFactoryContract.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BoringLpSeller.sol/BoringLpSeller.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BoringPtSeller.sol/BoringPtSeller.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/BytesLib.sol/BytesLib.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/BytesLib.sol/BytesLib.json +10 -0
- package/build/artifacts/contracts/offchain-helpers/ChainlinkRelayerGelato.sol/ChainlinkRelayerGelato.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/EmptyUUPS.sol/EmptyUUPS.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/LegacyNFTHelper.sol/LegacyNFTHelper.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/LegacyNFTHelper.sol/StarNFTV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/LimitBackendHelper.sol/LimitBackendHelper.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/LimitBackendHelper.sol/LimitBackendHelper.json +174 -0
- package/build/artifacts/contracts/offchain-helpers/MarketExchangeRateLib.sol/MarketExchangeRateLib.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/MarketExchangeRateLib.sol/MarketExchangeRateLib.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/Multicall2.sol/Multicall2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallV1.sol/PendleMulticallV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallV2.sol/PendleMulticallV2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PtAndLpToAsset.sol/PtAndLpToAsset.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PtAndLpToAsset.sol/PtAndLpToAsset.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/SimulateHelper.sol/SimulateHelper.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/SimulateHelper.sol/SimulateHelper.json +84 -0
- package/build/artifacts/contracts/offchain-helpers/errors/SDKErrorsDirectory.sol/SDKErrorsDirectory.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/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 -2
- 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 +2 -2
- 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 +1 -1
- package/build/artifacts/contracts/oracles/PendleLpOracleLib.sol/PendleLpOracleLib.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PendleLpOracleLib.sol/PendleLpOracleLib.json +2 -2
- package/build/artifacts/contracts/oracles/PendlePtOracle.sol/PendlePtOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PendlePtOracle.sol/PendlePtOracle.json +2 -2
- package/build/artifacts/contracts/oracles/PendlePtOracleLib.sol/PendlePtOracleLib.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PendlePtOracleLib.sol/PendlePtOracleLib.json +2 -2
- package/build/artifacts/contracts/oracles/samples/PendleLpGlpOracle.sol/PendleLpGlpOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/samples/PendleLpGlpOracle.sol/PendleLpGlpOracle.json +2 -2
- package/build/artifacts/contracts/oracles/samples/PendlePtGlpOracle.sol/PendlePtGlpOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/samples/PendlePtGlpOracle.sol/PendlePtGlpOracle.json +2 -2
- package/build/artifacts/contracts/oracles/samples/PendlePtUsdChainlinkOracle.sol/PendlePtUsdChainlinkOracle.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionAddRemoveLiqV3.sol/ActionAddRemoveLiqV3.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionAddRemoveLiqV3.sol/ActionAddRemoveLiqV3.json +2 -2
- package/build/artifacts/contracts/router/ActionCallbackV3.sol/ActionCallbackV3.dbg.json +4 -0
- package/build/artifacts/contracts/router/ActionCallbackV3.sol/ActionCallbackV3.json +116 -0
- package/build/artifacts/contracts/router/ActionMiscV3.sol/ActionMiscV3.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionMiscV3.sol/ActionMiscV3.json +36 -60
- package/build/artifacts/contracts/router/ActionSwapPTV3.sol/ActionSwapPTV3.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapPTV3.sol/ActionSwapPTV3.json +2 -2
- package/build/artifacts/contracts/router/ActionSwapYTV3.sol/ActionSwapYTV3.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapYTV3.sol/ActionSwapYTV3.json +2 -57
- package/build/artifacts/contracts/router/PendleRouterHelper.sol/PendleRouterHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/PendleRouterHelper.sol/PendleRouterHelper.json +2 -2
- package/build/artifacts/contracts/router/PendleRouterHelper.sol/RouterV2InterfaceForRouterHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/PendleRouterV3.sol/PendleRouterV3.dbg.json +1 -1
- package/build/artifacts/contracts/router/PendleRouterV3.sol/PendleRouterV3.json +7 -2
- package/build/artifacts/contracts/router/base/ActionBase.sol/ActionBase.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/IPSwapAggregator.sol/IPSwapAggregator.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwap.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwap.json +2 -2
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/IAggregationExecutor.sol/IAggregationExecutor.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/IExecutorHelper.sol/IExecutorHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/IMetaAggregationRouterV2.sol/IMetaAggregationRouterV2.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/KyberInputScalingHelper.sol/KyberInputScalingHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/ScalingDataLib.sol/ScalingDataLib.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/oneinch/I1inchAggregationRouterV5.sol/I1inchAggregationRouterV5.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/oneinch/OneInchAggregationRouterHelper.sol/OneInchAggregationRouterHelper.dbg.json +1 -1
- package/contracts/LiquidityMining/PendleMerkleDistributor.sol +95 -0
- package/contracts/core/libraries/Errors.sol +1 -1
- package/contracts/interfaces/IPActionCallbackV3.sol +7 -0
- package/contracts/interfaces/IPActionMiscV3.sol +1 -6
- package/contracts/interfaces/IPAllActionV3.sol +2 -2
- package/contracts/interfaces/IPLimitRouter.sol +11 -47
- package/contracts/interfaces/IPMerkleDistributor.sol +24 -0
- package/contracts/limit/LimitMathCore.sol +17 -99
- package/contracts/limit/PendleLimitRouter.sol +7 -5
- package/contracts/limit/PendleOrderMixin.sol +38 -148
- package/contracts/offchain-helpers/BytesLib.sol +539 -0
- package/contracts/offchain-helpers/LimitBackendHelper.sol +100 -0
- package/contracts/offchain-helpers/SimulateHelper.sol +41 -0
- package/contracts/router/{base/ActionBaseCallback.sol → ActionCallbackV3.sol} +57 -9
- package/contracts/router/ActionMiscV3.sol +4 -13
- package/contracts/router/ActionSwapYTV3.sol +2 -2
- package/contracts/router/PendleRouterV3.sol +52 -45
- package/contracts/router/base/ActionBase.sol +13 -8
- package/deployments/42161-core.json +2 -1
- package/package.json +1 -1
- package/typechain-types/ActionCallbackV3.ts +164 -0
- package/typechain-types/ActionMiscV3.ts +36 -75
- package/typechain-types/ActionSwapYTV3.ts +0 -44
- package/typechain-types/IPActionCallbackV3.ts +164 -0
- package/typechain-types/IPActionMiscV3.ts +36 -75
- package/typechain-types/IPAllActionV3.ts +70 -60
- package/typechain-types/IPLimitRouter.ts +39 -72
- package/typechain-types/IPLimitRouterCallback.ts +120 -0
- package/typechain-types/IPMarketFactoryV3.ts +225 -0
- package/typechain-types/IPMarketV3.ts +1068 -0
- package/typechain-types/LimitBackendHelper.ts +287 -0
- package/typechain-types/PendleLimitRouter.ts +110 -92
- package/typechain-types/PendleMarketFactoryV3.ts +719 -0
- package/typechain-types/PendleMarketV3.ts +1364 -0
- package/typechain-types/PendleOrderMixin.ts +292 -92
- package/typechain-types/SimulateHelper.ts +42 -35
- package/typechain-types/factories/ActionAddRemoveLiqV3__factory.ts +1 -1
- package/typechain-types/factories/ActionAddRemoveLiq__factory.ts +1 -1
- package/typechain-types/factories/ActionBaseCallback__factory.ts +59 -0
- package/typechain-types/factories/ActionCallbackV3__factory.ts +169 -0
- 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 -1
- package/typechain-types/factories/ActionMintRedeemStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionMintRedeem__factory.ts +1 -1
- package/typechain-types/factories/ActionMiscV3__factory.ts +35 -59
- package/typechain-types/factories/ActionStorageStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionSwapPTV3__factory.ts +1 -1
- package/typechain-types/factories/ActionSwapPT__factory.ts +1 -1
- package/typechain-types/factories/ActionSwapYTV3__factory.ts +1 -56
- package/typechain-types/factories/ActionSwapYT__factory.ts +1 -1
- package/typechain-types/factories/ActionVePendleStatic__factory.ts +1 -1
- package/typechain-types/factories/AuraEthxBbAWethSY__factory.ts +1 -1
- package/typechain-types/factories/AuraSwEthBbAWethSYV2__factory.ts +1 -1
- package/typechain-types/factories/AuraWethVethSYUpg__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/Errors__factory.ts +17 -17
- package/typechain-types/factories/IPActionCallbackV3__factory.ts +83 -0
- package/typechain-types/factories/IPActionMiscV3__factory.ts +18 -42
- package/typechain-types/factories/IPAllActionV3__factory.ts +37 -27
- package/typechain-types/factories/IPLimitRouterCallback__factory.ts +64 -0
- package/typechain-types/factories/IPLimitRouter__factory.ts +23 -136
- package/typechain-types/factories/IPMarketFactoryV3__factory.ts +160 -0
- package/typechain-types/factories/IPMarketV3__factory.ts +845 -0
- package/typechain-types/factories/LimitBackendHelper__factory.ts +232 -0
- package/typechain-types/factories/OracleLib__factory.ts +1 -1
- package/typechain-types/factories/PendleAnkrBNBSY__factory.ts +1 -1
- package/typechain-types/factories/PendleArbitrumStakedEthSY__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraBbAWethSwethSY__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraWethAnkrethSYV2__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraWethRocketEthSYV2__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraWethStafiEthSY__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraWethVethSY__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraWethWstethSYV2__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraWstethAnkreth__factory.ts +1 -1
- package/typechain-types/factories/PendleBridgedLSDSY__factory.ts +1 -1
- package/typechain-types/factories/PendleCamelotV1VolatileSY__factory.ts +1 -1
- package/typechain-types/factories/PendleChainlinkReceiver__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/PendleERC4626SY__factory.ts +1 -1
- package/typechain-types/factories/PendleETHXSY__factory.ts +1 -1
- package/typechain-types/factories/PendleEUSDSY__factory.ts +1 -1
- package/typechain-types/factories/PendleExternalRewardDistributor__factory.ts +1 -1
- package/typechain-types/factories/PendleFeeDistributorV2__factory.ts +1 -1
- package/typechain-types/factories/PendleFeeDistributor__factory.ts +1 -1
- package/typechain-types/factories/PendleFluxLendingSY__factory.ts +1 -1
- package/typechain-types/factories/PendleGDaiSY__factory.ts +1 -1
- package/typechain-types/factories/PendleGMV2TokenSY__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/PendleHlpSY__factory.ts +1 -1
- package/typechain-types/factories/PendleKyberElasticSYUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleLimitRouter__factory.ts +61 -131
- package/typechain-types/factories/PendleLooksStakingSY__factory.ts +1 -1
- package/typechain-types/factories/PendleLpGlpOracle__factory.ts +1 -1
- package/typechain-types/factories/PendleMantleStakedEthSY__factory.ts +1 -1
- package/typechain-types/factories/PendleMarketFactoryV2__factory.ts +1 -1
- package/typechain-types/factories/PendleMarketFactoryV3__factory.ts +714 -0
- package/typechain-types/factories/PendleMarketFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleMarketV2__factory.ts +1 -1
- package/typechain-types/factories/PendleMarketV3__factory.ts +1351 -0
- package/typechain-types/factories/PendleMarket__factory.ts +1 -1
- package/typechain-types/factories/PendleMerkleDistributor__factory.ts +1 -1
- package/typechain-types/factories/PendleMlpSY__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/PendleOracleForSyProxy__factory.ts +1 -1
- package/typechain-types/factories/PendleOrderMixin__factory.ts +254 -129
- package/typechain-types/factories/PendlePrincipalTokenV2__factory.ts +1 -1
- package/typechain-types/factories/PendlePrincipalToken__factory.ts +1 -1
- package/typechain-types/factories/PendlePtGlpOracle__factory.ts +1 -1
- package/typechain-types/factories/PendlePtOracle__factory.ts +1 -1
- package/typechain-types/factories/PendleQiTokenHelper__factory.ts +1 -1
- package/typechain-types/factories/PendleQiTokenSY__factory.ts +1 -1
- package/typechain-types/factories/PendleRouterHelper2__factory.ts +1 -1
- package/typechain-types/factories/PendleRouterHelper__factory.ts +1 -1
- package/typechain-types/factories/PendleRouterStatic__factory.ts +1 -1
- package/typechain-types/factories/PendleRouterV3__factory.ts +10 -1
- package/typechain-types/factories/PendleRouter__factory.ts +1 -1
- package/typechain-types/factories/PendleSfrxEthSY__factory.ts +1 -1
- package/typechain-types/factories/PendleSiloWithIncentiveSY__factory.ts +1 -1
- package/typechain-types/factories/PendleStargateLPSY__factory.ts +1 -1
- package/typechain-types/factories/PendleSwapL1__factory.ts +1 -1
- package/typechain-types/factories/PendleSwapL2__factory.ts +1 -1
- package/typechain-types/factories/PendleSwap__factory.ts +1 -1
- package/typechain-types/factories/PendleThenaSY__factory.ts +1 -1
- package/typechain-types/factories/PendleVotingControllerUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleWbEthSY__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/PtAndLpToAsset__factory.ts +1 -1
- package/typechain-types/factories/SAPE__factory.ts +1 -1
- package/typechain-types/factories/SimulateHelper__factory.ts +71 -18
- package/typechain-types/factories/SwETHSY__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 +94 -22
- package/typechain-types/index.ts +22 -6
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/ILimitOrderCallee.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPOrderMixin.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPOrderMixin.json +0 -438
- package/build/artifacts/contracts/router/base/ActionBaseCallback.sol/ActionBaseCallback.dbg.json +0 -4
- package/build/artifacts/contracts/router/base/ActionBaseCallback.sol/ActionBaseCallback.json +0 -82
- package/build/artifacts/contracts/router/base/SimulateHelper.sol/SimulateHelper.dbg.json +0 -4
- package/build/artifacts/contracts/router/base/SimulateHelper.sol/SimulateHelper.json +0 -69
- package/contracts/router/base/SimulateHelper.sol +0 -33
|
@@ -50,7 +50,7 @@ struct Order {
|
|
|
50
50
|
uint256 makingAmount;
|
|
51
51
|
uint256 lnImpliedRate;
|
|
52
52
|
uint256 failSafeRate;
|
|
53
|
-
bytes permit;
|
|
53
|
+
bytes permit;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
struct FillOrderParams {
|
|
@@ -59,7 +59,13 @@ struct FillOrderParams {
|
|
|
59
59
|
uint256 makingAmount;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
interface
|
|
62
|
+
interface IPLimitRouterCallback is IPOrderMixinType {
|
|
63
|
+
function normalFillCallback(uint256 actualMaking, uint256 actualTaking, uint256 totalFee, bytes memory data)
|
|
64
|
+
external
|
|
65
|
+
returns (bytes memory);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
interface IPLimitRouter is IPOrderMixinType {
|
|
63
69
|
struct OrderStatus {
|
|
64
70
|
uint128 filledAmount;
|
|
65
71
|
uint128 remaining;
|
|
@@ -78,59 +84,15 @@ interface IPOrderMixin is IPOrderMixinType {
|
|
|
78
84
|
uint256 notionalVolume
|
|
79
85
|
);
|
|
80
86
|
|
|
81
|
-
/**
|
|
82
|
-
* (making, taking)
|
|
83
|
-
* SY_FOR_PT: (SY, PT)
|
|
84
|
-
* PT_FOR_SY: (PT, SY)
|
|
85
|
-
* SY_FOR_YT: (SY, YT)
|
|
86
|
-
* YT_FOR_SY: (YT, SY)
|
|
87
|
-
*/
|
|
88
87
|
// @dev actualMaking, actualTaking are in the SY form
|
|
89
88
|
function normalFill(FillOrderParams[] memory params, address receiver, uint256 maxTaking, bytes calldata callback)
|
|
90
89
|
external
|
|
91
|
-
returns (uint256 actualMaking, uint256 actualTaking, uint256 totalFee);
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* (output, input)
|
|
95
|
-
* SY_FOR_PT: (YT, SY)
|
|
96
|
-
* PT_FOR_SY: (SY, YT)
|
|
97
|
-
* SY_FOR_YT: (PT, SY)
|
|
98
|
-
* YT_FOR_SY: (SY, PT)
|
|
99
|
-
*/
|
|
100
|
-
|
|
101
|
-
// @dev netOutputToTaker, netInputFromTaker are in the SY form
|
|
102
|
-
function flashFill(FillOrderParams[] memory params, address receiver, uint256 maxInput, bytes calldata callback)
|
|
103
|
-
external
|
|
104
|
-
returns (uint256 netOutputToTaker, uint256 netInputFromTaker, uint256 totalFee);
|
|
90
|
+
returns (uint256 actualMaking, uint256 actualTaking, uint256 totalFee, bytes memory callbackReturn);
|
|
105
91
|
|
|
106
92
|
function feeRecipient() external view returns (address);
|
|
107
93
|
|
|
108
|
-
function lnFeeRateRoot() external view returns (uint96);
|
|
109
|
-
|
|
110
94
|
function hashOrder(Order memory order) external view returns (bytes32);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
interface ILimitOrderCallee is IPOrderMixinType {
|
|
114
|
-
/// Refer to normalFill
|
|
115
|
-
function normalFillCall(
|
|
116
|
-
OrderType orderType,
|
|
117
|
-
uint256 actualMaking,
|
|
118
|
-
uint256 actualTaking,
|
|
119
|
-
uint256 totalFee,
|
|
120
|
-
bytes memory data
|
|
121
|
-
) external;
|
|
122
|
-
|
|
123
|
-
/// Refer to flashFill
|
|
124
|
-
function flashFillCall(
|
|
125
|
-
OrderType orderType,
|
|
126
|
-
uint256 netOutputToTaker,
|
|
127
|
-
uint256 netInputFromTaker,
|
|
128
|
-
uint256 totalFee,
|
|
129
|
-
bytes memory data
|
|
130
|
-
) external;
|
|
131
|
-
}
|
|
132
95
|
|
|
133
|
-
interface IPLimitRouter is IPOrderMixin {
|
|
134
96
|
function cancelSingle(Order calldata order) external;
|
|
135
97
|
|
|
136
98
|
function cancelBatch(Order[] calldata orders) external;
|
|
@@ -146,4 +108,6 @@ interface IPLimitRouter is IPOrderMixin {
|
|
|
146
108
|
returns (uint256[] memory remainings, uint256[] memory filledAmounts);
|
|
147
109
|
|
|
148
110
|
function DOMAIN_SEPARATOR() external view returns (bytes32);
|
|
111
|
+
|
|
112
|
+
function simulate(address target, bytes calldata data) external payable;
|
|
149
113
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity ^0.8.0;
|
|
3
|
+
|
|
4
|
+
interface IPMerkleDistributor {
|
|
5
|
+
event Claimed(address indexed user, address indexed receiver, uint256 amount);
|
|
6
|
+
event Verified(address indexed user, uint256 amountClaimable);
|
|
7
|
+
event SetMerkleRoot(bytes32 indexed merkleRoot);
|
|
8
|
+
|
|
9
|
+
error InvalidMerkleProof();
|
|
10
|
+
|
|
11
|
+
function claim(
|
|
12
|
+
address receiver,
|
|
13
|
+
uint256 totalAccrued,
|
|
14
|
+
bytes32[] calldata proof
|
|
15
|
+
) external returns (uint256 amountOut);
|
|
16
|
+
|
|
17
|
+
function claimVerified(address receiver) external returns (uint256 amountOut);
|
|
18
|
+
|
|
19
|
+
function verify(
|
|
20
|
+
address user,
|
|
21
|
+
uint256 totalAccrued,
|
|
22
|
+
bytes32[] calldata proof
|
|
23
|
+
) external returns (uint256 amountVerified);
|
|
24
|
+
}
|
|
@@ -21,27 +21,6 @@ library LimitMathCore {
|
|
|
21
21
|
);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
function calcFlashBatch(FillOrderParams[] memory params, address YT, uint256 lnFeeRateRoot)
|
|
25
|
-
internal
|
|
26
|
-
returns (
|
|
27
|
-
uint256 netInputFromTaker,
|
|
28
|
-
uint256 netOutputToTaker,
|
|
29
|
-
uint256 netFee,
|
|
30
|
-
IPOrderMixinType.NormalResults memory out
|
|
31
|
-
)
|
|
32
|
-
{
|
|
33
|
-
(, function (uint256, uint256, uint256, PYIndex) internal pure returns (uint256, uint256) calcFlash) =
|
|
34
|
-
getCalcFunctions(params[0].order.orderType);
|
|
35
|
-
|
|
36
|
-
uint256 timeToExpiry = IPYieldToken(YT).expiry() - block.timestamp;
|
|
37
|
-
uint256 pyIndex = IPYieldToken(YT).pyIndexCurrent();
|
|
38
|
-
|
|
39
|
-
out = calcNormalBatch(params, timeToExpiry, pyIndex, lnFeeRateRoot);
|
|
40
|
-
(netInputFromTaker, netOutputToTaker) =
|
|
41
|
-
calcFlash(out.totalMaking, out.totalTaking, out.totalFee, PYIndex.wrap(pyIndex));
|
|
42
|
-
netFee = out.totalFee;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
24
|
// --- PURE FUNCTIONS ---
|
|
46
25
|
function calcNormalBatch(
|
|
47
26
|
FillOrderParams[] memory params,
|
|
@@ -55,7 +34,7 @@ library LimitMathCore {
|
|
|
55
34
|
out.netFees = new uint256[](len);
|
|
56
35
|
out.notionalVolumes = new uint256[](len);
|
|
57
36
|
|
|
58
|
-
|
|
37
|
+
function (uint256, uint256, PYIndex, uint256) internal pure returns (uint256, uint256, uint256) calcNormal =
|
|
59
38
|
getCalcFunctions(params[0].order.orderType);
|
|
60
39
|
|
|
61
40
|
uint256 feeRate = impliedRateToExchangeRate(lnFeeRateRoot, timeToExpiry);
|
|
@@ -89,7 +68,7 @@ library LimitMathCore {
|
|
|
89
68
|
// notionalVolume = makeSy
|
|
90
69
|
|
|
91
70
|
takePt = index.syToAsset(makeSy).mulDown(r);
|
|
92
|
-
fee = makeSy
|
|
71
|
+
fee = makeSy * (f - PMath.ONE) / f;
|
|
93
72
|
notionalVolume = makeSy;
|
|
94
73
|
}
|
|
95
74
|
|
|
@@ -103,8 +82,8 @@ library LimitMathCore {
|
|
|
103
82
|
// fee = takeSy * (f-1)/f
|
|
104
83
|
// notionalVolume = takeSy
|
|
105
84
|
|
|
106
|
-
takeSy = index.
|
|
107
|
-
fee = takeSy
|
|
85
|
+
takeSy = index.assetToSy(makePt.divDown(r));
|
|
86
|
+
fee = takeSy.mulDown(f - PMath.ONE);
|
|
108
87
|
notionalVolume = takeSy;
|
|
109
88
|
}
|
|
110
89
|
|
|
@@ -117,10 +96,11 @@ library LimitMathCore {
|
|
|
117
96
|
// yt = pt / (r-1)
|
|
118
97
|
// fee = makeSy * ((f-1) / f) / (r-1)
|
|
119
98
|
// notionalVolume = makeSy / (r-1)
|
|
99
|
+
uint256 pt_yt_ratio = r - PMath.ONE;
|
|
120
100
|
|
|
121
|
-
takeYt = index.
|
|
122
|
-
fee =
|
|
123
|
-
notionalVolume = makeSy.divDown(
|
|
101
|
+
takeYt = index.syToAsset(makeSy) * r / pt_yt_ratio;
|
|
102
|
+
fee = makeSy * (f - PMath.ONE) / pt_yt_ratio;
|
|
103
|
+
notionalVolume = makeSy.divDown(pt_yt_ratio);
|
|
124
104
|
}
|
|
125
105
|
|
|
126
106
|
function calcYtForSyNormal(uint256 makeYt, uint256 r, PYIndex index, uint256 f)
|
|
@@ -132,55 +112,11 @@ library LimitMathCore {
|
|
|
132
112
|
// takeSy = pt / r / index
|
|
133
113
|
// feeSy = takeSy * (f-1) / (r-1)
|
|
134
114
|
// notionalVolume = takeSy / (r-1)
|
|
115
|
+
uint256 pt_yt_ratio = r - PMath.ONE;
|
|
135
116
|
|
|
136
|
-
takeSy = index.
|
|
137
|
-
fee = takeSy * (f - PMath.ONE) / (
|
|
138
|
-
notionalVolume = takeSy.divDown(
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
// Proof of index.syToAsset(index.assetToSyUp(takePt)) >= takePt at end of this file
|
|
142
|
-
function calcSyForPtFlash(uint256 makeSy, uint256 takePt, uint256 fee, PYIndex index)
|
|
143
|
-
internal
|
|
144
|
-
pure
|
|
145
|
-
returns (uint256 syFromTaker, uint256 ytToTaker)
|
|
146
|
-
{
|
|
147
|
-
uint256 syToMintPy = index.assetToSyUp(takePt);
|
|
148
|
-
|
|
149
|
-
syFromTaker = syToMintPy - (makeSy - fee);
|
|
150
|
-
ytToTaker = takePt;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
function calcPtForSyFlash(uint256 makePt, uint256 takeSy, uint256 fee, PYIndex index)
|
|
154
|
-
internal
|
|
155
|
-
pure
|
|
156
|
-
returns (uint256 ytFromTaker, uint256 syToTaker)
|
|
157
|
-
{
|
|
158
|
-
uint256 syRedeemFromPy = index.assetToSy(makePt);
|
|
159
|
-
syToTaker = syRedeemFromPy - (takeSy + fee);
|
|
160
|
-
|
|
161
|
-
ytFromTaker = makePt;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
function calcSyForYtFlash(uint256 makeSy, uint256 takeYt, uint256 fee, PYIndex index)
|
|
165
|
-
internal
|
|
166
|
-
pure
|
|
167
|
-
returns (uint256 syFromTaker, uint256 ptToTaker)
|
|
168
|
-
{
|
|
169
|
-
uint256 syToMintPy = index.assetToSyUp(takeYt);
|
|
170
|
-
|
|
171
|
-
syFromTaker = syToMintPy - (makeSy - fee);
|
|
172
|
-
ptToTaker = takeYt;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
function calcYtForSyFlash(uint256 makeYt, uint256 takeSy, uint256 fee, PYIndex index)
|
|
176
|
-
internal
|
|
177
|
-
pure
|
|
178
|
-
returns (uint256 ptFromTaker, uint256 syToTaker)
|
|
179
|
-
{
|
|
180
|
-
uint256 syRedeemFromPy = index.assetToSy(makeYt);
|
|
181
|
-
|
|
182
|
-
syToTaker = syRedeemFromPy - (takeSy + fee);
|
|
183
|
-
ptFromTaker = makeYt;
|
|
117
|
+
takeSy = index.assetToSy(makeYt * pt_yt_ratio / r);
|
|
118
|
+
fee = (takeSy * (f - PMath.ONE) / f).divDown(pt_yt_ratio);
|
|
119
|
+
notionalVolume = takeSy.divDown(pt_yt_ratio);
|
|
184
120
|
}
|
|
185
121
|
|
|
186
122
|
function impliedRateToExchangeRate(uint256 lnRate, uint256 timeToExpiry) internal pure returns (uint256) {
|
|
@@ -193,39 +129,21 @@ library LimitMathCore {
|
|
|
193
129
|
}
|
|
194
130
|
}
|
|
195
131
|
|
|
196
|
-
/// @dev diff sig for calcNormal and calcFlash to avoid miscalling
|
|
197
132
|
function getCalcFunctions(IPOrderMixinType.OrderType t)
|
|
198
133
|
internal
|
|
199
134
|
pure
|
|
200
135
|
returns (
|
|
201
|
-
function (uint256, uint256, PYIndex, uint256) internal pure returns (uint256, uint256, uint256) calcNormal
|
|
202
|
-
function (uint256, uint256, uint256, PYIndex) internal pure returns (uint256, uint256) calcFlash
|
|
136
|
+
function (uint256, uint256, PYIndex, uint256) internal pure returns (uint256, uint256, uint256) calcNormal
|
|
203
137
|
)
|
|
204
138
|
{
|
|
205
139
|
if (t == IPOrderMixinType.OrderType.SY_FOR_PT) {
|
|
206
|
-
return (calcSyForPtNormal
|
|
140
|
+
return (calcSyForPtNormal);
|
|
207
141
|
} else if (t == IPOrderMixinType.OrderType.PT_FOR_SY) {
|
|
208
|
-
return (calcPtForSyNormal
|
|
142
|
+
return (calcPtForSyNormal);
|
|
209
143
|
} else if (t == IPOrderMixinType.OrderType.SY_FOR_YT) {
|
|
210
|
-
return (calcSyForYtNormal
|
|
144
|
+
return (calcSyForYtNormal);
|
|
211
145
|
} else {
|
|
212
|
-
return (calcYtForSyNormal
|
|
146
|
+
return (calcYtForSyNormal);
|
|
213
147
|
}
|
|
214
148
|
}
|
|
215
149
|
}
|
|
216
|
-
|
|
217
|
-
/*
|
|
218
|
-
Proof of index.syToAsset(index.assetToSyUp(x)) >= x
|
|
219
|
-
|
|
220
|
-
let y = index.assetToSyUp(x)
|
|
221
|
-
=> y <= (x+index-1) * 1e18 / index < y+1 (since floor of the division == y)
|
|
222
|
-
=> (x+index-1) * 1e18 / index < y+1
|
|
223
|
-
=> x+index-1 < (y+1) * index / 1e18
|
|
224
|
-
=> x < (y+1) * index / 1e18 - index + 1
|
|
225
|
-
|
|
226
|
-
=> x < y * index / 1e18 + index / 1e18 - index + 1
|
|
227
|
-
It's obvious that "index / 1e18 - index + 1" < 0 as long as index >= 2
|
|
228
|
-
|
|
229
|
-
=> y * index / 1e18 + index / 1e18 - index + 1 <= y * index / 1e18
|
|
230
|
-
=> x <= y * index / 1e18
|
|
231
|
-
*/
|
|
@@ -2,12 +2,9 @@
|
|
|
2
2
|
pragma solidity ^0.8.17;
|
|
3
3
|
|
|
4
4
|
import "./PendleOrderMixin.sol";
|
|
5
|
-
import "
|
|
6
|
-
import "../core/libraries/TokenHelper.sol";
|
|
7
|
-
import "../interfaces/IAddressProvider.sol";
|
|
5
|
+
import "../core/libraries/Errors.sol";
|
|
8
6
|
|
|
9
|
-
contract PendleLimitRouter is PendleOrderMixin
|
|
10
|
-
using ArgumentsDecoder for bytes;
|
|
7
|
+
contract PendleLimitRouter is PendleOrderMixin {
|
|
11
8
|
using Address for address;
|
|
12
9
|
|
|
13
10
|
constructor(address _WNATIVE) PendleOrderMixin(_WNATIVE) {
|
|
@@ -64,4 +61,9 @@ contract PendleLimitRouter is PendleOrderMixin, IPLimitRouter {
|
|
|
64
61
|
function DOMAIN_SEPARATOR() external view returns (bytes32) {
|
|
65
62
|
return _domainSeparatorV4();
|
|
66
63
|
}
|
|
64
|
+
|
|
65
|
+
function simulate(address target, bytes calldata data) external payable {
|
|
66
|
+
(bool success, bytes memory result) = target.delegatecall(data);
|
|
67
|
+
revert Errors.SimulationResults(success, result);
|
|
68
|
+
}
|
|
67
69
|
}
|
|
@@ -3,34 +3,24 @@
|
|
|
3
3
|
pragma solidity ^0.8.17;
|
|
4
4
|
|
|
5
5
|
import "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol";
|
|
6
|
-
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
|
|
7
|
-
import "@openzeppelin/contracts/utils/Address.sol";
|
|
8
6
|
import "@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol";
|
|
9
7
|
import "../interfaces/IPLimitRouter.sol";
|
|
10
8
|
import "../core/libraries/BoringOwnableUpgradeable.sol";
|
|
11
9
|
import "../core/libraries/TokenHelper.sol";
|
|
12
10
|
import "../interfaces/IStandardizedYield.sol";
|
|
13
|
-
import "./helpers/Permitable.sol";
|
|
14
11
|
import "./helpers/NonceManager.sol";
|
|
15
|
-
import "./helpers/ArgumentsDecoder.sol";
|
|
16
12
|
import "../interfaces/IWETH.sol";
|
|
17
13
|
import {LimitMathCore as LimitMath} from "./LimitMathCore.sol";
|
|
18
14
|
|
|
19
15
|
abstract contract PendleOrderMixin is
|
|
20
16
|
EIP712Upgradeable,
|
|
21
|
-
|
|
22
|
-
Permitable,
|
|
17
|
+
IPLimitRouter,
|
|
23
18
|
BoringOwnableUpgradeable,
|
|
24
19
|
NonceManager,
|
|
25
20
|
TokenHelper
|
|
26
21
|
{
|
|
27
22
|
using SafeERC20 for IERC20;
|
|
28
|
-
using PYIndexLib for PYIndex;
|
|
29
23
|
using PMath for uint256;
|
|
30
|
-
using PMath for int256;
|
|
31
|
-
using PYIndexLib for IPYieldToken;
|
|
32
|
-
using ArgumentsDecoder for bytes;
|
|
33
|
-
using Address for address payable;
|
|
34
24
|
|
|
35
25
|
bytes32 internal constant LIMIT_ORDER_TYPEHASH = keccak256(
|
|
36
26
|
"Order(uint256 salt,uint256 expiry,uint256 nonce,uint8 orderType,address token,address YT,address maker,address receiver,uint256 makingAmount,uint256 lnImpliedRate,uint256 failSafeRate,bytes permit)"
|
|
@@ -40,7 +30,9 @@ abstract contract PendleOrderMixin is
|
|
|
40
30
|
uint128 internal constant _ORDER_FILLED = 1;
|
|
41
31
|
|
|
42
32
|
address public feeRecipient;
|
|
43
|
-
|
|
33
|
+
|
|
34
|
+
// YT => lnFeeRateRoot // not to be accessed directly
|
|
35
|
+
mapping(address => uint256) internal __lnFeeRateRoot;
|
|
44
36
|
|
|
45
37
|
address private immutable WNATIVE;
|
|
46
38
|
|
|
@@ -55,15 +47,15 @@ abstract contract PendleOrderMixin is
|
|
|
55
47
|
// solhint-disable-next-line no-empty-blocks
|
|
56
48
|
receive() external payable {}
|
|
57
49
|
|
|
58
|
-
function initialize(address _feeRecipient
|
|
50
|
+
function initialize(address _feeRecipient) external initializer {
|
|
59
51
|
__BoringOwnable_init();
|
|
60
52
|
__EIP712_init("Pendle Limit Order Protocol", "1");
|
|
61
|
-
|
|
53
|
+
setFeeRecipient(_feeRecipient);
|
|
62
54
|
}
|
|
63
55
|
|
|
64
56
|
function normalFill(FillOrderParams[] memory params, address receiver, uint256 maxTaking, bytes memory callback)
|
|
65
57
|
external
|
|
66
|
-
returns (uint256 actualMaking, uint256 actualTaking, uint256 totalFee)
|
|
58
|
+
returns (uint256 actualMaking, uint256 actualTaking, uint256 totalFee, bytes memory callbackReturn)
|
|
67
59
|
{
|
|
68
60
|
_validateOrdersSkipSig(params);
|
|
69
61
|
OrderType orderType = params[0].order.orderType;
|
|
@@ -74,19 +66,6 @@ abstract contract PendleOrderMixin is
|
|
|
74
66
|
}
|
|
75
67
|
}
|
|
76
68
|
|
|
77
|
-
function flashFill(FillOrderParams[] memory params, address receiver, uint256 maxInput, bytes memory callback)
|
|
78
|
-
external
|
|
79
|
-
returns (uint256 netOutputToTaker, uint256 netInputFromTaker, uint256 totalFee)
|
|
80
|
-
{
|
|
81
|
-
_validateOrdersSkipSig(params);
|
|
82
|
-
OrderType orderType = params[0].order.orderType;
|
|
83
|
-
if (orderType == OrderType.SY_FOR_PT || orderType == OrderType.SY_FOR_YT) {
|
|
84
|
-
return flashFillTokenForPY(Args(orderType, params, receiver, maxInput, callback));
|
|
85
|
-
} else {
|
|
86
|
-
return flashFillPYForToken(Args(orderType, params, receiver, maxInput, callback));
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
69
|
// ----------------- Core logic -----------------
|
|
91
70
|
|
|
92
71
|
// solhint-disable-next-line
|
|
@@ -94,21 +73,20 @@ abstract contract PendleOrderMixin is
|
|
|
94
73
|
OrderType orderType;
|
|
95
74
|
FillOrderParams[] params;
|
|
96
75
|
address receiver;
|
|
97
|
-
uint256 maxTaking;
|
|
76
|
+
uint256 maxTaking;
|
|
98
77
|
bytes callback;
|
|
99
78
|
}
|
|
100
79
|
|
|
101
80
|
function normalFillTokenForPY(Args memory a)
|
|
102
81
|
internal
|
|
103
|
-
returns (uint256 actualMaking, uint256 actualTaking, uint256 totalFee)
|
|
82
|
+
returns (uint256 actualMaking, uint256 actualTaking, uint256 totalFee, bytes memory callbackReturn)
|
|
104
83
|
{
|
|
105
|
-
(address SY, address PT, address YT, bytes32[] memory orderHashes) =
|
|
106
|
-
_checkSig_doPermit_updMakingAndRemaining(a.params);
|
|
84
|
+
(address SY, address PT, address YT, bytes32[] memory orderHashes) = _checkSig_updMakingAndStatus(a.params);
|
|
107
85
|
|
|
108
86
|
// Token => This
|
|
109
87
|
uint256[] memory fromMakers = _transferFromMakers_mintSy_updMakings(SY, a.params);
|
|
110
88
|
|
|
111
|
-
NormalResults memory out = LimitMath.calcNormalBatch(a.params, YT,
|
|
89
|
+
NormalResults memory out = LimitMath.calcNormalBatch(a.params, YT, getLnFeeRateRoot(YT));
|
|
112
90
|
(actualMaking, actualTaking, totalFee) = (out.totalMaking - out.totalFee, out.totalTaking, out.totalFee);
|
|
113
91
|
|
|
114
92
|
require(actualTaking <= a.maxTaking, "LOP: maxTaking exceeded");
|
|
@@ -118,7 +96,8 @@ abstract contract PendleOrderMixin is
|
|
|
118
96
|
|
|
119
97
|
// callback to Taker
|
|
120
98
|
if (a.callback.length > 0) {
|
|
121
|
-
|
|
99
|
+
callbackReturn =
|
|
100
|
+
IPLimitRouterCallback(msg.sender).normalFillCallback(actualMaking, actualTaking, totalFee, a.callback);
|
|
122
101
|
}
|
|
123
102
|
|
|
124
103
|
// Taker => Makers
|
|
@@ -134,12 +113,11 @@ abstract contract PendleOrderMixin is
|
|
|
134
113
|
|
|
135
114
|
function normalFillPYForToken(Args memory a)
|
|
136
115
|
internal
|
|
137
|
-
returns (uint256 actualMaking, uint256 actualTaking, uint256 totalFee)
|
|
116
|
+
returns (uint256 actualMaking, uint256 actualTaking, uint256 totalFee, bytes memory callbackReturn)
|
|
138
117
|
{
|
|
139
|
-
(address SY, address PT, address YT, bytes32[] memory orderHashes) =
|
|
140
|
-
_checkSig_doPermit_updMakingAndRemaining(a.params);
|
|
118
|
+
(address SY, address PT, address YT, bytes32[] memory orderHashes) = _checkSig_updMakingAndStatus(a.params);
|
|
141
119
|
|
|
142
|
-
NormalResults memory out = LimitMath.calcNormalBatch(a.params, YT,
|
|
120
|
+
NormalResults memory out = LimitMath.calcNormalBatch(a.params, YT, getLnFeeRateRoot(YT));
|
|
143
121
|
(actualMaking, actualTaking, totalFee) = (out.totalMaking, out.totalTaking + out.totalFee, out.totalFee);
|
|
144
122
|
|
|
145
123
|
require(actualTaking <= a.maxTaking, "LOP: maxTaking exceeded");
|
|
@@ -150,7 +128,8 @@ abstract contract PendleOrderMixin is
|
|
|
150
128
|
|
|
151
129
|
// callback to Taker
|
|
152
130
|
if (a.callback.length > 0) {
|
|
153
|
-
|
|
131
|
+
callbackReturn =
|
|
132
|
+
IPLimitRouterCallback(msg.sender).normalFillCallback(actualMaking, actualTaking, totalFee, a.callback);
|
|
154
133
|
}
|
|
155
134
|
|
|
156
135
|
// Taker => This
|
|
@@ -166,100 +145,6 @@ abstract contract PendleOrderMixin is
|
|
|
166
145
|
_checkSafety_emitEvents(a.params, orderHashes, out.netMakings, toMakers, out.netFees, out.notionalVolumes);
|
|
167
146
|
}
|
|
168
147
|
|
|
169
|
-
// ----------------- Flash functions -----------------
|
|
170
|
-
|
|
171
|
-
function flashFillTokenForPY(Args memory a)
|
|
172
|
-
internal
|
|
173
|
-
returns (uint256 totalPYToTaker, uint256 totalSyFromTaker, uint256 totalFee)
|
|
174
|
-
{
|
|
175
|
-
(address SY, address PT, address YT, bytes32[] memory orderHashes) =
|
|
176
|
-
_checkSig_doPermit_updMakingAndRemaining(a.params);
|
|
177
|
-
|
|
178
|
-
// Token => This
|
|
179
|
-
uint256[] memory fromMakers = _transferFromMakers_mintSy_updMakings(SY, a.params);
|
|
180
|
-
|
|
181
|
-
NormalResults memory out;
|
|
182
|
-
(totalSyFromTaker, totalPYToTaker, totalFee, out) = LimitMath.calcFlashBatch(a.params, YT, lnFeeRateRoot);
|
|
183
|
-
|
|
184
|
-
require(totalSyFromTaker <= a.maxTaking, "LOP: maxInput exceeded");
|
|
185
|
-
|
|
186
|
-
// callback to Taker
|
|
187
|
-
if (a.callback.length > 0) {
|
|
188
|
-
ILimitOrderCallee(msg.sender).flashFillCall(
|
|
189
|
-
a.orderType, totalPYToTaker, totalSyFromTaker, totalFee, a.callback
|
|
190
|
-
);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
// Taker => This
|
|
194
|
-
_transferFrom(IERC20(SY), msg.sender, address(this), totalSyFromTaker);
|
|
195
|
-
|
|
196
|
-
// This => YT
|
|
197
|
-
_transferOut(SY, YT, totalSyFromTaker + out.totalMaking - out.totalFee);
|
|
198
|
-
|
|
199
|
-
bool isPtToMaker = (a.orderType == OrderType.SY_FOR_PT);
|
|
200
|
-
address pyToMaker = isPtToMaker ? PT : YT;
|
|
201
|
-
{
|
|
202
|
-
address receiverPt = isPtToMaker ? address(this) : a.receiver;
|
|
203
|
-
address receiverYt = isPtToMaker ? a.receiver : address(this);
|
|
204
|
-
|
|
205
|
-
// PT => receiverPt, YT => receiverYt
|
|
206
|
-
IPYieldToken(YT).mintPY(receiverPt, receiverYt);
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
// This => Makers
|
|
210
|
-
_transferToMakers(IERC20(pyToMaker), address(this), a.params, out.netTakings);
|
|
211
|
-
|
|
212
|
-
// This => Fee
|
|
213
|
-
_transferOut(SY, feeRecipient, totalFee);
|
|
214
|
-
|
|
215
|
-
// toMakers == netTakings
|
|
216
|
-
_checkSafety_emitEvents(a.params, orderHashes, fromMakers, out.netTakings, out.netFees, out.notionalVolumes);
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
function flashFillPYForToken(Args memory a)
|
|
220
|
-
internal
|
|
221
|
-
returns (uint256 totalSyToTaker, uint256 totalPYFromTaker, uint256 totalFee)
|
|
222
|
-
{
|
|
223
|
-
(address SY, address PT, address YT, bytes32[] memory orderHashes) =
|
|
224
|
-
_checkSig_doPermit_updMakingAndRemaining(a.params);
|
|
225
|
-
|
|
226
|
-
NormalResults memory out;
|
|
227
|
-
(totalPYFromTaker, totalSyToTaker, totalFee, out) = LimitMath.calcFlashBatch(a.params, YT, lnFeeRateRoot);
|
|
228
|
-
|
|
229
|
-
require(totalPYFromTaker <= a.maxTaking, "LOP: maxInput exceeded");
|
|
230
|
-
|
|
231
|
-
// callback to Taker
|
|
232
|
-
if (a.callback.length > 0) {
|
|
233
|
-
ILimitOrderCallee(msg.sender).flashFillCall(
|
|
234
|
-
a.orderType, totalSyToTaker, totalPYFromTaker, totalFee, a.callback
|
|
235
|
-
);
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
bool ptFromTaker = (a.orderType == OrderType.YT_FOR_SY);
|
|
239
|
-
address pyFromTaker = ptFromTaker ? PT : YT;
|
|
240
|
-
address pyFromMaker = ptFromTaker ? YT : PT;
|
|
241
|
-
|
|
242
|
-
// Taker => YT
|
|
243
|
-
_transferFrom(IERC20(pyFromTaker), msg.sender, YT, totalPYFromTaker);
|
|
244
|
-
// Maker => YT
|
|
245
|
-
_transferFromMakers(IERC20(pyFromMaker), a.params, YT, out.netMakings);
|
|
246
|
-
|
|
247
|
-
// YT => This
|
|
248
|
-
IPYieldToken(YT).redeemPY(address(this));
|
|
249
|
-
|
|
250
|
-
// This => Taker
|
|
251
|
-
_transferOut(SY, a.receiver, totalSyToTaker);
|
|
252
|
-
|
|
253
|
-
// This => Makers
|
|
254
|
-
uint256[] memory toMakers = _redeemSy_transferToMakers(SY, a.params, out.netTakings);
|
|
255
|
-
|
|
256
|
-
// This => Fee
|
|
257
|
-
_transferOut(SY, feeRecipient, totalFee);
|
|
258
|
-
|
|
259
|
-
// fromMakers == netMakings
|
|
260
|
-
_checkSafety_emitEvents(a.params, orderHashes, out.netMakings, toMakers, out.netFees, out.notionalVolumes);
|
|
261
|
-
}
|
|
262
|
-
|
|
263
148
|
// ----------------- verify & convert functions -----------------
|
|
264
149
|
function _validateOrdersSkipSig(FillOrderParams[] memory params) internal view {
|
|
265
150
|
uint256 len = params.length;
|
|
@@ -280,7 +165,7 @@ abstract contract PendleOrderMixin is
|
|
|
280
165
|
}
|
|
281
166
|
}
|
|
282
167
|
|
|
283
|
-
function
|
|
168
|
+
function _checkSig_updMakingAndStatus(FillOrderParams[] memory params)
|
|
284
169
|
internal
|
|
285
170
|
returns (address SY, address PT, address YT, bytes32[] memory orderHashes)
|
|
286
171
|
{
|
|
@@ -291,7 +176,7 @@ abstract contract PendleOrderMixin is
|
|
|
291
176
|
FillOrderParams memory param = params[i];
|
|
292
177
|
|
|
293
178
|
(bytes32 orderHash, uint256 remainingMakerAmount, uint256 filledMakerAmount) =
|
|
294
|
-
|
|
179
|
+
_checkSig(param.order, param.signature);
|
|
295
180
|
uint256 netMaking = PMath.min(param.makingAmount, remainingMakerAmount);
|
|
296
181
|
|
|
297
182
|
unchecked {
|
|
@@ -341,8 +226,9 @@ abstract contract PendleOrderMixin is
|
|
|
341
226
|
}
|
|
342
227
|
}
|
|
343
228
|
|
|
344
|
-
function
|
|
229
|
+
function _checkSig(Order memory order, bytes memory signature)
|
|
345
230
|
internal
|
|
231
|
+
view
|
|
346
232
|
returns (
|
|
347
233
|
bytes32,
|
|
348
234
|
/*orderHash*/
|
|
@@ -355,20 +241,10 @@ abstract contract PendleOrderMixin is
|
|
|
355
241
|
OrderStatus memory status = _status[orderHash];
|
|
356
242
|
(uint256 remainingMakerAmount, uint256 filledMakerAmount) = (status.remaining, status.filledAmount);
|
|
357
243
|
|
|
358
|
-
if (remainingMakerAmount == _ORDER_FILLED) return (orderHash, 0, filledMakerAmount);
|
|
359
|
-
|
|
360
244
|
if (remainingMakerAmount == _ORDER_DOES_NOT_EXIST) {
|
|
361
245
|
require(SignatureChecker.isValidSignatureNow(order.maker, orderHash, signature), "LOP: bad signature");
|
|
362
246
|
|
|
363
247
|
remainingMakerAmount = order.makingAmount;
|
|
364
|
-
|
|
365
|
-
// permit if there is such
|
|
366
|
-
if (order.permit.length >= 20) {
|
|
367
|
-
// proceed only if permit length is enough to store address
|
|
368
|
-
(address token, bytes memory permit) = order.permit.decodeTargetAndCalldata();
|
|
369
|
-
_permitMemory(token, permit);
|
|
370
|
-
require(_status[orderHash].remaining == _ORDER_DOES_NOT_EXIST, "LOP: reentrancy detected");
|
|
371
|
-
}
|
|
372
248
|
} else {
|
|
373
249
|
unchecked {
|
|
374
250
|
remainingMakerAmount -= 1;
|
|
@@ -525,9 +401,23 @@ abstract contract PendleOrderMixin is
|
|
|
525
401
|
return _hashTypedDataV4(keccak256(abi.encode(LIMIT_ORDER_TYPEHASH, staticOrder, keccak256(order.permit))));
|
|
526
402
|
}
|
|
527
403
|
|
|
404
|
+
function getLnFeeRateRoot(address YT) public view returns (uint256 res) {
|
|
405
|
+
res = __lnFeeRateRoot[YT];
|
|
406
|
+
require(res > 0, "LOP: fee not set");
|
|
407
|
+
}
|
|
408
|
+
|
|
528
409
|
// ----------------- Owner -----------------
|
|
529
|
-
function
|
|
410
|
+
function setFeeRecipient(address _feeRecipient) public onlyOwner {
|
|
530
411
|
feeRecipient = _feeRecipient;
|
|
531
|
-
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
function setLnFeeRateRoots(address[] memory YTs, uint256[] memory lnFeeRateRoots) public onlyOwner {
|
|
415
|
+
uint256 len = YTs.length;
|
|
416
|
+
require(len == lnFeeRateRoots.length, "LOP: length mismatch");
|
|
417
|
+
|
|
418
|
+
for (uint256 i = 0; i < len; i = _inc1(i)) {
|
|
419
|
+
require(lnFeeRateRoots[i] > 0, "LOP: zero fee not allowed");
|
|
420
|
+
__lnFeeRateRoot[YTs[i]] = lnFeeRateRoots[i];
|
|
421
|
+
}
|
|
532
422
|
}
|
|
533
423
|
}
|