@pendle/core-v2 2.29.1 → 3.0.0-beta-2
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/ExcessivelySafeCall.sol/ExcessivelySafeCall.json +2 -2
- 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/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/LiquidityMining/libraries/WeekMath.sol/WeekMath.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/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/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/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/ComposableStableMath.sol/ComposableStableMath.json +2 -2
- 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/FixedPoint.sol/FixedPoint.json +2 -2
- 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/LinearMath.sol/LinearMath.json +2 -2
- 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/Linear/LinearPreview.sol/LinearPreview.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/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/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/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/CamelotRewardHelper.sol/CamelotRewardHelper.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatileCommon.sol/CamelotV1VolatileCommon.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatileCommon.sol/CamelotV1VolatileCommon.json +2 -2
- 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/CamelotV1VolatilePreview.sol/CamelotV1VolatilePreview.json +2 -2
- 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/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/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/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/Errors.sol/Errors.json +9 -162
- package/build/artifacts/contracts/core/libraries/ExpiryUtilsLib.sol/ExpiryUtils.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/ExpiryUtilsLib.sol/ExpiryUtils.json +2 -2
- package/build/artifacts/contracts/core/libraries/MiniHelpers.sol/MiniHelpers.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/MiniHelpers.sol/MiniHelpers.json +2 -2
- 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/PMath.sol/PMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/math/PMath.sol/PMath.json +2 -2
- 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 +4 -0
- package/build/artifacts/contracts/interfaces/IDailLikePermit.sol/IDaiLikePermit.json +59 -0
- 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/IPActionAddRemoveLiq.sol/IPActionAddRemoveLiq.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiq.sol/IPActionAddRemoveLiq.json +1050 -30
- 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 -45
- package/build/artifacts/contracts/interfaces/IPActionMintRedeemStatic.sol/IPActionMintRedeemStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMintRedeemStatic.sol/IPActionMintRedeemStatic.json +0 -69
- package/build/artifacts/contracts/interfaces/IPActionMisc.sol/IPActionMisc.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMisc.sol/IPActionMisc.json +734 -1
- package/build/artifacts/contracts/interfaces/IPActionStorageStatic.sol/IPActionStorageStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionStorageStatic.sol/IPActionStorageStatic.json +0 -26
- package/build/artifacts/contracts/interfaces/IPActionSwapPT.sol/IPActionSwapPT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapPT.sol/IPActionSwapPT.json +688 -108
- package/build/artifacts/contracts/interfaces/IPActionSwapYT.sol/IPActionSwapYT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapYT.sol/IPActionSwapYT.json +688 -108
- 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/IPAllAction.sol/IPAllAction.json +2550 -331
- 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/ILimitOrderCallee.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/ILimitOrderCallee.json +77 -0
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouter.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouter.json +779 -0
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPOrderMixin.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPOrderMixin.json +544 -0
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPOrderMixinType.dbg.json +4 -0
- package/build/artifacts/contracts/{router/base/ActionBaseMintRedeem.sol/ActionBaseMintRedeem.json → interfaces/IPLimitRouter.sol/IPOrderMixinType.json} +2 -2
- 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/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/IPRouterHelper.sol/IPRouterHelper.json +0 -25
- package/build/artifacts/contracts/interfaces/IPRouterStatic.sol/IPRouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPRouterStatic.sol/IPRouterStatic.json +0 -140
- 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 +4 -0
- package/build/artifacts/contracts/{core/BulkSeller/BulkSellerMathCore.sol/BulkSellerMathCore.json → limit/LimitMathCore.sol/LimitMathCore.json} +4 -4
- package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.dbg.json +4 -0
- package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.json +910 -0
- package/build/artifacts/contracts/limit/PendleOrderMixin.sol/PendleOrderMixin.dbg.json +4 -0
- package/build/artifacts/contracts/limit/PendleOrderMixin.sol/PendleOrderMixin.json +760 -0
- package/build/artifacts/contracts/limit/helpers/ArgumentsDecoder.sol/ArgumentsDecoder.dbg.json +4 -0
- package/build/artifacts/contracts/limit/helpers/ArgumentsDecoder.sol/ArgumentsDecoder.json +10 -0
- package/build/artifacts/contracts/limit/helpers/NonceManager.sol/NonceManager.dbg.json +4 -0
- package/build/artifacts/contracts/limit/helpers/NonceManager.sol/NonceManager.json +99 -0
- package/build/artifacts/contracts/limit/helpers/Permitable.sol/Permitable.dbg.json +4 -0
- package/build/artifacts/contracts/limit/helpers/Permitable.sol/Permitable.json +10 -0
- package/build/artifacts/contracts/limit/helpers/RevertReasonParser.sol/RevertReasonParser.dbg.json +4 -0
- package/build/artifacts/contracts/limit/helpers/RevertReasonParser.sol/RevertReasonParser.json +10 -0
- 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/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/BaseSplitCodeFactoryContract.sol/BaseSplitCodeFactoryContract.json +2 -2
- 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/ChainlinkRelayerAutomation.sol/ChainlinkRelayerAutomation.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/ChainlinkRelayerAutomation.sol/ChainlinkRelayerAutomation.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/ChainlinkRelayerGelato.sol/ChainlinkRelayerGelato.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/ChainlinkRelayerGelato.sol/ChainlinkRelayerGelato.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/EmptyUUPS.sol/EmptyUUPS.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/EmptyUUPS.sol/EmptyUUPS.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/LegacyNFTHelper.sol/LegacyNFTHelper.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/LegacyNFTHelper.sol/LegacyNFTHelper.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/LegacyNFTHelper.sol/StarNFTV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/MarketExchangeRateLib.sol/MarketExchangeRateLib.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/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/Multicall2.sol/Multicall2.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallV1.sol/PendleMulticallV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallV1.sol/PendleMulticallV1.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallV2.sol/PendleMulticallV2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallV2.sol/PendleMulticallV2.json +2 -2
- 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/errors/SDKErrorsDirectory.sol/SDKErrorsDirectory.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/errors/SDKErrorsDirectory.sol/SDKErrorsDirectory.json +2 -171
- 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 -47
- 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 -103
- 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 -28
- 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/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.json +1052 -32
- package/build/artifacts/contracts/router/ActionMisc.sol/ActionMisc.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionMisc.sol/ActionMisc.json +878 -3
- package/build/artifacts/contracts/router/ActionSwapPT.sol/ActionSwapPT.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapPT.sol/ActionSwapPT.json +730 -163
- package/build/artifacts/contracts/router/ActionSwapYT.sol/ActionSwapYT.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapYT.sol/ActionSwapYT.json +730 -169
- package/build/artifacts/contracts/router/PendleRouter.sol/PendleRouter.dbg.json +1 -1
- package/build/artifacts/contracts/router/PendleRouter.sol/PendleRouter.json +2 -18
- package/build/artifacts/contracts/router/PendleRouterHelper.sol/PendleRouterHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/PendleRouterHelper.sol/PendleRouterHelper.json +3 -33
- package/build/artifacts/contracts/router/PendleRouterHelper.sol/RouterV2InterfaceForRouterHelper.dbg.json +4 -0
- package/build/artifacts/contracts/{interfaces/IPActionMintRedeem.sol/IPActionMintRedeem.json → router/PendleRouterHelper.sol/RouterV2InterfaceForRouterHelper.json} +113 -352
- package/build/artifacts/contracts/router/base/ActionBase.sol/ActionBase.dbg.json +4 -0
- package/build/artifacts/contracts/router/base/ActionBase.sol/ActionBase.json +10 -0
- package/build/artifacts/contracts/router/base/ActionBaseCallback.sol/ActionBaseCallback.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/ActionBaseCallback.sol/ActionBaseCallback.json +0 -59
- 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/kyberswap/ScalingDataLib.sol/ScalingDataLib.json +2 -2
- 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/core/Market/PendleMarketFactory.sol +21 -27
- package/contracts/core/libraries/Errors.sol +4 -21
- package/contracts/core/libraries/TokenHelper.sol +7 -7
- package/contracts/interfaces/IDailLikePermit.sol +17 -0
- package/contracts/interfaces/IPActionAddRemoveLiq.sol +16 -18
- package/contracts/interfaces/IPActionMarketCoreStatic.sol +20 -118
- package/contracts/interfaces/IPActionMintRedeemStatic.sol +17 -47
- package/contracts/interfaces/IPActionMisc.sol +88 -1
- package/contracts/interfaces/IPActionStorageStatic.sol +1 -8
- package/contracts/interfaces/IPActionSwapPT.sol +9 -20
- package/contracts/interfaces/IPActionSwapYT.sol +10 -21
- package/contracts/interfaces/IPAllAction.sol +0 -2
- package/contracts/interfaces/IPAllActionType.sol +33 -0
- package/contracts/interfaces/IPLimitRouter.sol +162 -0
- package/contracts/interfaces/IPMarketFactory.sol +2 -0
- package/contracts/interfaces/IPRouterHelper.sol +11 -45
- package/contracts/limit/LimitMathCore.sol +208 -0
- package/contracts/limit/PendleLimitRouter.sol +72 -0
- package/contracts/limit/PendleOrderMixin.sol +526 -0
- package/contracts/limit/helpers/ArgumentsDecoder.sol +47 -0
- package/contracts/limit/helpers/NonceManager.sol +28 -0
- package/contracts/limit/helpers/Permitable.sol +48 -0
- package/contracts/limit/helpers/RevertReasonParser.sol +75 -0
- package/contracts/offchain-helpers/AddressProvider.sol +1 -1
- package/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol +5 -18
- package/contracts/offchain-helpers/Broadcaster.sol +3 -3
- package/contracts/offchain-helpers/ChainlinkRelayerAutomation.sol +6 -13
- package/contracts/offchain-helpers/ChainlinkRelayerGelato.sol +5 -4
- package/contracts/offchain-helpers/EmptyUUPS.sol +2 -1
- package/contracts/offchain-helpers/PendleMulticallV1.sol +9 -11
- package/contracts/offchain-helpers/PendleMulticallV2.sol +1 -1
- package/contracts/offchain-helpers/errors/SDKErrorsDirectory.sol +2 -19
- package/contracts/offchain-helpers/router-static/PendleRouterStatic.sol +1 -1
- package/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol +5 -18
- package/contracts/offchain-helpers/router-static/base/ActionLimitOrdersStatic.sol +145 -0
- package/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol +29 -82
- package/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol +82 -288
- package/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol +37 -108
- package/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol +4 -16
- package/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol +8 -10
- package/contracts/offchain-helpers/router-static/base/StorageLayout.sol +1 -4
- package/contracts/router/ActionAddRemoveLiq.sol +225 -440
- package/contracts/router/ActionMisc.sol +134 -14
- package/contracts/router/ActionSwapPT.sol +35 -195
- package/contracts/router/ActionSwapYT.sol +127 -288
- package/contracts/router/PendleRouter.sol +104 -128
- package/contracts/router/PendleRouterHelper.sol +100 -186
- package/contracts/router/base/ActionBase.sol +238 -0
- package/contracts/router/base/ActionBaseCallback.sol +25 -124
- package/contracts/router/base/CallbackHelper.sol +31 -110
- package/contracts/router/base/MarketApproxLib.sol +143 -176
- package/contracts/router/swap-aggregator/PendleSwap.sol +9 -20
- package/deployments/42161-core.json +4 -2
- package/package.json +4 -4
- package/typechain-types/ActionAddRemoveLiq.ts +151 -26
- package/typechain-types/ActionLimitOrdersStatic.ts +262 -0
- package/typechain-types/ActionMarketCoreStatic.ts +18 -63
- package/typechain-types/ActionMintRedeem.ts +4 -10
- package/typechain-types/ActionMintRedeemStatic.ts +10 -102
- package/typechain-types/ActionMisc.ts +732 -11
- package/typechain-types/ActionStorageStatic.ts +0 -55
- package/typechain-types/ActionSwapPT.ts +119 -121
- package/typechain-types/ActionSwapYT.ts +124 -126
- package/typechain-types/AuraWethVethSYUpg.ts +1547 -0
- package/typechain-types/EIP712Upgradeable.ts +68 -0
- package/typechain-types/IDaiLikePermit.ts +146 -0
- package/typechain-types/IKyberElasticFactory.ts +734 -0
- package/typechain-types/IKyberElasticPool.ts +514 -0
- package/typechain-types/IKyberElasticRouter.ts +315 -0
- package/typechain-types/IKyberLiquidityMining.ts +968 -0
- package/typechain-types/IKyberMathHelper.ts +231 -0
- package/typechain-types/IKyberPositionManager.ts +773 -0
- package/typechain-types/ILimitOrderCallee.ts +179 -0
- package/typechain-types/IPActionAddRemoveLiq.ts +151 -26
- package/typechain-types/IPActionMarketCoreStatic.ts +18 -63
- package/typechain-types/IPActionMintRedeem.ts +4 -10
- package/typechain-types/IPActionMintRedeemStatic.ts +10 -102
- package/typechain-types/IPActionMisc.ts +688 -11
- package/typechain-types/IPActionStorageStatic.ts +0 -55
- package/typechain-types/IPActionSwapPT.ts +119 -121
- package/typechain-types/IPActionSwapYT.ts +124 -126
- package/typechain-types/IPAllAction.ts +355 -284
- package/typechain-types/IPLimitRouter.ts +702 -0
- package/typechain-types/IPOrderMixin.ts +479 -0
- package/typechain-types/IPRouterHelper.ts +6 -19
- package/typechain-types/IPRouterStatic.ts +28 -220
- package/typechain-types/KyberMathHelper.ts +604 -0
- package/typechain-types/KyberNftManagerBaseUpg.ts +148 -0
- package/typechain-types/NonceManager.ts +209 -0
- package/typechain-types/PendleAuraBalancerStableLPSYV3Upg.ts +1512 -0
- package/typechain-types/PendleERC20PermitUpg.ts +452 -0
- package/typechain-types/PendleERC20Upg.ts +348 -0
- package/typechain-types/PendleKyberElasticSY.ts +1583 -0
- package/typechain-types/PendleLimitRouter.ts +1041 -0
- package/typechain-types/PendleOrderMixin.ts +818 -0
- package/typechain-types/PendleRouterHelper.ts +7 -23
- package/typechain-types/PredicateHelper.ts +298 -0
- package/typechain-types/RouterV2InterfaceForRouterHelper.ts +479 -0
- package/typechain-types/SYBaseUpg.ts +1205 -0
- package/typechain-types/SYBaseWithRewardsUpg.ts +1298 -0
- package/typechain-types/factories/ActionAddRemoveLiq__factory.ts +1051 -31
- package/typechain-types/factories/ActionBaseCallback__factory.ts +0 -59
- package/typechain-types/factories/ActionInfoStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionLimitOrdersStatic__factory.ts +499 -0
- package/typechain-types/factories/ActionMarketAuxStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionMarketCoreStatic__factory.ts +1 -46
- package/typechain-types/factories/ActionMintRedeemStatic__factory.ts +1 -102
- package/typechain-types/factories/ActionMintRedeem__factory.ts +1 -21
- package/typechain-types/factories/ActionMisc__factory.ts +877 -2
- package/typechain-types/factories/ActionStorageStatic__factory.ts +1 -27
- package/typechain-types/factories/ActionSwapPT__factory.ts +689 -162
- package/typechain-types/factories/ActionSwapYT__factory.ts +692 -186
- package/typechain-types/factories/ActionVePendleStatic__factory.ts +1 -1
- package/typechain-types/factories/AddressProvider__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 +1215 -0
- package/typechain-types/factories/AutomationBase__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/CamelotRewardHelper__factory.ts +1 -1
- package/typechain-types/factories/CamelotV1VolatilePreview__factory.ts +1 -1
- package/typechain-types/factories/ChainlinkRelayerAutomation__factory.ts +1 -1
- package/typechain-types/factories/ChainlinkRelayerGelato__factory.ts +1 -1
- package/typechain-types/factories/EIP712Upgradeable__factory.ts +39 -0
- package/typechain-types/factories/ERC20__factory.ts +1 -1
- package/typechain-types/factories/EmptyUUPS__factory.ts +1 -1
- package/typechain-types/factories/Errors__factory.ts +8 -161
- package/typechain-types/factories/IDaiLikePermit__factory.ts +74 -0
- package/typechain-types/factories/IKyberElasticFactory__factory.ts +455 -0
- package/typechain-types/factories/IKyberElasticPool__factory.ts +315 -0
- package/typechain-types/factories/IKyberElasticRouter__factory.ts +240 -0
- package/typechain-types/factories/IKyberLiquidityMining__factory.ts +913 -0
- package/typechain-types/factories/IKyberMathHelper__factory.ts +143 -0
- package/typechain-types/factories/IKyberPositionManager__factory.ts +633 -0
- package/typechain-types/factories/ILimitOrderCallee__factory.ts +92 -0
- package/typechain-types/factories/IPActionAddRemoveLiq__factory.ts +1050 -30
- package/typechain-types/factories/IPActionMarketCoreStatic__factory.ts +0 -45
- package/typechain-types/factories/IPActionMintRedeemStatic__factory.ts +0 -69
- package/typechain-types/factories/IPActionMintRedeem__factory.ts +0 -20
- package/typechain-types/factories/IPActionMisc__factory.ts +734 -1
- package/typechain-types/factories/IPActionStorageStatic__factory.ts +0 -26
- package/typechain-types/factories/IPActionSwapPT__factory.ts +688 -108
- package/typechain-types/factories/IPActionSwapYT__factory.ts +688 -108
- package/typechain-types/factories/IPAllAction__factory.ts +2550 -331
- package/typechain-types/factories/IPLimitRouter__factory.ts +791 -0
- package/typechain-types/factories/IPOrderMixin__factory.ts +556 -0
- package/typechain-types/factories/IPRouterHelper__factory.ts +0 -25
- package/typechain-types/factories/IPRouterStatic__factory.ts +0 -140
- package/typechain-types/factories/KyberMathHelper__factory.ts +430 -0
- package/typechain-types/factories/KyberNftManagerBaseUpg__factory.ts +101 -0
- package/typechain-types/factories/LegacyNFTHelper__factory.ts +1 -1
- package/typechain-types/factories/LinearPreview__factory.ts +1 -1
- package/typechain-types/factories/MetaStableMath__factory.ts +1 -1
- package/typechain-types/factories/Multicall2__factory.ts +1 -1
- package/typechain-types/factories/NonceManager__factory.ts +149 -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/PendleAuraBalancerStableLPSYV3Upg__factory.ts +1160 -0
- 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/PendleERC20PermitUpg__factory.ts +340 -0
- package/typechain-types/factories/PendleERC20Permit__factory.ts +1 -1
- package/typechain-types/factories/PendleERC20Upg__factory.ts +261 -0
- package/typechain-types/factories/PendleERC20__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/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/PendleKyberElasticSY__factory.ts +1302 -0
- package/typechain-types/factories/PendleLimitRouter__factory.ts +1064 -0
- 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/PendleMarketFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleMarketV2__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/PendleMulticallV1__factory.ts +1 -1
- package/typechain-types/factories/PendleMulticallV2__factory.ts +1 -1
- package/typechain-types/factories/PendleOracleForSyProxy__factory.ts +1 -1
- package/typechain-types/factories/PendleOrderMixin__factory.ts +775 -0
- 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/PendleRouterHelper__factory.ts +2 -32
- package/typechain-types/factories/PendleRouterStatic__factory.ts +1 -1
- package/typechain-types/factories/PendleRouter__factory.ts +1 -21
- package/typechain-types/factories/PendleSfrxEthSY__factory.ts +1 -1
- package/typechain-types/factories/PendleStargateLPSY__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/PredicateHelper__factory.ts +218 -0
- package/typechain-types/factories/PtAndLpToAsset__factory.ts +1 -1
- package/typechain-types/factories/RouterV2InterfaceForRouterHelper__factory.ts +487 -0
- package/typechain-types/factories/SAPE__factory.ts +1 -1
- package/typechain-types/factories/SDKErrorsDirectory__factory.ts +1 -170
- package/typechain-types/factories/SYBaseUpg__factory.ts +939 -0
- package/typechain-types/factories/SYBaseWithRewardsUpg__factory.ts +1012 -0
- 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 +81 -63
- package/typechain-types/index.ts +18 -14
- package/build/artifacts/contracts/core/BulkSeller/BulkSeller.sol/BulkSeller.dbg.json +0 -4
- package/build/artifacts/contracts/core/BulkSeller/BulkSeller.sol/BulkSeller.json +0 -642
- package/build/artifacts/contracts/core/BulkSeller/BulkSellerFactory.sol/BulkSellerFactory.dbg.json +0 -4
- package/build/artifacts/contracts/core/BulkSeller/BulkSellerFactory.sol/BulkSellerFactory.json +0 -521
- package/build/artifacts/contracts/core/BulkSeller/BulkSellerMathCore.sol/BulkSellerMathCore.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IPActionMintRedeem.sol/IPActionMintRedeem.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IPBulkSeller.sol/IPBulkSeller.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IPBulkSeller.sol/IPBulkSeller.json +0 -321
- package/build/artifacts/contracts/interfaces/IPBulkSellerFactory.sol/IPBulkSellerFactory.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IPBulkSellerFactory.sol/IPBulkSellerFactory.json +0 -92
- package/build/artifacts/contracts/interfaces/IPBulkSellerSYCallback.sol/IPBulkSellerCallback.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IPBulkSellerSYCallback.sol/IPBulkSellerCallback.json +0 -34
- package/build/artifacts/contracts/offchain-helpers/BulkSellerOffchain.sol/BulkSellerOffchain.dbg.json +0 -4
- package/build/artifacts/contracts/offchain-helpers/BulkSellerOffchain.sol/BulkSellerOffchain.json +0 -125
- package/build/artifacts/contracts/router/ActionMintRedeem.sol/ActionMintRedeem.dbg.json +0 -4
- package/build/artifacts/contracts/router/ActionMintRedeem.sol/ActionMintRedeem.json +0 -753
- package/build/artifacts/contracts/router/base/ActionBaseMintRedeem.sol/ActionBaseMintRedeem.dbg.json +0 -4
- package/contracts/core/BulkSeller/BulkSeller.sol +0 -233
- package/contracts/core/BulkSeller/BulkSellerFactory.sol +0 -85
- package/contracts/core/BulkSeller/BulkSellerMathCore.sol +0 -139
- package/contracts/interfaces/IPActionMintRedeem.sol +0 -108
- package/contracts/interfaces/IPBulkSeller.sol +0 -48
- package/contracts/interfaces/IPBulkSellerFactory.sol +0 -12
- package/contracts/interfaces/IPBulkSellerSYCallback.sol +0 -6
- package/contracts/offchain-helpers/BulkSellerOffchain.sol +0 -69
- package/contracts/router/ActionMintRedeem.sol +0 -134
- package/contracts/router/base/ActionBaseMintRedeem.sol +0 -203
|
@@ -0,0 +1,526 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
|
|
3
|
+
pragma solidity 0.8.21;
|
|
4
|
+
|
|
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
|
+
import "@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol";
|
|
9
|
+
import "../interfaces/IPLimitRouter.sol";
|
|
10
|
+
import "../core/libraries/BoringOwnableUpgradeable.sol";
|
|
11
|
+
import "../core/libraries/TokenHelper.sol";
|
|
12
|
+
import "../interfaces/IStandardizedYield.sol";
|
|
13
|
+
import "./helpers/Permitable.sol";
|
|
14
|
+
import "./helpers/NonceManager.sol";
|
|
15
|
+
import "./helpers/ArgumentsDecoder.sol";
|
|
16
|
+
import "../interfaces/IWETH.sol";
|
|
17
|
+
import {LimitMathCore as LimitMath} from "./LimitMathCore.sol";
|
|
18
|
+
|
|
19
|
+
abstract contract PendleOrderMixin is
|
|
20
|
+
EIP712Upgradeable,
|
|
21
|
+
IPOrderMixin,
|
|
22
|
+
Permitable,
|
|
23
|
+
BoringOwnableUpgradeable,
|
|
24
|
+
NonceManager,
|
|
25
|
+
TokenHelper
|
|
26
|
+
{
|
|
27
|
+
using SafeERC20 for IERC20;
|
|
28
|
+
using PYIndexLib for PYIndex;
|
|
29
|
+
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
|
+
|
|
35
|
+
bytes32 internal constant LIMIT_ORDER_TYPEHASH = keccak256(
|
|
36
|
+
"Order(uint256 salt,uint256 expiry,uint256 nonce,uint8 orderType,address token,address YT,address maker,address receiver,uint256 makingAmount,uint256 lnImpliedRate,bytes permit)"
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
uint256 internal constant _ORDER_DOES_NOT_EXIST = 0;
|
|
40
|
+
uint256 internal constant _ORDER_FILLED = 1;
|
|
41
|
+
|
|
42
|
+
address public feeRecipient;
|
|
43
|
+
uint96 public lnFeeRateRoot;
|
|
44
|
+
|
|
45
|
+
address private immutable WNATIVE;
|
|
46
|
+
|
|
47
|
+
mapping(bytes32 => uint256) internal _remaining;
|
|
48
|
+
|
|
49
|
+
constructor(address _WNATIVE) {
|
|
50
|
+
WNATIVE = _WNATIVE;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
receive() external payable {}
|
|
54
|
+
|
|
55
|
+
function initialize(address _feeRecipient, uint96 _lnFeeRateRoot) external initializer {
|
|
56
|
+
__BoringOwnable_init();
|
|
57
|
+
__EIP712_init("Pendle Limit Order Protocol", "1");
|
|
58
|
+
setFees(_feeRecipient, _lnFeeRateRoot);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function normalFill(FillOrderParams[] memory params, address receiver, uint256 maxTaking, bytes memory callback)
|
|
62
|
+
external
|
|
63
|
+
returns (uint256 actualMaking, uint256 actualTaking, uint256 totalFee)
|
|
64
|
+
{
|
|
65
|
+
OrderType orderType = params[0].order.orderType;
|
|
66
|
+
_validateOrdersSkipSig(params);
|
|
67
|
+
if (orderType == OrderType.SY_FOR_PT || orderType == OrderType.SY_FOR_YT) {
|
|
68
|
+
return normalFillTokenForPY(params, receiver, maxTaking, callback);
|
|
69
|
+
} else {
|
|
70
|
+
return normalFillPYForToken(params, receiver, maxTaking, callback);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function flashFill(FillOrderParams[] memory params, address receiver, uint256 maxInput, bytes memory callback)
|
|
75
|
+
external
|
|
76
|
+
returns (uint256 netOutputToTaker, uint256 netInputFromTaker, uint256 totalFee)
|
|
77
|
+
{
|
|
78
|
+
OrderType orderType = params[0].order.orderType;
|
|
79
|
+
_validateOrdersSkipSig(params);
|
|
80
|
+
if (orderType == OrderType.SY_FOR_PT || orderType == OrderType.SY_FOR_YT) {
|
|
81
|
+
return flashFillTokenForPY(params, receiver, maxInput, callback);
|
|
82
|
+
} else {
|
|
83
|
+
return flashFillPYForToken(params, receiver, maxInput, callback);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// ----------------- Core logic -----------------
|
|
88
|
+
|
|
89
|
+
struct Args {
|
|
90
|
+
FillOrderParams[] params;
|
|
91
|
+
address receiver;
|
|
92
|
+
uint256 maxTaking; // or maxInput
|
|
93
|
+
bytes callback;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function normalFillTokenForPY(
|
|
97
|
+
FillOrderParams[] memory _params,
|
|
98
|
+
address _receiver,
|
|
99
|
+
uint256 _maxTaking,
|
|
100
|
+
bytes memory _callback
|
|
101
|
+
) internal returns (uint256 actualMaking, uint256 actualTaking, uint256 totalFee) {
|
|
102
|
+
Args memory a = Args(_params, _receiver, _maxTaking, _callback);
|
|
103
|
+
|
|
104
|
+
OrderType orderType = a.params[0].order.orderType;
|
|
105
|
+
|
|
106
|
+
// Token => This
|
|
107
|
+
(address SY, address PT, address YT, OnchainParams memory onchain) = _prep(a.params, true);
|
|
108
|
+
|
|
109
|
+
NormalResults memory out = LimitMath.calcNormalBatch(a.params, onchain);
|
|
110
|
+
(actualMaking, actualTaking, totalFee) = (out.totalMaking - out.totalFee, out.totalTaking, out.totalFee);
|
|
111
|
+
|
|
112
|
+
require(actualTaking <= a.maxTaking, "LOP: maxTaking exceeded");
|
|
113
|
+
|
|
114
|
+
// This => Taker
|
|
115
|
+
_transferOut(SY, a.receiver, actualMaking);
|
|
116
|
+
|
|
117
|
+
// callback to Taker
|
|
118
|
+
if (a.callback.length > 0) {
|
|
119
|
+
ILimitOrderCallee(msg.sender).normalFillCall(orderType, actualMaking, actualTaking, totalFee, a.callback);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Taker => Makers
|
|
123
|
+
address pyToMaker = (orderType == OrderType.SY_FOR_PT) ? PT : YT;
|
|
124
|
+
_transferFromMulti(IERC20(pyToMaker), msg.sender, a.params, out.netTakings);
|
|
125
|
+
|
|
126
|
+
// This => Fee
|
|
127
|
+
_transferOut(SY, onchain.feeRecipient, totalFee);
|
|
128
|
+
|
|
129
|
+
emit NormalFill(
|
|
130
|
+
orderType, YT, msg.sender, actualMaking, actualTaking, totalFee, out.totalMaking, out.totalTaking
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function normalFillPYForToken(
|
|
135
|
+
FillOrderParams[] memory _params,
|
|
136
|
+
address _receiver,
|
|
137
|
+
uint256 _maxTaking,
|
|
138
|
+
bytes memory _callback
|
|
139
|
+
) internal returns (uint256 actualMaking, uint256 actualTaking, uint256 totalFee) {
|
|
140
|
+
Args memory a = Args(_params, _receiver, _maxTaking, _callback);
|
|
141
|
+
|
|
142
|
+
OrderType orderType = a.params[0].order.orderType;
|
|
143
|
+
|
|
144
|
+
(address SY, address PT, address YT, OnchainParams memory onchain) = _prep(a.params, false);
|
|
145
|
+
|
|
146
|
+
NormalResults memory out = LimitMath.calcNormalBatch(a.params, onchain);
|
|
147
|
+
(actualMaking, actualTaking, totalFee) = (out.totalMaking, out.totalTaking + out.totalFee, out.totalFee);
|
|
148
|
+
|
|
149
|
+
require(actualTaking <= a.maxTaking, "LOP: maxTaking exceeded");
|
|
150
|
+
|
|
151
|
+
// Makers => Taker
|
|
152
|
+
address pyFromMaker = (orderType == OrderType.PT_FOR_SY) ? PT : YT;
|
|
153
|
+
_transferFromMulti(IERC20(pyFromMaker), a.params, a.receiver, out.netMakings);
|
|
154
|
+
|
|
155
|
+
// callback to Taker
|
|
156
|
+
if (a.callback.length > 0) {
|
|
157
|
+
ILimitOrderCallee(msg.sender).normalFillCall(orderType, actualMaking, actualTaking, totalFee, a.callback);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// Taker => This
|
|
161
|
+
_transferFrom(IERC20(SY), msg.sender, address(this), actualTaking);
|
|
162
|
+
|
|
163
|
+
// This => Makers
|
|
164
|
+
_redeemSy_transferOut(SY, a.params, out.totalTaking, out.netTakings);
|
|
165
|
+
|
|
166
|
+
// This => Fee
|
|
167
|
+
_transferOut(SY, onchain.feeRecipient, totalFee);
|
|
168
|
+
|
|
169
|
+
emit NormalFill(
|
|
170
|
+
orderType, YT, msg.sender, actualMaking, actualTaking, totalFee, out.totalMaking, out.totalTaking
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// ----------------- Flash functions -----------------
|
|
175
|
+
|
|
176
|
+
function flashFillTokenForPY(
|
|
177
|
+
FillOrderParams[] memory _params,
|
|
178
|
+
address _receiver,
|
|
179
|
+
uint256 _maxInput,
|
|
180
|
+
bytes memory _callback
|
|
181
|
+
) internal returns (uint256 totalPYToTaker, uint256 totalSyFromTaker, uint256 totalFee) {
|
|
182
|
+
Args memory a = Args(_params, _receiver, _maxInput, _callback);
|
|
183
|
+
|
|
184
|
+
OrderType orderType = a.params[0].order.orderType;
|
|
185
|
+
|
|
186
|
+
// Token => This
|
|
187
|
+
(address SY, address PT, address YT, OnchainParams memory onchain) = _prep(a.params, true);
|
|
188
|
+
|
|
189
|
+
NormalResults memory out;
|
|
190
|
+
(totalSyFromTaker, totalPYToTaker, totalFee, out) = LimitMath.calcFlashBatch(a.params, onchain);
|
|
191
|
+
|
|
192
|
+
require(totalSyFromTaker <= a.maxTaking, "LOP: maxInput exceeded");
|
|
193
|
+
|
|
194
|
+
// callback to Taker
|
|
195
|
+
if (a.callback.length > 0) {
|
|
196
|
+
ILimitOrderCallee(msg.sender).flashFillCall(
|
|
197
|
+
orderType, totalPYToTaker, totalSyFromTaker, totalFee, a.callback
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// Taker => This
|
|
202
|
+
_transferFrom(IERC20(SY), msg.sender, address(this), totalSyFromTaker);
|
|
203
|
+
|
|
204
|
+
// This => YT
|
|
205
|
+
_transferOut(SY, YT, totalSyFromTaker + out.totalMaking - out.totalFee);
|
|
206
|
+
|
|
207
|
+
bool isPtToMaker = (orderType == OrderType.SY_FOR_PT);
|
|
208
|
+
address pyToMaker = isPtToMaker ? PT : YT;
|
|
209
|
+
{
|
|
210
|
+
address receiverPt = isPtToMaker ? address(this) : a.receiver;
|
|
211
|
+
address receiverYt = isPtToMaker ? a.receiver : address(this);
|
|
212
|
+
|
|
213
|
+
// PT => receiverPt, YT => receiverYt
|
|
214
|
+
IPYieldToken(YT).mintPY(receiverPt, receiverYt);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// This => Makers
|
|
218
|
+
_transferFromMulti(IERC20(pyToMaker), address(this), a.params, out.netTakings);
|
|
219
|
+
|
|
220
|
+
// This => Fee
|
|
221
|
+
_transferOut(SY, onchain.feeRecipient, out.totalFee);
|
|
222
|
+
|
|
223
|
+
emit FlashFill(
|
|
224
|
+
orderType, YT, msg.sender, totalPYToTaker, totalSyFromTaker, totalFee, out.totalMaking, out.totalTaking
|
|
225
|
+
);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
function flashFillPYForToken(
|
|
229
|
+
FillOrderParams[] memory _params,
|
|
230
|
+
address _receiver,
|
|
231
|
+
uint256 _maxInput,
|
|
232
|
+
bytes memory _callback
|
|
233
|
+
) internal returns (uint256 totalSyToTaker, uint256 totalPYFromTaker, uint256 totalFee) {
|
|
234
|
+
Args memory a = Args(_params, _receiver, _maxInput, _callback);
|
|
235
|
+
|
|
236
|
+
OrderType orderType = a.params[0].order.orderType;
|
|
237
|
+
|
|
238
|
+
(address SY, address PT, address YT, OnchainParams memory onchain) = _prep(a.params, false);
|
|
239
|
+
|
|
240
|
+
NormalResults memory out;
|
|
241
|
+
(totalPYFromTaker, totalSyToTaker, totalFee, out) = LimitMath.calcFlashBatch(a.params, onchain);
|
|
242
|
+
|
|
243
|
+
require(totalPYFromTaker <= a.maxTaking, "LOP: maxInput exceeded");
|
|
244
|
+
|
|
245
|
+
// callback to Taker
|
|
246
|
+
if (a.callback.length > 0) {
|
|
247
|
+
ILimitOrderCallee(msg.sender).flashFillCall(
|
|
248
|
+
orderType, totalSyToTaker, totalPYFromTaker, totalFee, a.callback
|
|
249
|
+
);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
bool ptFromTaker = (orderType == OrderType.YT_FOR_SY);
|
|
253
|
+
address pyFromTaker = ptFromTaker ? PT : YT;
|
|
254
|
+
address pyFromMaker = ptFromTaker ? YT : PT;
|
|
255
|
+
|
|
256
|
+
// Taker => YT
|
|
257
|
+
_transferFrom(IERC20(pyFromTaker), msg.sender, YT, totalPYFromTaker);
|
|
258
|
+
// Maker => YT
|
|
259
|
+
_transferFromMulti(IERC20(pyFromMaker), a.params, YT, out.netMakings);
|
|
260
|
+
|
|
261
|
+
// YT => This
|
|
262
|
+
IPYieldToken(YT).redeemPY(address(this));
|
|
263
|
+
|
|
264
|
+
// This => Taker
|
|
265
|
+
_transferOut(SY, a.receiver, totalSyToTaker);
|
|
266
|
+
|
|
267
|
+
// This => Makers
|
|
268
|
+
_redeemSy_transferOut(SY, a.params, out.totalTaking, out.netTakings);
|
|
269
|
+
|
|
270
|
+
// This => Fee
|
|
271
|
+
_transferOut(SY, onchain.feeRecipient, out.totalFee);
|
|
272
|
+
|
|
273
|
+
emit FlashFill(
|
|
274
|
+
orderType, YT, msg.sender, totalSyToTaker, totalPYFromTaker, totalFee, out.totalMaking, out.totalTaking
|
|
275
|
+
);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
// ----------------- verify & convert functions -----------------
|
|
279
|
+
|
|
280
|
+
function _validateOrdersSkipSig(FillOrderParams[] memory params) internal view {
|
|
281
|
+
uint256 len = params.length;
|
|
282
|
+
require(len != 0, "LOP: empty batch");
|
|
283
|
+
|
|
284
|
+
(address YT, OrderType orderType) = (params[0].order.YT, params[0].order.orderType);
|
|
285
|
+
bool isTokenOut = (orderType == OrderType.PT_FOR_SY || orderType == OrderType.YT_FOR_SY);
|
|
286
|
+
|
|
287
|
+
uint256 expiry = IPYieldToken(YT).expiry();
|
|
288
|
+
require(block.timestamp < expiry, "LOP: PY expired");
|
|
289
|
+
|
|
290
|
+
for (uint256 i = 0; i < len; i = _inc1(i)) {
|
|
291
|
+
Order memory order = params[i].order;
|
|
292
|
+
|
|
293
|
+
require(order.orderType == orderType, "LOP: not same orderType");
|
|
294
|
+
require(order.YT == YT, "LOP: not same YT");
|
|
295
|
+
require(block.timestamp < order.expiry, "LOP: order expired");
|
|
296
|
+
require(order.nonce >= nonce[order.maker], "LOP: order invalidated");
|
|
297
|
+
|
|
298
|
+
if (isTokenOut) require(order.token != WNATIVE, "LOP: invalid tokenOut");
|
|
299
|
+
// else assert(order.token!=NATIVE) // always true
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
function _prep(FillOrderParams[] memory params, bool tokenToSy)
|
|
304
|
+
internal
|
|
305
|
+
returns (address SY, address PT, address YT, OnchainParams memory onchain)
|
|
306
|
+
{
|
|
307
|
+
_checkSig_doPermit_updMakingAndRemaining(params); // state changes to avoid reentrancy
|
|
308
|
+
|
|
309
|
+
YT = params[0].order.YT;
|
|
310
|
+
SY = IPYieldToken(YT).SY();
|
|
311
|
+
PT = IPYieldToken(YT).PT();
|
|
312
|
+
|
|
313
|
+
if (tokenToSy) {
|
|
314
|
+
_transferIn_mintSy(SY, params);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
onchain = getOnchainParams(YT);
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
function _checkSig_doPermit_updMakingAndRemaining(FillOrderParams[] memory params) internal {
|
|
321
|
+
uint256 len = params.length;
|
|
322
|
+
for (uint256 i = 0; i < len; i = _inc1(i)) {
|
|
323
|
+
FillOrderParams memory param = params[i];
|
|
324
|
+
|
|
325
|
+
(bytes32 orderHash, uint256 remainingMakerAmount) = _checkSig_doPermit(param.order, param.signature);
|
|
326
|
+
uint256 netMaking = PMath.min(param.makingAmount, remainingMakerAmount);
|
|
327
|
+
|
|
328
|
+
unchecked {
|
|
329
|
+
remainingMakerAmount = remainingMakerAmount - netMaking;
|
|
330
|
+
_remaining[orderHash] = remainingMakerAmount + 1;
|
|
331
|
+
|
|
332
|
+
emit OrderRemainingUpdated(orderHash, remainingMakerAmount);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
param.makingAmount = netMaking;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
function _checkSig_doPermit(Order memory order, bytes memory signature)
|
|
340
|
+
internal
|
|
341
|
+
returns (bytes32, /*orderHash*/ uint256 /*remainingMakerAmount*/ )
|
|
342
|
+
{
|
|
343
|
+
bytes32 orderHash = hashOrder(order);
|
|
344
|
+
uint256 remainingMakerAmount = _remaining[orderHash];
|
|
345
|
+
|
|
346
|
+
if (remainingMakerAmount == _ORDER_FILLED) return (orderHash, 0);
|
|
347
|
+
|
|
348
|
+
if (remainingMakerAmount == _ORDER_DOES_NOT_EXIST) {
|
|
349
|
+
require(SignatureChecker.isValidSignatureNow(order.maker, orderHash, signature), "LOP: bad signature");
|
|
350
|
+
|
|
351
|
+
remainingMakerAmount = order.makingAmount;
|
|
352
|
+
|
|
353
|
+
// permit if there is such
|
|
354
|
+
if (order.permit.length >= 20) {
|
|
355
|
+
// proceed only if permit length is enough to store address
|
|
356
|
+
(address token, bytes memory permit) = order.permit.decodeTargetAndCalldata();
|
|
357
|
+
_permitMemory(token, permit);
|
|
358
|
+
require(_remaining[orderHash] == _ORDER_DOES_NOT_EXIST, "LOP: reentrancy detected");
|
|
359
|
+
}
|
|
360
|
+
} else {
|
|
361
|
+
unchecked {
|
|
362
|
+
remainingMakerAmount -= 1;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
return (orderHash, remainingMakerAmount);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
// ----------------- simple helper functions functions -----------------
|
|
370
|
+
|
|
371
|
+
function _transferIn_mintSy(address SY, FillOrderParams[] memory params) internal {
|
|
372
|
+
uint256 len = params.length;
|
|
373
|
+
(bool isSame, address commonToken) = _isSameTokens(params);
|
|
374
|
+
uint256 totalMakingCommon = 0;
|
|
375
|
+
|
|
376
|
+
for (uint256 i = 0; i < len; i = _inc1(i)) {
|
|
377
|
+
FillOrderParams memory param = params[i];
|
|
378
|
+
if (param.makingAmount == 0) continue;
|
|
379
|
+
|
|
380
|
+
_transferIn(param.order.token, param.order.maker, param.makingAmount);
|
|
381
|
+
if (isSame) totalMakingCommon += param.makingAmount;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
if (isSame) {
|
|
385
|
+
if (commonToken == SY || totalMakingCommon == 0) return;
|
|
386
|
+
uint256 totalSy = __mintSy_Single(SY, commonToken, totalMakingCommon);
|
|
387
|
+
for (uint256 i = 0; i < len; i = _inc1(i)) {
|
|
388
|
+
params[i].makingAmount = params[i].makingAmount * totalSy / totalMakingCommon;
|
|
389
|
+
}
|
|
390
|
+
} else {
|
|
391
|
+
for (uint256 i = 0; i < len; i = _inc1(i)) {
|
|
392
|
+
FillOrderParams memory param = params[i];
|
|
393
|
+
if (param.makingAmount == 0 || param.order.token == SY) continue;
|
|
394
|
+
param.makingAmount = __mintSy_Single(SY, param.order.token, param.makingAmount);
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
function __mintSy_Single(address SY, address token, uint256 netTokenIn) private returns (uint256 netSyOut) {
|
|
400
|
+
if (token == WNATIVE && !IStandardizedYield(SY).isValidTokenIn(WNATIVE)) {
|
|
401
|
+
_wrap_unwrap_ETH(WNATIVE, NATIVE, netTokenIn);
|
|
402
|
+
token = NATIVE;
|
|
403
|
+
}
|
|
404
|
+
return
|
|
405
|
+
IStandardizedYield(SY).deposit{value: token == NATIVE ? netTokenIn : 0}(address(this), token, netTokenIn, 0);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
function _redeemSy_transferOut(
|
|
409
|
+
address SY,
|
|
410
|
+
FillOrderParams[] memory params,
|
|
411
|
+
uint256 totalSyOut,
|
|
412
|
+
uint256[] memory netSyOuts
|
|
413
|
+
) internal {
|
|
414
|
+
uint256 len = params.length;
|
|
415
|
+
(bool isSame, address commonToken) = _isSameTokens(params);
|
|
416
|
+
|
|
417
|
+
if (isSame) {
|
|
418
|
+
if (commonToken == SY) {
|
|
419
|
+
_transferFromMulti(IERC20(SY), address(this), params, netSyOuts);
|
|
420
|
+
return;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
uint256 totalTokenOut = __redeemSy_Single(address(this), SY, commonToken, totalSyOut);
|
|
424
|
+
for (uint256 i = 0; i < len; i = _inc1(i)) {
|
|
425
|
+
Order memory order = params[i].order;
|
|
426
|
+
uint256 netOut = netSyOuts[i] * totalTokenOut / totalSyOut;
|
|
427
|
+
if (order.token == NATIVE) payable(order.receiver).sendValue(netOut);
|
|
428
|
+
else IERC20(order.token).safeTransfer(order.receiver, netOut);
|
|
429
|
+
}
|
|
430
|
+
} else {
|
|
431
|
+
for (uint256 i = 0; i < len; i = _inc1(i)) {
|
|
432
|
+
Order memory order = params[i].order;
|
|
433
|
+
if (order.token == SY) {
|
|
434
|
+
_transferOut(SY, order.receiver, netSyOuts[i]);
|
|
435
|
+
} else {
|
|
436
|
+
__redeemSy_Single(order.receiver, SY, order.token, netSyOuts[i]);
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
function __redeemSy_Single(address receiver, address SY, address tokenOut, uint256 netSyIn)
|
|
443
|
+
private
|
|
444
|
+
returns (uint256 netTokenOut)
|
|
445
|
+
{
|
|
446
|
+
if (tokenOut == NATIVE) {
|
|
447
|
+
address tokenRedeemSy = IStandardizedYield(SY).isValidTokenOut(tokenOut) ? tokenOut : WNATIVE;
|
|
448
|
+
netTokenOut = IStandardizedYield(SY).redeem(address(this), netSyIn, tokenRedeemSy, 0, false);
|
|
449
|
+
|
|
450
|
+
if (tokenRedeemSy == WNATIVE) {
|
|
451
|
+
_wrap_unwrap_ETH(WNATIVE, NATIVE, netTokenOut);
|
|
452
|
+
}
|
|
453
|
+
payable(receiver).sendValue(netTokenOut);
|
|
454
|
+
} else {
|
|
455
|
+
return IStandardizedYield(SY).redeem(receiver, netSyIn, tokenOut, 0, false);
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
function _isSameTokens(FillOrderParams[] memory params)
|
|
460
|
+
internal
|
|
461
|
+
pure
|
|
462
|
+
returns (bool, /*isSame*/ address /*commonToken*/ )
|
|
463
|
+
{
|
|
464
|
+
uint256 len = params.length;
|
|
465
|
+
address commonToken = params[0].order.token;
|
|
466
|
+
for (uint256 i = 1; i < len; i = _inc1(i)) {
|
|
467
|
+
if (params[i].order.token != commonToken) return (false, address(0));
|
|
468
|
+
}
|
|
469
|
+
return (true, commonToken);
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
function _inc1(uint256 i) internal pure returns (uint256) {
|
|
473
|
+
unchecked {
|
|
474
|
+
return i + 1;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
function _transferFromMulti(IERC20 token, FillOrderParams[] memory params, address to, uint256[] memory netIn)
|
|
479
|
+
internal
|
|
480
|
+
{
|
|
481
|
+
uint256 len = params.length;
|
|
482
|
+
for (uint256 i = 0; i < len; i = _inc1(i)) {
|
|
483
|
+
token.safeTransferFrom(params[i].order.maker, to, netIn[i]);
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
function _transferFromMulti(IERC20 token, address payer, FillOrderParams[] memory params, uint256[] memory netOut)
|
|
488
|
+
internal
|
|
489
|
+
{
|
|
490
|
+
uint256 len = params.length;
|
|
491
|
+
if (payer == address(this)) {
|
|
492
|
+
for (uint256 i = 0; i < len; i = _inc1(i)) {
|
|
493
|
+
token.safeTransfer(params[i].order.receiver, netOut[i]);
|
|
494
|
+
}
|
|
495
|
+
} else {
|
|
496
|
+
for (uint256 i = 0; i < len; i = _inc1(i)) {
|
|
497
|
+
token.safeTransferFrom(payer, params[i].order.receiver, netOut[i]);
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
// ----------------- Getters -----------------
|
|
503
|
+
function getOnchainParams(address YT) public returns (OnchainParams memory) {
|
|
504
|
+
uint256 timeToExpiry = IPYieldToken(YT).expiry() - block.timestamp;
|
|
505
|
+
return OnchainParams({
|
|
506
|
+
timeToExpiry: timeToExpiry,
|
|
507
|
+
pyIndex: IPYieldToken(YT).pyIndexCurrent(),
|
|
508
|
+
feeRecipient: feeRecipient,
|
|
509
|
+
lnFeeRateRoot: lnFeeRateRoot
|
|
510
|
+
});
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
function hashOrder(Order memory order) public view returns (bytes32) {
|
|
514
|
+
StaticOrder memory staticOrder;
|
|
515
|
+
assembly {
|
|
516
|
+
staticOrder := order
|
|
517
|
+
}
|
|
518
|
+
return _hashTypedDataV4(keccak256(abi.encode(LIMIT_ORDER_TYPEHASH, staticOrder, keccak256(order.permit))));
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
// ----------------- Owner -----------------
|
|
522
|
+
function setFees(address _feeRecipient, uint96 _lnFeeRateRoot) public onlyOwner {
|
|
523
|
+
feeRecipient = _feeRecipient;
|
|
524
|
+
lnFeeRateRoot = _lnFeeRateRoot;
|
|
525
|
+
}
|
|
526
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
|
|
3
|
+
pragma solidity ^0.8.0;
|
|
4
|
+
|
|
5
|
+
/// @title Library with gas efficient alternatives to `abi.decode`
|
|
6
|
+
library ArgumentsDecoder {
|
|
7
|
+
function decodeUint256(bytes memory data) internal pure returns (uint256) {
|
|
8
|
+
uint256 value;
|
|
9
|
+
assembly {
|
|
10
|
+
// solhint-disable-line no-inline-assembly
|
|
11
|
+
value := mload(add(data, 0x20))
|
|
12
|
+
}
|
|
13
|
+
return value;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function decodeBool(bytes memory data) internal pure returns (bool) {
|
|
17
|
+
bool value;
|
|
18
|
+
assembly {
|
|
19
|
+
// solhint-disable-line no-inline-assembly
|
|
20
|
+
value := eq(mload(add(data, 0x20)), 1)
|
|
21
|
+
}
|
|
22
|
+
return value;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function decodeTargetAndCalldata(bytes memory data) internal pure returns (address, bytes memory) {
|
|
26
|
+
address target;
|
|
27
|
+
bytes memory args;
|
|
28
|
+
assembly {
|
|
29
|
+
// solhint-disable-line no-inline-assembly
|
|
30
|
+
target := mload(add(data, 0x14))
|
|
31
|
+
args := add(data, 0x14)
|
|
32
|
+
mstore(args, sub(mload(data), 0x14))
|
|
33
|
+
}
|
|
34
|
+
return (target, args);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function decodeTargetAndData(bytes calldata data) internal pure returns (address, bytes calldata) {
|
|
38
|
+
address target;
|
|
39
|
+
bytes calldata args;
|
|
40
|
+
assembly {
|
|
41
|
+
// solhint-disable-line no-inline-assembly
|
|
42
|
+
target := shr(96, calldataload(data.offset))
|
|
43
|
+
}
|
|
44
|
+
args = data[20:];
|
|
45
|
+
return (target, args);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
pragma solidity ^0.8.0;
|
|
3
|
+
|
|
4
|
+
/// @title A helper contract for managing nonce of tx sender
|
|
5
|
+
|
|
6
|
+
contract NonceManager {
|
|
7
|
+
event NonceIncreased(address indexed maker, uint256 oldNonce, uint256 newNonce);
|
|
8
|
+
|
|
9
|
+
mapping(address => uint256) public nonce;
|
|
10
|
+
|
|
11
|
+
/// @notice Advances nonce by one
|
|
12
|
+
function increaseNonce() external {
|
|
13
|
+
advanceNonce(1);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/// @notice Advances nonce by specified amount
|
|
17
|
+
function advanceNonce(uint8 amount) public {
|
|
18
|
+
uint256 newNonce = nonce[msg.sender] + amount;
|
|
19
|
+
nonce[msg.sender] = newNonce;
|
|
20
|
+
emit NonceIncreased(msg.sender, newNonce - amount, newNonce);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/// @notice Checks if `makerAddress` has specified `makerNonce`
|
|
24
|
+
/// @return Result True if `makerAddress` has specified nonce. Otherwise, false
|
|
25
|
+
function nonceEquals(address makerAddress, uint256 makerNonce) external view returns (bool) {
|
|
26
|
+
return nonce[makerAddress] == makerNonce;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
|
|
3
|
+
pragma solidity ^0.8.0;
|
|
4
|
+
|
|
5
|
+
import "@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol";
|
|
6
|
+
import "./RevertReasonParser.sol";
|
|
7
|
+
import "../../interfaces/IDailLikePermit.sol";
|
|
8
|
+
|
|
9
|
+
/// @title Base contract with common permit handling logics
|
|
10
|
+
abstract contract Permitable {
|
|
11
|
+
function _permit(address token, bytes calldata permit) internal {
|
|
12
|
+
if (permit.length > 0) {
|
|
13
|
+
bool success;
|
|
14
|
+
bytes memory result;
|
|
15
|
+
if (permit.length == 32 * 7) {
|
|
16
|
+
// solhint-disable-next-line avoid-low-level-calls
|
|
17
|
+
(success, result) = token.call(abi.encodePacked(IERC20Permit.permit.selector, permit));
|
|
18
|
+
} else if (permit.length == 32 * 8) {
|
|
19
|
+
// solhint-disable-next-line avoid-low-level-calls
|
|
20
|
+
(success, result) = token.call(abi.encodePacked(IDaiLikePermit.permit.selector, permit));
|
|
21
|
+
} else {
|
|
22
|
+
revert("Wrong permit length");
|
|
23
|
+
}
|
|
24
|
+
if (!success) {
|
|
25
|
+
revert(RevertReasonParser.parse(result, "Permit failed: "));
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function _permitMemory(address token, bytes memory permit) internal {
|
|
31
|
+
if (permit.length > 0) {
|
|
32
|
+
bool success;
|
|
33
|
+
bytes memory result;
|
|
34
|
+
if (permit.length == 32 * 7) {
|
|
35
|
+
// solhint-disable-next-line avoid-low-level-calls
|
|
36
|
+
(success, result) = token.call(abi.encodePacked(IERC20Permit.permit.selector, permit));
|
|
37
|
+
} else if (permit.length == 32 * 8) {
|
|
38
|
+
// solhint-disable-next-line avoid-low-level-calls
|
|
39
|
+
(success, result) = token.call(abi.encodePacked(IDaiLikePermit.permit.selector, permit));
|
|
40
|
+
} else {
|
|
41
|
+
revert("Wrong permit length");
|
|
42
|
+
}
|
|
43
|
+
if (!success) {
|
|
44
|
+
revert(RevertReasonParser.parse(result, "Permit failed: "));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|