@pendle/core-v2 5.5.0 → 5.7.0-sonic
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/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol/VotingEscrowTokenBase.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.json +2 -2
- package/build/artifacts/contracts/core/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/PendleGauge.sol/PendleGauge.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/v1/PendleMarket.sol/PendleMarket.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/v1/PendleMarket.sol/PendleMarket.json +2 -2
- package/build/artifacts/contracts/core/Market/v1/PendleMarketFactory.sol/PendleMarketFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/v1/PendleMarketFactory.sol/PendleMarketFactory.json +2 -2
- 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 +2 -2
- package/build/artifacts/contracts/core/RewardManager/RewardManager.sol/RewardManager.dbg.json +1 -1
- package/build/artifacts/contracts/core/RewardManager/RewardManagerAbstract.sol/RewardManagerAbstract.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.json +2 -2
- package/build/artifacts/contracts/core/YieldContracts/InterestManagerYT.sol/InterestManagerYT.dbg.json +1 -1
- 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/libraries/math/PMath.sol/PMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/math/PMath.sol/PMath.json +2 -2
- package/build/artifacts/contracts/interfaces/IOwnable.sol/IOwnable.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IOwnable.sol/IOwnable.json +34 -0
- 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/IPActionMarketAuxStatic.sol/IPActionMarketAuxStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMarketCoreStatic.sol/IPActionMarketCoreStatic.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/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/IPCommonSYFactory.sol/IPCommonSYFactory.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPCommonSYFactory.sol/IPCommonSYFactory.json +40 -0
- package/build/artifacts/contracts/interfaces/IPGovernanceProxy.sol/IPGovernanceProxy.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPGovernanceProxy.sol/IPGovernanceProxy.json +77 -0
- 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 +32 -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/IPMarketFactoryV3.sol/IPMarketFactoryV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarketFactoryV3.sol/IPMarketFactoryV3.json +23 -0
- package/build/artifacts/contracts/interfaces/IPMarketV3.sol/IPMarketV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPoolDeployHelperV2.sol/IPPoolDeployHelperV2.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPPoolDeployHelperV2.sol/IPPoolDeployHelperV2.json +162 -0
- package/build/artifacts/contracts/interfaces/IPRouterStatic.sol/IPRouterStatic.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/IPendleCommonPoolDeployHelperV2.sol/IPendleCommonPoolDeployHelperV2.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPendleCommonPoolDeployHelperV2.sol/IPendleCommonPoolDeployHelperV2.json +426 -0
- 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 +32 -0
- package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.dbg.json +1 -1
- package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.json +34 -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/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/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 +98 -3
- package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonPoolDeployHelperV2.sol/PendleCommonPoolDeployHelperV2.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonPoolDeployHelperV2.sol/PendleCommonPoolDeployHelperV2.json +651 -0
- package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonSYFactory.sol/PendleCommonSYFactory.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonSYFactory.sol/PendleCommonSYFactory.json +329 -0
- package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelper.sol/PendlePoolDeployHelper.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/{PendlePoolDeployHelper.sol → deploy/PendlePoolDeployHelper.sol}/PendlePoolDeployHelper.json +3 -3
- package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelperV2.sol/PendlePoolDeployHelperV2.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelperV2.sol/PendlePoolDeployHelperV2.json +235 -0
- package/build/artifacts/contracts/offchain-helpers/deploy/lib/MarketDeployLib.sol/MarketDeployLib.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/deploy/lib/MarketDeployLib.sol/MarketDeployLib.json +10 -0
- 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/PendleRedStoneRateOracleAdapter.sol/PendleRedStoneRateOracleAdapter.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleRedStoneRateOracleAdapter.sol/PendleRedStoneRateOracleAdapter.json +2 -2
- package/build/artifacts/contracts/router/ActionAddRemoveLiqV3.sol/ActionAddRemoveLiqV3.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionAddRemoveLiqV3.sol/ActionAddRemoveLiqV3.json +2 -2
- package/build/artifacts/contracts/router/ActionCallbackV3.sol/ActionCallbackV3.dbg.json +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 +2 -2
- package/build/artifacts/contracts/router/ActionSimple.sol/ActionSimple.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSimple.sol/ActionSimple.json +2 -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 +2 -2
- package/build/artifacts/contracts/router/ActionSwapYTV3.sol/ActionSwapYTV3.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapYTV3.sol/ActionSwapYTV3.json +2 -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/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 +2 -2
- 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/contracts/core/libraries/math/PMath.sol +5 -0
- package/contracts/interfaces/IOwnable.sol +6 -0
- package/contracts/interfaces/IPCommonSYFactory.sol +6 -0
- package/contracts/interfaces/IPGovernanceProxy.sol +10 -0
- package/contracts/interfaces/IPLimitRouter.sol +5 -0
- package/contracts/interfaces/IPMarketFactoryV3.sol +2 -0
- package/contracts/interfaces/IPPoolDeployHelperV2.sol +36 -0
- package/contracts/interfaces/IPendleCommonPoolDeployHelperV2.sol +30 -0
- package/contracts/limit/LimitRouterBase.sol +6 -10
- package/contracts/offchain-helpers/PendleGovernanceProxy.sol +41 -10
- package/contracts/offchain-helpers/deploy/PendleCommonPoolDeployHelperV2.sol +68 -0
- package/contracts/offchain-helpers/deploy/PendleCommonSYFactory.sol +67 -0
- package/contracts/offchain-helpers/{PendlePoolDeployHelper.sol → deploy/PendlePoolDeployHelper.sol} +5 -5
- package/contracts/offchain-helpers/deploy/PendlePoolDeployHelperV2.sol +159 -0
- package/contracts/offchain-helpers/deploy/lib/MarketDeployLib.sol +70 -0
- package/deployments/1-core.json +2 -1
- package/deployments/10-core.json +2 -1
- package/deployments/146-core.json +47 -0
- package/deployments/146-offchain-helper.json +6 -0
- package/deployments/42161-core.json +2 -1
- package/deployments/5000-core.json +2 -1
- package/deployments/56-core.json +2 -1
- package/deployments/8453-core.json +2 -1
- package/deployments/merkle-distribution/2024-12-31-snapshot.json +65767 -0
- package/deployments/merkle-distribution/2025-01-30.json +28060 -0
- package/package.json +1 -1
- package/typechain-types/ActionCallbackV3.ts +164 -0
- package/typechain-types/BoringPYUsdChainlinkAssetOracle.ts +244 -0
- package/typechain-types/BoringPYUsdChainlinkSYOracle.ts +243 -0
- package/typechain-types/Broadcaster.ts +454 -0
- package/typechain-types/IOwnable.ts +114 -0
- package/typechain-types/IPActionCallbackV3.ts +164 -0
- package/typechain-types/IPActionMarketCoreStatic.ts +1974 -0
- package/typechain-types/IPCommonSYFactory.ts +111 -0
- package/typechain-types/IPGovernanceProxy.ts +236 -0
- package/typechain-types/IPLimitRouter.ts +633 -0
- package/typechain-types/IPLimitRouterCallback.ts +120 -0
- package/typechain-types/IPMarket.ts +1045 -0
- package/typechain-types/IPMarketFactoryV3.ts +321 -0
- package/typechain-types/IPMarketV3.ts +1068 -0
- package/typechain-types/IPPoolDeployHelperV2.ts +209 -0
- package/typechain-types/IPVotingController.ts +510 -0
- package/typechain-types/IPVotingEscrowMainchain.ts +461 -0
- package/typechain-types/IPendleCommonPoolDeployHelperV2.ts +391 -0
- package/typechain-types/InterestManagerYT.ts +120 -0
- package/typechain-types/LimitBackendHelper.ts +287 -0
- package/typechain-types/LimitRouterBase.ts +1138 -0
- package/typechain-types/PendleBoringOneracle.ts +87 -0
- package/typechain-types/PendleBoringSolvBTCOneracle.ts +87 -0
- package/typechain-types/PendleChainlinkOracle.ts +299 -0
- package/typechain-types/PendleChainlinkOracleFactory.ts +468 -0
- package/typechain-types/PendleChainlinkOracleWithQuote.ts +335 -0
- package/typechain-types/PendleCommonPoolDeployHelperV2.ts +698 -0
- package/typechain-types/PendleCommonSYFactory.ts +420 -0
- package/typechain-types/PendleExchangeRateOracle.ts +393 -0
- package/typechain-types/PendleFeeDistributor.ts +745 -0
- package/typechain-types/PendleGauge.ts +225 -0
- package/typechain-types/PendleGaugeControllerBaseUpg.ts +670 -0
- package/typechain-types/PendleGaugeControllerMainchainUpg.ts +758 -0
- package/typechain-types/PendleGaugeControllerSidechainUpg.ts +750 -0
- package/typechain-types/PendleGovernanceProxy.ts +128 -0
- package/typechain-types/PendleLimitRouter.ts +1138 -0
- package/typechain-types/PendleMarket.ts +1207 -0
- package/typechain-types/PendleMarketFactory.ts +906 -0
- package/typechain-types/PendleMarketFactoryV3.ts +719 -0
- package/typechain-types/PendleMarketV3.ts +1195 -0
- package/typechain-types/PendlePYLpOracle.ts +619 -0
- package/typechain-types/PendlePoolDeployHelperV2.ts +283 -0
- package/typechain-types/PendleRedStoneRateOracleAdapter.ts +133 -0
- package/typechain-types/PendleVotingControllerUpg.ts +1621 -0
- package/typechain-types/PendleYieldContractFactory.ts +801 -0
- package/typechain-types/PendleYieldToken.ts +1107 -0
- package/typechain-types/RewardManager.ts +161 -0
- package/typechain-types/RewardManagerAbstract.ts +108 -0
- package/typechain-types/VotingControllerStorageUpg.ts +915 -0
- package/typechain-types/VotingEscrowPendleMainchain.ts +1045 -0
- package/typechain-types/VotingEscrowPendleSidechain.ts +558 -0
- package/typechain-types/VotingEscrowTokenBase.ts +252 -0
- package/typechain-types/factories/ActionAddRemoveLiqV3__factory.ts +1 -1
- package/typechain-types/factories/ActionCallbackV3__factory.ts +121 -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 +1 -1
- package/typechain-types/factories/ActionSimple__factory.ts +1 -1
- 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 +1 -1
- package/typechain-types/factories/ActionSwapYTV3__factory.ts +1 -1
- package/typechain-types/factories/ActionVePendleStatic__factory.ts +1 -1
- package/typechain-types/factories/BoringPYUsdChainlinkAssetOracle__factory.ts +269 -0
- package/typechain-types/factories/BoringPYUsdChainlinkSYOracle__factory.ts +267 -0
- package/typechain-types/factories/Broadcaster__factory.ts +311 -0
- package/typechain-types/factories/IOwnable__factory.ts +46 -0
- package/typechain-types/factories/IPActionCallbackV3__factory.ts +83 -0
- package/typechain-types/factories/IPActionMarketCoreStatic__factory.ts +1300 -0
- package/typechain-types/factories/IPCommonSYFactory__factory.ts +55 -0
- package/typechain-types/factories/IPGovernanceProxy__factory.ts +152 -0
- package/typechain-types/factories/IPLimitRouterCallback__factory.ts +64 -0
- package/typechain-types/factories/IPLimitRouter__factory.ts +748 -0
- package/typechain-types/factories/IPMarketFactoryV3__factory.ts +217 -0
- package/typechain-types/factories/IPMarketV3__factory.ts +845 -0
- package/typechain-types/factories/IPMarket__factory.ts +832 -0
- package/typechain-types/factories/IPPoolDeployHelperV2__factory.ts +181 -0
- package/typechain-types/factories/IPVotingController__factory.ts +363 -0
- package/typechain-types/factories/IPVotingEscrowMainchain__factory.ts +340 -0
- package/typechain-types/factories/IPendleCommonPoolDeployHelperV2__factory.ts +447 -0
- package/typechain-types/factories/InterestManagerYT__factory.ts +63 -0
- package/typechain-types/factories/LimitBackendHelper__factory.ts +232 -0
- package/typechain-types/factories/LimitRouterBase__factory.ts +1069 -0
- package/typechain-types/factories/PendleBoringOneracle__factory.ts +81 -0
- package/typechain-types/factories/PendleBoringSolvBTCOneracle__factory.ts +83 -0
- package/typechain-types/factories/PendleChainlinkOracleFactory__factory.ts +405 -0
- package/typechain-types/factories/PendleChainlinkOracleWithQuote__factory.ts +341 -0
- package/typechain-types/factories/PendleChainlinkOracle__factory.ts +306 -0
- package/typechain-types/factories/PendleCommonPoolDeployHelperV2__factory.ts +728 -0
- package/typechain-types/factories/PendleCommonSYFactory__factory.ts +386 -0
- package/typechain-types/factories/PendleExchangeRateOracle__factory.ts +379 -0
- package/typechain-types/factories/PendleFeeDistributor__factory.ts +665 -0
- package/typechain-types/factories/PendleGaugeControllerBaseUpg__factory.ts +457 -0
- package/typechain-types/factories/PendleGaugeControllerMainchainUpg__factory.ts +620 -0
- package/typechain-types/factories/PendleGaugeControllerSidechainUpg__factory.ts +610 -0
- package/typechain-types/factories/PendleGauge__factory.ts +140 -0
- package/typechain-types/factories/PendleGovernanceProxy__factory.ts +97 -2
- package/typechain-types/factories/PendleLimitRouter__factory.ts +1139 -0
- package/typechain-types/factories/PendleMarketFactoryV3__factory.ts +714 -0
- package/typechain-types/factories/PendleMarketFactory__factory.ts +748 -0
- package/typechain-types/factories/PendleMarketV3__factory.ts +1211 -0
- package/typechain-types/factories/PendleMarket__factory.ts +1212 -0
- package/typechain-types/factories/PendlePYLpOracle__factory.ts +475 -0
- package/typechain-types/factories/PendlePoolDeployHelperV2__factory.ts +308 -0
- package/typechain-types/factories/PendlePoolDeployHelper__factory.ts +1 -1
- package/typechain-types/factories/PendleRedStoneRateOracleAdapter__factory.ts +157 -0
- package/typechain-types/factories/PendleRouterStatic__factory.ts +1 -1
- package/typechain-types/factories/PendleRouterV4__factory.ts +1 -1
- package/typechain-types/factories/PendleVotingControllerUpg__factory.ts +1278 -0
- package/typechain-types/factories/PendleYieldContractFactory__factory.ts +674 -0
- package/typechain-types/factories/PendleYieldToken__factory.ts +978 -0
- package/typechain-types/factories/Reflector__factory.ts +1 -1
- package/typechain-types/factories/RewardManagerAbstract__factory.ts +59 -0
- package/typechain-types/factories/RewardManager__factory.ts +89 -0
- package/typechain-types/factories/VotingControllerStorageUpg__factory.ts +700 -0
- package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +856 -0
- package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +455 -0
- package/typechain-types/factories/VotingEscrowTokenBase__factory.ts +162 -0
- package/typechain-types/hardhat.d.ts +72 -0
- package/typechain-types/index.ts +16 -2
- package/build/artifacts/contracts/offchain-helpers/PendlePoolDeployHelper.sol/PendlePoolDeployHelper.dbg.json +0 -4
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
"contractName": "MarketApproxPtInLibOnchain",
|
|
4
4
|
"sourceName": "contracts/router/math/MarketApproxLibOnchain.sol",
|
|
5
5
|
"abi": [],
|
|
6
|
-
"bytecode": "
|
|
7
|
-
"deployedBytecode": "
|
|
6
|
+
"bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220db58a967387c96ef256ca85026693abcc2eda68d78b98c1e8b09b7b9e5ccc7d464736f6c63430008170033",
|
|
7
|
+
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220db58a967387c96ef256ca85026693abcc2eda68d78b98c1e8b09b7b9e5ccc7d464736f6c63430008170033",
|
|
8
8
|
"linkReferences": {},
|
|
9
9
|
"deployedLinkReferences": {}
|
|
10
10
|
}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
"contractName": "MarketApproxPtOutLibOnchain",
|
|
4
4
|
"sourceName": "contracts/router/math/MarketApproxLibOnchain.sol",
|
|
5
5
|
"abi": [],
|
|
6
|
-
"bytecode": "
|
|
7
|
-
"deployedBytecode": "
|
|
6
|
+
"bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220b01d830ebc55a8101440a48133846bc45b73a5760f470f9d9e71a9bcbb9da5ca64736f6c63430008170033",
|
|
7
|
+
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220b01d830ebc55a8101440a48133846bc45b73a5760f470f9d9e71a9bcbb9da5ca64736f6c63430008170033",
|
|
8
8
|
"linkReferences": {},
|
|
9
9
|
"deployedLinkReferences": {}
|
|
10
10
|
}
|
package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtInLibV2.json
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
"contractName": "MarketApproxPtInLibV2",
|
|
4
4
|
"sourceName": "contracts/router/math/MarketApproxLibV2.sol",
|
|
5
5
|
"abi": [],
|
|
6
|
-
"bytecode": "
|
|
7
|
-
"deployedBytecode": "
|
|
6
|
+
"bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212200745ab83bec35c6cb543bd00729e05a3d8d559995343acab0afc082338b1eef464736f6c63430008170033",
|
|
7
|
+
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212200745ab83bec35c6cb543bd00729e05a3d8d559995343acab0afc082338b1eef464736f6c63430008170033",
|
|
8
8
|
"linkReferences": {},
|
|
9
9
|
"deployedLinkReferences": {}
|
|
10
10
|
}
|
package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtOutLibV2.json
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
"contractName": "MarketApproxPtOutLibV2",
|
|
4
4
|
"sourceName": "contracts/router/math/MarketApproxLibV2.sol",
|
|
5
5
|
"abi": [],
|
|
6
|
-
"bytecode": "
|
|
7
|
-
"deployedBytecode": "
|
|
6
|
+
"bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220cab98746dcd717d1857c86a735c91e23176716c3fac175ac2c8a5e4806d36b0e64736f6c63430008170033",
|
|
7
|
+
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220cab98746dcd717d1857c86a735c91e23176716c3fac175ac2c8a5e4806d36b0e64736f6c63430008170033",
|
|
8
8
|
"linkReferences": {},
|
|
9
9
|
"deployedLinkReferences": {}
|
|
10
10
|
}
|
|
@@ -206,6 +206,11 @@ library PMath {
|
|
|
206
206
|
return uint192(x);
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
+
function Uint80(uint256 x) internal pure returns (uint80) {
|
|
210
|
+
require(x <= type(uint80).max);
|
|
211
|
+
return uint80(x);
|
|
212
|
+
}
|
|
213
|
+
|
|
209
214
|
function isAApproxB(uint256 a, uint256 b, uint256 eps) internal pure returns (bool) {
|
|
210
215
|
return mulDown(b, ONE - eps) <= a && a <= mulDown(b, ONE + eps);
|
|
211
216
|
}
|
|
@@ -11,4 +11,14 @@ interface IPGovernanceProxy {
|
|
|
11
11
|
function pause(address[] calldata addrs) external;
|
|
12
12
|
|
|
13
13
|
function aggregate(Call[] calldata calls) external payable returns (bytes[] memory rtnData);
|
|
14
|
+
|
|
15
|
+
event SetAllowedSelectors(bytes4[] selectors, bytes32 indexed role);
|
|
16
|
+
|
|
17
|
+
function ALICE() external view returns (bytes32);
|
|
18
|
+
|
|
19
|
+
function BOB() external view returns (bytes32);
|
|
20
|
+
|
|
21
|
+
function CHARLIE() external view returns (bytes32);
|
|
22
|
+
|
|
23
|
+
function allowedSelectors(bytes4 selector) external view returns (bytes32);
|
|
14
24
|
}
|
|
@@ -89,6 +89,9 @@ interface IPLimitRouter is IPLimitOrderType {
|
|
|
89
89
|
address taker
|
|
90
90
|
);
|
|
91
91
|
|
|
92
|
+
// event added on 2/1/2025
|
|
93
|
+
event LnFeeRateRootsSet(address[] YTs, uint256[] lnFeeRateRoots);
|
|
94
|
+
|
|
92
95
|
// @dev actualMaking, actualTaking are in the SY form
|
|
93
96
|
function fill(
|
|
94
97
|
FillOrderParams[] memory params,
|
|
@@ -118,6 +121,8 @@ interface IPLimitRouter is IPLimitOrderType {
|
|
|
118
121
|
|
|
119
122
|
function simulate(address target, bytes calldata data) external payable;
|
|
120
123
|
|
|
124
|
+
function WNATIVE() external view returns (address);
|
|
125
|
+
|
|
121
126
|
function _checkSig(
|
|
122
127
|
Order memory order,
|
|
123
128
|
bytes memory signature
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
pragma solidity ^0.8.0;
|
|
3
|
+
|
|
4
|
+
interface IPPoolDeployHelperV2 {
|
|
5
|
+
struct PoolDeploymentParams {
|
|
6
|
+
uint32 expiry;
|
|
7
|
+
uint80 lnFeeRateRoot;
|
|
8
|
+
int256 scalarRoot;
|
|
9
|
+
int256 initialRateAnchor;
|
|
10
|
+
bool doCacheIndexSameBlock;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
struct PoolDeploymentAddrs {
|
|
14
|
+
address SY;
|
|
15
|
+
address PT;
|
|
16
|
+
address YT;
|
|
17
|
+
address market;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
struct PoolConfig {
|
|
21
|
+
uint32 expiry;
|
|
22
|
+
uint256 rateMin;
|
|
23
|
+
uint256 rateMax;
|
|
24
|
+
uint256 desiredImpliedRate;
|
|
25
|
+
uint256 fee;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
event MarketDeployment(PoolDeploymentAddrs addrs, PoolDeploymentParams params);
|
|
29
|
+
|
|
30
|
+
function deploy5115MarketAndSeedLiquidity(
|
|
31
|
+
address SY,
|
|
32
|
+
PoolConfig memory config,
|
|
33
|
+
address tokenToSeedLiqudity,
|
|
34
|
+
uint256 amountToSeed
|
|
35
|
+
) external payable returns (PoolDeploymentAddrs memory);
|
|
36
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity ^0.8.0;
|
|
3
|
+
|
|
4
|
+
import "./IPPoolDeployHelperV2.sol";
|
|
5
|
+
|
|
6
|
+
interface IPendleCommonPoolDeployHelperV2 is IPPoolDeployHelperV2 {
|
|
7
|
+
function deployERC4626Market(
|
|
8
|
+
bytes memory constructorParams,
|
|
9
|
+
PoolConfig memory config,
|
|
10
|
+
address tokenToSeedLiqudity,
|
|
11
|
+
uint256 amountToSeed,
|
|
12
|
+
address syOwner
|
|
13
|
+
) external returns (PoolDeploymentAddrs memory);
|
|
14
|
+
|
|
15
|
+
function deployERC4626NotRedeemableMarket(
|
|
16
|
+
bytes memory constructorParams,
|
|
17
|
+
PoolConfig memory config,
|
|
18
|
+
address tokenToSeedLiqudity,
|
|
19
|
+
uint256 amountToSeed,
|
|
20
|
+
address syOwner
|
|
21
|
+
) external returns (PoolDeploymentAddrs memory);
|
|
22
|
+
|
|
23
|
+
function deployERC20Market(
|
|
24
|
+
bytes memory constructorParams,
|
|
25
|
+
PoolConfig memory config,
|
|
26
|
+
address tokenToSeedLiqudity,
|
|
27
|
+
uint256 amountToSeed,
|
|
28
|
+
address syOwner
|
|
29
|
+
) external returns (PoolDeploymentAddrs memory);
|
|
30
|
+
}
|
|
@@ -30,6 +30,8 @@ abstract contract LimitRouterBase is
|
|
|
30
30
|
uint128 internal constant _ORDER_DOES_NOT_EXIST = 0;
|
|
31
31
|
uint128 internal constant _ORDER_FILLED = 1;
|
|
32
32
|
uint256 internal constant NEW_PRIME = 12421;
|
|
33
|
+
uint256 internal constant MAX_LN_FEE_RATE_ROOT = 48790164169432003; // ln(1.05)
|
|
34
|
+
|
|
33
35
|
bytes private constant EMPTY_BYTES = abi.encode();
|
|
34
36
|
|
|
35
37
|
address public feeRecipient;
|
|
@@ -37,7 +39,7 @@ abstract contract LimitRouterBase is
|
|
|
37
39
|
// YT => lnFeeRateRoot // not to be accessed directly
|
|
38
40
|
mapping(address => uint256) internal __lnFeeRateRoot;
|
|
39
41
|
|
|
40
|
-
address
|
|
42
|
+
address public immutable WNATIVE;
|
|
41
43
|
|
|
42
44
|
mapping(bytes32 => OrderStatus) internal _status;
|
|
43
45
|
|
|
@@ -486,19 +488,13 @@ abstract contract LimitRouterBase is
|
|
|
486
488
|
uint256 len = YTs.length;
|
|
487
489
|
require(len == lnFeeRateRoots.length, "LOP: length mismatch");
|
|
488
490
|
|
|
489
|
-
if (msg.sender == ownerHelper) {
|
|
490
|
-
_requireFeeNotSet(YTs);
|
|
491
|
-
}
|
|
492
|
-
|
|
493
491
|
for (uint256 i = 0; i < len; i++) {
|
|
494
492
|
require(lnFeeRateRoots[i] > 0, "LOP: zero fee not allowed");
|
|
493
|
+
require(lnFeeRateRoots[i] <= MAX_LN_FEE_RATE_ROOT, "LOP: fee too high");
|
|
494
|
+
|
|
495
495
|
__lnFeeRateRoot[YTs[i]] = lnFeeRateRoots[i];
|
|
496
496
|
}
|
|
497
|
-
}
|
|
498
497
|
|
|
499
|
-
|
|
500
|
-
for (uint256 i = 0; i < YTs.length; i++) {
|
|
501
|
-
require(__lnFeeRateRoot[YTs[i]] == 0, "LOP: fee already set");
|
|
502
|
-
}
|
|
498
|
+
emit LnFeeRateRootsSet(YTs, lnFeeRateRoots);
|
|
503
499
|
}
|
|
504
500
|
}
|
|
@@ -13,13 +13,30 @@ import "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";
|
|
|
13
13
|
contract PendleGovernanceProxy is AccessControlUpgradeable, UUPSUpgradeable, IPGovernanceProxy {
|
|
14
14
|
bytes32 public constant GUARDIAN = keccak256("GUARDIAN");
|
|
15
15
|
|
|
16
|
+
bytes32 public constant ALICE = keccak256("ALICE");
|
|
17
|
+
bytes32 public constant BOB = keccak256("BOB");
|
|
18
|
+
bytes32 public constant CHARLIE = keccak256("CHARLIE");
|
|
19
|
+
|
|
20
|
+
mapping(bytes4 => bytes32) public allowedSelectors;
|
|
21
|
+
|
|
16
22
|
modifier onlyGuardian() {
|
|
17
|
-
require(hasRole(
|
|
23
|
+
require(hasRole(GUARDIAN, msg.sender) || hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "n/a");
|
|
18
24
|
_;
|
|
19
25
|
}
|
|
20
26
|
|
|
21
27
|
modifier onlyAdmin() {
|
|
22
|
-
require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "
|
|
28
|
+
require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "n/a");
|
|
29
|
+
_;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
modifier onlyHaveSomeRole() {
|
|
33
|
+
require(
|
|
34
|
+
hasRole(ALICE, msg.sender) ||
|
|
35
|
+
hasRole(BOB, msg.sender) ||
|
|
36
|
+
hasRole(CHARLIE, msg.sender) ||
|
|
37
|
+
hasRole(DEFAULT_ADMIN_ROLE, msg.sender),
|
|
38
|
+
"n/a"
|
|
39
|
+
);
|
|
23
40
|
_;
|
|
24
41
|
}
|
|
25
42
|
|
|
@@ -27,6 +44,19 @@ contract PendleGovernanceProxy is AccessControlUpgradeable, UUPSUpgradeable, IPG
|
|
|
27
44
|
_disableInitializers();
|
|
28
45
|
}
|
|
29
46
|
|
|
47
|
+
function aggregate(Call[] calldata calls) external payable onlyHaveSomeRole returns (bytes[] memory) {
|
|
48
|
+
bool isAdmin = hasRole(DEFAULT_ADMIN_ROLE, msg.sender);
|
|
49
|
+
|
|
50
|
+
if (!isAdmin) {
|
|
51
|
+
for (uint256 i = 0; i < calls.length; i++) {
|
|
52
|
+
bytes4 selector = bytes4(calls[i].callData[:4]);
|
|
53
|
+
require(hasRole(allowedSelectors[selector], msg.sender), "n/a");
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return _aggregate(calls);
|
|
58
|
+
}
|
|
59
|
+
|
|
30
60
|
/*///////////////////////////////////////////////////////////////
|
|
31
61
|
PAUSING
|
|
32
62
|
//////////////////////////////////////////////////////////////*/
|
|
@@ -45,14 +75,19 @@ contract PendleGovernanceProxy is AccessControlUpgradeable, UUPSUpgradeable, IPG
|
|
|
45
75
|
ADMIN CALL
|
|
46
76
|
//////////////////////////////////////////////////////////////*/
|
|
47
77
|
|
|
48
|
-
function
|
|
49
|
-
|
|
50
|
-
|
|
78
|
+
function setAllowedSelectors(bytes4[] calldata selectors, bytes32 role) external onlyAdmin {
|
|
79
|
+
for (uint256 i = 0; i < selectors.length; i++) {
|
|
80
|
+
allowedSelectors[selectors[i]] = role;
|
|
81
|
+
}
|
|
82
|
+
emit SetAllowedSelectors(selectors, role);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function _aggregate(Call[] calldata calls) internal returns (bytes[] memory rtnData) {
|
|
51
86
|
uint256 length = calls.length;
|
|
52
87
|
rtnData = new bytes[](length);
|
|
53
88
|
|
|
54
89
|
Call calldata call;
|
|
55
|
-
for (uint256 i = 0; i < length; ) {
|
|
90
|
+
for (uint256 i = 0; i < length; i++) {
|
|
56
91
|
call = calls[i];
|
|
57
92
|
|
|
58
93
|
(bool success, bytes memory resp) = call.target.call{value: call.value}(call.callData);
|
|
@@ -63,10 +98,6 @@ contract PendleGovernanceProxy is AccessControlUpgradeable, UUPSUpgradeable, IPG
|
|
|
63
98
|
}
|
|
64
99
|
|
|
65
100
|
rtnData[i] = resp;
|
|
66
|
-
|
|
67
|
-
unchecked {
|
|
68
|
-
++i;
|
|
69
|
-
}
|
|
70
101
|
}
|
|
71
102
|
}
|
|
72
103
|
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity ^0.8.17;
|
|
3
|
+
|
|
4
|
+
import "./PendlePoolDeployHelperV2.sol";
|
|
5
|
+
import "../../interfaces/IPCommonSYFactory.sol";
|
|
6
|
+
import "../../interfaces/IOwnable.sol";
|
|
7
|
+
import "../../core/libraries/BoringOwnableUpgradeable.sol";
|
|
8
|
+
|
|
9
|
+
contract PendleCommonPoolDeployHelperV2 is PendlePoolDeployHelperV2, BoringOwnableUpgradeable {
|
|
10
|
+
bytes32 public constant ERC4626_DEPLOY_ID = keccak256("PendleERC4626SYV2");
|
|
11
|
+
bytes32 public constant ERC4626_NOT_REDEEMABLE_DEPLOY_ID = keccak256("PendleERC4626NotRedeemableToAssetSYV2");
|
|
12
|
+
bytes32 public constant ERC20_DEPLOY_ID = keccak256("PendleERC20SY");
|
|
13
|
+
|
|
14
|
+
address public immutable syFactory;
|
|
15
|
+
|
|
16
|
+
constructor(
|
|
17
|
+
address _syFactory,
|
|
18
|
+
address _router,
|
|
19
|
+
address _yieldContractFactory,
|
|
20
|
+
address _marketFactory
|
|
21
|
+
) PendlePoolDeployHelperV2(_router, _yieldContractFactory, _marketFactory) {
|
|
22
|
+
syFactory = _syFactory;
|
|
23
|
+
_disableInitializers();
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function initialize() external initializer {
|
|
27
|
+
__BoringOwnable_init();
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Those 3 are all not payable as they should not accept tokenIn as native
|
|
31
|
+
|
|
32
|
+
function deployERC4626Market(
|
|
33
|
+
bytes memory constructorParams,
|
|
34
|
+
PoolConfig memory config,
|
|
35
|
+
address tokenToSeedLiqudity,
|
|
36
|
+
uint256 amountToSeed,
|
|
37
|
+
address syOwner
|
|
38
|
+
) external returns (PoolDeploymentAddrs memory) {
|
|
39
|
+
address SY = IPCommonSYFactory(syFactory).deploySY(ERC4626_DEPLOY_ID, constructorParams, syOwner);
|
|
40
|
+
return deploy5115MarketAndSeedLiquidity(SY, config, tokenToSeedLiqudity, amountToSeed);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function deployERC4626NotRedeemableMarket(
|
|
44
|
+
bytes memory constructorParams,
|
|
45
|
+
PoolConfig memory config,
|
|
46
|
+
address tokenToSeedLiqudity,
|
|
47
|
+
uint256 amountToSeed,
|
|
48
|
+
address syOwner
|
|
49
|
+
) external returns (PoolDeploymentAddrs memory) {
|
|
50
|
+
address SY = IPCommonSYFactory(syFactory).deploySY(
|
|
51
|
+
ERC4626_NOT_REDEEMABLE_DEPLOY_ID,
|
|
52
|
+
constructorParams,
|
|
53
|
+
syOwner
|
|
54
|
+
);
|
|
55
|
+
return deploy5115MarketAndSeedLiquidity(SY, config, tokenToSeedLiqudity, amountToSeed);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function deployERC20Market(
|
|
59
|
+
bytes memory constructorParams,
|
|
60
|
+
PoolConfig memory config,
|
|
61
|
+
address tokenToSeedLiqudity,
|
|
62
|
+
uint256 amountToSeed,
|
|
63
|
+
address syOwner
|
|
64
|
+
) external returns (PoolDeploymentAddrs memory) {
|
|
65
|
+
address SY = IPCommonSYFactory(syFactory).deploySY(ERC20_DEPLOY_ID, constructorParams, syOwner);
|
|
66
|
+
return deploy5115MarketAndSeedLiquidity(SY, config, tokenToSeedLiqudity, amountToSeed);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity ^0.8.17;
|
|
3
|
+
|
|
4
|
+
import "../../core/libraries/BoringOwnableUpgradeable.sol";
|
|
5
|
+
import "../../core/libraries/BaseSplitCodeFactory.sol";
|
|
6
|
+
import "../../interfaces/IOwnable.sol";
|
|
7
|
+
|
|
8
|
+
contract PendleCommonSYFactory is BoringOwnableUpgradeable {
|
|
9
|
+
error InvalidCreationCode(bytes32 id, CreationCode code);
|
|
10
|
+
|
|
11
|
+
error InvalidSYId(bytes32 id);
|
|
12
|
+
|
|
13
|
+
struct CreationCode {
|
|
14
|
+
address creationCodeContractA;
|
|
15
|
+
uint256 creationCodeSizeA;
|
|
16
|
+
address creationCodeContractB;
|
|
17
|
+
uint256 creationCodeSizeB;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
event SetSYCreationCode(bytes32 id, CreationCode code);
|
|
21
|
+
|
|
22
|
+
event DeployedSY(bytes32 id, bytes constructorParams, address SY);
|
|
23
|
+
|
|
24
|
+
mapping(bytes32 => CreationCode) public creationCodes;
|
|
25
|
+
|
|
26
|
+
constructor() {
|
|
27
|
+
_disableInitializers();
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function initialize() external initializer {
|
|
31
|
+
__BoringOwnable_init();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function setSYCreationCode(bytes32 id, CreationCode memory code) external onlyOwner {
|
|
35
|
+
if (
|
|
36
|
+
code.creationCodeContractA == address(0) ||
|
|
37
|
+
code.creationCodeContractB == address(0) ||
|
|
38
|
+
code.creationCodeSizeA == 0 ||
|
|
39
|
+
code.creationCodeSizeB == 0
|
|
40
|
+
) {
|
|
41
|
+
revert InvalidCreationCode(id, code);
|
|
42
|
+
}
|
|
43
|
+
creationCodes[id] = code;
|
|
44
|
+
emit SetSYCreationCode(id, code);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function deploySY(bytes32 id, bytes memory constructorParams, address syOwner) external returns (address SY) {
|
|
48
|
+
CreationCode memory code = creationCodes[id];
|
|
49
|
+
|
|
50
|
+
if (code.creationCodeContractA == address(0)) {
|
|
51
|
+
revert InvalidSYId(id);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
SY = BaseSplitCodeFactory._create2(
|
|
55
|
+
0,
|
|
56
|
+
bytes32(block.chainid),
|
|
57
|
+
constructorParams,
|
|
58
|
+
code.creationCodeContractA,
|
|
59
|
+
code.creationCodeSizeA,
|
|
60
|
+
code.creationCodeContractB,
|
|
61
|
+
code.creationCodeSizeB
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
emit DeployedSY(id, constructorParams, SY);
|
|
65
|
+
IOwnable(SY).transferOwnership(syOwner, true, false);
|
|
66
|
+
}
|
|
67
|
+
}
|
package/contracts/offchain-helpers/{PendlePoolDeployHelper.sol → deploy/PendlePoolDeployHelper.sol}
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity ^0.8.17;
|
|
3
3
|
|
|
4
|
-
import "
|
|
5
|
-
import "
|
|
6
|
-
import "
|
|
7
|
-
import "
|
|
4
|
+
import "../../interfaces/IPAllActionV3.sol";
|
|
5
|
+
import "../../interfaces/IPMarketFactoryV3.sol";
|
|
6
|
+
import "../../interfaces/IPYieldContractFactory.sol";
|
|
7
|
+
import "../../interfaces/IPMarketV3.sol";
|
|
8
8
|
// import "../core/StandardizedYield/implementations/PendleERC4626SY.sol";
|
|
9
|
-
import "
|
|
9
|
+
import "../../core/libraries/TokenHelper.sol";
|
|
10
10
|
|
|
11
11
|
contract PendlePoolDeployHelper is TokenHelper {
|
|
12
12
|
address public immutable router;
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
pragma solidity ^0.8.17;
|
|
3
|
+
|
|
4
|
+
import "../../core/libraries/TokenHelper.sol";
|
|
5
|
+
import "../../interfaces/IPAllActionV3.sol";
|
|
6
|
+
import "../../interfaces/IPMarketFactoryV3.sol";
|
|
7
|
+
import "../../interfaces/IPYieldContractFactory.sol";
|
|
8
|
+
import "../../interfaces/IPMarketV3.sol";
|
|
9
|
+
import "./lib/MarketDeployLib.sol";
|
|
10
|
+
|
|
11
|
+
contract PendlePoolDeployHelperV2 is TokenHelper {
|
|
12
|
+
using PMath for uint256;
|
|
13
|
+
using PMath for int256;
|
|
14
|
+
|
|
15
|
+
struct PoolDeploymentParams {
|
|
16
|
+
uint32 expiry;
|
|
17
|
+
uint80 lnFeeRateRoot;
|
|
18
|
+
int256 scalarRoot;
|
|
19
|
+
int256 initialRateAnchor;
|
|
20
|
+
bool doCacheIndexSameBlock;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
struct PoolDeploymentAddrs {
|
|
24
|
+
address SY;
|
|
25
|
+
address PT;
|
|
26
|
+
address YT;
|
|
27
|
+
address market;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
struct PoolConfig {
|
|
31
|
+
uint32 expiry;
|
|
32
|
+
uint256 rateMin;
|
|
33
|
+
uint256 rateMax;
|
|
34
|
+
uint256 desiredImpliedRate;
|
|
35
|
+
uint256 fee;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
event MarketDeployment(PoolDeploymentAddrs addrs, PoolDeploymentParams params);
|
|
39
|
+
|
|
40
|
+
// solhint-disable immutable-vars-naming
|
|
41
|
+
address public immutable router;
|
|
42
|
+
address public immutable yieldContractFactory;
|
|
43
|
+
address public immutable marketFactory;
|
|
44
|
+
bool public immutable doCacheIndexSameBlock;
|
|
45
|
+
|
|
46
|
+
constructor(address _router, address _yieldContractFactory, address _marketFactory) {
|
|
47
|
+
doCacheIndexSameBlock = block.chainid == 1;
|
|
48
|
+
router = _router;
|
|
49
|
+
yieldContractFactory = _yieldContractFactory;
|
|
50
|
+
marketFactory = _marketFactory;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function deploy5115MarketAndSeedLiquidity(
|
|
54
|
+
address SY,
|
|
55
|
+
PoolConfig memory config,
|
|
56
|
+
address tokenToSeedLiqudity,
|
|
57
|
+
uint256 amountToSeed
|
|
58
|
+
) public payable returns (PoolDeploymentAddrs memory) {
|
|
59
|
+
(PoolDeploymentParams memory params, PoolDeploymentAddrs memory addrs) = _deployPYAndMarket(SY, config);
|
|
60
|
+
_seedLiquidity(params, addrs, tokenToSeedLiqudity, amountToSeed, config.desiredImpliedRate);
|
|
61
|
+
return addrs;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function _deployPYAndMarket(
|
|
65
|
+
address SY,
|
|
66
|
+
PoolConfig memory config
|
|
67
|
+
) internal returns (PoolDeploymentParams memory params, PoolDeploymentAddrs memory addrs) {
|
|
68
|
+
(uint256 scalarRoot, uint256 initialRateAnchor) = MarketDeployLib.calcParams(
|
|
69
|
+
config.rateMin,
|
|
70
|
+
config.rateMax,
|
|
71
|
+
config.expiry
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
params = PoolDeploymentParams({
|
|
75
|
+
expiry: config.expiry,
|
|
76
|
+
lnFeeRateRoot: MarketDeployLib.calcFee(config.fee),
|
|
77
|
+
scalarRoot: scalarRoot.Int(),
|
|
78
|
+
initialRateAnchor: initialRateAnchor.Int(),
|
|
79
|
+
doCacheIndexSameBlock: doCacheIndexSameBlock
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
addrs.SY = SY;
|
|
83
|
+
(addrs.PT, addrs.YT) = IPYieldContractFactory(yieldContractFactory).createYieldContract(
|
|
84
|
+
SY,
|
|
85
|
+
params.expiry,
|
|
86
|
+
params.doCacheIndexSameBlock
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
addrs.market = IPMarketFactoryV3(marketFactory).createNewMarket(
|
|
90
|
+
addrs.PT,
|
|
91
|
+
params.scalarRoot,
|
|
92
|
+
params.initialRateAnchor,
|
|
93
|
+
params.lnFeeRateRoot
|
|
94
|
+
);
|
|
95
|
+
|
|
96
|
+
emit MarketDeployment(addrs, params);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function _seedLiquidity(
|
|
100
|
+
PoolDeploymentParams memory params,
|
|
101
|
+
PoolDeploymentAddrs memory addrs,
|
|
102
|
+
address token,
|
|
103
|
+
uint256 amountToSeed,
|
|
104
|
+
uint256 desiredImpliedRate
|
|
105
|
+
) internal {
|
|
106
|
+
_transferIn(token, msg.sender, amountToSeed);
|
|
107
|
+
|
|
108
|
+
// Approval
|
|
109
|
+
_safeApproveInf(token, router);
|
|
110
|
+
if (token != addrs.SY) {
|
|
111
|
+
_safeApproveInf(addrs.SY, router);
|
|
112
|
+
}
|
|
113
|
+
_safeApproveInf(addrs.PT, router);
|
|
114
|
+
|
|
115
|
+
// Mint SY
|
|
116
|
+
uint256 amountSY;
|
|
117
|
+
if (token != addrs.SY) {
|
|
118
|
+
uint256 netNative = (token == NATIVE ? amountToSeed : 0);
|
|
119
|
+
amountSY = IPAllActionV3(router).mintSyFromToken{value: netNative}(
|
|
120
|
+
address(this),
|
|
121
|
+
addrs.SY,
|
|
122
|
+
0,
|
|
123
|
+
TokenInput({
|
|
124
|
+
tokenIn: token,
|
|
125
|
+
netTokenIn: amountToSeed,
|
|
126
|
+
tokenMintSy: token,
|
|
127
|
+
pendleSwap: address(0),
|
|
128
|
+
swapData: SwapData({
|
|
129
|
+
swapType: SwapType.NONE,
|
|
130
|
+
extRouter: address(0),
|
|
131
|
+
extCalldata: abi.encode(),
|
|
132
|
+
needScale: false
|
|
133
|
+
})
|
|
134
|
+
})
|
|
135
|
+
);
|
|
136
|
+
} else {
|
|
137
|
+
amountSY = amountToSeed;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
uint256 initialProportion = MarketDeployLib.calcInitialProportion(
|
|
141
|
+
params.expiry,
|
|
142
|
+
params.scalarRoot.Uint(),
|
|
143
|
+
params.initialRateAnchor.Uint(),
|
|
144
|
+
desiredImpliedRate
|
|
145
|
+
);
|
|
146
|
+
|
|
147
|
+
// mint PY
|
|
148
|
+
uint256 amountPY = IPAllActionV3(router).mintPyFromSy(
|
|
149
|
+
address(this),
|
|
150
|
+
addrs.YT,
|
|
151
|
+
amountSY.mulDown(initialProportion),
|
|
152
|
+
0
|
|
153
|
+
);
|
|
154
|
+
|
|
155
|
+
// mint LP
|
|
156
|
+
IPAllActionV3(router).addLiquidityDualSyAndPt(msg.sender, addrs.market, _selfBalance(addrs.SY), amountPY, 0);
|
|
157
|
+
_transferOut(addrs.YT, msg.sender, amountPY);
|
|
158
|
+
}
|
|
159
|
+
}
|