@pendle/core-v2 1.2.0-mainnet → 1.2.0-testnet
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol/PendleMsgReceiveEndpointUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol/PendleMsgReceiveEndpointUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiverAppUpg.sol/PendleMsgReceiverAppUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiverAppUpg.sol/PendleMsgReceiverAppUpg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol/PendleMsgSendEndpointUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol/PendleMsgSendEndpointUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSenderAppUpg.sol/PendleMsgSenderAppUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/ExcessivelySafeCall.sol/ExcessivelySafeCall.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol/LayerZeroHelper.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/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 +3 -3
- package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.json +34 -2
- package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.json +3 -3
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol/VotingEscrowTokenBase.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/libraries/WeekMath.sol/WeekMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/BulkSeller/BulkSeller.sol/BulkSeller.dbg.json +1 -1
- package/build/artifacts/contracts/core/BulkSeller/BulkSeller.sol/BulkSeller.json +2 -2
- package/build/artifacts/contracts/core/BulkSeller/BulkSellerFactory.sol/BulkSellerFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/BulkSeller/BulkSellerFactory.sol/BulkSellerFactory.json +2 -2
- package/build/artifacts/contracts/core/BulkSeller/BulkSellerMathCore.sol/BulkSellerMathCore.dbg.json +1 -1
- package/build/artifacts/contracts/core/BulkSeller/BulkSellerMathCore.sol/BulkSellerMathCore.json +2 -2
- package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.json +2 -2
- package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.json +2 -2
- package/build/artifacts/contracts/core/Market/PendleGauge.sol/PendleGauge.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.json +2 -2
- package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.json +2 -2
- package/build/artifacts/contracts/core/RewardManager/RewardManager.sol/RewardManager.dbg.json +1 -1
- package/build/artifacts/contracts/core/RewardManager/RewardManagerAbstract.sol/RewardManagerAbstract.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/SYBase.sol/SYBase.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/SYBase.sol/SYBase.json +141 -0
- package/build/artifacts/contracts/core/StandardizedYield/SYBaseWithRewards.sol/SYBaseWithRewards.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/SYBaseWithRewards.sol/SYBaseWithRewards.json +141 -0
- package/build/artifacts/contracts/core/StandardizedYield/SYUtils.sol/SYUtils.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/StEthHelper.sol/StEthHelper.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/StEthHelper.sol/StEthHelper.json +10 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ape/sAPE.sol/sAPE.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ape/sAPE.sol/sAPE.json +143 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRethSY.sol/PendleAuraWethRethSY.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRethSY.sol/PendleAuraWethRethSY.json +1218 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSY.sol/PendleAuraWethWstethSY.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSY.sol/PendleAuraWethWstethSY.json +1192 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/FixedPoint.sol/FixedPoint.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/FixedPoint.sol/FixedPoint.json +10 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStableMath.sol/MetaStableMath.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStableMath.sol/MetaStableMath.json +40 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStablePreview.sol/MetaStablePreview.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStablePreview.sol/MetaStablePreview.json +322 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/PendleAuraBalancerStableLPSY.sol/PendleAuraBalancerStableLPSY.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/PendleAuraBalancerStableLPSY.sol/PendleAuraBalancerStableLPSY.json +1171 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePoolUserData.sol/StablePoolUserData.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePoolUserData.sol/StablePoolUserData.json +10 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePreviewBase.sol/StablePreviewBase.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePreviewBase.sol/StablePreviewBase.json +133 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol/PendleQiTokenSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol/PendleQiTokenSY.json +143 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveFraxUsdcSY.sol/PendleCurveFraxUsdcSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveFraxUsdcSY.sol/PendleCurveFraxUsdcSY.json +143 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveUsdd3CrvSY.sol/PendleCurveUsdd3CrvSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveUsdd3CrvSY.sol/PendleCurveUsdd3CrvSY.json +143 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/Curve3CrvPoolHelper.sol/Curve3CrvPoolHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/CurveFraxUsdcPoolHelper.sol/CurveFraxUsdcPoolHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/CurveUsdd3CrvPoolHelper.sol/CurveUsdd3CrvPoolHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/PendleConvexLPSY.sol/PendleConvexLPSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/PendleConvexLPSY.sol/PendleConvexLPSY.json +141 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/GLPPreviewHelper.sol/GLPPreviewHelper.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/GLPPreviewHelper.sol/GLPPreviewHelper.json +50 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/PendleGlpSY.sol/PendleGlpSY.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/PendleGlpSY.sol/PendleGlpSY.json +1163 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleLooksStakingSY.sol/PendleLooksStakingSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleLooksStakingSY.sol/PendleLooksStakingSY.json +143 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol/PendleWstEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol/PendleWstEthSY.json +143 -2
- package/build/artifacts/contracts/core/YieldContracts/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 +4 -0
- package/build/artifacts/contracts/core/YieldContractsV2/InterestManagerYTV2.sol/InterestManagerYTV2.json +66 -0
- package/build/artifacts/contracts/core/YieldContractsV2/PendlePrincipalTokenV2.sol/PendlePrincipalTokenV2.dbg.json +4 -0
- package/build/artifacts/contracts/core/YieldContractsV2/PendlePrincipalTokenV2.sol/PendlePrincipalTokenV2.json +476 -0
- package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldContractFactoryV2.sol/PendleYieldContractFactoryV2.dbg.json +4 -0
- package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldContractFactoryV2.sol/PendleYieldContractFactoryV2.json +590 -0
- package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldTokenV2.sol/PendleYieldTokenV2.dbg.json +4 -0
- package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldTokenV2.sol/PendleYieldTokenV2.json +1017 -0
- package/build/artifacts/contracts/core/erc20/PendleERC20.sol/PendleERC20.dbg.json +1 -1
- package/build/artifacts/contracts/core/erc20/PendleERC20Permit.sol/PendleERC20Permit.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/ArrayLib.sol/ArrayLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/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/CodeDeployer.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeable.sol/BoringOwnableUpgradeable.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeable.sol/BoringOwnableUpgradeableData.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.json +87 -2
- package/build/artifacts/contracts/core/libraries/ExpiryUtilsLib.sol/ExpiryUtils.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/MiniHelpers.sol/MiniHelpers.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/StringLib.sol/StringLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/TokenHelper.sol/TokenHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/math/LogExpMath.sol/LogExpMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/math/Math.sol/Math.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/IAsset.sol/IAsset.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Balancer/IAsset.sol/IAsset.json +10 -0
- package/build/artifacts/contracts/interfaces/Balancer/IBalancerFees.sol/IBalancerFees.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Balancer/IBalancerFees.sol/IBalancerFees.json +24 -0
- package/build/artifacts/contracts/interfaces/Balancer/IBalancerStablePreview.sol/IBalancerStablePreview.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Balancer/IBalancerStablePreview.sol/IBalancerStablePreview.json +133 -0
- package/build/artifacts/contracts/interfaces/Balancer/IBasePool.sol/IBasePool.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Balancer/IBasePool.sol/IBasePool.json +328 -0
- package/build/artifacts/contracts/interfaces/Balancer/IComposableStable.sol/IComposableStable.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Balancer/IComposableStable.sol/IComposableStable.json +467 -0
- package/build/artifacts/contracts/interfaces/Balancer/IGauge.sol/IGauge.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Balancer/IGauge.sol/IGauge.json +61 -0
- package/build/artifacts/contracts/interfaces/Balancer/ILiquidityGaugeFactory.sol/ILiquidityGaugeFactory.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Balancer/ILiquidityGaugeFactory.sol/ILiquidityGaugeFactory.json +30 -0
- package/build/artifacts/contracts/interfaces/Balancer/IMetaStablePool.sol/IMetaStablePool.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Balancer/IMetaStablePool.sol/IMetaStablePool.json +398 -0
- package/build/artifacts/contracts/interfaces/Balancer/IRateProvider.sol/IRateProvider.dbg.json +4 -0
- package/build/artifacts/contracts/{router/kyberswap/KyberSwapHelper.sol/KyberSwapHelper.json → interfaces/Balancer/IRateProvider.sol/IRateProvider.json} +5 -5
- package/build/artifacts/contracts/interfaces/Balancer/IVault.sol/IVault.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Balancer/IVault.sol/IVault.json +278 -0
- package/build/artifacts/contracts/interfaces/ConvexCurve/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/ConvexCurve/IRewards.sol/IRewards.json +18 -0
- package/build/artifacts/contracts/interfaces/Curve/ICrvPool.sol/ICrvPool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Curve/ITriCrvPool.sol/ITriCrvPool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/GMX/IGMXVault.sol/IGMXVault.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/GMX/IGMXVault.sol/IGMXVault.json +308 -0
- package/build/artifacts/contracts/interfaces/GMX/IGlpManager.sol/IGlpManager.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/GMX/IGlpManager.sol/IGlpManager.json +43 -0
- package/build/artifacts/contracts/interfaces/GMX/IRewardRouterV2.sol/IRewardRouterV2.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/GMX/IRewardRouterV2.sol/IRewardRouterV2.json +201 -0
- package/build/artifacts/contracts/interfaces/GMX/IVaultPriceFeed.sol/IVaultPriceFeed.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/GMX/IVaultPriceFeed.sol/IVaultPriceFeed.json +45 -0
- package/build/artifacts/contracts/interfaces/IAToken.sol/IAToken.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IAavePool.sol/IAavePool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IAaveRewardsController.sol/IAaveRewardsController.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IAddressProvider.sol/IAddressProvider.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IAddressProvider.sol/IAddressProvider.json +48 -0
- 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/IBoringOwnableUpgradeable.sol/IBoringOwnableUpgradeable.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IDiamondCut.sol/IDiamondCut.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IDiamondCut.sol/IDiamondCut.json +93 -0
- package/build/artifacts/contracts/interfaces/IDiamondLoupe.sol/IDiamondLoupe.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IDiamondLoupe.sol/IDiamondLoupe.json +87 -0
- package/build/artifacts/contracts/interfaces/IERC4626.sol/IERC4626.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IEulerEToken.sol/IEulerEToken.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IEulerMarkets.sol/IEulerMarkets.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 +338 -16
- package/build/artifacts/contracts/interfaces/IPActionMintRedeem.sol/IPActionMintRedeem.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMintRedeem.sol/IPActionMintRedeem.json +105 -224
- package/build/artifacts/contracts/interfaces/IPActionMisc.sol/IPActionMisc.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMisc.sol/IPActionMisc.json +56 -12
- package/build/artifacts/contracts/interfaces/IPActionSwapPT.sol/IPActionSwapPT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapPT.sol/IPActionSwapPT.json +52 -8
- package/build/artifacts/contracts/interfaces/IPActionSwapYT.sol/IPActionSwapYT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapYT.sol/IPActionSwapYT.json +231 -8
- package/build/artifacts/contracts/interfaces/IPAllAction.sol/IPAllAction.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllAction.sol/IPAllAction.json +675 -241
- package/build/artifacts/contracts/interfaces/IPBulkSeller.sol/IPBulkSeller.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPBulkSellerFactory.sol/IPBulkSellerFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPBulkSellerSYCallback.sol/IPBulkSellerCallback.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPFeeDistributor.sol/IPFeeDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPFeeDistributor.sol/IPFeeDistributor.json +19 -0
- 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/IPGovernanceManager.sol/IPGovernanceManager.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 +4 -0
- package/build/artifacts/contracts/interfaces/IPInterestManagerYTV2.sol/IPInterestManagerYTV2.json +40 -0
- package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarketFactory.sol/IPMarketFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarketSwapCallback.sol/IPMarketSwapCallback.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMsgReceiverApp.sol/IPMsgReceiverApp.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMsgReceiverApp.sol/IPMsgReceiverApp.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMsgSendEndpoint.sol/IPMsgSendEndpoint.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPermissionsV2Upg.sol/IPermissionsV2Upg.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPrincipalToken.sol/IPPrincipalToken.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPVeToken.sol/IPVeToken.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPVotingController.sol/IPVotingController.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPVotingEscrowMainchain.sol/IPVotingEscrowMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPYieldContractFactory.sol/IPYieldContractFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPYieldToken.sol/IPYieldToken.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPYieldTokenV2.sol/IPYieldTokenV2.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPYieldTokenV2.sol/IPYieldTokenV2.json +679 -0
- 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/IREDACTEDStaking.sol/IREDACTEDStaking.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IRewardManager.sol/IRewardManager.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ISAvax.sol/ISAvax.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ISJoe.sol/ISJoe.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IStETH.sol/IStETH.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IStandardizedYield.sol/IStandardizedYield.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IStargateLPStaking.sol/IStargateLPStaking.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IStargatePool.sol/IStargatePool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IStargateRouter.sol/IStargateRouter.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IWAvax.sol/IWAvax.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IWETH.sol/IWETH.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IWXBTRFLY.sol/IWXBTRFLY.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IWstETH.sol/IWstETH.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IYearnVault.sol/IYearnVault.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AddressProvider.sol/AddressProvider.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/AddressProvider.sol/AddressProvider.json +143 -0
- package/build/artifacts/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol/BaseSplitCodeFactoryContract.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BulkSellerOffchain.sol/BulkSellerOffchain.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BulkSellerOffchain.sol/BulkSellerOffchain.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/MarketMathStatic.sol/MarketMathStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/MarketMathStatic.sol/MarketMathStatic.json +2 -28
- package/build/artifacts/contracts/offchain-helpers/Multicall2.sol/Multicall2.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/Multicall2.sol/Multicall2.json +322 -0
- package/build/artifacts/contracts/offchain-helpers/PendleMulticall.sol/PendleMulticall.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/PendleMulticall.sol/PendleMulticall.json +47 -0
- package/build/artifacts/contracts/offchain-helpers/RouterStatic.sol/RouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/RouterStatic.sol/RouterStatic.json +144 -60
- package/build/artifacts/contracts/router/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.json +345 -62
- package/build/artifacts/contracts/router/ActionMintRedeem.sol/ActionMintRedeem.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionMintRedeem.sol/ActionMintRedeem.json +107 -260
- package/build/artifacts/contracts/router/ActionMisc.sol/ActionMisc.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionMisc.sol/ActionMisc.json +57 -18
- package/build/artifacts/contracts/router/ActionSwapPT.sol/ActionSwapPT.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapPT.sol/ActionSwapPT.json +54 -65
- package/build/artifacts/contracts/router/ActionSwapYT.sol/ActionSwapYT.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapYT.sol/ActionSwapYT.json +342 -44
- package/build/artifacts/contracts/router/PendleRouter.sol/PendleRouter.dbg.json +1 -1
- package/build/artifacts/contracts/router/PendleRouter.sol/PendleRouter.json +76 -67
- package/build/artifacts/contracts/router/base/ActionBaseCallback.sol/ActionBaseCallback.dbg.json +4 -0
- package/build/artifacts/contracts/router/base/ActionBaseCallback.sol/ActionBaseCallback.json +141 -0
- package/build/artifacts/contracts/router/base/ActionBaseMintRedeem.sol/ActionBaseMintRedeem.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/ActionBaseMintRedeem.sol/ActionBaseMintRedeem.json +1 -15
- package/build/artifacts/contracts/router/base/CallbackHelper.sol/CallbackHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtInLib.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtInLib.json +2 -2
- package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtOutLib.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtOutLib.json +2 -2
- package/build/artifacts/contracts/router/swap-aggregator/1inch/I1inchAggregationRouterV5.sol/I1inchAggregationRouterV5.dbg.json +4 -0
- package/build/artifacts/contracts/router/swap-aggregator/1inch/I1inchAggregationRouterV5.sol/I1inchAggregationRouterV5.json +160 -0
- package/build/artifacts/contracts/router/swap-aggregator/1inch/OneInchAggregationRouterHelper.sol/OneInchAggregationRouterHelper.dbg.json +4 -0
- package/build/artifacts/contracts/router/swap-aggregator/1inch/OneInchAggregationRouterHelper.sol/OneInchAggregationRouterHelper.json +10 -0
- package/build/artifacts/contracts/router/swap-aggregator/IPSwapAggregator.sol/IPSwapAggregator.dbg.json +4 -0
- package/build/artifacts/contracts/router/swap-aggregator/IPSwapAggregator.sol/IPSwapAggregator.json +56 -0
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwapAggregator.sol/PendleSwapAggregator.dbg.json +4 -0
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwapAggregator.sol/PendleSwapAggregator.json +72 -0
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/KyberAggregationRouterHelper.sol/KyberAggregationRouterHelper.dbg.json +4 -0
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/KyberAggregationRouterHelper.sol/KyberAggregationRouterHelper.json +10 -0
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/ScaleDataHelperEthereum1.sol/ScaleDataHelperEthereum1.dbg.json +4 -0
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/ScaleDataHelperEthereum1.sol/ScaleDataHelperEthereum1.json +10 -0
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/interfaces/IAggregationExecutor.sol/IAggregationExecutor.dbg.json +4 -0
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/interfaces/IAggregationExecutor.sol/IAggregationExecutor.json +65 -0
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/interfaces/IExecutorHelperEthereum1.sol/IExecutorHelperEthereum1.dbg.json +4 -0
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/interfaces/IExecutorHelperEthereum1.sol/IExecutorHelperEthereum1.json +388 -0
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/interfaces/IHashflow.sol/IHashflow.dbg.json +4 -0
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/interfaces/IHashflow.sol/IHashflow.json +101 -0
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/interfaces/IMetaAggregationRouterV2.sol/IMetaAggregationRouterV2.dbg.json +4 -0
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/interfaces/IMetaAggregationRouterV2.sol/IMetaAggregationRouterV2.json +215 -0
- package/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiverAppUpg.sol +0 -1
- package/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol +9 -9
- package/contracts/core/RewardManager/RewardManager.sol +1 -1
- package/contracts/core/StandardizedYield/SYBase.sol +23 -5
- package/contracts/core/StandardizedYield/StEthHelper.sol +71 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRethSY.sol +134 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSY.sol +154 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/FixedPoint.sol +68 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStableMath.sol +322 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStablePreview.sol +390 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/PendleAuraBalancerStableLPSY.sol +329 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePoolUserData.sol +30 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePreviewBase.sol +189 -0
- package/contracts/core/StandardizedYield/implementations/GLP/GLPPreviewHelper.sol +142 -0
- package/contracts/core/StandardizedYield/implementations/GLP/PendleGlpSY.sol +224 -0
- package/contracts/core/StandardizedYield/implementations/GLP/README.md +61 -0
- package/contracts/core/StandardizedYield/implementations/PendleGdaiSY.sol +138 -0
- package/contracts/core/YieldContracts/PendleYieldContractFactory.sol +10 -0
- package/contracts/core/YieldContractsV2/InterestManagerYTV2.sol +114 -0
- package/contracts/core/YieldContractsV2/PendlePrincipalTokenV2.sol +63 -0
- package/contracts/core/YieldContractsV2/PendleYieldContractFactoryV2.sol +200 -0
- package/contracts/core/YieldContractsV2/PendleYieldTokenV2.sol +485 -0
- package/contracts/core/libraries/ArrayLib.sol +27 -12
- package/contracts/core/libraries/Errors.sol +8 -2
- package/contracts/core/libraries/TokenHelper.sol +10 -0
- package/contracts/interfaces/Balancer/IAsset.sol +4 -0
- package/contracts/interfaces/Balancer/IBalancerFees.sol +6 -0
- package/contracts/interfaces/Balancer/IBalancerStablePreview.sol +22 -0
- package/contracts/interfaces/Balancer/IBasePool.sol +30 -0
- package/contracts/interfaces/Balancer/IComposableStable.sol +39 -0
- package/contracts/interfaces/Balancer/IGauge.sol +10 -0
- package/contracts/interfaces/Balancer/ILiquidityGaugeFactory.sol +6 -0
- package/contracts/interfaces/Balancer/IMetaStablePool.sol +31 -0
- package/contracts/interfaces/Balancer/IRateProvider.sol +6 -0
- package/contracts/interfaces/Balancer/IVault.sol +78 -0
- package/contracts/interfaces/ConvexCurve/IRewards.sol +5 -0
- package/contracts/interfaces/GMX/IGMXVault.sol +47 -0
- package/contracts/interfaces/GMX/IGlpManager.sol +12 -0
- package/contracts/interfaces/GMX/IRewardRouterV2.sol +43 -0
- package/contracts/interfaces/GMX/IVaultPriceFeed.sol +11 -0
- package/contracts/interfaces/IAddressProvider.sol +7 -0
- package/contracts/interfaces/IDiamondCut.sol +36 -0
- package/contracts/interfaces/IDiamondLoupe.sol +38 -0
- package/contracts/interfaces/IERC4626.sol +2 -0
- package/contracts/interfaces/IPActionAddRemoveLiq.sol +36 -1
- package/contracts/interfaces/IPActionInfoStatic.sol +43 -0
- package/contracts/interfaces/IPActionMarketAuxStatic.sol +30 -0
- package/contracts/interfaces/IPActionMarketCoreStatic.sol +317 -0
- package/contracts/interfaces/IPActionMintRedeem.sol +2 -55
- package/contracts/interfaces/IPActionMintRedeemStatic.sol +60 -0
- package/contracts/interfaces/IPActionMisc.sol +18 -4
- package/contracts/interfaces/IPActionStorageStatic.sol +25 -0
- package/contracts/interfaces/IPActionSwapPT.sol +1 -1
- package/contracts/interfaces/IPActionSwapYT.sol +28 -4
- package/contracts/interfaces/IPActionVePendleStatic.sol +9 -0
- package/contracts/interfaces/IPAllAction.sol +5 -3
- package/contracts/interfaces/IPInterestManagerYTV2.sol +13 -0
- package/contracts/interfaces/IPMiniDiamond.sol +12 -0
- package/contracts/interfaces/IPMsgReceiverApp.sol +1 -1
- package/contracts/interfaces/IPRouterStatic.sol +19 -0
- package/contracts/interfaces/IPVotingController.sol +6 -0
- package/contracts/interfaces/IPYieldTokenV2.sol +66 -0
- package/contracts/interfaces/IStandardizedYield.sol +1 -1
- package/contracts/offchain-helpers/AddressProvider.sol +16 -0
- package/contracts/offchain-helpers/Broadcaster.sol +48 -0
- package/contracts/offchain-helpers/PendleMulticall.sol +26 -0
- package/contracts/offchain-helpers/{MarketMathStatic.sol → legacy/MarketMathStatic.sol} +2 -2
- package/contracts/offchain-helpers/{RouterStatic.sol → legacy/RouterStatic.sol} +7 -7
- package/contracts/offchain-helpers/router-static/PendleRouterStatic.sol +19 -0
- package/contracts/offchain-helpers/router-static/StorageLayout.sol +21 -0
- package/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol +125 -0
- package/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol +166 -0
- package/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol +769 -0
- package/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol +166 -0
- package/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol +75 -0
- package/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol +55 -0
- package/contracts/router/ActionAddRemoveLiq.sol +116 -6
- package/contracts/router/ActionMintRedeem.sol +12 -202
- package/contracts/router/ActionMisc.sol +45 -19
- package/contracts/router/ActionSwapPT.sol +0 -5
- package/contracts/router/ActionSwapYT.sol +103 -13
- package/contracts/router/PendleRouter.sol +211 -72
- package/contracts/router/{ActionCallback.sol → base/ActionBaseCallback.sol} +47 -47
- package/contracts/router/base/ActionBaseMintRedeem.sol +105 -60
- package/contracts/router/base/CallbackHelper.sol +137 -44
- package/contracts/router/base/MarketApproxLib.sol +227 -350
- package/contracts/router/swap-aggregator/1inch/I1inchAggregationRouterV5.sol +45 -0
- package/contracts/router/swap-aggregator/1inch/OneInchAggregationRouterHelper.sol +69 -0
- package/contracts/router/swap-aggregator/IPSwapAggregator.sol +25 -0
- package/contracts/router/swap-aggregator/PendleSwapAggregator.sol +46 -0
- package/contracts/router/swap-aggregator/kyberswap/KyberAggregationRouterHelper.sol +214 -0
- package/contracts/router/swap-aggregator/kyberswap/ScaleDataHelperEthereum1.sol +147 -0
- package/contracts/router/swap-aggregator/kyberswap/interfaces/IAggregationExecutor.sol +17 -0
- package/contracts/router/swap-aggregator/kyberswap/interfaces/IExecutorHelperEthereum1.sol +191 -0
- package/contracts/router/swap-aggregator/kyberswap/interfaces/IHashflow.sol +30 -0
- package/contracts/router/swap-aggregator/kyberswap/interfaces/IMetaAggregationRouterV2.sol +42 -0
- package/deployments/43113-core.json +30 -0
- package/deployments/43113-markets/APE-30-MARCH.json +10 -0
- package/deployments/43113-markets/USDC-FEB-2ND-2024.json +10 -0
- package/deployments/43113-markets/USDC-FEB-2ND.json +10 -0
- package/deployments/43113-markets/USDC-FEB-4TH.json +10 -0
- package/deployments/43113-markets/WETH-FEB-2ND.json +11 -0
- package/deployments/43113-markets/WETH-FEB-4TH.json +11 -0
- package/deployments/43113-offchain-helper.json +4 -0
- package/deployments/43113-testenv.json +22 -0
- package/deployments/80001-core.json +29 -0
- package/deployments/80001-markets/GLP-DEC-8TH.json +10 -0
- package/deployments/80001-markets/USDC-DEC-8TH.json +10 -0
- package/deployments/80001-markets/USDC-FEB-4TH.json +10 -0
- package/deployments/80001-markets/WETH-FEB-4TH.json +11 -0
- package/deployments/80001-offchain-helper.json +4 -0
- package/deployments/80001-testenv.json +22 -0
- package/package.json +9 -10
- package/typechain-types/ActionAddRemoveLiq.ts +203 -23
- package/typechain-types/ActionBaseCallback.ts +115 -0
- package/typechain-types/ActionMintRedeem.ts +29 -230
- package/typechain-types/ActionMisc.ts +77 -27
- package/typechain-types/ActionSwapPT.ts +26 -31
- package/typechain-types/ActionSwapYT.ts +202 -21
- package/typechain-types/AddressProvider.ts +280 -0
- package/typechain-types/ComposableStablePreview.ts +217 -0
- package/typechain-types/GLPPreviewHelper.ts +121 -0
- package/typechain-types/GMXPreviewHelper.ts +121 -0
- package/typechain-types/I1inchAggregationRouterV5.ts +257 -0
- package/typechain-types/IAddressProvider.ts +123 -0
- package/typechain-types/IAggregationExecutor.ts +182 -0
- package/typechain-types/IBalancerFees.ts +89 -0
- package/typechain-types/IBalancerStablePreview.ts +217 -0
- package/typechain-types/IBasePool.ts +482 -0
- package/typechain-types/IComposableStable.ts +730 -0
- package/typechain-types/IDiamondCut.ts +152 -0
- package/typechain-types/IDiamondLoupe.ts +190 -0
- package/typechain-types/IExecutorHelperEthereum1.ts +643 -0
- package/typechain-types/IGMXVault.ts +494 -0
- package/typechain-types/IGauge.ts +160 -0
- package/typechain-types/IGlpManager.ts +115 -0
- package/typechain-types/IHashflow.ts +159 -0
- package/typechain-types/IKyberSwapAggregationRouterHelper.ts +109 -0
- package/typechain-types/ILiquidityGaugeFactory.ts +99 -0
- package/typechain-types/IMetaAggregationRouter.ts +213 -0
- package/typechain-types/IMetaAggregationRouterV2.ts +221 -0
- package/typechain-types/IMetaStablePool.ts +619 -0
- package/typechain-types/IPActionAddRemoveLiq.ts +213 -14
- package/typechain-types/IPActionMintRedeem.ts +29 -211
- package/typechain-types/IPActionMisc.ts +77 -27
- package/typechain-types/IPActionSwapPT.ts +26 -12
- package/typechain-types/IPActionSwapYT.ts +168 -12
- package/typechain-types/IPAllAction.ts +445 -227
- package/typechain-types/IPFeeDistributor.ts +18 -0
- package/typechain-types/IPInterestManagerYTV2.ts +117 -0
- package/typechain-types/IPMsgReceiverApp.ts +5 -5
- package/typechain-types/IPSwapAggregator.ts +126 -0
- package/typechain-types/IPYieldTokenV2.ts +901 -0
- package/typechain-types/IRateProvider.ts +81 -0
- package/typechain-types/IRewardRouterV2.ts +346 -0
- package/typechain-types/IRewards.ts +35 -5
- package/typechain-types/ISwapAggregator.ts +124 -0
- package/typechain-types/IVault.ts +410 -0
- package/typechain-types/IVaultPriceFeed.ts +114 -0
- package/typechain-types/InterestManagerYTV2.ts +157 -0
- package/typechain-types/MetaStableMath.ts +113 -0
- package/typechain-types/MetaStablePreview.ts +501 -0
- package/typechain-types/Multicall2.ts +437 -0
- package/typechain-types/PendleAura3EthSY.ts +1600 -0
- package/typechain-types/PendleAuraBalancerStableLPSY.ts +1523 -0
- package/typechain-types/PendleAuraCbethWstethSY.ts +1587 -0
- package/typechain-types/PendleAuraWethRethSY.ts +1549 -0
- package/typechain-types/PendleAuraWethWstethSY.ts +1523 -0
- package/typechain-types/PendleConvexLPSY.ts +204 -0
- package/typechain-types/PendleCurveFraxUsdcSY.ts +204 -0
- package/typechain-types/PendleCurveUsdd3CrvSY.ts +204 -0
- package/typechain-types/PendleFeeDistributor.ts +37 -0
- package/typechain-types/PendleGaugeControllerSidechainUpg.ts +4 -4
- package/typechain-types/PendleGlpSY.ts +1463 -0
- package/typechain-types/PendleLooksStakingSY.ts +204 -0
- package/typechain-types/PendleMsgReceiverAppUpg.ts +5 -5
- package/typechain-types/PendleMulticall.ts +110 -0
- package/typechain-types/PendlePrincipalTokenV2.ts +614 -0
- package/typechain-types/PendleQiTokenSY.ts +204 -0
- package/typechain-types/PendleRouter.ts +109 -131
- package/typechain-types/PendleSwapAggregator.ts +126 -0
- package/typechain-types/PendleWstEthSY.ts +204 -0
- package/typechain-types/PendleYieldContractFactoryV2.ts +801 -0
- package/typechain-types/PendleYieldTokenV2.ts +1298 -0
- package/typechain-types/RouterStatic.ts +92 -0
- package/typechain-types/SAPE.ts +204 -0
- package/typechain-types/SYBase.ts +204 -0
- package/typechain-types/SYBaseWithRewards.ts +204 -0
- package/typechain-types/StEthHelper.ts +107 -0
- package/typechain-types/StablePreviewBase.ts +217 -0
- package/typechain-types/SwapAggregator.ts +406 -0
- package/typechain-types/VotingEscrowPendleSidechain.ts +4 -5
- package/typechain-types/factories/ActionAddRemoveLiq__factory.ts +346 -68
- package/typechain-types/factories/ActionBaseCallback__factory.ts +156 -0
- package/typechain-types/factories/ActionCallback__factory.ts +1 -1
- package/typechain-types/factories/ActionMintRedeem__factory.ts +108 -266
- package/typechain-types/factories/ActionMisc__factory.ts +56 -17
- package/typechain-types/factories/ActionSwapPTYT__factory.ts +1 -1
- package/typechain-types/factories/ActionSwapPT__factory.ts +55 -71
- package/typechain-types/factories/ActionSwapYT__factory.ts +356 -48
- package/typechain-types/factories/AddressProvider__factory.ts +196 -0
- package/typechain-types/factories/AggregationRouterHelper__factory.ts +1 -1
- package/typechain-types/factories/BulkSellerFactory__factory.ts +1 -1
- package/typechain-types/factories/BulkSellerOffchain__factory.ts +1 -1
- package/typechain-types/factories/BulkSeller__factory.ts +1 -1
- package/typechain-types/factories/ComposableStablePreview__factory.ts +190 -0
- package/typechain-types/factories/Errors__factory.ts +86 -1
- package/typechain-types/factories/GLPPreviewHelper__factory.ts +65 -0
- package/typechain-types/factories/GMXPreviewHelper__factory.ts +65 -0
- package/typechain-types/factories/I1inchAggregationRouterV5__factory.ts +179 -0
- package/typechain-types/factories/IAddressProvider__factory.ts +63 -0
- package/typechain-types/factories/IAggregationExecutor__factory.ts +84 -0
- package/typechain-types/factories/IBalancerFees__factory.ts +36 -0
- package/typechain-types/factories/IBalancerStablePreview__factory.ts +152 -0
- package/typechain-types/factories/IBasePool__factory.ts +340 -0
- package/typechain-types/factories/IComposableStable__factory.ts +482 -0
- package/typechain-types/factories/IDiamondCut__factory.ts +105 -0
- package/typechain-types/factories/IDiamondLoupe__factory.ts +99 -0
- package/typechain-types/factories/IExecutorHelperEthereum1__factory.ts +407 -0
- package/typechain-types/factories/IGMXVault__factory.ts +320 -0
- package/typechain-types/factories/IGauge__factory.ts +70 -0
- package/typechain-types/factories/IGlpManager__factory.ts +55 -0
- package/typechain-types/factories/IHashflow__factory.ts +113 -0
- package/typechain-types/factories/IKyberSwapAggregationRouterHelper__factory.ts +56 -0
- package/typechain-types/factories/ILiquidityGaugeFactory__factory.ts +49 -0
- package/typechain-types/factories/IMetaAggregationRouterV2__factory.ts +234 -0
- package/typechain-types/factories/IMetaAggregationRouter__factory.ts +202 -0
- package/typechain-types/factories/IMetaStablePool__factory.ts +413 -0
- package/typechain-types/factories/IPActionAddRemoveLiq__factory.ts +338 -16
- package/typechain-types/factories/IPActionMintRedeem__factory.ts +105 -224
- package/typechain-types/factories/IPActionMisc__factory.ts +55 -11
- package/typechain-types/factories/IPActionSwapPT__factory.ts +52 -8
- package/typechain-types/factories/IPActionSwapYT__factory.ts +231 -8
- package/typechain-types/factories/IPAllAction__factory.ts +675 -241
- package/typechain-types/factories/IPFeeDistributor__factory.ts +19 -0
- package/typechain-types/factories/IPInterestManagerYTV2__factory.ts +59 -0
- package/typechain-types/factories/IPMsgReceiverApp__factory.ts +1 -1
- package/typechain-types/factories/IPSwapAggregator__factory.ts +71 -0
- package/typechain-types/factories/IPYieldTokenV2__factory.ts +694 -0
- package/typechain-types/factories/IRateProvider__factory.ts +36 -0
- package/typechain-types/factories/IRewardRouterV2__factory.ts +216 -0
- package/typechain-types/factories/IRewards__factory.ts +18 -0
- package/typechain-types/factories/ISwapAggregator__factory.ts +66 -0
- package/typechain-types/factories/IVaultPriceFeed__factory.ts +60 -0
- package/typechain-types/factories/IVault__factory.ts +287 -0
- package/typechain-types/factories/InterestManagerYTV2__factory.ts +81 -0
- package/typechain-types/factories/MarketMathStatic__factory.ts +1 -27
- package/typechain-types/factories/MetaStableMath__factory.ts +93 -0
- package/typechain-types/factories/MetaStablePreview__factory.ts +375 -0
- package/typechain-types/factories/Multicall2__factory.ts +372 -0
- package/typechain-types/factories/OracleLib__factory.ts +1 -1
- package/typechain-types/factories/PendleAura3EthSY__factory.ts +1326 -0
- package/typechain-types/factories/PendleAuraBalancerStableLPSY__factory.ts +1190 -0
- package/typechain-types/factories/PendleAuraCbethWstethSY__factory.ts +1317 -0
- package/typechain-types/factories/PendleAuraWethRethSY__factory.ts +1291 -0
- package/typechain-types/factories/PendleAuraWethWstethSY__factory.ts +1265 -0
- package/typechain-types/factories/PendleConvexLPSY__factory.ts +141 -0
- package/typechain-types/factories/PendleCurveFraxUsdcSY__factory.ts +142 -1
- package/typechain-types/factories/PendleCurveUsdd3CrvSY__factory.ts +142 -1
- package/typechain-types/factories/PendleFeeDistributor__factory.ts +33 -1
- package/typechain-types/factories/PendleGaugeControllerMainchainUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleGaugeControllerSidechainUpg__factory.ts +2 -2
- package/typechain-types/factories/PendleGlpSY__factory.ts +1249 -0
- package/typechain-types/factories/PendleLooksStakingSY__factory.ts +142 -1
- package/typechain-types/factories/PendleMarketFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleMarket__factory.ts +1 -1
- package/typechain-types/factories/PendleMsgReceiveEndpointUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleMsgReceiverAppUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleMsgSendEndpointUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleMulticall__factory.ts +100 -0
- package/typechain-types/factories/PendlePrincipalTokenV2__factory.ts +564 -0
- package/typechain-types/factories/PendlePrincipalToken__factory.ts +1 -1
- package/typechain-types/factories/PendleQiTokenHelper__factory.ts +1 -1
- package/typechain-types/factories/PendleQiTokenSY__factory.ts +142 -1
- package/typechain-types/factories/PendleRouter__factory.ts +75 -74
- package/typechain-types/factories/PendleSwapAggregator__factory.ts +129 -0
- package/typechain-types/factories/PendleVotingControllerUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleWstEthSY__factory.ts +142 -1
- package/typechain-types/factories/PendleYieldContractFactoryV2__factory.ts +674 -0
- package/typechain-types/factories/PendleYieldContractFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleYieldTokenV2__factory.ts +1109 -0
- package/typechain-types/factories/PendleYieldToken__factory.ts +1 -1
- package/typechain-types/factories/RouterStatic__factory.ts +69 -1
- package/typechain-types/factories/SAPE__factory.ts +142 -1
- package/typechain-types/factories/SYBaseWithRewards__factory.ts +141 -0
- package/typechain-types/factories/SYBase__factory.ts +141 -0
- package/typechain-types/factories/StEthHelper__factory.ts +62 -0
- package/typechain-types/factories/StablePreviewBase__factory.ts +148 -0
- package/typechain-types/factories/SwapAggregator__factory.ts +309 -0
- package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +1 -1
- package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +2 -2
- package/typechain-types/hardhat.d.ts +369 -54
- package/typechain-types/index.ts +88 -18
- package/build/artifacts/contracts/interfaces/IPActionSwapPTYT.sol/IPActionSwapPTYT.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IPActionSwapPTYT.sol/IPActionSwapPTYT.json +0 -190
- package/build/artifacts/contracts/router/ActionCallback.sol/ActionCallback.dbg.json +0 -4
- package/build/artifacts/contracts/router/ActionCallback.sol/ActionCallback.json +0 -165
- package/build/artifacts/contracts/router/ActionSwapPTYT.sol/ActionSwapPTYT.dbg.json +0 -4
- package/build/artifacts/contracts/router/ActionSwapPTYT.sol/ActionSwapPTYT.json +0 -343
- package/build/artifacts/contracts/router/kyberswap/AggregationRouterHelper.sol/AggregationRouterHelper.dbg.json +0 -4
- package/build/artifacts/contracts/router/kyberswap/AggregationRouterHelper.sol/AggregationRouterHelper.json +0 -224
- package/build/artifacts/contracts/router/kyberswap/IAggregatorRouterHelper.sol/IAggregationRouterHelper.dbg.json +0 -4
- package/build/artifacts/contracts/router/kyberswap/IAggregatorRouterHelper.sol/IAggregationRouterHelper.json +0 -35
- package/build/artifacts/contracts/router/kyberswap/IMultihopRouterEthereum.sol/IMultihopRouterEthereum.dbg.json +0 -4
- package/build/artifacts/contracts/router/kyberswap/IMultihopRouterEthereum.sol/IMultihopRouterEthereum.json +0 -136
- package/build/artifacts/contracts/router/kyberswap/KyberSwapHelper.sol/KyberSwapHelper.dbg.json +0 -4
- package/contracts/interfaces/IBoringOwnableUpgradeable.sol +0 -10
- package/contracts/interfaces/IPActionSwapPTYT.sol +0 -31
- package/contracts/router/ActionSwapPTYT.sol +0 -108
- package/contracts/router/kyberswap/AggregationRouterHelper.sol +0 -331
- package/contracts/router/kyberswap/IAggregatorRouterHelper.sol +0 -10
- package/contracts/router/kyberswap/IMultihopRouterEthereum.sol +0 -141
- package/contracts/router/kyberswap/KyberSwapHelper.sol +0 -79
- package/deployments/1-core.json +0 -30
- package/deployments/1-markets/APE-JUNE-29.json +0 -8
- package/deployments/1-markets/FRAXUSDC-CURVELP-MARCH30.json +0 -11
- package/deployments/1-markets/LOOKS-STAKING-MARCH30.json +0 -10
- package/deployments/1-markets/STETH-JUNE29.json +0 -10
- package/deployments/1-markets/STETH-MARCH30.json +0 -10
|
@@ -1,25 +1,51 @@
|
|
|
1
1
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
2
|
pragma solidity 0.8.17;
|
|
3
3
|
|
|
4
|
-
import "../interfaces/IPMarket.sol";
|
|
5
4
|
import "../interfaces/IPActionMisc.sol";
|
|
6
|
-
import "../core/libraries/
|
|
7
|
-
|
|
8
|
-
contract ActionMisc is IPActionMisc {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
5
|
+
import "../core/libraries/TokenHelper.sol";
|
|
6
|
+
|
|
7
|
+
contract ActionMisc is IPActionMisc, TokenHelper {
|
|
8
|
+
function approveInf(MultiApproval[] calldata arr) external {
|
|
9
|
+
for (uint256 i = 0; i < arr.length; ) {
|
|
10
|
+
MultiApproval calldata ele = arr[i];
|
|
11
|
+
for (uint256 j = 0; j < ele.tokens.length; ) {
|
|
12
|
+
_safeApproveInf(ele.tokens[j], ele.spender);
|
|
13
|
+
unchecked {
|
|
14
|
+
j++;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
unchecked {
|
|
18
|
+
i++;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function batchExec(Call3[] calldata calls) external returns (Result[] memory res) {
|
|
24
|
+
uint256 length = calls.length;
|
|
25
|
+
|
|
26
|
+
res = new Result[](length);
|
|
27
|
+
|
|
28
|
+
Call3 calldata calli;
|
|
29
|
+
|
|
30
|
+
for (uint256 i = 0; i < length; ) {
|
|
31
|
+
calli = calls[i];
|
|
32
|
+
|
|
33
|
+
// delegatecall to itself, it turns allowing invoking functions from other actions
|
|
34
|
+
(bool success, bytes memory result) = address(this).delegatecall(calli.callData);
|
|
35
|
+
|
|
36
|
+
if (!success && !calli.allowFailure) {
|
|
37
|
+
assembly {
|
|
38
|
+
// We use Yul's revert() to bubble up errors from the target contract.
|
|
39
|
+
revert(add(32, result), mload(result))
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
res[i].success = success;
|
|
44
|
+
res[i].returnData = result;
|
|
45
|
+
|
|
46
|
+
unchecked {
|
|
47
|
+
++i;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
24
50
|
}
|
|
25
51
|
}
|
|
@@ -15,11 +15,6 @@ contract ActionSwapPT is IPActionSwapPT, ActionBaseMintRedeem {
|
|
|
15
15
|
using Math for int256;
|
|
16
16
|
using PYIndexLib for IPYieldToken;
|
|
17
17
|
|
|
18
|
-
/// @dev since this contract will be proxied, it must not contains non-immutable variables
|
|
19
|
-
constructor(address _kyberScalingLib)
|
|
20
|
-
ActionBaseMintRedeem(_kyberScalingLib) //solhint-disable-next-line no-empty-blocks
|
|
21
|
-
{}
|
|
22
|
-
|
|
23
18
|
/**
|
|
24
19
|
* @notice swaps exact amount of PT for SY
|
|
25
20
|
* @param exactPtIn will always consume this exact amount of PT for as much SY as possible
|
|
@@ -4,11 +4,14 @@ pragma solidity 0.8.17;
|
|
|
4
4
|
import "./base/ActionBaseMintRedeem.sol";
|
|
5
5
|
import "./base/CallbackHelper.sol";
|
|
6
6
|
import "../interfaces/IPActionSwapYT.sol";
|
|
7
|
+
import "../interfaces/IAddressProvider.sol";
|
|
7
8
|
import "../interfaces/IPMarket.sol";
|
|
8
9
|
import "../core/libraries/Errors.sol";
|
|
9
10
|
|
|
11
|
+
import "./base/ActionBaseCallback.sol";
|
|
12
|
+
|
|
10
13
|
/// @dev All swap actions will revert if market is expired
|
|
11
|
-
contract ActionSwapYT is IPActionSwapYT, ActionBaseMintRedeem
|
|
14
|
+
contract ActionSwapYT is ActionBaseCallback, IPActionSwapYT, ActionBaseMintRedeem {
|
|
12
15
|
using Math for uint256;
|
|
13
16
|
using Math for int256;
|
|
14
17
|
using MarketMathCore for MarketState;
|
|
@@ -16,10 +19,11 @@ contract ActionSwapYT is IPActionSwapYT, ActionBaseMintRedeem, CallbackHelper {
|
|
|
16
19
|
using MarketApproxPtOutLib for MarketState;
|
|
17
20
|
using PYIndexLib for IPYieldToken;
|
|
18
21
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
constructor(IAddressProvider provider, uint256 providerId) ActionBaseCallback(_getMarketFactory(provider,providerId)) {}
|
|
23
|
+
|
|
24
|
+
function _getMarketFactory(IAddressProvider provider, uint256 providerId) internal view returns (address) {
|
|
25
|
+
return provider.get(providerId);
|
|
26
|
+
}
|
|
23
27
|
|
|
24
28
|
/**
|
|
25
29
|
* @notice swap exact SY to YT with the help of flashswaps & YT tokenization / redemption
|
|
@@ -38,7 +42,7 @@ contract ActionSwapYT is IPActionSwapYT, ActionBaseMintRedeem, CallbackHelper {
|
|
|
38
42
|
address market,
|
|
39
43
|
uint256 exactSyIn,
|
|
40
44
|
uint256 minYtOut,
|
|
41
|
-
ApproxParams
|
|
45
|
+
ApproxParams calldata guessYtOut
|
|
42
46
|
) external returns (uint256 netYtOut, uint256 netSyFee) {
|
|
43
47
|
(IStandardizedYield SY, , IPYieldToken YT) = IPMarket(market).readTokens();
|
|
44
48
|
|
|
@@ -105,7 +109,7 @@ contract ActionSwapYT is IPActionSwapYT, ActionBaseMintRedeem, CallbackHelper {
|
|
|
105
109
|
(, netSyFee) = IPMarket(market).swapExactPtForSy(
|
|
106
110
|
address(YT),
|
|
107
111
|
exactYtOut, // exactPtIn = exactYtOut
|
|
108
|
-
_encodeSwapSyForExactYt(msg.sender, receiver, maxSyIn)
|
|
112
|
+
_encodeSwapSyForExactYt(msg.sender, receiver, maxSyIn, SY, YT)
|
|
109
113
|
);
|
|
110
114
|
|
|
111
115
|
netSyIn = preSyBalance - SY.balanceOf(msg.sender);
|
|
@@ -129,7 +133,7 @@ contract ActionSwapYT is IPActionSwapYT, ActionBaseMintRedeem, CallbackHelper {
|
|
|
129
133
|
address market,
|
|
130
134
|
uint256 exactSyOut,
|
|
131
135
|
uint256 maxYtIn,
|
|
132
|
-
ApproxParams
|
|
136
|
+
ApproxParams calldata guessYtIn
|
|
133
137
|
) external returns (uint256 netYtIn, uint256 netSyFee) {
|
|
134
138
|
MarketState memory state = IPMarket(market).readState(address(this));
|
|
135
139
|
(, , IPYieldToken YT) = IPMarket(market).readTokens();
|
|
@@ -148,7 +152,7 @@ contract ActionSwapYT is IPActionSwapYT, ActionBaseMintRedeem, CallbackHelper {
|
|
|
148
152
|
(, netSyFee) = IPMarket(market).swapSyForExactPt(
|
|
149
153
|
address(YT),
|
|
150
154
|
netYtIn, // exactPtOut = netYtIn
|
|
151
|
-
_encodeSwapYtForSy(receiver, exactSyOut)
|
|
155
|
+
_encodeSwapYtForSy(receiver, exactSyOut, YT)
|
|
152
156
|
);
|
|
153
157
|
|
|
154
158
|
emit SwapYtAndSy(msg.sender, market, receiver, netYtIn.neg(), exactSyOut.Int());
|
|
@@ -163,7 +167,7 @@ contract ActionSwapYT is IPActionSwapYT, ActionBaseMintRedeem, CallbackHelper {
|
|
|
163
167
|
address receiver,
|
|
164
168
|
address market,
|
|
165
169
|
uint256 minYtOut,
|
|
166
|
-
ApproxParams
|
|
170
|
+
ApproxParams calldata guessYtOut,
|
|
167
171
|
TokenInput calldata input
|
|
168
172
|
) external payable returns (uint256 netYtOut, uint256 netSyFee) {
|
|
169
173
|
(IStandardizedYield SY, , IPYieldToken YT) = IPMarket(market).readTokens();
|
|
@@ -227,13 +231,99 @@ contract ActionSwapYT is IPActionSwapYT, ActionBaseMintRedeem, CallbackHelper {
|
|
|
227
231
|
);
|
|
228
232
|
}
|
|
229
233
|
|
|
234
|
+
/**
|
|
235
|
+
* @notice swap exact PT to YT with the help of flashswaps & YT tokenization / redemption
|
|
236
|
+
* @dev inner working of this function:
|
|
237
|
+
- `exactPtIn` PT is transferred to market contract
|
|
238
|
+
- `market.swapExactPtForSy` is called, which will transfer SY directly to YT contract & callback is invoked.
|
|
239
|
+
Note that we will owe PT, the amount before is not sufficient
|
|
240
|
+
- in callback, all SY in YT contract is used to mint PT + YT, with PT used to pay the rest of the loan, and YT
|
|
241
|
+
transferred to the receiver
|
|
242
|
+
* @param exactPtIn will always consume this amount of PT for as much YT as possible
|
|
243
|
+
* @param guessTotalPtToSwap approximation data for PT used for the PT-to-SY flashswap
|
|
244
|
+
* @dev this function works in conjunction with ActionCallback
|
|
245
|
+
*/
|
|
246
|
+
function swapExactPtForYt(
|
|
247
|
+
address receiver,
|
|
248
|
+
address market,
|
|
249
|
+
uint256 exactPtIn,
|
|
250
|
+
uint256 minYtOut,
|
|
251
|
+
ApproxParams calldata guessTotalPtToSwap
|
|
252
|
+
) external returns (uint256 netYtOut, uint256 netSyFee) {
|
|
253
|
+
(, IPPrincipalToken PT, IPYieldToken YT) = IPMarket(market).readTokens();
|
|
254
|
+
MarketState memory state = IPMarket(market).readState(address(this));
|
|
255
|
+
|
|
256
|
+
_transferFrom(IERC20(PT), msg.sender, market, exactPtIn);
|
|
257
|
+
|
|
258
|
+
uint256 totalPtToSwap;
|
|
259
|
+
(netYtOut, totalPtToSwap, netSyFee) = state.approxSwapExactPtForYt(
|
|
260
|
+
YT.newIndex(),
|
|
261
|
+
exactPtIn,
|
|
262
|
+
block.timestamp,
|
|
263
|
+
guessTotalPtToSwap
|
|
264
|
+
);
|
|
265
|
+
|
|
266
|
+
if (netYtOut < minYtOut) revert Errors.RouterInsufficientYtOut(netYtOut, minYtOut);
|
|
267
|
+
|
|
268
|
+
IPMarket(market).swapExactPtForSy(
|
|
269
|
+
address(YT),
|
|
270
|
+
totalPtToSwap,
|
|
271
|
+
_encodeSwapExactPtForYt(receiver, exactPtIn, minYtOut, YT)
|
|
272
|
+
);
|
|
273
|
+
|
|
274
|
+
emit SwapPtAndYt(msg.sender, market, receiver, exactPtIn.neg(), netYtOut.Int());
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* @notice swap exact YT to PT with the help of flashswaps & YT tokenization / redemption
|
|
279
|
+
* @dev inner working of this function:
|
|
280
|
+
- `exactYtIn` YT is transferred to yield contract
|
|
281
|
+
- `market.swapSyForExactPt` is called, which will transfer PT directly to this contract & callback is invoked.
|
|
282
|
+
Note that we now owe SY
|
|
283
|
+
- in callback, a portion of PT + YT is used to redeem SY, which is then used to payback the loan. The rest of
|
|
284
|
+
of the PT is transferred to `receiver`
|
|
285
|
+
* @param exactYtIn will always consume this amount of YT for as much PT as possible
|
|
286
|
+
* @param guessTotalPtFromSwap approximation data for PT output of the SY-to-PT flashswap
|
|
287
|
+
* @dev this function works in conjunction with ActionCallback
|
|
288
|
+
*/
|
|
289
|
+
function swapExactYtForPt(
|
|
290
|
+
address receiver,
|
|
291
|
+
address market,
|
|
292
|
+
uint256 exactYtIn,
|
|
293
|
+
uint256 minPtOut,
|
|
294
|
+
ApproxParams calldata guessTotalPtFromSwap
|
|
295
|
+
) external returns (uint256 netPtOut, uint256 netSyFee) {
|
|
296
|
+
(, IPPrincipalToken PT, IPYieldToken YT) = IPMarket(market).readTokens();
|
|
297
|
+
MarketState memory state = IPMarket(market).readState(address(this));
|
|
298
|
+
|
|
299
|
+
_transferFrom(IERC20(YT), msg.sender, address(YT), exactYtIn);
|
|
300
|
+
|
|
301
|
+
uint256 totalPtFromSwap;
|
|
302
|
+
(netPtOut, totalPtFromSwap, netSyFee) = state.approxSwapExactYtForPt(
|
|
303
|
+
YT.newIndex(),
|
|
304
|
+
exactYtIn,
|
|
305
|
+
block.timestamp,
|
|
306
|
+
guessTotalPtFromSwap
|
|
307
|
+
);
|
|
308
|
+
|
|
309
|
+
if (netPtOut < minPtOut) revert Errors.RouterInsufficientPtOut(netPtOut, minPtOut);
|
|
310
|
+
|
|
311
|
+
IPMarket(market).swapSyForExactPt(
|
|
312
|
+
address(this),
|
|
313
|
+
totalPtFromSwap,
|
|
314
|
+
_encodeSwapExactYtForPt(receiver, exactYtIn, minPtOut, PT, YT)
|
|
315
|
+
);
|
|
316
|
+
|
|
317
|
+
emit SwapPtAndYt(msg.sender, market, receiver, netPtOut.Int(), exactYtIn.neg());
|
|
318
|
+
}
|
|
319
|
+
|
|
230
320
|
function _swapExactSyForYt(
|
|
231
321
|
address receiver,
|
|
232
322
|
address market,
|
|
233
323
|
IPYieldToken YT,
|
|
234
324
|
uint256 exactSyIn,
|
|
235
325
|
uint256 minYtOut,
|
|
236
|
-
ApproxParams
|
|
326
|
+
ApproxParams calldata guessYtOut
|
|
237
327
|
) internal returns (uint256 netYtOut, uint256 netSyFee) {
|
|
238
328
|
MarketState memory state = IPMarket(market).readState(address(this));
|
|
239
329
|
|
|
@@ -250,7 +340,7 @@ contract ActionSwapYT is IPActionSwapYT, ActionBaseMintRedeem, CallbackHelper {
|
|
|
250
340
|
(, netSyFee) = IPMarket(market).swapExactPtForSy(
|
|
251
341
|
address(YT),
|
|
252
342
|
netYtOut, // exactPtIn = netYtOut
|
|
253
|
-
_encodeSwapExactSyForYt(receiver, minYtOut)
|
|
343
|
+
_encodeSwapExactSyForYt(receiver, minYtOut, YT)
|
|
254
344
|
);
|
|
255
345
|
}
|
|
256
346
|
|
|
@@ -267,7 +357,7 @@ contract ActionSwapYT is IPActionSwapYT, ActionBaseMintRedeem, CallbackHelper {
|
|
|
267
357
|
(, netSyFee) = IPMarket(market).swapSyForExactPt(
|
|
268
358
|
address(YT),
|
|
269
359
|
exactYtIn, // exactPtOut = exactYtIn
|
|
270
|
-
_encodeSwapYtForSy(receiver, minSyOut)
|
|
360
|
+
_encodeSwapYtForSy(receiver, minSyOut, YT)
|
|
271
361
|
);
|
|
272
362
|
|
|
273
363
|
netSyOut = SY.balanceOf(receiver) - preSyBalance;
|
|
@@ -1,103 +1,242 @@
|
|
|
1
1
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
2
|
pragma solidity 0.8.17;
|
|
3
3
|
|
|
4
|
-
import "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";
|
|
5
4
|
import "@openzeppelin/contracts/proxy/Proxy.sol";
|
|
6
5
|
import "../interfaces/IPAllAction.sol";
|
|
7
|
-
import "../interfaces/
|
|
8
|
-
import "../
|
|
9
|
-
|
|
10
|
-
/// @dev this contract will be deployed behind an ERC1967 proxy
|
|
11
|
-
/// calls to the ERC1967 proxy will be resolved at this contract, and proxied again to the
|
|
12
|
-
/// corresponding implementation contracts
|
|
6
|
+
import "../interfaces/IDiamondLoupe.sol";
|
|
7
|
+
import "../interfaces/IDiamondCut.sol";
|
|
13
8
|
|
|
14
9
|
// solhint-disable no-empty-blocks
|
|
15
|
-
contract PendleRouter is Proxy {
|
|
16
|
-
address
|
|
17
|
-
address
|
|
18
|
-
address
|
|
19
|
-
address
|
|
20
|
-
address
|
|
21
|
-
|
|
22
|
-
address
|
|
10
|
+
contract PendleRouter is Proxy, IDiamondLoupe {
|
|
11
|
+
address internal immutable ACTION_MINT_REDEEM;
|
|
12
|
+
address internal immutable ACTION_ADD_REMOVE_LIQ;
|
|
13
|
+
address internal immutable ACTION_SWAP_PT;
|
|
14
|
+
address internal immutable ACTION_SWAP_YT;
|
|
15
|
+
address internal immutable ACTION_MISC;
|
|
16
|
+
|
|
17
|
+
event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata);
|
|
23
18
|
|
|
24
19
|
constructor(
|
|
25
20
|
address _ACTION_MINT_REDEEM,
|
|
26
21
|
address _ACTION_ADD_REMOVE_LIQ,
|
|
27
22
|
address _ACTION_SWAP_PT,
|
|
28
23
|
address _ACTION_SWAP_YT,
|
|
29
|
-
address _ACTION_SWAP_PTYT,
|
|
30
|
-
address _ACTION_CALLBACK,
|
|
31
24
|
address _ACTION_MISC
|
|
32
25
|
) {
|
|
33
26
|
ACTION_MINT_REDEEM = _ACTION_MINT_REDEEM;
|
|
34
27
|
ACTION_ADD_REMOVE_LIQ = _ACTION_ADD_REMOVE_LIQ;
|
|
35
28
|
ACTION_SWAP_PT = _ACTION_SWAP_PT;
|
|
36
29
|
ACTION_SWAP_YT = _ACTION_SWAP_YT;
|
|
37
|
-
ACTION_SWAP_PTYT = _ACTION_SWAP_PTYT;
|
|
38
|
-
ACTION_CALLBACK = _ACTION_CALLBACK;
|
|
39
30
|
ACTION_MISC = _ACTION_MISC;
|
|
31
|
+
_emitEvents();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function _emitEvents() internal {
|
|
35
|
+
Facet[] memory facets_ = facets();
|
|
36
|
+
|
|
37
|
+
uint256 nFacets = facets_.length;
|
|
38
|
+
|
|
39
|
+
IDiamondCut.FacetCut[] memory cuts = new IDiamondCut.FacetCut[](nFacets);
|
|
40
|
+
for (uint256 i; i < nFacets; ) {
|
|
41
|
+
cuts[i].facetAddress = facets_[i].facetAddress;
|
|
42
|
+
cuts[i].action = IDiamondCut.FacetCutAction.Add;
|
|
43
|
+
cuts[i].functionSelectors = facets_[i].functionSelectors;
|
|
44
|
+
unchecked {
|
|
45
|
+
++i;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
emit DiamondCut(cuts, address(0), "");
|
|
40
50
|
}
|
|
41
51
|
|
|
42
52
|
receive() external payable virtual override {}
|
|
43
53
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
return
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
54
|
+
/// @notice Gets all facet addresses and their four byte function selectors.
|
|
55
|
+
/// @return facets_ Facet
|
|
56
|
+
function facets() public view returns (Facet[] memory facets_) {
|
|
57
|
+
address[] memory facetAddresses_ = facetAddresses();
|
|
58
|
+
uint256 numFacets = facetAddresses_.length;
|
|
59
|
+
|
|
60
|
+
facets_ = new Facet[](numFacets);
|
|
61
|
+
for (uint256 i; i < numFacets; ) {
|
|
62
|
+
facets_[i].facetAddress = facetAddresses_[i];
|
|
63
|
+
facets_[i].functionSelectors = facetFunctionSelectors(facetAddresses_[i]);
|
|
64
|
+
unchecked {
|
|
65
|
+
i++;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function facetFunctionSelectors(address facet) public view returns (bytes4[] memory res) {
|
|
71
|
+
if (facet == ACTION_ADD_REMOVE_LIQ) {
|
|
72
|
+
res = new bytes4[](12);
|
|
73
|
+
res[0] = 0x97ee279e; // addLiquidityDualSyAndPt
|
|
74
|
+
res[1] = 0xcb591eb2; // addLiquidityDualTokenAndPt
|
|
75
|
+
res[2] = 0x3af1f329; // addLiquiditySinglePt
|
|
76
|
+
res[3] = 0x409c7a89; // addLiquiditySingleSy
|
|
77
|
+
res[4] = 0x015491d1; // addLiquiditySingleToken
|
|
78
|
+
res[5] = 0xb7d75b8b; // removeLiquidityDualSyAndPt
|
|
79
|
+
res[6] = 0xe6eaba01; // removeLiquidityDualTokenAndPt
|
|
80
|
+
res[7] = 0x694ab559; // removeLiquiditySinglePt
|
|
81
|
+
res[8] = 0x178d29d3; // removeLiquiditySingleSy
|
|
82
|
+
res[9] = 0x690807ad; // removeLiquiditySingleToken
|
|
83
|
+
res[10] = 0xdfbc814e; // addLiquiditySingleTokenKeepYt
|
|
84
|
+
res[11] = 0x844384aa; // addLiquiditySingleSyKeepYt
|
|
85
|
+
return res;
|
|
86
|
+
}
|
|
87
|
+
if (facet == ACTION_MINT_REDEEM) {
|
|
88
|
+
res = new bytes4[](7);
|
|
89
|
+
res[0] = 0x1a8631b2; // mintPyFromSy
|
|
90
|
+
res[1] = 0x46eb2db6; // mintPyFromToken
|
|
91
|
+
res[2] = 0x443e6512; // mintSyFromToken
|
|
92
|
+
res[3] = 0xf7e375e8; // redeemDueInterestAndRewards
|
|
93
|
+
res[4] = 0x339748cb; // redeemPyToSy
|
|
94
|
+
res[5] = 0x527df199; // redeemPyToToken
|
|
95
|
+
res[6] = 0x85b29936; // redeemSyToToken
|
|
96
|
+
return res;
|
|
97
|
+
}
|
|
98
|
+
if (facet == ACTION_SWAP_PT) {
|
|
99
|
+
res = new bytes4[](6);
|
|
100
|
+
res[0] = 0x2032aecd; // swapExactPtForSy
|
|
101
|
+
res[1] = 0xb85f50ba; // swapExactPtForToken
|
|
102
|
+
res[2] = 0x83c71b69; // swapExactSyForPt
|
|
103
|
+
res[3] = 0xa5f9931b; // swapExactTokenForPt
|
|
104
|
+
res[4] = 0xdd371acd; // swapPtForExactSy
|
|
105
|
+
res[5] = 0x6b8bdf32; // swapSyForExactPt
|
|
106
|
+
return res;
|
|
107
|
+
}
|
|
108
|
+
if (facet == ACTION_SWAP_YT) {
|
|
109
|
+
res = new bytes4[](9);
|
|
110
|
+
res[0] = 0xfa483e72; // swapCallback
|
|
111
|
+
res[1] = 0xc861a898; // swapExactPtForYt
|
|
112
|
+
res[2] = 0x448b9b95; // swapExactYtForPt
|
|
113
|
+
res[3] = 0xfdd71f43; // swapExactSyForYt
|
|
114
|
+
res[4] = 0xc4a9c7de; // swapExactTokenForYt
|
|
115
|
+
res[5] = 0x357d6540; // swapExactYtForSy
|
|
116
|
+
res[6] = 0xd6308fa4; // swapExactYtForToken
|
|
117
|
+
res[7] = 0xbf1bd434; // swapSyForExactYt
|
|
118
|
+
res[8] = 0xe15cc098; // swapYtForExactSy
|
|
119
|
+
return res;
|
|
120
|
+
}
|
|
121
|
+
if (facet == ACTION_MISC) {
|
|
122
|
+
res = new bytes4[](2);
|
|
123
|
+
res[0] = 0xacdb32df; // approveInf
|
|
124
|
+
res[1] = 0xd617b03b; // batchExec
|
|
125
|
+
return res;
|
|
126
|
+
}
|
|
127
|
+
if (facet == address(this)) {
|
|
128
|
+
res = new bytes4[](4);
|
|
129
|
+
res[0] = 0xcdffacc6; // facetAddress
|
|
130
|
+
res[1] = 0x52ef6b2c; // facetAddresses
|
|
131
|
+
res[2] = 0xadfca15e; // facetFunctionSelectors
|
|
132
|
+
res[3] = 0x7a0ed627; // facets
|
|
133
|
+
return res;
|
|
134
|
+
}
|
|
135
|
+
revert Errors.RouterInvalidFacet(facet);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
function facetAddress(bytes4 sig) public view returns (address) {
|
|
139
|
+
if (sig < 0x97ee279e) {
|
|
140
|
+
if (sig < 0x46eb2db6) {
|
|
141
|
+
if (sig < 0x357d6540) {
|
|
142
|
+
if (sig < 0x1a8631b2) {
|
|
143
|
+
if (sig == 0x015491d1) return ACTION_ADD_REMOVE_LIQ; // addLiquiditySingleToken 5
|
|
144
|
+
if (sig == 0x178d29d3) return ACTION_ADD_REMOVE_LIQ; // removeLiquiditySingleSy 6
|
|
145
|
+
} else {
|
|
146
|
+
if (sig == 0x1a8631b2) return ACTION_MINT_REDEEM; // mintPyFromSy 5
|
|
147
|
+
if (sig == 0x2032aecd) return ACTION_SWAP_PT; // swapExactPtForSy 6
|
|
148
|
+
if (sig == 0x339748cb) return ACTION_MINT_REDEEM; // redeemPyToSy 7
|
|
149
|
+
}
|
|
150
|
+
} else {
|
|
151
|
+
if (sig < 0x409c7a89) {
|
|
152
|
+
if (sig == 0x357d6540) return ACTION_SWAP_YT; // swapExactYtForSy 5
|
|
153
|
+
if (sig == 0x3af1f329) return ACTION_ADD_REMOVE_LIQ; // addLiquiditySinglePt 6
|
|
154
|
+
} else {
|
|
155
|
+
if (sig == 0x409c7a89) return ACTION_ADD_REMOVE_LIQ; // addLiquiditySingleSy 5
|
|
156
|
+
if (sig == 0x443e6512) return ACTION_MINT_REDEEM; // mintSyFromToken 6
|
|
157
|
+
if (sig == 0x448b9b95) return ACTION_SWAP_YT; // swapExactYtForPt 7
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
} else {
|
|
161
|
+
if (sig < 0x6b8bdf32) {
|
|
162
|
+
if (sig < 0x52ef6b2c) {
|
|
163
|
+
if (sig == 0x46eb2db6) return ACTION_MINT_REDEEM; // mintPyFromToken 5
|
|
164
|
+
if (sig == 0x527df199) return ACTION_MINT_REDEEM; // redeemPyToToken 6
|
|
165
|
+
} else {
|
|
166
|
+
if (sig == 0x690807ad) return ACTION_ADD_REMOVE_LIQ; // removeLiquiditySingleToken 5
|
|
167
|
+
if (sig == 0x694ab559) return ACTION_ADD_REMOVE_LIQ; // removeLiquiditySinglePt 6
|
|
168
|
+
if (sig == 0x52ef6b2c) return address(this); // facetAddresses 7
|
|
169
|
+
}
|
|
170
|
+
} else {
|
|
171
|
+
if (sig < 0x83c71b69) {
|
|
172
|
+
if (sig == 0x6b8bdf32) return ACTION_SWAP_PT; // swapSyForExactPt 5
|
|
173
|
+
if (sig == 0x7a0ed627) return address(this); // facets 6
|
|
174
|
+
} else {
|
|
175
|
+
if (sig == 0x85b29936) return ACTION_MINT_REDEEM; // redeemSyToToken 5
|
|
176
|
+
if (sig == 0x844384aa) return ACTION_ADD_REMOVE_LIQ; // addLiquiditySingleSyKeepYt 6
|
|
177
|
+
if (sig == 0x83c71b69) return ACTION_SWAP_PT; // swapExactSyForPt 7
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
} else {
|
|
182
|
+
if (sig < 0xcdffacc6) {
|
|
183
|
+
if (sig < 0xb85f50ba) {
|
|
184
|
+
if (sig < 0xacdb32df) {
|
|
185
|
+
if (sig == 0xa5f9931b) return ACTION_SWAP_PT; // swapExactTokenForPt 5
|
|
186
|
+
if (sig == 0x97ee279e) return ACTION_ADD_REMOVE_LIQ; // addLiquidityDualSyAndPt 6
|
|
187
|
+
} else {
|
|
188
|
+
if (sig == 0xb7d75b8b) return ACTION_ADD_REMOVE_LIQ; // removeLiquidityDualSyAndPt 5
|
|
189
|
+
if (sig == 0xacdb32df) return ACTION_MISC; // approveInf 6
|
|
190
|
+
if (sig == 0xadfca15e) return address(this); // facetFunctionSelectors 7
|
|
191
|
+
}
|
|
192
|
+
} else {
|
|
193
|
+
if (sig < 0xc4a9c7de) {
|
|
194
|
+
if (sig == 0xb85f50ba) return ACTION_SWAP_PT; // swapExactPtForToken 5
|
|
195
|
+
if (sig == 0xbf1bd434) return ACTION_SWAP_YT; // swapSyForExactYt 6
|
|
196
|
+
} else {
|
|
197
|
+
if (sig == 0xc4a9c7de) return ACTION_SWAP_YT; // swapExactTokenForYt 5
|
|
198
|
+
if (sig == 0xcb591eb2) return ACTION_ADD_REMOVE_LIQ; // addLiquidityDualTokenAndPt 6
|
|
199
|
+
if (sig == 0xc861a898) return ACTION_SWAP_YT; // swapExactPtForYt 7
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
} else {
|
|
203
|
+
if (sig < 0xe15cc098) {
|
|
204
|
+
if (sig < 0xd6308fa4) {
|
|
205
|
+
if (sig == 0xd617b03b) return ACTION_MISC; // batchExec 5
|
|
206
|
+
if (sig == 0xcdffacc6) return address(this); // facetAddress 6
|
|
207
|
+
} else {
|
|
208
|
+
if (sig == 0xd6308fa4) return ACTION_SWAP_YT; // swapExactYtForToken 5
|
|
209
|
+
if (sig == 0xdfbc814e) return ACTION_ADD_REMOVE_LIQ; // addLiquiditySingleTokenKeepYt 6
|
|
210
|
+
if (sig == 0xdd371acd) return ACTION_SWAP_PT; // swapPtForExactSy 7
|
|
211
|
+
}
|
|
212
|
+
} else {
|
|
213
|
+
if (sig < 0xf7e375e8) {
|
|
214
|
+
if (sig == 0xe6eaba01) return ACTION_ADD_REMOVE_LIQ; // removeLiquidityDualTokenAndPt 5
|
|
215
|
+
if (sig == 0xe15cc098) return ACTION_SWAP_YT; // swapYtForExactSy 6
|
|
216
|
+
} else {
|
|
217
|
+
if (sig == 0xfa483e72) return ACTION_SWAP_YT; // swapCallback 5
|
|
218
|
+
if (sig == 0xf7e375e8) return ACTION_MINT_REDEEM; // redeemDueInterestAndRewards 6
|
|
219
|
+
if (sig == 0xfdd71f43) return ACTION_SWAP_YT; // swapExactSyForYt 7
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
96
223
|
}
|
|
97
224
|
revert Errors.RouterInvalidAction(sig);
|
|
225
|
+
// NUM_FUNC: 40 AVG:5.80 STD:0.75 WORST_CASE:7 STOP_BRANCH:3
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
function facetAddresses() public view returns (address[] memory) {
|
|
229
|
+
address[] memory res = new address[](6);
|
|
230
|
+
res[0] = ACTION_ADD_REMOVE_LIQ;
|
|
231
|
+
res[1] = ACTION_MINT_REDEEM;
|
|
232
|
+
res[2] = ACTION_SWAP_PT;
|
|
233
|
+
res[3] = ACTION_SWAP_YT;
|
|
234
|
+
res[4] = ACTION_MISC;
|
|
235
|
+
res[5] = address(this);
|
|
236
|
+
return res;
|
|
98
237
|
}
|
|
99
238
|
|
|
100
239
|
function _implementation() internal view override returns (address) {
|
|
101
|
-
return
|
|
240
|
+
return facetAddress(msg.sig);
|
|
102
241
|
}
|
|
103
242
|
}
|