@pendle/core-v2 6.0.0 → 6.1.0
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/PendleMerkleDistributor.sol/PendleMerkleDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/PendleMerkleDistributor.sol/PendleMerkleDistributor.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/PendleMultiTokenMerkleDistributor.sol/PendleMultiTokenMerkleDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/PendleMultiTokenMerkleDistributor.sol/PendleMultiTokenMerkleDistributor.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 +127 -2
- package/build/artifacts/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.json +83 -0
- 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/PendleGauge.sol/PendleGauge.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/v3/PendleMarketFactoryV3.sol/PendleMarketFactoryV3.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/v3/PendleMarketFactoryV3.sol/PendleMarketFactoryV3.json +2 -2
- package/build/artifacts/contracts/core/Market/v3/PendleMarketV3.sol/PendleMarketV3.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/v3/PendleMarketV3.sol/PendleMarketV3.json +9 -9
- 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/SYUtils.sol/SYUtils.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/SYUtils.sol/SYUtils.json +2 -2
- package/build/artifacts/contracts/core/YieldContracts/InterestManagerYT.sol/InterestManagerYT.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.json +2 -2
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.json +2 -2
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.json +2 -2
- package/build/artifacts/contracts/core/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/erc20/PendleERC20PermitUpg.sol/PendleERC20PermitUpg.dbg.json +1 -1
- package/build/artifacts/contracts/core/erc20/PendleERC20Upg.sol/PendleERC20Upg.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/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/BoringOwnableUpgradeableV2.sol/BoringOwnableUpgradeableData.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeableV2.sol/BoringOwnableUpgradeableData.json +2 -2
- package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeableV2.sol/BoringOwnableUpgradeableV2.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 +13 -2
- 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/cross-chain/FixedPricePTAMM.sol/FixedPricePTAMM.dbg.json +4 -0
- package/build/artifacts/contracts/cross-chain/FixedPricePTAMM.sol/FixedPricePTAMM.json +599 -0
- package/build/artifacts/contracts/cross-chain/factory/hub/PendlePTOFTAdapterFactory.sol/PendlePTOFTAdapterFactory.dbg.json +4 -0
- package/build/artifacts/contracts/cross-chain/factory/hub/PendlePTOFTAdapterFactory.sol/PendlePTOFTAdapterFactory.json +280 -0
- package/build/artifacts/contracts/cross-chain/oftImpl/hub/OFTAdapterImpl.sol/OFTAdapterImpl.dbg.json +4 -0
- package/build/artifacts/contracts/cross-chain/oftImpl/hub/OFTAdapterImpl.sol/OFTAdapterImpl.json +1265 -0
- package/build/artifacts/contracts/cross-chain/oftImpl/spoke/PendleBridgedPrincipalToken.sol/PendleBridgedPrincipalToken.dbg.json +4 -0
- package/build/artifacts/contracts/cross-chain/oftImpl/spoke/PendleBridgedPrincipalToken.sol/PendleBridgedPrincipalToken.json +1573 -0
- package/build/artifacts/contracts/deprecated/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/deprecated/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.json +2 -2
- package/build/artifacts/contracts/deprecated/VeDistributor/PendleFeeDistributorV2.sol/PendleFeeDistributorV2.dbg.json +1 -1
- package/build/artifacts/contracts/deprecated/VeDistributor/PendleFeeDistributorV2.sol/PendleFeeDistributorV2.json +2 -2
- package/build/artifacts/contracts/interfaces/IAddressProvider.sol/IAddressProvider.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ILPWrapper.sol/ILPWrapper.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/ILPWrapper.sol/ILPWrapper.json +99 -0
- 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/IOwnable.sol/IOwnable.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiqV3.sol/IPActionAddRemoveLiqV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionCallbackV3.sol/IPActionCallbackV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionInfoStatic.sol/IPActionInfoStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMarketAuxStatic.sol/IPActionMarketAuxStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMarketCoreStatic.sol/IPActionMarketCoreStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMintRedeemStatic.sol/IPActionMintRedeemStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMiscV3.sol/IPActionMiscV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSimple.sol/IPActionSimple.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionStorageStatic.sol/IPActionStorageStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionStorageV4.sol/IPActionStorageV4.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapPTV3.sol/IPActionSwapPTV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapYTV3.sol/IPActionSwapYTV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionVePendleStatic.sol/IPActionVePendleStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllActionV3.sol/IPAllActionV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionAddRemoveLiqV3Events.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionMiscV3Events.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionStorageEvents.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionSwapPTV3Events.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionSwapYTV3Events.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPAllEventsV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPBridgedPrincipalToken.sol/IPBridgedPrincipalToken.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPBridgedPrincipalToken.sol/IPBridgedPrincipalToken.json +928 -0
- package/build/artifacts/contracts/interfaces/IPChainlinkOracle.sol/IPChainlinkOracle.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPChainlinkOracleEssential.sol/IPChainlinkOracleEssential.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPChainlinkOracleEssential.sol/IPChainlinkOracleEssential.json +57 -0
- package/build/artifacts/contracts/interfaces/IPChainlinkOracleFactory.sol/IPChainlinkOracleFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPChainlinkOracleWithQuote.sol/IPChainlinkOracleWithQuote.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPCommonPoolDeployHelperV2.sol/IPCommonPoolDeployHelperV2.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPCommonSYFactory.sol/IPCommonSYFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPExchangeRateOracle.sol/IPExchangeRateOracle.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/IPFixedPricePTAMM.sol/IPFixedPricePTAMM.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPFixedPricePTAMM.sol/IPFixedPricePTAMM.json +346 -0
- package/build/artifacts/contracts/interfaces/IPFixedPricePTAMM.sol/IPFixedPricePTAMMSwapCallback.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPFixedPricePTAMM.sol/IPFixedPricePTAMMSwapCallback.json +34 -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/IPGovernanceProxy.sol/IPGovernanceProxy.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/IPLPWrapperFactory.sol/IPLPWrapperFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitOrderType.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouter.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouter.json +13 -0
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouterCallback.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarketFactory.sol/IPMarketFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarketFactoryV3.sol/IPMarketFactoryV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarketSwapCallback.sol/IPMarketSwapCallback.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarketV3.sol/IPMarketV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMerkleDistributor.sol/IPMerkleDistributor.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/IPMultiTokenMerkleDistributor.sol/IPMultiTokenMerkleDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPOffchainStorage.sol/IPOffchainStorage.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPOracleForSy.sol/IPOracleForSy.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPTOFTAdapterFactory.sol/IPPTOFTAdapterFactory.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPPTOFTAdapterFactory.sol/IPPTOFTAdapterFactory.json +81 -0
- package/build/artifacts/contracts/interfaces/IPPYLpOracle.sol/IPPYLpOracle.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPausingInterface.sol/IPPausingInterface.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPoolDeployHelperV2.sol/IPPoolDeployHelperV2.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPriceFeed.sol/IPPriceFeed.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPrincipalToken.sol/IPPrincipalToken.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPReflector.sol/IPReflector.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPRouterStatic.sol/IPRouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPTokenWithSupplyCap.sol/IPTokenWithSupplyCap.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/IPVotingController.sol/IPVotingController.json +32 -0
- 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/IRedstonePriceFeed.sol/IRedstonePriceFeed.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IRewardManager.sol/IRewardManager.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IStandardizedYield.sol/IStandardizedYield.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/limit/LimitMathCore.sol/LimitMathCore.dbg.json +1 -1
- package/build/artifacts/contracts/limit/LimitMathCore.sol/LimitMathCore.json +2 -2
- package/build/artifacts/contracts/limit/LimitRouterBase.sol/LimitRouterBase.dbg.json +1 -1
- package/build/artifacts/contracts/limit/LimitRouterBase.sol/LimitRouterBase.json +18 -0
- package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.dbg.json +1 -1
- package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.json +33 -2
- package/build/artifacts/contracts/limit/helpers/NonceManager.sol/NonceManager.dbg.json +1 -1
- package/build/artifacts/contracts/limit/helpers/NonceManager.sol/NonceManager.json +2 -2
- 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/BalanceReader.sol/BalanceReader.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BalanceReader.sol/BalanceReader.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol/BaseSplitCodeFactoryContract.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol/BaseSplitCodeFactoryContract.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/BytesLib.sol/BytesLib.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BytesLib.sol/BytesLib.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/ExpiredLpPtRedeemer.sol/ExpiredLpPtRedeemer.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/ExpiredLpPtRedeemer.sol/ExpiredLpPtRedeemer.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/LimitBackendHelper.sol/LimitBackendHelper.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/LimitBackendHelper.sol/LimitBackendHelper.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/PendleExchangeRateOracle.sol/PendleExchangeRateOracle.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleExchangeRateOracle.sol/PendleExchangeRateOracle.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleGovernanceProxy.sol/PendleGovernanceProxy.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleGovernanceProxy.sol/PendleGovernanceProxy.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleLPWrapper.sol/PendleLPWrapper.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleLPWrapper.sol/PendleLPWrapper.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleLPWrapperFactory.sol/PendleLPWrapperFactory.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleLPWrapperFactory.sol/PendleLPWrapperFactory.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallOwnerV1.sol/PendleMulticallOwnerV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallOwnerV1.sol/PendleMulticallOwnerV1.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/PendleOffchainStorage.sol/PendleOffchainStorage.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleOffchainStorage.sol/PendleOffchainStorage.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleWstETHPriceFeed.sol/PendleWstETHPriceFeed.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleWstETHPriceFeed.sol/PendleWstETHPriceFeed.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/SimulateHelper.sol/SimulateHelper.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/SimulateHelper.sol/SimulateHelper.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/SupplyCapReader.sol/IPossibleSupplyCapInterface.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/SupplyCapReader.sol/SupplyCapReader.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/SupplyCapReader.sol/SupplyCapReader.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonPoolDeployHelperV2.sol/PendleCommonPoolDeployHelperV2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonPoolDeployHelperV2.sol/PendleCommonPoolDeployHelperV2.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonSYFactory.sol/PendleCommonSYFactory.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonSYFactory.sol/PendleCommonSYFactory.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelper.sol/PendlePoolDeployHelper.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelper.sol/PendlePoolDeployHelper.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelperV2.sol/PendlePoolDeployHelperV2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelperV2.sol/PendlePoolDeployHelperV2.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/deploy/lib/MarketDeployLib.sol/MarketDeployLib.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/deploy/lib/MarketDeployLib.sol/MarketDeployLib.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 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol/MarketApproxPtInLibV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol/MarketApproxPtInLibV1.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol/MarketApproxPtOutLibV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol/MarketApproxPtOutLibV1.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/StorageLayout.sol/StorageLayout.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/PendleLpOracleLib.sol/PendleLpOracleLib.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/PendleLpOracleLib.sol/PendleLpOracleLib.json +2 -2
- package/build/artifacts/contracts/oracles/PtYtLpOracle/PendlePYLpOracle.sol/PendlePYLpOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/PendlePYLpOracle.sol/PendlePYLpOracle.json +2 -2
- package/build/artifacts/contracts/oracles/PtYtLpOracle/PendlePYOracleLib.sol/PendlePYOracleLib.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/PendlePYOracleLib.sol/PendlePYOracleLib.json +2 -2
- package/build/artifacts/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracle.sol/PendleChainlinkOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracle.sol/PendleChainlinkOracle.json +2 -2
- package/build/artifacts/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracleFactory.sol/PendleChainlinkOracleFactory.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracleFactory.sol/PendleChainlinkOracleFactory.json +2 -2
- package/build/artifacts/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracleWithQuote.sol/PendleChainlinkOracleWithQuote.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracleWithQuote.sol/PendleChainlinkOracleWithQuote.json +2 -2
- package/build/artifacts/contracts/oracles/PtYtLpOracle/samples/BoringLpSeller.sol/BoringLpSeller.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/samples/BoringPYUsdChainlinkAssetOracle.sol/BoringPYUsdChainlinkAssetOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/samples/BoringPYUsdChainlinkAssetOracle.sol/BoringPYUsdChainlinkAssetOracle.json +2 -2
- package/build/artifacts/contracts/oracles/PtYtLpOracle/samples/BoringPYUsdChainlinkSYOracle.sol/BoringPYUsdChainlinkSYOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/samples/BoringPYUsdChainlinkSYOracle.sol/BoringPYUsdChainlinkSYOracle.json +2 -2
- package/build/artifacts/contracts/oracles/PtYtLpOracle/samples/BoringPtSeller.sol/BoringPtSeller.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleBoringOneracle.sol/PendleBoringOneracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleBoringOneracle.sol/PendleBoringOneracle.json +2 -2
- package/build/artifacts/contracts/oracles/internal/PendleBoringSolvBTCOneracle.sol/PendleBoringSolvBTCOneracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleBoringSolvBTCOneracle.sol/PendleBoringSolvBTCOneracle.json +2 -2
- package/build/artifacts/contracts/oracles/internal/PendleLpLinearDiscountOracle.sol/LPExpiry.dbg.json +4 -0
- package/build/artifacts/contracts/oracles/internal/PendleLpLinearDiscountOracle.sol/LPExpiry.json +24 -0
- package/build/artifacts/contracts/oracles/internal/PendleLpLinearDiscountOracle.sol/PendleLpLinearDiscountOracle.dbg.json +4 -0
- package/build/artifacts/contracts/oracles/internal/PendleLpLinearDiscountOracle.sol/PendleLpLinearDiscountOracle.json +168 -0
- package/build/artifacts/contracts/oracles/internal/PendleLpLinearDiscountOracleFactory.sol/PendleLpLinearDiscountOracleFactory.dbg.json +4 -0
- package/build/artifacts/contracts/oracles/internal/PendleLpLinearDiscountOracleFactory.sol/PendleLpLinearDiscountOracleFactory.json +71 -0
- package/build/artifacts/contracts/oracles/internal/PendleRedStoneRateOracleAdapter.sol/PendleRedStoneRateOracleAdapter.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleRedStoneRateOracleAdapter.sol/PendleRedStoneRateOracleAdapter.json +2 -2
- package/build/artifacts/contracts/oracles/internal/PendleSparkLinearDiscountOracle.sol/PTExpiry.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleSparkLinearDiscountOracle.sol/PendleSparkLinearDiscountOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleSparkLinearDiscountOracle.sol/PendleSparkLinearDiscountOracle.json +2 -2
- package/build/artifacts/contracts/oracles/internal/PendleSparkLinearDiscountOracleFactory.sol/PendleSparkLinearDiscountOracleFactory.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleSparkLinearDiscountOracleFactory.sol/PendleSparkLinearDiscountOracleFactory.json +2 -2
- package/build/artifacts/contracts/router/ActionAddRemoveLiqV3.sol/ActionAddRemoveLiqV3.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionAddRemoveLiqV3.sol/ActionAddRemoveLiqV3.json +13 -2
- package/build/artifacts/contracts/router/ActionCallbackV3.sol/ActionCallbackV3.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionCallbackV3.sol/ActionCallbackV3.json +2 -2
- package/build/artifacts/contracts/router/ActionMiscV3.sol/ActionMiscV3.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionMiscV3.sol/ActionMiscV3.json +13 -2
- package/build/artifacts/contracts/router/ActionSimple.sol/ActionSimple.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSimple.sol/ActionSimple.json +13 -2
- package/build/artifacts/contracts/router/ActionStorageV4.sol/ActionStorageV4.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionStorageV4.sol/ActionStorageV4.json +2 -2
- package/build/artifacts/contracts/router/ActionSwapPTV3.sol/ActionSwapPTV3.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapPTV3.sol/ActionSwapPTV3.json +13 -2
- package/build/artifacts/contracts/router/ActionSwapYTV3.sol/ActionSwapYTV3.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapYTV3.sol/ActionSwapYTV3.json +13 -2
- package/build/artifacts/contracts/router/PendleRouterV4.sol/PendleRouterV4.dbg.json +1 -1
- package/build/artifacts/contracts/router/PendleRouterV4.sol/PendleRouterV4.json +2 -2
- package/build/artifacts/contracts/router/Reflector.sol/Reflector.dbg.json +1 -1
- package/build/artifacts/contracts/router/Reflector.sol/Reflector.json +2 -2
- package/build/artifacts/contracts/router/RouterStorage.sol/RouterStorage.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/ActionBase.sol/ActionBase.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/ActionDelegateBase.sol/ActionDelegateBase.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/ActionDelegateBase.sol/ActionDelegateBase.json +15 -3
- package/build/artifacts/contracts/router/base/CallbackHelper.sol/CallbackHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/ApproxStateLib.sol/ApproxStateLib.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/ApproxStateLib.sol/ApproxStateLib.json +2 -2
- package/build/artifacts/contracts/router/math/MarketApproxEstimateLib.sol/MarketApproxEstimateLib.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/MarketApproxEstimateLib.sol/MarketApproxEstimateLib.json +2 -2
- package/build/artifacts/contracts/router/math/MarketApproxLibOnchain.sol/MarketApproxPtInLibOnchain.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/MarketApproxLibOnchain.sol/MarketApproxPtInLibOnchain.json +2 -2
- package/build/artifacts/contracts/router/math/MarketApproxLibOnchain.sol/MarketApproxPtOutLibOnchain.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/MarketApproxLibOnchain.sol/MarketApproxPtOutLibOnchain.json +2 -2
- package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtInLibV2.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtInLibV2.json +2 -2
- package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtOutLibV2.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtOutLibV2.json +2 -2
- package/build/artifacts/contracts/router/swap-aggregator/IPSwapAggregator.sol/IPSwapAggregator.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/OKXScaleHelper.sol/IOKXDexRouter.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/OKXScaleHelper.sol/OKXScaleHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/ParaswapScaleHelper.sol/IAugustusV6.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/ParaswapScaleHelper.sol/ParaswapScaleHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/ParaswapScaleHelper.sol/ParaswapScaleHelper.json +2 -2
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/IKyberScalingHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/IOdosRouterV2.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/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol +26 -4
- package/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol +32 -1
- package/contracts/core/libraries/Errors.sol +1 -0
- package/contracts/cross-chain/FixedPricePTAMM.sol +159 -0
- package/contracts/cross-chain/factory/hub/PendlePTOFTAdapterFactory.sol +38 -0
- package/contracts/cross-chain/oftImpl/hub/OFTAdapterImpl.sol +12 -0
- package/contracts/cross-chain/oftImpl/spoke/PendleBridgedPrincipalToken.sol +41 -0
- package/contracts/interfaces/ILPWrapper.sol +16 -0
- package/contracts/interfaces/IPBridgedPrincipalToken.sol +11 -0
- package/contracts/interfaces/IPChainlinkOracleEssential.sol +11 -0
- package/contracts/interfaces/IPFixedPricePTAMM.sol +67 -0
- package/contracts/interfaces/IPLimitRouter.sol +2 -0
- package/contracts/interfaces/IPPTOFTAdapterFactory.sol +12 -0
- package/contracts/interfaces/IPVotingController.sol +4 -0
- package/contracts/limit/LimitRouterBase.sol +7 -2
- package/contracts/limit/PendleLimitRouter.sol +10 -0
- package/contracts/offchain-helpers/ExpiredLpPtRedeemer.sol +1 -1
- package/contracts/offchain-helpers/PendleLPWrapper.sol +2 -1
- package/contracts/oracles/internal/PendleLpLinearDiscountOracle.sol +65 -0
- package/contracts/oracles/internal/PendleLpLinearDiscountOracleFactory.sol +20 -0
- package/contracts/oracles/internal/PendleSparkLinearDiscountOracle.sol +3 -1
- package/contracts/router/ActionAddRemoveLiqV3.sol +2 -0
- package/contracts/router/ActionMiscV3.sol +2 -0
- package/contracts/router/ActionSimple.sol +2 -0
- package/contracts/router/ActionSwapPTV3.sol +2 -0
- package/contracts/router/ActionSwapYTV3.sol +2 -0
- package/contracts/router/base/ActionBase.sol +16 -8
- package/contracts/router/base/ActionDelegateBase.sol +2 -0
- package/deployments/1-core.json +6 -1
- package/deployments/10-core.json +11 -3
- package/deployments/146-core.json +4 -2
- package/deployments/42161-core.json +4 -1
- package/deployments/43114-core.json +5 -0
- package/deployments/5000-core.json +3 -1
- package/deployments/56-core.json +3 -1
- package/deployments/80094-core.json +3 -1
- package/deployments/8453-core.json +3 -1
- package/deployments/999-core.json +4 -1
- package/package.json +4 -1
- package/typechain-types/ActionDelegateBase.ts +57 -0
- package/typechain-types/ERC1967UpgradeUpgradeable.ts +106 -0
- package/typechain-types/FixedPricePTAMM.ts +230 -52
- package/typechain-types/IBeaconUpgradeable.ts +87 -0
- package/typechain-types/IERC1822ProxiableUpgradeable.ts +87 -0
- package/typechain-types/IERC1967Upgradeable.ts +97 -0
- package/typechain-types/ILPWrapper.ts +224 -0
- package/typechain-types/IPFixedPricePTAMM.ts +77 -23
- package/typechain-types/IPLimitRouter.ts +17 -0
- package/typechain-types/IPVotingController.ts +24 -0
- package/typechain-types/LPExpiry.ts +81 -0
- package/typechain-types/LimitRouterBase.ts +24 -2
- package/typechain-types/PendleBridgedPrincipalToken.ts +1688 -0
- package/typechain-types/PendleLimitRouter.ts +58 -2
- package/typechain-types/PendleLpLinearDiscountOracle.ts +262 -0
- package/typechain-types/PendleLpLinearDiscountOracleFactory.ts +142 -0
- package/typechain-types/PendlePTOFTAdapterFactory.ts +125 -0
- package/typechain-types/PendleVotingControllerUpg.ts +139 -0
- package/typechain-types/UUPSUpgradeable.ts +9 -0
- package/typechain-types/VotingControllerStorageUpg.ts +69 -0
- package/typechain-types/factories/ActionAddRemoveLiqV3__factory.ts +19 -3
- package/typechain-types/factories/ActionCallbackV3__factory.ts +1 -1
- package/typechain-types/factories/ActionDelegateBase__factory.ts +80 -0
- package/typechain-types/factories/ActionInfoStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionMarketAuxStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionMarketCoreStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionMintRedeemStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionMiscV3__factory.ts +19 -3
- package/typechain-types/factories/ActionSimple__factory.ts +19 -3
- package/typechain-types/factories/ActionStorageStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionStorageV4__factory.ts +1 -1
- package/typechain-types/factories/ActionSwapPTV3__factory.ts +19 -3
- package/typechain-types/factories/ActionSwapYTV3__factory.ts +19 -3
- package/typechain-types/factories/ActionVePendleStatic__factory.ts +1 -1
- package/typechain-types/factories/AddressCast__factory.ts +1 -1
- package/typechain-types/factories/AddressProvider__factory.ts +1 -1
- package/typechain-types/factories/BalanceReader__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/BoringPYUsdChainlinkAssetOracle__factory.ts +1 -1
- package/typechain-types/factories/BoringPYUsdChainlinkSYOracle__factory.ts +1 -1
- package/typechain-types/factories/Broadcaster__factory.ts +1 -1
- package/typechain-types/factories/ERC1967Proxy__factory.ts +1 -1
- package/typechain-types/factories/ERC1967UpgradeUpgradeable__factory.ts +88 -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 +12 -1
- package/typechain-types/factories/ExpiredLpPtRedeemer__factory.ts +1 -1
- package/typechain-types/factories/FixedPricePTAMM__factory.ts +158 -25
- package/typechain-types/factories/IBeaconUpgradeable__factory.ts +39 -0
- package/typechain-types/factories/IERC1822ProxiableUpgradeable__factory.ts +43 -0
- package/typechain-types/factories/IERC1967Upgradeable__factory.ts +71 -0
- package/typechain-types/factories/ILPWrapper__factory.ts +111 -0
- package/typechain-types/factories/IPFixedPricePTAMM__factory.ts +48 -4
- package/typechain-types/factories/IPLimitRouter__factory.ts +13 -0
- package/typechain-types/factories/IPVotingController__factory.ts +32 -0
- package/typechain-types/factories/LPExpiry__factory.ts +36 -0
- package/typechain-types/factories/LegacyNFTHelper__factory.ts +1 -1
- package/typechain-types/factories/LimitBackendHelper__factory.ts +1 -1
- package/typechain-types/factories/LimitRouterBase__factory.ts +18 -0
- package/typechain-types/factories/Multicall2__factory.ts +1 -1
- package/typechain-types/factories/NonceManager__factory.ts +1 -1
- package/typechain-types/factories/OFTAdapterImpl__factory.ts +1 -1
- package/typechain-types/factories/OracleLib__factory.ts +1 -1
- package/typechain-types/factories/PendleBoringOneracle__factory.ts +1 -1
- package/typechain-types/factories/PendleBoringSolvBTCOneracle__factory.ts +1 -1
- package/typechain-types/factories/PendleBridgedPrincipalToken__factory.ts +1673 -0
- package/typechain-types/factories/PendleChainlinkOracleFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleChainlinkOracleWithQuote__factory.ts +1 -1
- package/typechain-types/factories/PendleChainlinkOracle__factory.ts +1 -1
- package/typechain-types/factories/PendleCommonPoolDeployHelperV2__factory.ts +1 -1
- package/typechain-types/factories/PendleCommonSYFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleERC20Permit__factory.ts +1 -1
- package/typechain-types/factories/PendleERC20__factory.ts +1 -1
- package/typechain-types/factories/PendleExchangeRateOracle__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/PendleGaugeControllerMainchainUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleGaugeControllerSidechainUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleGovernanceProxy__factory.ts +1 -1
- package/typechain-types/factories/PendleLPWrapperFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleLPWrapper__factory.ts +1 -1
- package/typechain-types/factories/PendleLimitRouter__factory.ts +32 -1
- package/typechain-types/factories/PendleLpLinearDiscountOracleFactory__factory.ts +134 -0
- package/typechain-types/factories/PendleLpLinearDiscountOracle__factory.ts +248 -0
- package/typechain-types/factories/PendleMarketFactoryV3__factory.ts +1 -1
- package/typechain-types/factories/PendleMarketV3__factory.ts +1 -1
- package/typechain-types/factories/PendleMerkleDistributor__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/PendleMultiTokenMerkleDistributor__factory.ts +1 -1
- package/typechain-types/factories/PendleMulticallOwnerV1__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/PendleOffchainStorage__factory.ts +1 -1
- package/typechain-types/factories/PendlePTOFTAdapterFactory__factory.ts +90 -1
- package/typechain-types/factories/PendlePYLpOracle__factory.ts +1 -1
- package/typechain-types/factories/PendlePoolDeployHelperV2__factory.ts +1 -1
- package/typechain-types/factories/PendlePoolDeployHelper__factory.ts +1 -1
- package/typechain-types/factories/PendlePrincipalToken__factory.ts +1 -1
- package/typechain-types/factories/PendleRedStoneRateOracleAdapter__factory.ts +1 -1
- package/typechain-types/factories/PendleRouterStatic__factory.ts +1 -1
- package/typechain-types/factories/PendleRouterV4__factory.ts +1 -1
- package/typechain-types/factories/PendleSparkLinearDiscountOracleFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleSparkLinearDiscountOracle__factory.ts +1 -1
- package/typechain-types/factories/PendleSwap__factory.ts +1 -1
- package/typechain-types/factories/PendleVotingControllerUpg__factory.ts +126 -1
- package/typechain-types/factories/PendleWstETHPriceFeed__factory.ts +1 -1
- package/typechain-types/factories/PendleYieldContractFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleYieldToken__factory.ts +1 -1
- package/typechain-types/factories/Reflector__factory.ts +1 -1
- package/typechain-types/factories/SDKErrorsDirectory__factory.ts +1 -1
- package/typechain-types/factories/ShortStrings__factory.ts +1 -1
- package/typechain-types/factories/SimulateHelper__factory.ts +1 -1
- package/typechain-types/factories/SupplyCapReader__factory.ts +1 -1
- package/typechain-types/factories/TransparentUpgradeableProxy__factory.ts +1 -1
- package/typechain-types/factories/UUPSUpgradeable__factory.ts +13 -0
- package/typechain-types/factories/VotingControllerStorageUpg__factory.ts +83 -0
- package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +1 -1
- package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +1 -1
- package/typechain-types/hardhat.d.ts +171 -0
- package/typechain-types/index.ts +38 -2
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
// SPDX-License-Identifier: SEE LICENSE IN LICENSE
|
|
2
|
+
pragma solidity ^0.8.19;
|
|
3
|
+
|
|
4
|
+
import {IPFixedPricePTAMM, IPFixedPricePTAMMSwapCallback} from "../interfaces/IPFixedPricePTAMM.sol";
|
|
5
|
+
import {IPChainlinkOracleEssential} from "../interfaces/IPChainlinkOracleEssential.sol";
|
|
6
|
+
|
|
7
|
+
import {ReentrancyGuardUpgradeable} from "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
|
|
8
|
+
|
|
9
|
+
import {PMath} from "../core/libraries/math/PMath.sol";
|
|
10
|
+
import {BoringOwnableUpgradeableV2} from "../core/libraries/BoringOwnableUpgradeableV2.sol";
|
|
11
|
+
import {TokenHelper} from "../core/libraries/TokenHelper.sol";
|
|
12
|
+
import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
|
|
13
|
+
|
|
14
|
+
contract FixedPricePTAMM is
|
|
15
|
+
IPFixedPricePTAMM,
|
|
16
|
+
BoringOwnableUpgradeableV2,
|
|
17
|
+
ReentrancyGuardUpgradeable,
|
|
18
|
+
TokenHelper,
|
|
19
|
+
UUPSUpgradeable
|
|
20
|
+
{
|
|
21
|
+
// cast index-erc7201 "pendle.FixedPricePTAMM.storage"
|
|
22
|
+
uint256 internal constant STORAGE_SLOT = 0xbbf04d9aae855c6bd76c8f4ba7a918994ad0d002f537323e58c83cbfe5249000;
|
|
23
|
+
|
|
24
|
+
error OracleNotSet(address PT, address token);
|
|
25
|
+
error InsufficientTokenForTrade(address token, uint256 actualAmount, uint256 requiredAmount);
|
|
26
|
+
error InsufficientPtReceived(address PT, uint256 actualAmount, uint256 requiredAmount);
|
|
27
|
+
|
|
28
|
+
using PMath for uint256;
|
|
29
|
+
using PMath for int256;
|
|
30
|
+
|
|
31
|
+
constructor() {
|
|
32
|
+
_disableInitializers();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function initialize(address _owner) external initializer {
|
|
36
|
+
__BoringOwnableV2_init(_owner);
|
|
37
|
+
__UUPSUpgradeable_init();
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
struct OracleData {
|
|
41
|
+
address oracle;
|
|
42
|
+
// @notice This can be seen as the price at maturity.
|
|
43
|
+
// @notice This can help with decimals conversion.
|
|
44
|
+
uint256 multiplier;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
struct Storage {
|
|
48
|
+
mapping(address PT => mapping(address token => OracleData)) priceOracle;
|
|
49
|
+
mapping(address token => uint256) totalToken;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function $() internal pure returns (Storage storage res) {
|
|
53
|
+
assembly ("memory-safe") {
|
|
54
|
+
res.slot := STORAGE_SLOT
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function priceOracle(
|
|
59
|
+
address PT,
|
|
60
|
+
address token
|
|
61
|
+
) public view returns (IPChainlinkOracleEssential oracle, uint256 multiplier) {
|
|
62
|
+
oracle = IPChainlinkOracleEssential($().priceOracle[PT][token].oracle);
|
|
63
|
+
multiplier = $().priceOracle[PT][token].multiplier;
|
|
64
|
+
|
|
65
|
+
if (address(oracle) == address(0)) revert OracleNotSet(PT, token);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function previewSwapPtForExactToken(
|
|
69
|
+
address PT,
|
|
70
|
+
address token,
|
|
71
|
+
uint256 exactTokenOut
|
|
72
|
+
) public view returns (uint256 amountPtIn) {
|
|
73
|
+
(IPChainlinkOracleEssential oracle, uint256 multiplier) = priceOracle(PT, token);
|
|
74
|
+
(, int256 rawPrice, , , ) = oracle.latestRoundData();
|
|
75
|
+
|
|
76
|
+
// ceil(exactTokenOut / (rawPrice * multiplier))
|
|
77
|
+
return (exactTokenOut * PMath.ONE * PMath.ONE).rawDivUp(rawPrice.Uint() * multiplier);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function previewSwapExactPtForToken(
|
|
81
|
+
address PT,
|
|
82
|
+
uint256 exactPtIn,
|
|
83
|
+
address token
|
|
84
|
+
) public view returns (uint256 amountTokenOut) {
|
|
85
|
+
(IPChainlinkOracleEssential oracle, uint256 multiplier) = priceOracle(PT, token);
|
|
86
|
+
(, int256 rawPrice, , , ) = oracle.latestRoundData();
|
|
87
|
+
|
|
88
|
+
// exactPtIn * rawPrice * multiplier
|
|
89
|
+
return (exactPtIn * rawPrice.Uint() * multiplier) / (PMath.ONE * PMath.ONE);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function swapPtForExactToken(
|
|
93
|
+
address receiver,
|
|
94
|
+
address PT,
|
|
95
|
+
address token,
|
|
96
|
+
uint256 exactTokenOut,
|
|
97
|
+
bytes calldata data
|
|
98
|
+
) external nonReentrant returns (uint256 netPtIn) {
|
|
99
|
+
netPtIn = previewSwapPtForExactToken(PT, token, exactTokenOut);
|
|
100
|
+
_swap(receiver, PT, netPtIn, token, exactTokenOut, data);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function swapExactPtForToken(
|
|
104
|
+
address receiver,
|
|
105
|
+
address PT,
|
|
106
|
+
uint256 exactPtIn,
|
|
107
|
+
address token,
|
|
108
|
+
bytes calldata data
|
|
109
|
+
) external nonReentrant returns (uint256 netTokenOut) {
|
|
110
|
+
netTokenOut = previewSwapExactPtForToken(PT, exactPtIn, token);
|
|
111
|
+
_swap(receiver, PT, exactPtIn, token, netTokenOut, data);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function _swap(
|
|
115
|
+
address receiver,
|
|
116
|
+
address PT,
|
|
117
|
+
uint256 exactPtIn,
|
|
118
|
+
address token,
|
|
119
|
+
uint256 exactTokenOut,
|
|
120
|
+
bytes calldata data
|
|
121
|
+
) internal {
|
|
122
|
+
if ($().totalToken[token] < exactTokenOut)
|
|
123
|
+
revert InsufficientTokenForTrade(token, $().totalToken[token], exactTokenOut);
|
|
124
|
+
|
|
125
|
+
_transferOut(token, receiver, exactTokenOut);
|
|
126
|
+
$().totalToken[token] -= exactTokenOut;
|
|
127
|
+
|
|
128
|
+
if (data.length > 0) {
|
|
129
|
+
IPFixedPricePTAMMSwapCallback(msg.sender).swapCallback(exactTokenOut, exactPtIn, data);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
$().totalToken[PT] += exactPtIn;
|
|
133
|
+
if (_selfBalance(PT) < $().totalToken[PT])
|
|
134
|
+
revert InsufficientPtReceived(PT, _selfBalance(PT), $().totalToken[PT]);
|
|
135
|
+
|
|
136
|
+
emit Swap(msg.sender, receiver, PT, exactPtIn, token, exactTokenOut);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// Admin functions
|
|
140
|
+
|
|
141
|
+
function setPriceOracle(address PT, address token, address _priceOracle, uint256 _multiplier) external onlyOwner {
|
|
142
|
+
$().priceOracle[PT][token] = OracleData(_priceOracle, _multiplier);
|
|
143
|
+
emit PriceOracleUpdated(PT, token, _priceOracle);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function addFund(address token, uint256 amount) external payable onlyOwner {
|
|
147
|
+
_transferIn(token, owner, amount);
|
|
148
|
+
$().totalToken[token] += amount;
|
|
149
|
+
emit Seeded(token, amount);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
function removeFund(address token, uint256 amount) external onlyOwner {
|
|
153
|
+
_transferOut(token, owner, amount);
|
|
154
|
+
$().totalToken[token] -= amount;
|
|
155
|
+
emit Unseeded(token, amount);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
function _authorizeUpgrade(address) internal override onlyOwner {}
|
|
159
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity ^0.8.0;
|
|
3
|
+
|
|
4
|
+
import {IPPTOFTAdapterFactory} from "../../../interfaces/IPPTOFTAdapterFactory.sol";
|
|
5
|
+
import {BoringOwnableUpgradeableV2} from "../../../core/libraries/BoringOwnableUpgradeableV2.sol";
|
|
6
|
+
import {OFTAdapterImpl} from "../../oftImpl/hub/OFTAdapterImpl.sol";
|
|
7
|
+
|
|
8
|
+
import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
|
|
9
|
+
|
|
10
|
+
contract PendlePTOFTAdapterFactory is IPPTOFTAdapterFactory, BoringOwnableUpgradeableV2, UUPSUpgradeable {
|
|
11
|
+
error PTOFTAdapterExisted(address pt);
|
|
12
|
+
|
|
13
|
+
address internal immutable _lzEndpoint;
|
|
14
|
+
|
|
15
|
+
constructor(address lzEndpoint) {
|
|
16
|
+
_disableInitializers();
|
|
17
|
+
_lzEndpoint = lzEndpoint;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function initialize(address _owner) external initializer {
|
|
21
|
+
__BoringOwnableV2_init(_owner);
|
|
22
|
+
__UUPSUpgradeable_init();
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
mapping(address pt => address) public ptAdapter;
|
|
26
|
+
|
|
27
|
+
function createPtAdapter(address pt) external override onlyOwner returns (address) {
|
|
28
|
+
if (ptAdapter[pt] != address(0)) revert PTOFTAdapterExisted(pt);
|
|
29
|
+
|
|
30
|
+
OFTAdapterImpl adapter = new OFTAdapterImpl(pt, _lzEndpoint, owner);
|
|
31
|
+
adapter.transferOwnership(owner);
|
|
32
|
+
emit PtAdapterCreated(pt, address(adapter));
|
|
33
|
+
|
|
34
|
+
return ptAdapter[pt] = address(adapter);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function _authorizeUpgrade(address) internal override onlyOwner {}
|
|
38
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
|
|
3
|
+
pragma solidity ^0.8.0;
|
|
4
|
+
|
|
5
|
+
import {OFTAdapter} from "@layerzerolabs/oft-evm/contracts/OFTAdapter.sol";
|
|
6
|
+
|
|
7
|
+
// @notice Base OFT contract, without any additional functionality (like RateLimiter).
|
|
8
|
+
// @dev This contract inherits Ownable from OpenZeppelin v4.
|
|
9
|
+
// @dev Sender is set as the contract owner at deployment.
|
|
10
|
+
contract OFTAdapterImpl is OFTAdapter {
|
|
11
|
+
constructor(address _token, address _endpoint, address _delegate) OFTAdapter(_token, _endpoint, _delegate) {}
|
|
12
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity ^0.8.19;
|
|
3
|
+
|
|
4
|
+
import {IPBridgedPrincipalToken} from "../../../interfaces/IPBridgedPrincipalToken.sol";
|
|
5
|
+
import {OFT, OFTCore, IOFT} from "@layerzerolabs/oft-evm/contracts/OFT.sol";
|
|
6
|
+
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
|
|
7
|
+
import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
|
|
8
|
+
|
|
9
|
+
contract PendleBridgedPrincipalToken is IPBridgedPrincipalToken, OFT {
|
|
10
|
+
uint256 public immutable expiry;
|
|
11
|
+
uint8 internal immutable LOCAL_DECIMALS;
|
|
12
|
+
uint8 internal immutable SHARED_DECIMALS;
|
|
13
|
+
|
|
14
|
+
constructor(
|
|
15
|
+
string memory _name,
|
|
16
|
+
string memory _symbol,
|
|
17
|
+
address _lzEndpoint,
|
|
18
|
+
address _delegate,
|
|
19
|
+
uint256 _expiry,
|
|
20
|
+
uint8 _localDecimals,
|
|
21
|
+
uint8 _sharedDecimals,
|
|
22
|
+
address initialOwner
|
|
23
|
+
) OFT(_name, _symbol, _lzEndpoint, _delegate) {
|
|
24
|
+
expiry = _expiry;
|
|
25
|
+
_transferOwnership(initialOwner);
|
|
26
|
+
|
|
27
|
+
LOCAL_DECIMALS = _localDecimals;
|
|
28
|
+
SHARED_DECIMALS = _sharedDecimals;
|
|
29
|
+
|
|
30
|
+
// override decimalConversionRate set in OFTCore constructor
|
|
31
|
+
decimalConversionRate = 10 ** (LOCAL_DECIMALS - SHARED_DECIMALS);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function decimals() public view override(ERC20, IERC20Metadata) returns (uint8) {
|
|
35
|
+
return LOCAL_DECIMALS;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function sharedDecimals() public view override(OFTCore, IOFT) returns (uint8) {
|
|
39
|
+
return SHARED_DECIMALS;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// SPDX-License-Identifier: SEE LICENSE IN LICENSE
|
|
2
|
+
pragma solidity ^0.8.0;
|
|
3
|
+
|
|
4
|
+
interface ILPWrapper {
|
|
5
|
+
function LP() external view returns (address);
|
|
6
|
+
|
|
7
|
+
function factory() external view returns (address);
|
|
8
|
+
|
|
9
|
+
function isRewardRedemptionDisabled() external view returns (bool);
|
|
10
|
+
|
|
11
|
+
function setRewardRedemptionDisabled(bool _isRewardRedemptionDisabled) external;
|
|
12
|
+
|
|
13
|
+
function wrap(address receiver, uint256 netLpIn) external;
|
|
14
|
+
|
|
15
|
+
function unwrap(address receiver, uint256 netWrapIn) external;
|
|
16
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity ^0.8.0;
|
|
3
|
+
|
|
4
|
+
import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
|
|
5
|
+
import {IOFT} from "@layerzerolabs/oft-evm/contracts/interfaces/IOFT.sol";
|
|
6
|
+
import {IOAppCore} from "@layerzerolabs/oapp-evm/contracts/oapp/interfaces/IOAppCore.sol";
|
|
7
|
+
import {IOAppOptionsType3} from "@layerzerolabs/oapp-evm/contracts/oapp/interfaces/IOAppOptionsType3.sol";
|
|
8
|
+
|
|
9
|
+
interface IPBridgedPrincipalToken is IOFT, IOAppCore, IOAppOptionsType3, IERC20Metadata {
|
|
10
|
+
function expiry() external view returns (uint256);
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
pragma solidity ^0.8.0;
|
|
3
|
+
|
|
4
|
+
interface IPChainlinkOracleEssential {
|
|
5
|
+
function decimals() external view returns (uint8);
|
|
6
|
+
|
|
7
|
+
function latestRoundData()
|
|
8
|
+
external
|
|
9
|
+
view
|
|
10
|
+
returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);
|
|
11
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// SPDX-License-Identifier: SEE LICENSE IN LICENSE
|
|
2
|
+
pragma solidity ^0.8.19;
|
|
3
|
+
|
|
4
|
+
import {IPBridgedPrincipalToken} from "./IPBridgedPrincipalToken.sol";
|
|
5
|
+
import {IPChainlinkOracleEssential} from "../interfaces/IPChainlinkOracleEssential.sol";
|
|
6
|
+
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
|
7
|
+
|
|
8
|
+
interface IPFixedPricePTAMM {
|
|
9
|
+
event Swap(
|
|
10
|
+
address indexed caller,
|
|
11
|
+
address indexed receiver,
|
|
12
|
+
address PT,
|
|
13
|
+
uint256 netPtIn,
|
|
14
|
+
address token,
|
|
15
|
+
uint256 netTokenOut
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
event PriceOracleUpdated(address indexed PT, address indexed token, address indexed priceOracle);
|
|
19
|
+
|
|
20
|
+
event Seeded(address indexed token, uint256 amount);
|
|
21
|
+
event Unseeded(address indexed token, uint256 amount);
|
|
22
|
+
|
|
23
|
+
function priceOracle(
|
|
24
|
+
address PT,
|
|
25
|
+
address token
|
|
26
|
+
) external view returns (IPChainlinkOracleEssential, uint256 multiplier);
|
|
27
|
+
|
|
28
|
+
function previewSwapPtForExactToken(
|
|
29
|
+
address PT,
|
|
30
|
+
address token,
|
|
31
|
+
uint256 exactTokenOut
|
|
32
|
+
) external view returns (uint256 amountPtIn);
|
|
33
|
+
|
|
34
|
+
function previewSwapExactPtForToken(
|
|
35
|
+
address PT,
|
|
36
|
+
uint256 exactPtIn,
|
|
37
|
+
address token
|
|
38
|
+
) external view returns (uint256 amountTokenOut);
|
|
39
|
+
|
|
40
|
+
function swapPtForExactToken(
|
|
41
|
+
address receiver,
|
|
42
|
+
address PT,
|
|
43
|
+
address token,
|
|
44
|
+
uint256 exactTokenOut,
|
|
45
|
+
bytes calldata data
|
|
46
|
+
) external returns (uint256 netPtIn);
|
|
47
|
+
|
|
48
|
+
function swapExactPtForToken(
|
|
49
|
+
address receiver,
|
|
50
|
+
address PT,
|
|
51
|
+
uint256 exactPtIn,
|
|
52
|
+
address token,
|
|
53
|
+
bytes calldata data
|
|
54
|
+
) external returns (uint256 netTokenOut);
|
|
55
|
+
|
|
56
|
+
// Admin functions
|
|
57
|
+
|
|
58
|
+
function setPriceOracle(address PT, address token, address priceOracle, uint256 multiplier) external;
|
|
59
|
+
|
|
60
|
+
function addFund(address token, uint256 amount) external payable;
|
|
61
|
+
|
|
62
|
+
function removeFund(address token, uint256 amount) external;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
interface IPFixedPricePTAMMSwapCallback {
|
|
66
|
+
function swapCallback(uint256 exactTokenOut, uint256 netPtIn, bytes calldata data) external;
|
|
67
|
+
}
|
|
@@ -76,6 +76,8 @@ interface IPLimitRouter is IPLimitOrderType {
|
|
|
76
76
|
|
|
77
77
|
event OrderCanceled(address indexed maker, bytes32 indexed orderHash);
|
|
78
78
|
|
|
79
|
+
event OrderForceCanceled(bytes32 indexed orderHash);
|
|
80
|
+
|
|
79
81
|
event OrderFilledV2(
|
|
80
82
|
bytes32 indexed orderHash,
|
|
81
83
|
OrderType indexed orderType,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity ^0.8.0;
|
|
3
|
+
|
|
4
|
+
interface IPPTOFTAdapterFactory {
|
|
5
|
+
event PtAdapterCreated(address indexed pt, address indexed adapter);
|
|
6
|
+
|
|
7
|
+
function initialize(address _owner) external;
|
|
8
|
+
|
|
9
|
+
function createPtAdapter(address pt) external returns (address);
|
|
10
|
+
|
|
11
|
+
function ptAdapter(address pt) external view returns (address);
|
|
12
|
+
}
|
|
@@ -16,6 +16,10 @@ interface IPVotingController {
|
|
|
16
16
|
|
|
17
17
|
event BroadcastResults(uint64 indexed chainId, uint128 indexed wTime, uint128 totalPendlePerSec);
|
|
18
18
|
|
|
19
|
+
event SetPoolCaps(address[] pools, uint256[] caps);
|
|
20
|
+
|
|
21
|
+
event SetGlobalCap(uint256 cap);
|
|
22
|
+
|
|
19
23
|
function applyPoolSlopeChanges(address pool) external;
|
|
20
24
|
|
|
21
25
|
/// @notice deprecated, only kept for compatibility reasons
|
|
@@ -485,12 +485,17 @@ abstract contract LimitRouterBase is
|
|
|
485
485
|
ownerHelper = _helper;
|
|
486
486
|
}
|
|
487
487
|
|
|
488
|
-
|
|
488
|
+
/// @dev if zero fees are intended, it must be explicitly allowed again
|
|
489
|
+
function setLnFeeRateRoots(
|
|
490
|
+
address[] memory YTs,
|
|
491
|
+
uint256[] memory lnFeeRateRoots,
|
|
492
|
+
bool allowZeroFees
|
|
493
|
+
) public onlyHelperAndOwner {
|
|
489
494
|
uint256 len = YTs.length;
|
|
490
495
|
require(len == lnFeeRateRoots.length, "LOP: length mismatch");
|
|
491
496
|
|
|
492
497
|
for (uint256 i = 0; i < len; i++) {
|
|
493
|
-
require(lnFeeRateRoots[i] > 0, "LOP: zero fee
|
|
498
|
+
require(lnFeeRateRoots[i] > 0 || allowZeroFees, "LOP: zero fee must be allowed explicitly");
|
|
494
499
|
require(lnFeeRateRoots[i] <= MAX_LN_FEE_RATE_ROOT, "LOP: fee too high");
|
|
495
500
|
|
|
496
501
|
__lnFeeRateRoot[YTs[i]] = lnFeeRateRoots[i];
|
|
@@ -29,6 +29,16 @@ contract PendleLimitRouter is LimitRouterBase {
|
|
|
29
29
|
emit OrderCanceled(msg.sender, orderHash);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
/// @dev auto skip cancelled orders to avoid race conditions
|
|
33
|
+
function forceCancel(bytes32[] calldata orderHashes) public onlyHelperAndOwner {
|
|
34
|
+
for (uint256 i = 0; i < orderHashes.length; ++i) {
|
|
35
|
+
if (_status[orderHashes[i]].remaining == _ORDER_FILLED) continue;
|
|
36
|
+
|
|
37
|
+
_status[orderHashes[i]].remaining = _ORDER_FILLED;
|
|
38
|
+
emit OrderForceCanceled(orderHashes[i]);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
32
42
|
function orderStatusesRaw(
|
|
33
43
|
bytes32[] memory orderHashes
|
|
34
44
|
) public view returns (uint256[] memory remainingsRaw, uint256[] memory filledAmounts) {
|
|
@@ -40,7 +40,7 @@ contract ExpiredLpPtRedeemer is TokenHelper, ReentrancyGuardUpgradeable, BoringO
|
|
|
40
40
|
uint256 totalPtRedeem = 0;
|
|
41
41
|
|
|
42
42
|
if (netPtIn > 0) {
|
|
43
|
-
_transferFrom(PT, msg.sender, address(this),
|
|
43
|
+
_transferFrom(PT, msg.sender, address(this), netPtIn);
|
|
44
44
|
totalPtRedeem += netPtIn;
|
|
45
45
|
}
|
|
46
46
|
|
|
@@ -5,8 +5,9 @@ import "../core/erc20/PendleERC20.sol";
|
|
|
5
5
|
import "../core/libraries/TokenHelper.sol";
|
|
6
6
|
import "../interfaces/IPMarket.sol";
|
|
7
7
|
import "../interfaces/IPLPWrapperFactory.sol";
|
|
8
|
+
import "../interfaces/ILPWrapper.sol";
|
|
8
9
|
|
|
9
|
-
contract PendleLPWrapper is PendleERC20, TokenHelper {
|
|
10
|
+
contract PendleLPWrapper is PendleERC20, TokenHelper, ILPWrapper {
|
|
10
11
|
address public immutable LP;
|
|
11
12
|
address public immutable factory;
|
|
12
13
|
bool public isRewardRedemptionDisabled;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// SPDX-License-Identifier: SEE LICENSE IN LICENSE
|
|
2
|
+
pragma solidity ^0.8.19;
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @title PendleLpLinearDiscountOracle
|
|
6
|
+
* @notice Oracle for pricing Pendle LP tokens using a linear discount model based on time to maturity
|
|
7
|
+
* @dev Implements Chainlink-compatible price feed interface for LP tokens
|
|
8
|
+
* The oracle calculates LP price by applying a time-based linear discount to the PT component
|
|
9
|
+
*/
|
|
10
|
+
contract PendleLpLinearDiscountOracle {
|
|
11
|
+
uint256 private constant SECONDS_PER_YEAR = 365 days;
|
|
12
|
+
uint256 private constant ONE = 1e18;
|
|
13
|
+
|
|
14
|
+
/// @notice The LP token address (Pendle Market)
|
|
15
|
+
address public immutable LP;
|
|
16
|
+
|
|
17
|
+
/// @notice The maturity timestamp of the LP token
|
|
18
|
+
uint256 public immutable maturity;
|
|
19
|
+
|
|
20
|
+
/// @notice Annual discount rate for LP tokens (1e18 = 100%)
|
|
21
|
+
uint256 public immutable baseLpDiscountPerYear;
|
|
22
|
+
|
|
23
|
+
/// @notice Base price multiplier for LP tokens (1e18 = 1x)
|
|
24
|
+
uint256 public immutable lpMaturedPrice;
|
|
25
|
+
|
|
26
|
+
constructor(address _lp, uint256 _baseLpDiscountPerYear, uint256 _lpMaturedPrice) {
|
|
27
|
+
require(_lpMaturedPrice >= 1e18, "invalid price");
|
|
28
|
+
|
|
29
|
+
LP = _lp;
|
|
30
|
+
maturity = LPExpiry(LP).expiry();
|
|
31
|
+
baseLpDiscountPerYear = _baseLpDiscountPerYear;
|
|
32
|
+
lpMaturedPrice = _lpMaturedPrice;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function latestRoundData()
|
|
36
|
+
external
|
|
37
|
+
view
|
|
38
|
+
returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound)
|
|
39
|
+
{
|
|
40
|
+
uint256 timeLeft = (maturity > block.timestamp) ? maturity - block.timestamp : 0;
|
|
41
|
+
uint256 lpPrice = getLpPrice(timeLeft);
|
|
42
|
+
return (0, int256(lpPrice), 0, 0, 0);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function getLpPrice(uint256 timeLeft) public view returns (uint256) {
|
|
46
|
+
uint256 lpDiscount = getLpDiscount(timeLeft);
|
|
47
|
+
require(lpDiscount <= ONE, "discount overflow");
|
|
48
|
+
|
|
49
|
+
uint256 lpPrice = ((ONE - lpDiscount) * lpMaturedPrice) / ONE;
|
|
50
|
+
|
|
51
|
+
return lpPrice;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function getLpDiscount(uint256 timeLeft) public view returns (uint256) {
|
|
55
|
+
return (timeLeft * baseLpDiscountPerYear) / SECONDS_PER_YEAR;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function decimals() external pure returns (uint8) {
|
|
59
|
+
return 18;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
interface LPExpiry {
|
|
64
|
+
function expiry() external view returns (uint256);
|
|
65
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// SPDX-License-Identifier: SEE LICENSE IN LICENSE
|
|
2
|
+
pragma solidity ^0.8.19;
|
|
3
|
+
|
|
4
|
+
import {PendleLpLinearDiscountOracle} from "./PendleLpLinearDiscountOracle.sol";
|
|
5
|
+
|
|
6
|
+
contract PendleLpLinearDiscountOracleFactory {
|
|
7
|
+
event OracleCreated(address indexed market, uint256 basePtDiscountPerYear, uint256 lpBasePrice, address oracle);
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @notice Creates a new LP linear discount oracle
|
|
11
|
+
* @param market The Pendle Market address (LP token)
|
|
12
|
+
* @param basePtDiscountPerYear Annual discount rate for PT (max: 1e18 = 100%)
|
|
13
|
+
* @param lpBasePrice Base price multiplier for LP (min: 1e18 = 1x)
|
|
14
|
+
* @return res The address of the deployed oracle contract
|
|
15
|
+
*/
|
|
16
|
+
function create(address market, uint256 basePtDiscountPerYear, uint256 lpBasePrice) external returns (address res) {
|
|
17
|
+
res = address(new PendleLpLinearDiscountOracle(market, basePtDiscountPerYear, lpBasePrice));
|
|
18
|
+
emit OracleCreated(market, basePtDiscountPerYear, lpBasePrice, res);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
// SPDX-License-Identifier: SEE LICENSE IN LICENSE
|
|
2
2
|
pragma solidity ^0.8.19;
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
import {IPChainlinkOracleEssential} from "../../interfaces/IPChainlinkOracleEssential.sol";
|
|
5
|
+
|
|
6
|
+
contract PendleSparkLinearDiscountOracle is IPChainlinkOracleEssential {
|
|
5
7
|
uint256 private constant SECONDS_PER_YEAR = 365 days;
|
|
6
8
|
uint256 private constant ONE = 1e18;
|
|
7
9
|
|
|
@@ -15,6 +15,8 @@ contract ActionAddRemoveLiqV3 is IPActionAddRemoveLiqV3, ActionBase, ActionDeleg
|
|
|
15
15
|
using PYIndexLib for IPYieldToken;
|
|
16
16
|
using PYIndexLib for PYIndex;
|
|
17
17
|
|
|
18
|
+
constructor(address _dustReceiver) ActionDelegateBase(_dustReceiver) {}
|
|
19
|
+
|
|
18
20
|
// ------------------ ADD LIQUIDITY DUAL ------------------
|
|
19
21
|
|
|
20
22
|
/// @notice For details on the parameters (input, guessPtSwapToSy, limit, etc.), please refer to IPAllActionTypeV3.
|
|
@@ -8,6 +8,8 @@ import "../interfaces/IPReflector.sol";
|
|
|
8
8
|
contract ActionMiscV3 is IPActionMiscV3, ActionBase {
|
|
9
9
|
uint256 private constant NOT_FOUND = type(uint256).max;
|
|
10
10
|
|
|
11
|
+
constructor(address _dustReceiver) ActionBase(_dustReceiver) {}
|
|
12
|
+
|
|
11
13
|
function mintSyFromToken(
|
|
12
14
|
address receiver,
|
|
13
15
|
address SY,
|
|
@@ -24,6 +24,8 @@ contract ActionSimple is ActionBase, IPActionSimple {
|
|
|
24
24
|
using PYIndexLib for PYIndex;
|
|
25
25
|
using PMath for uint256;
|
|
26
26
|
|
|
27
|
+
constructor(address _dustReceiver) ActionBase(_dustReceiver) {}
|
|
28
|
+
|
|
27
29
|
// ------------------ SWAP TOKEN FOR PT ------------------
|
|
28
30
|
/// @notice This function is for internal router use only and should not be called directly.
|
|
29
31
|
/// @dev Use swapExactTokenForPt from the main router instead.
|
|
@@ -8,6 +8,8 @@ import {ActionDelegateBase} from "./base/ActionDelegateBase.sol";
|
|
|
8
8
|
contract ActionSwapPTV3 is IPActionSwapPTV3, ActionBase, ActionDelegateBase {
|
|
9
9
|
using PMath for uint256;
|
|
10
10
|
|
|
11
|
+
constructor(address _dustReceiver) ActionDelegateBase(_dustReceiver) {}
|
|
12
|
+
|
|
11
13
|
// ------------------ SWAP TOKEN FOR PT ------------------
|
|
12
14
|
/// @notice For details on the parameters (input, guessPtSwapToSy, limit, etc.), please refer to IPAllActionTypeV3.
|
|
13
15
|
function swapExactTokenForPt(
|
|
@@ -12,6 +12,8 @@ contract ActionSwapYTV3 is CallbackHelper, IPActionSwapYTV3, ActionBase, ActionD
|
|
|
12
12
|
using MarketApproxPtOutLibV2 for MarketState;
|
|
13
13
|
using PYIndexLib for IPYieldToken;
|
|
14
14
|
|
|
15
|
+
constructor(address _dustReceiver) ActionDelegateBase(_dustReceiver) {}
|
|
16
|
+
|
|
15
17
|
// ------------------ SWAP TOKEN FOR YT ------------------
|
|
16
18
|
|
|
17
19
|
/// @notice For details on the parameters (input, guessPtSwapToSy, limit, etc.), please refer to IPAllActionTypeV3.
|