@pendle/core-v2 6.2.2-beta → 6.2.2-sweed
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol/PendleMsgReceiveEndpointUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol/PendleMsgReceiveEndpointUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiverAppUpg.sol/PendleMsgReceiverAppUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol/PendleMsgSendEndpointUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol/PendleMsgSendEndpointUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSenderAppUpg.sol/PendleMsgSenderAppUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/ExcessivelySafeCall.sol/ExcessivelySafeCall.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol/LayerZeroHelper.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.json +13 -0
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.json +20 -2
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.json +20 -2
- package/build/artifacts/contracts/LiquidityMining/PendleMerkleDistributor.sol/PendleMerkleDistributor.dbg.json +1 -1
- 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 +6 -24
- package/build/artifacts/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol/VotingEscrowTokenBase.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/libraries/WeekMath.sol/WeekMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.json +2 -2
- package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.json +2 -2
- package/build/artifacts/contracts/core/Market/PendleGauge.sol/PendleGauge.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleGauge.sol/PendleGauge.json +19 -0
- package/build/artifacts/contracts/core/Market/PendleMarketFactoryV6Upg.sol/PendleMarketFactoryV6Upg.dbg.json +4 -0
- package/build/artifacts/contracts/core/Market/PendleMarketFactoryV6Upg.sol/PendleMarketFactoryV6Upg.json +636 -0
- package/build/artifacts/contracts/core/Market/PendleMarketV6.sol/PendleMarketV6.dbg.json +4 -0
- package/build/artifacts/contracts/core/Market/PendleMarketV6.sol/PendleMarketV6.json +1181 -0
- 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/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 +28 -2
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactoryUpg.sol/PendleYieldContractFactoryUpg.dbg.json +4 -0
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactoryUpg.sol/PendleYieldContractFactoryUpg.json +608 -0
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.json +28 -2
- package/build/artifacts/contracts/core/erc20/PendleERC20.sol/PendleERC20.dbg.json +1 -1
- package/build/artifacts/contracts/core/erc20/PendleERC20.sol/PendleERC20.json +15 -2
- package/build/artifacts/contracts/core/libraries/ArrayLib.sol/ArrayLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/BaseSplitCodeFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/CodeDeployer.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeableV2.sol/BoringOwnableUpgradeableData.dbg.json +1 -1
- 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 +27 -2
- package/build/artifacts/contracts/core/libraries/ExpiryUtilsLib.sol/ExpiryUtils.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/MiniHelpers.sol/MiniHelpers.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/StringLib.sol/StringLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/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/PMath.sol/PMath.dbg.json +1 -1
- package/build/artifacts/contracts/cross-chain/FixedPricePTAMM.sol/FixedPricePTAMM.dbg.json +1 -1
- package/build/artifacts/contracts/cross-chain/factory/hub/PendlePTOFTAdapterFactory.sol/PendlePTOFTAdapterFactory.dbg.json +1 -1
- package/build/artifacts/contracts/cross-chain/oftImpl/hub/OFTAdapterImpl.sol/OFTAdapterImpl.dbg.json +1 -1
- package/build/artifacts/contracts/cross-chain/oftImpl/spoke/PendleBridgedPrincipalToken.sol/PendleBridgedPrincipalToken.dbg.json +1 -1
- 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 +1 -1
- package/build/artifacts/contracts/interfaces/ILayerZeroEndpoint.sol/ILayerZeroEndpoint.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ILayerZeroReceiver.sol/ILayerZeroReceiver.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IMarketSweed.sol/IMarketSweed.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IMarketSweed.sol/IMarketSweed.json +141 -0
- 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 +1 -1
- package/build/artifacts/contracts/interfaces/IPChainlinkOracle.sol/IPChainlinkOracle.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPChainlinkOracleEssential.sol/IPChainlinkOracleEssential.dbg.json +1 -1
- 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/IPExchangeRateOracleApp.sol/IPExchangeRateOracleApp.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPExchangeRateOracleApp.sol/IPExchangeRateOracleApp.json +282 -0
- 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 +1 -1
- package/build/artifacts/contracts/interfaces/IPFixedPricePTAMM.sol/IPFixedPricePTAMMSwapCallback.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPGauge.sol/IPGauge.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPGauge.sol/IPGauge.json +19 -0
- 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/IPLimitRouterCallback.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.json +58 -0
- package/build/artifacts/contracts/interfaces/IPMarketFactory.sol/IPMarketFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarketFactory.sol/IPMarketFactory.json +81 -19
- package/build/artifacts/contracts/interfaces/IPMarketSwapCallback.sol/IPMarketSwapCallback.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 +1 -1
- 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/IPPrincipalToken.sol/IPPrincipalToken.json +26 -0
- 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/IPVotingEscrowMainchain.sol/IPVotingEscrowMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPYieldContractFactory.sol/IPYieldContractFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPYieldContractFactory.sol/IPYieldContractFactory.json +13 -0
- package/build/artifacts/contracts/interfaces/IPYieldToken.sol/IPYieldToken.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPYieldToken.sol/IPYieldToken.json +26 -0
- 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/PendleLimitRouter.sol/PendleLimitRouter.dbg.json +1 -1
- package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.json +2 -2
- package/build/artifacts/contracts/limit/helpers/NonceManager.sol/NonceManager.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AddressProvider.sol/AddressProvider.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/AutomateReady.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/IAutomate.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/IOpsProxyFactory.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/ITaskTreasuryUpgradable.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/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/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/EmptyUUPS.sol/EmptyUUPS.dbg.json +1 -1
- 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/StarNFTV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/LimitBackendHelperV2.sol/LimitBackendHelperV2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/LimitBackendHelperV2.sol/LimitBackendHelperV2.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/MarketSweed.sol/MarketSweed.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/MarketSweed.sol/MarketSweed.json +333 -0
- package/build/artifacts/contracts/offchain-helpers/Multicall2.sol/Multicall2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleExchangeRateOracle.sol/PendleExchangeRateOracle.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleGovernanceProxy.sol/PendleGovernanceProxy.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleLPWrapper.sol/PendleLPWrapper.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleLPWrapper.sol/PendleLPWrapper.json +15 -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/PendleMulticallV1.sol/PendleMulticallV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallV2.sol/PendleMulticallV2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleOffchainStorage.sol/PendleOffchainStorage.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleWstETHPriceFeed.sol/PendleWstETHPriceFeed.dbg.json +1 -1
- 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/deploy/PendleCommonPoolDeployHelperV2.sol/PendleCommonPoolDeployHelperV2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonPoolDeployHelperV2.sol/PendleCommonPoolDeployHelperV2.json +7 -2
- package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonSYFactory.sol/PendleCommonSYFactory.dbg.json +1 -1
- 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/errors/SDKErrorsDirectory.sol/SDKErrorsDirectory.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/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/CrossChainOracle/base/PendleCrossChainOracleBaseApp_Init.sol/PendleCrossChainOracleBaseApp_Init.dbg.json +4 -0
- package/build/artifacts/contracts/oracles/CrossChainOracle/base/PendleCrossChainOracleBaseApp_Init.sol/PendleCrossChainOracleBaseApp_Init.json +533 -0
- package/build/artifacts/contracts/oracles/CrossChainOracle/exchangeRate/PendleExchangeRateOracleApp.sol/PendleExchangeRateOracleApp.dbg.json +4 -0
- package/build/artifacts/contracts/oracles/CrossChainOracle/exchangeRate/PendleExchangeRateOracleApp.sol/PendleExchangeRateOracleApp.json +889 -0
- package/build/artifacts/contracts/oracles/CrossChainOracle/exchangeRate/PendleExchangeRateOracleV2.sol/PendleExchangeRateOracleV2.dbg.json +4 -0
- package/build/artifacts/contracts/oracles/CrossChainOracle/exchangeRate/PendleExchangeRateOracleV2.sol/PendleExchangeRateOracleV2.json +84 -0
- package/build/artifacts/contracts/oracles/CrossChainOracle/libraries/ExchangeRateMsgCodec.sol/ExchangeRateMsgCodec.dbg.json +4 -0
- package/build/artifacts/contracts/oracles/CrossChainOracle/libraries/ExchangeRateMsgCodec.sol/ExchangeRateMsgCodec.json +24 -0
- 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/StatelessWrapper/PendleLinearDiscountOracleWrapper.sol/PendleLinearDiscountOracleWrapper.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/StatelessWrapper/PendleSparkLinearDiscountOracleFactoryWrapper.sol/PendleSparkLinearDiscountOracleFactoryWrapper.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/StatelessWrapper/PendleSparkLinearDiscountOracleFactoryWrapper.sol/PendleSparkLinearDiscountOracleFactoryWrapper.json +2 -2
- package/build/artifacts/contracts/oracles/internal/PendleBoringOneracle.sol/PendleBoringOneracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleBoringSolvBTCOneracle.sol/PendleBoringSolvBTCOneracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleLpLinearDiscountOracle.sol/LPExpiry.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleLpLinearDiscountOracle.sol/PendleLpLinearDiscountOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleLpLinearDiscountOracleFactory.sol/PendleLpLinearDiscountOracleFactory.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleRedStoneRateOracleAdapter.sol/PendleRedStoneRateOracleAdapter.dbg.json +1 -1
- 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/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 +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/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 +2 -2
- 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/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/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol +6 -2
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol +12 -2
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol +9 -1
- package/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol +10 -14
- package/contracts/core/Market/PendleGauge.sol +2 -0
- package/contracts/core/Market/{v3/PendleMarketFactoryV3.sol → PendleMarketFactoryV6Upg.sol} +18 -14
- package/contracts/core/Market/{v3/PendleMarketV3.sol → PendleMarketV6.sol} +48 -13
- package/contracts/core/YieldContracts/PendlePrincipalToken.sol +6 -0
- package/contracts/core/YieldContracts/{PendleYieldContractFactory.sol → PendleYieldContractFactoryUpg.sol} +10 -13
- package/contracts/core/YieldContracts/PendleYieldToken.sol +6 -0
- package/contracts/core/erc20/PendleERC20.sol +12 -0
- package/contracts/core/libraries/Errors.sol +7 -0
- package/contracts/core/libraries/StringLib.sol +12 -0
- package/contracts/interfaces/IMarketSweed.sol +23 -0
- package/contracts/interfaces/IPExchangeRateOracleApp.sol +86 -0
- package/contracts/interfaces/IPGauge.sol +4 -3
- package/contracts/interfaces/IPMarket.sol +8 -2
- package/contracts/interfaces/IPMarketFactory.sol +22 -10
- package/contracts/interfaces/IPPrincipalToken.sol +4 -0
- package/contracts/interfaces/IPYieldContractFactory.sol +2 -0
- package/contracts/interfaces/IPYieldToken.sol +4 -0
- package/contracts/offchain-helpers/MarketSweed.sol +239 -0
- package/contracts/offchain-helpers/deploy/PendleCommonPoolDeployHelperV2.sol +10 -10
- package/contracts/offchain-helpers/deploy/PendlePoolDeployHelper.sol +6 -6
- package/contracts/offchain-helpers/deploy/PendlePoolDeployHelperV2.sol +3 -3
- package/contracts/oracles/CrossChainOracle/base/PendleCrossChainOracleBaseApp_Init.sol +23 -0
- package/contracts/oracles/CrossChainOracle/exchangeRate/PendleExchangeRateOracleApp.sol +160 -0
- package/contracts/oracles/CrossChainOracle/exchangeRate/PendleExchangeRateOracleV2.sol +25 -0
- package/contracts/oracles/CrossChainOracle/libraries/ExchangeRateMsgCodec.sol +36 -0
- package/contracts/oracles/PtYtLpOracle/PendleLpOracleLib.sol +9 -0
- package/package.json +3 -2
- package/typechain-types/ExchangeRateMsgCodec.ts +89 -0
- package/typechain-types/IMarketSweed.ts +203 -0
- package/typechain-types/IPExchangeRateOracleApp.ts +352 -0
- package/typechain-types/IPGauge.ts +19 -0
- package/typechain-types/IPMarket.ts +76 -0
- package/typechain-types/IPMarketFactory.ts +146 -46
- package/typechain-types/IPPrincipalToken.ts +34 -0
- package/typechain-types/IPYieldContractFactory.ts +13 -0
- package/typechain-types/IPYieldToken.ts +34 -0
- package/typechain-types/LimitMathCore.ts +102 -0
- package/typechain-types/MarketSweed.ts +255 -0
- package/typechain-types/{PendleFeeSetter.ts → OAppCoreUpgradeable.ts} +123 -140
- package/typechain-types/OAppOptionsType3Upgradeable.ts +319 -0
- package/typechain-types/OAppReceiverUpgradeable.ts +498 -0
- package/typechain-types/OAppSenderUpgradeable.ts +320 -0
- package/typechain-types/OAppUpgradeable.ts +498 -0
- package/typechain-types/OwnableUpgradeable.ts +174 -0
- package/typechain-types/PendleCommonPoolDeployHelperV2.ts +7 -1
- package/typechain-types/PendleCrossChainOracleBaseApp_Init.ts +662 -0
- package/typechain-types/PendleERC20.ts +21 -0
- package/typechain-types/PendleExchangeRateOracleApp.ts +1012 -0
- package/typechain-types/PendleExchangeRateOracleV2.ts +142 -0
- package/typechain-types/PendleGauge.ts +19 -0
- package/typechain-types/PendleGaugeControllerBaseUpg.ts +19 -0
- package/typechain-types/PendleGaugeControllerMainchainUpg.ts +19 -0
- package/typechain-types/PendleGaugeControllerSidechainUpg.ts +19 -0
- package/typechain-types/PendleLPWrapper.ts +21 -0
- package/typechain-types/PendleMarketFactoryV6Upg.ts +773 -0
- package/typechain-types/PendleMarketV6.ts +1248 -0
- package/typechain-types/PendlePrincipalToken.ts +34 -0
- package/typechain-types/PendleVotingControllerUpg.ts +18 -48
- package/typechain-types/PendleYieldContractFactoryUpg.ts +820 -0
- package/typechain-types/PendleYieldToken.ts +34 -0
- package/typechain-types/factories/ActionAddRemoveLiqV3__factory.ts +1 -1
- package/typechain-types/factories/ActionCallbackV3__factory.ts +1 -1
- package/typechain-types/factories/ActionDelegateBase__factory.ts +1 -1
- 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/BalanceReader__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/Errors__factory.ts +26 -1
- package/typechain-types/factories/ExchangeRateMsgCodec__factory.ts +81 -0
- package/typechain-types/factories/ExpiredLpPtRedeemer__factory.ts +1 -1
- package/typechain-types/factories/{IPActionCrossChain__factory.ts → IMarketSweed__factory.ts} +61 -22
- package/typechain-types/factories/IPExchangeRateOracleApp__factory.ts +301 -0
- package/typechain-types/factories/IPGauge__factory.ts +19 -0
- package/typechain-types/factories/IPMarketFactory__factory.ts +81 -19
- package/typechain-types/factories/IPMarket__factory.ts +58 -0
- package/typechain-types/factories/IPPrincipalToken__factory.ts +26 -0
- package/typechain-types/factories/IPYieldContractFactory__factory.ts +13 -0
- package/typechain-types/factories/IPYieldToken__factory.ts +26 -0
- package/typechain-types/factories/LimitBackendHelperV2__factory.ts +1 -1
- package/typechain-types/factories/LimitMathCore__factory.ts +87 -0
- package/typechain-types/factories/MarketSweed__factory.ts +385 -0
- package/typechain-types/factories/OAppCoreUpgradeable__factory.ts +228 -0
- package/typechain-types/factories/OAppOptionsType3Upgradeable__factory.ts +219 -0
- package/typechain-types/factories/OAppReceiverUpgradeable__factory.ts +399 -0
- package/typechain-types/factories/OAppSenderUpgradeable__factory.ts +248 -0
- package/typechain-types/factories/OAppUpgradeable__factory.ts +411 -0
- package/typechain-types/factories/OracleLib__factory.ts +1 -1
- package/typechain-types/factories/OwnableUpgradeable__factory.ts +91 -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 +6 -1
- package/typechain-types/factories/PendleCrossChainOracleBaseApp_Init__factory.ts +554 -0
- package/typechain-types/factories/PendleERC20__factory.ts +14 -1
- package/typechain-types/factories/PendleExchangeRateOracleApp__factory.ts +958 -0
- package/typechain-types/factories/PendleExchangeRateOracleV2__factory.ts +165 -0
- package/typechain-types/factories/PendleFeeDistributorV2__factory.ts +1 -1
- package/typechain-types/factories/PendleFeeDistributor__factory.ts +1 -1
- package/typechain-types/factories/PendleGaugeControllerBaseUpg__factory.ts +13 -0
- package/typechain-types/factories/PendleGaugeControllerMainchainUpg__factory.ts +23 -1
- package/typechain-types/factories/PendleGaugeControllerSidechainUpg__factory.ts +23 -1
- package/typechain-types/factories/PendleGauge__factory.ts +19 -0
- package/typechain-types/factories/PendleLPWrapperFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleLPWrapper__factory.ts +14 -1
- package/typechain-types/factories/PendleLimitRouter__factory.ts +1 -1
- package/typechain-types/factories/PendleMarketFactoryV6Upg__factory.ts +732 -0
- package/typechain-types/factories/PendleMarketV6__factory.ts +1261 -0
- 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/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 +27 -1
- package/typechain-types/factories/PendleRouterStatic__factory.ts +1 -1
- package/typechain-types/factories/PendleRouterV4__factory.ts +1 -1
- package/typechain-types/factories/PendleSparkLinearDiscountOracleFactoryWrapper__factory.ts +1 -1
- package/typechain-types/factories/PendleSparkLinearDiscountOracleFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleVotingControllerUpg__factory.ts +5 -23
- package/typechain-types/factories/PendleYieldContractFactoryUpg__factory.ts +692 -0
- package/typechain-types/factories/PendleYieldToken__factory.ts +27 -1
- package/typechain-types/factories/Reflector__factory.ts +1 -1
- package/typechain-types/factories/SimulateHelper__factory.ts +1 -1
- package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +1 -1
- package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +1 -1
- package/typechain-types/hardhat.d.ts +144 -0
- package/typechain-types/index.ts +32 -0
- package/build/artifacts/contracts/core/Market/v3/PendleMarketFactoryV3.sol/PendleMarketFactoryV3.dbg.json +0 -4
- package/build/artifacts/contracts/core/Market/v3/PendleMarketFactoryV3.sol/PendleMarketFactoryV3.json +0 -610
- package/build/artifacts/contracts/core/Market/v3/PendleMarketV3.sol/PendleMarketV3.dbg.json +0 -4
- package/build/artifacts/contracts/core/Market/v3/PendleMarketV3.sol/PendleMarketV3.json +0 -1131
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.dbg.json +0 -4
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.json +0 -590
- package/build/artifacts/contracts/core/erc20/PendleERC20Permit.sol/PendleERC20Permit.dbg.json +0 -4
- package/build/artifacts/contracts/core/erc20/PendleERC20Permit.sol/PendleERC20Permit.json +0 -394
- package/build/artifacts/contracts/core/erc20/PendleERC20PermitUpg.sol/PendleERC20PermitUpg.dbg.json +0 -4
- package/build/artifacts/contracts/core/erc20/PendleERC20PermitUpg.sol/PendleERC20PermitUpg.json +0 -370
- package/build/artifacts/contracts/core/erc20/PendleERC20Upg.sol/PendleERC20Upg.dbg.json +0 -4
- package/build/artifacts/contracts/core/erc20/PendleERC20Upg.sol/PendleERC20Upg.json +0 -246
- package/build/artifacts/contracts/interfaces/IPMarketFactoryV3.sol/IPMarketFactoryV3.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IPMarketFactoryV3.sol/IPMarketFactoryV3.json +0 -202
- package/build/artifacts/contracts/interfaces/IPMarketV3.sol/IPMarketV3.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IPMarketV3.sol/IPMarketV3.json +0 -833
- package/contracts/core/erc20/PendleERC20Permit.sol +0 -80
- package/contracts/core/erc20/PendleERC20PermitUpg.sol +0 -82
- package/contracts/core/erc20/PendleERC20Upg.sol +0 -334
- package/contracts/interfaces/IPMarketFactoryV3.sol +0 -33
- package/contracts/interfaces/IPMarketV3.sol +0 -8
- package/typechain-types/ActionCrossChain.ts +0 -161
- package/typechain-types/BasePendleBridgedPrincipalToken.ts +0 -1689
- package/typechain-types/IPActionCrossChain.ts +0 -161
- package/typechain-types/LimitBackendHelper.ts +0 -287
- package/typechain-types/PendleBridgedPrincipalToken_18Decimals.ts +0 -1689
- package/typechain-types/PendleBridgedPrincipalToken_6Decimals.ts +0 -1689
- package/typechain-types/PendleBridgedPrincipalToken_8Decimals.ts +0 -1689
- package/typechain-types/factories/ActionCrossChain__factory.ts +0 -152
- package/typechain-types/factories/BasePendleBridgedPrincipalToken__factory.ts +0 -1548
- package/typechain-types/factories/LimitBackendHelper__factory.ts +0 -232
- package/typechain-types/factories/PendleBridgedPrincipalToken_18Decimals__factory.ts +0 -1652
- package/typechain-types/factories/PendleBridgedPrincipalToken_6Decimals__factory.ts +0 -1650
- package/typechain-types/factories/PendleBridgedPrincipalToken_8Decimals__factory.ts +0 -1650
- package/typechain-types/factories/PendleFeeSetter__factory.ts +0 -257
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity ^0.8.0;
|
|
3
|
+
|
|
4
|
+
import "./IPAllActionV3.sol";
|
|
5
|
+
|
|
6
|
+
interface IMarketSweed {
|
|
7
|
+
struct ApproxSweedParams {
|
|
8
|
+
uint256 targetLnImpliedRate;
|
|
9
|
+
uint256 eps;
|
|
10
|
+
uint256 maxPtToSwap;
|
|
11
|
+
int256 guessOffchain;
|
|
12
|
+
uint256 maxIteration;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function seedAtImpliedRate(
|
|
16
|
+
address receiver,
|
|
17
|
+
address market,
|
|
18
|
+
uint256 minLpOut,
|
|
19
|
+
uint256 minYtOut,
|
|
20
|
+
TokenInput calldata input,
|
|
21
|
+
ApproxSweedParams calldata sweedParams
|
|
22
|
+
) external payable returns (uint256 netLpOut, uint256 netYtOut, int256 guessedAmountPtToSwap);
|
|
23
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
pragma solidity ^0.8.0;
|
|
3
|
+
|
|
4
|
+
import {MessagingFee, MessagingReceipt} from "@layerzerolabs/oapp-evm-upgradeable/contracts/oapp/OAppUpgradeable.sol";
|
|
5
|
+
|
|
6
|
+
interface IPExchangeRateOracleApp {
|
|
7
|
+
event ExchangeRateSent(
|
|
8
|
+
bytes32 indexed guid,
|
|
9
|
+
uint32 indexed dstEid,
|
|
10
|
+
address indexed exchangeRateSource,
|
|
11
|
+
uint256 exchangeRate
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
event ExchangeRateReceived(
|
|
15
|
+
bytes32 indexed guid,
|
|
16
|
+
uint32 indexed srcEid,
|
|
17
|
+
bytes32 indexed exchangeRateSource,
|
|
18
|
+
uint256 exchangeRate,
|
|
19
|
+
uint256 updatedAt,
|
|
20
|
+
bool rateAccepted
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
event AllowedSenderSet(address indexed sender);
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @dev Parameters for the send operation
|
|
27
|
+
* @param exchangeRateSource The address of the exchange rate source
|
|
28
|
+
* @param dstEid Destination endpoint ID
|
|
29
|
+
* @param extraOptions Additional LayerZero message options (e.g. gas limit configuration)
|
|
30
|
+
*/
|
|
31
|
+
struct SendExchangeRateParam {
|
|
32
|
+
address exchangeRateSource;
|
|
33
|
+
uint32 dstEid;
|
|
34
|
+
bytes extraOptions;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @dev Exchange rate data with timestamp information
|
|
39
|
+
* @param exchangeRate The exchange rate value
|
|
40
|
+
* @param updatedAt Timestamp when the exchange rate was last updated
|
|
41
|
+
*/
|
|
42
|
+
struct ExchangeRateData {
|
|
43
|
+
uint256 exchangeRate;
|
|
44
|
+
uint256 updatedAt;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @dev Retrieves exchange rate from a data source on the specified chain
|
|
49
|
+
* @param _srcEid Endpoint ID of the source chain
|
|
50
|
+
* @param exchangeRateSource The exchange rate source identifier on the source chain
|
|
51
|
+
*/
|
|
52
|
+
function getExchangeRate(
|
|
53
|
+
uint32 _srcEid,
|
|
54
|
+
bytes32 exchangeRateSource
|
|
55
|
+
) external view returns (ExchangeRateData memory exchangeRateData);
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* @dev Quote the fee required for sendExchangeRate execution
|
|
59
|
+
* @param sendParam The parameters required for the sendExchangeRate execution operation
|
|
60
|
+
* @param payInLzToken Flag indicating whether the caller is paying in the LZ token
|
|
61
|
+
* @return fee The fee need to pay for sendExchangeRate operation request
|
|
62
|
+
* - nativeFee: the fee paid in native token
|
|
63
|
+
* - lzTokenFee: the fee paid in lzToken
|
|
64
|
+
*/
|
|
65
|
+
function quoteSendExchangeRate(
|
|
66
|
+
SendExchangeRateParam calldata sendParam,
|
|
67
|
+
bool payInLzToken
|
|
68
|
+
) external view returns (MessagingFee memory fee);
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* @dev Execute sending exchange rate to another chain
|
|
72
|
+
* @param sendParam The parameters required for the operation
|
|
73
|
+
* @param fee The calculated fee for the operation. This can be retrieved through quoteSendExchangeRate() for estimation
|
|
74
|
+
* - nativeFee: the fee paid in native token
|
|
75
|
+
* - lzTokenFee: the fee paid in lzToken
|
|
76
|
+
* @return receipt The message receipt for the send operation, contains guid, nonce and the actual fee required
|
|
77
|
+
*/
|
|
78
|
+
function sendExchangeRate(
|
|
79
|
+
SendExchangeRateParam calldata sendParam,
|
|
80
|
+
MessagingFee calldata fee
|
|
81
|
+
) external payable returns (MessagingReceipt memory receipt);
|
|
82
|
+
|
|
83
|
+
// ====== Admin functions ======
|
|
84
|
+
|
|
85
|
+
function setAllowedSender(address _allowedSender) external;
|
|
86
|
+
}
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
pragma solidity ^0.8.0;
|
|
3
3
|
|
|
4
4
|
interface IPGauge {
|
|
5
|
+
event RedeemRewards(address indexed user, uint256[] rewardsOut);
|
|
6
|
+
|
|
7
|
+
event UpdateActiveBalance(address indexed user, uint256 newActiveBalance);
|
|
8
|
+
|
|
5
9
|
function totalActiveSupply() external view returns (uint256);
|
|
6
10
|
|
|
7
11
|
function activeBalance(address user) external view returns (uint256);
|
|
8
|
-
|
|
9
|
-
// only available for newer factories. please check the verified contracts
|
|
10
|
-
event RedeemRewards(address indexed user, uint256[] rewardsOut);
|
|
11
12
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
2
|
pragma solidity ^0.8.0;
|
|
3
3
|
|
|
4
|
-
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
|
|
4
|
+
// import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
|
|
5
5
|
import "./IPPrincipalToken.sol";
|
|
6
6
|
import "./IPYieldToken.sol";
|
|
7
7
|
import "./IStandardizedYield.sol";
|
|
8
8
|
import "./IPGauge.sol";
|
|
9
9
|
import "../core/Market/MarketMathCore.sol";
|
|
10
10
|
|
|
11
|
-
interface IPMarket is
|
|
11
|
+
interface IPMarket is IPGauge, IERC20Metadata {
|
|
12
12
|
event Mint(address indexed receiver, uint256 netLpMinted, uint256 netSyUsed, uint256 netPtUsed);
|
|
13
13
|
|
|
14
14
|
event Burn(
|
|
@@ -90,4 +90,10 @@ interface IPMarket is IERC20Metadata, IPGauge {
|
|
|
90
90
|
uint16 observationCardinality,
|
|
91
91
|
uint16 observationCardinalityNext
|
|
92
92
|
);
|
|
93
|
+
|
|
94
|
+
function getNonOverrideLnFeeRateRoot() external view returns (uint80);
|
|
95
|
+
|
|
96
|
+
function VERSION() external pure returns (uint256);
|
|
97
|
+
|
|
98
|
+
function reentrancyGuardEntered() external view returns (bool);
|
|
93
99
|
}
|
|
@@ -2,22 +2,34 @@
|
|
|
2
2
|
pragma solidity ^0.8.0;
|
|
3
3
|
|
|
4
4
|
interface IPMarketFactory {
|
|
5
|
-
|
|
6
|
-
uint80 lnFeeRateRoot;
|
|
7
|
-
uint8 reserveFeePercent;
|
|
8
|
-
bool active;
|
|
9
|
-
}
|
|
5
|
+
event SetOverriddenFee(address indexed router, address indexed market, uint80 lnFeeRateRoot);
|
|
10
6
|
|
|
11
|
-
event
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
event CreateNewMarket(
|
|
8
|
+
address indexed market,
|
|
9
|
+
address indexed PT,
|
|
10
|
+
int256 scalarRoot,
|
|
11
|
+
int256 initialAnchor,
|
|
12
|
+
uint256 lnFeeRateRoot
|
|
13
|
+
);
|
|
14
14
|
|
|
15
|
-
event
|
|
15
|
+
event NewTreasuryAndFeeReserve(address indexed treasury, uint8 reserveFeePercent);
|
|
16
|
+
|
|
17
|
+
function VERSION() external pure returns (uint256);
|
|
16
18
|
|
|
17
19
|
function isValidMarket(address market) external view returns (bool);
|
|
18
20
|
|
|
19
21
|
// If this is changed, change the readState function in market as well
|
|
20
22
|
function getMarketConfig(
|
|
23
|
+
address market,
|
|
21
24
|
address router
|
|
22
|
-
) external view returns (address treasury, uint80
|
|
25
|
+
) external view returns (address treasury, uint80 overriddenFee, uint8 reserveFeePercent);
|
|
26
|
+
|
|
27
|
+
function createNewMarket(
|
|
28
|
+
address PT,
|
|
29
|
+
int256 scalarRoot,
|
|
30
|
+
int256 initialAnchor,
|
|
31
|
+
uint80 lnFeeRateRoot
|
|
32
|
+
) external returns (address market);
|
|
33
|
+
|
|
34
|
+
function setOverriddenFee(address router, address market, uint80 newFee) external;
|
|
23
35
|
}
|
|
@@ -18,4 +18,8 @@ interface IPPrincipalToken is IERC20Metadata {
|
|
|
18
18
|
function expiry() external view returns (uint256);
|
|
19
19
|
|
|
20
20
|
function isExpired() external view returns (bool);
|
|
21
|
+
|
|
22
|
+
function VERSION() external pure returns (uint256);
|
|
23
|
+
|
|
24
|
+
function reentrancyGuardEntered() external view returns (bool);
|
|
21
25
|
}
|
|
@@ -34,6 +34,8 @@ interface IPYieldContractFactory {
|
|
|
34
34
|
|
|
35
35
|
event SetTreasury(address indexed treasury);
|
|
36
36
|
|
|
37
|
+
function VERSION() external pure returns (uint256);
|
|
38
|
+
|
|
37
39
|
function getPT(address SY, uint256 expiry) external view returns (address);
|
|
38
40
|
|
|
39
41
|
function getYT(address SY, uint256 expiry) external view returns (address);
|
|
@@ -59,4 +59,8 @@ interface IPYieldToken is IERC20Metadata, IRewardManager, IPInterestManagerYT {
|
|
|
59
59
|
function doCacheIndexSameBlock() external view returns (bool);
|
|
60
60
|
|
|
61
61
|
function pyIndexLastUpdatedBlock() external view returns (uint128);
|
|
62
|
+
|
|
63
|
+
function reentrancyGuardEntered() external view returns (bool);
|
|
64
|
+
|
|
65
|
+
function VERSION() external pure returns (uint256);
|
|
62
66
|
}
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
|
|
3
|
+
pragma solidity ^0.8.17;
|
|
4
|
+
|
|
5
|
+
import "../interfaces/IPMarket.sol";
|
|
6
|
+
import "../router/math/MarketApproxLibOnchain.sol";
|
|
7
|
+
import "../router/base/ActionBase.sol";
|
|
8
|
+
import "../interfaces/IMarketSweed.sol";
|
|
9
|
+
|
|
10
|
+
contract MarketSweed is ActionBase, IMarketSweed {
|
|
11
|
+
using PMath for uint256;
|
|
12
|
+
using PMath for int256;
|
|
13
|
+
using PYIndexLib for PYIndex;
|
|
14
|
+
using MarketMathCore for MarketState;
|
|
15
|
+
using PYIndexLib for IPYieldToken;
|
|
16
|
+
|
|
17
|
+
address public immutable router;
|
|
18
|
+
|
|
19
|
+
struct MarketTokens {
|
|
20
|
+
IStandardizedYield SY;
|
|
21
|
+
IPPrincipalToken PT;
|
|
22
|
+
IPYieldToken YT;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
constructor(address _router) {
|
|
26
|
+
router = _router;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function seedAtImpliedRate(
|
|
30
|
+
address receiver,
|
|
31
|
+
address market,
|
|
32
|
+
uint256 minLpOut,
|
|
33
|
+
uint256 minYtOut,
|
|
34
|
+
TokenInput calldata input,
|
|
35
|
+
ApproxSweedParams calldata sweedParams
|
|
36
|
+
) external payable returns (uint256 netLpOut, uint256 netYtOut, int256 guessedAmountPtToSwap) {
|
|
37
|
+
MarketTokens memory tokens;
|
|
38
|
+
(tokens.SY, tokens.PT, tokens.YT) = IPMarket(market).readTokens();
|
|
39
|
+
|
|
40
|
+
_mintSyFromToken(address(this), address(tokens.SY), 1, input);
|
|
41
|
+
|
|
42
|
+
uint256 netPtOut;
|
|
43
|
+
(netPtOut, netYtOut, guessedAmountPtToSwap) = _swap(receiver, market, tokens, sweedParams);
|
|
44
|
+
|
|
45
|
+
uint256 netYtFromSeed;
|
|
46
|
+
(netLpOut, netYtFromSeed, ) = _seed(receiver, market, tokens.SY, tokens.YT, _selfBalance(tokens.SY), netPtOut);
|
|
47
|
+
netYtOut += netYtFromSeed;
|
|
48
|
+
|
|
49
|
+
if (netLpOut < minLpOut) revert("Slippage: INSUFFICIENT_LP_OUT");
|
|
50
|
+
if (netYtOut < minYtOut) revert("Slippage: INSUFFICIENT_YT_OUT");
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function mintPYFromToken__noCall(
|
|
54
|
+
address YT,
|
|
55
|
+
TokenInput calldata input
|
|
56
|
+
) external payable returns (uint256 netPYOut) {
|
|
57
|
+
address SY = IPYieldToken(YT).SY();
|
|
58
|
+
_mintSyFromToken(YT, SY, 1, input);
|
|
59
|
+
netPYOut = IPYieldToken(YT).mintPY(msg.sender, msg.sender);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function _seed(
|
|
63
|
+
address receiver,
|
|
64
|
+
address market,
|
|
65
|
+
IStandardizedYield SY,
|
|
66
|
+
IPYieldToken YT,
|
|
67
|
+
uint256 netSyIn,
|
|
68
|
+
uint256 netPtIn
|
|
69
|
+
) internal returns (uint256 netLpOut, uint256 netYtOut, uint256 netSyMintPy) {
|
|
70
|
+
MarketState memory state = _readMarket(market);
|
|
71
|
+
|
|
72
|
+
uint256 netSyDual = 0;
|
|
73
|
+
if (netPtIn > 0) {
|
|
74
|
+
/** Add dual SY + PT */
|
|
75
|
+
uint256 netPtDual;
|
|
76
|
+
(, , netSyDual, netPtDual) = _readMarket(market).addLiquidity(netSyIn, netPtIn, block.timestamp);
|
|
77
|
+
if (netPtIn > netPtDual || netSyDual == netSyIn) {
|
|
78
|
+
revert("MS: Bought too much PT");
|
|
79
|
+
}
|
|
80
|
+
netSyIn -= netSyDual;
|
|
81
|
+
_transferOut(YT.PT(), market, netPtDual);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
PYIndex pyIndex = YT.newIndex();
|
|
85
|
+
netSyMintPy =
|
|
86
|
+
(netSyIn * state.totalPt.Uint()) /
|
|
87
|
+
(state.totalPt.Uint() + pyIndex.syToAsset(state.totalSy.Uint()));
|
|
88
|
+
|
|
89
|
+
uint256 netSyAddLiquidity = netSyIn - netSyMintPy;
|
|
90
|
+
|
|
91
|
+
// transfer SY to mint PY
|
|
92
|
+
_transferOut(address(SY), address(YT), netSyMintPy);
|
|
93
|
+
|
|
94
|
+
// PT goes to market, YT goes to receiver
|
|
95
|
+
netYtOut = YT.mintPY(market, receiver);
|
|
96
|
+
|
|
97
|
+
// the rest of SY goes to market
|
|
98
|
+
_transferOut(address(SY), market, netSyAddLiquidity + netSyDual);
|
|
99
|
+
|
|
100
|
+
(netLpOut, , ) = IPMarket(market).mint(receiver, netSyAddLiquidity, netYtOut);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function _swap(
|
|
104
|
+
address receiver,
|
|
105
|
+
address market,
|
|
106
|
+
MarketTokens memory tokens,
|
|
107
|
+
ApproxSweedParams memory sweedParams
|
|
108
|
+
) internal returns (uint256 amountPtToAccount, uint256 amountYTToAccount, int256 guessedSwap) {
|
|
109
|
+
PYIndex index = _getPYIndex(market);
|
|
110
|
+
MarketState memory state = _readMarket(market);
|
|
111
|
+
MarketPreCompute memory comp = state.getMarketPreCompute(index, block.timestamp);
|
|
112
|
+
|
|
113
|
+
if (state.lastLnImpliedRate > sweedParams.targetLnImpliedRate) {
|
|
114
|
+
// Normalize maxPtToSwap
|
|
115
|
+
sweedParams.maxPtToSwap = PMath.min(
|
|
116
|
+
sweedParams.maxPtToSwap,
|
|
117
|
+
MarketApproxPtOutLibOnchain.calcMaxPtOut(comp, state.totalPt)
|
|
118
|
+
);
|
|
119
|
+
|
|
120
|
+
int256 amountSyToAccount;
|
|
121
|
+
|
|
122
|
+
(guessedSwap, amountSyToAccount) = _calcAmountPtToBuy(state, index, sweedParams);
|
|
123
|
+
amountPtToAccount = guessedSwap.Uint();
|
|
124
|
+
|
|
125
|
+
_transferOut(address(tokens.SY), market, amountSyToAccount.abs());
|
|
126
|
+
IPMarket(market).swapSyForExactPt(address(this), guessedSwap.abs(), EMPTY_BYTES);
|
|
127
|
+
} else {
|
|
128
|
+
// Normalize maxPtToSwap
|
|
129
|
+
sweedParams.maxPtToSwap = PMath.min(
|
|
130
|
+
sweedParams.maxPtToSwap,
|
|
131
|
+
MarketApproxPtInLibOnchain.calcSoftMaxPtIn(state, comp)
|
|
132
|
+
);
|
|
133
|
+
|
|
134
|
+
guessedSwap = _calcAmountPtToSell(state, index, sweedParams);
|
|
135
|
+
|
|
136
|
+
uint256 amountPtToSell = guessedSwap.abs();
|
|
137
|
+
amountYTToAccount = amountPtToSell;
|
|
138
|
+
|
|
139
|
+
_transferOut(address(tokens.SY), address(tokens.YT), index.assetToSyUp(amountPtToSell));
|
|
140
|
+
uint256 amountPYOut = tokens.YT.mintPY(market, receiver);
|
|
141
|
+
|
|
142
|
+
assert(amountPYOut >= amountPtToSell);
|
|
143
|
+
|
|
144
|
+
// this amount of SY will be used to add liquidity in later step
|
|
145
|
+
IPMarket(market).swapExactPtForSy(address(this), amountPtToSell, EMPTY_BYTES);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
function _calcAmountPtToBuy(
|
|
150
|
+
MarketState memory state,
|
|
151
|
+
PYIndex index,
|
|
152
|
+
ApproxSweedParams memory sweedParams
|
|
153
|
+
) internal view returns (int256 amountPtToSwapToAccount, int256 amountSyToAccount) {
|
|
154
|
+
int256 refAmt = sweedParams.maxPtToSwap.Int();
|
|
155
|
+
int256 accPtToAccount = 0;
|
|
156
|
+
|
|
157
|
+
for (uint256 iter = 0; iter < sweedParams.maxIteration; ++iter) {
|
|
158
|
+
int256 guess;
|
|
159
|
+
if (iter == 0 && _isValidGuessOffchain(sweedParams, true)) {
|
|
160
|
+
guess = sweedParams.guessOffchain;
|
|
161
|
+
} else {
|
|
162
|
+
refAmt /= 2;
|
|
163
|
+
guess = accPtToAccount + refAmt;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
MarketState memory localState = _deepCopy(state);
|
|
167
|
+
|
|
168
|
+
// // Will not revert. maxPtToBuy should already be normalized
|
|
169
|
+
(int256 localAmountSyToAccount, , ) = localState.executeTradeCore(index, guess, block.timestamp);
|
|
170
|
+
|
|
171
|
+
if (PMath.isAApproxB(localState.lastLnImpliedRate, sweedParams.targetLnImpliedRate, sweedParams.eps)) {
|
|
172
|
+
return (guess, localAmountSyToAccount);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
if (localState.lastLnImpliedRate > sweedParams.targetLnImpliedRate) {
|
|
176
|
+
accPtToAccount += refAmt;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
revert("_calcAmountPtToBuy: failed");
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
function _calcAmountPtToSell(
|
|
183
|
+
MarketState memory state,
|
|
184
|
+
PYIndex index,
|
|
185
|
+
ApproxSweedParams memory sweedParams
|
|
186
|
+
) internal view returns (int256 amountPtToSwapToAccount) {
|
|
187
|
+
int256 refAmt = sweedParams.maxPtToSwap.Int();
|
|
188
|
+
int256 accPtToAccount = 0;
|
|
189
|
+
|
|
190
|
+
for (uint256 iter = 0; iter < sweedParams.maxIteration; ++iter) {
|
|
191
|
+
int256 guess;
|
|
192
|
+
if (iter == 0 && _isValidGuessOffchain(sweedParams, false)) {
|
|
193
|
+
guess = sweedParams.guessOffchain;
|
|
194
|
+
} else {
|
|
195
|
+
refAmt /= 2;
|
|
196
|
+
guess = accPtToAccount - refAmt;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
MarketState memory localState = _deepCopy(state);
|
|
200
|
+
|
|
201
|
+
// Will not revert. maxPtToSell should already be normalized
|
|
202
|
+
localState.executeTradeCore(index, guess, block.timestamp);
|
|
203
|
+
|
|
204
|
+
if (PMath.isAApproxB(localState.lastLnImpliedRate, sweedParams.targetLnImpliedRate, sweedParams.eps)) {
|
|
205
|
+
return guess;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
if (localState.lastLnImpliedRate < sweedParams.targetLnImpliedRate) {
|
|
209
|
+
accPtToAccount -= refAmt;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
revert("_calcAmountPtToSell: failed");
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
function _getPYIndex(address market) internal returns (PYIndex) {
|
|
216
|
+
(, , IPYieldToken YT) = IPMarket(market).readTokens();
|
|
217
|
+
return PYIndex.wrap(YT.pyIndexCurrent());
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
function _deepCopy(MarketState memory state) internal pure returns (MarketState memory copiedState) {
|
|
221
|
+
copiedState.totalPt = state.totalPt;
|
|
222
|
+
copiedState.totalSy = state.totalSy;
|
|
223
|
+
copiedState.totalLp = state.totalLp;
|
|
224
|
+
copiedState.treasury = state.treasury;
|
|
225
|
+
|
|
226
|
+
copiedState.scalarRoot = state.scalarRoot;
|
|
227
|
+
copiedState.expiry = state.expiry;
|
|
228
|
+
|
|
229
|
+
copiedState.lnFeeRateRoot = state.lnFeeRateRoot;
|
|
230
|
+
copiedState.reserveFeePercent = state.reserveFeePercent;
|
|
231
|
+
copiedState.lastLnImpliedRate = state.lastLnImpliedRate;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
function _isValidGuessOffchain(ApproxSweedParams memory sweedParams, bool isBuyingPt) internal pure returns (bool) {
|
|
235
|
+
if (sweedParams.guessOffchain == 0) return false;
|
|
236
|
+
if (isBuyingPt != (sweedParams.guessOffchain > 0)) return false;
|
|
237
|
+
return sweedParams.guessOffchain.abs() <= sweedParams.maxPtToSwap;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
@@ -7,15 +7,14 @@ import "../../interfaces/IOwnable.sol";
|
|
|
7
7
|
import "../../core/libraries/BoringOwnableUpgradeableV2.sol";
|
|
8
8
|
|
|
9
9
|
contract PendleCommonPoolDeployHelperV2 is PendlePoolDeployHelperV2, BoringOwnableUpgradeableV2 {
|
|
10
|
-
|
|
11
|
-
bytes32 public constant
|
|
12
|
-
bytes32 public constant
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
bytes32 public constant
|
|
16
|
-
bytes32 public constant
|
|
17
|
-
bytes32 public constant
|
|
18
|
-
bytes32 public constant ERC4626_NO_DEPOSIT_NO_REDEEM = keccak256("PendleERC4626NoRedeemNoDepositUpgSY"); // 0x5c1cddc0128e0b02bb711f84a022bf1c13177d4ab028830b702f3a77280025ea
|
|
10
|
+
bytes32 public constant ERC4626_DEPLOY_ID = keccak256("PendleERC4626SYV2"); // 0x1278efc0e6754cd30fef2df25ff5ced072ebb194d348b0b1b9548166d24352ef
|
|
11
|
+
bytes32 public constant ERC4626_NOT_REDEEMABLE_DEPLOY_ID = keccak256("PendleERC4626NotRedeemableToAssetSYV2"); // 0x6f089cd4afdd945c5c26b3f4542d0c294d19ec0e339c6ce4f8eafa94d700d05d
|
|
12
|
+
bytes32 public constant ERC20_DEPLOY_ID = keccak256("PendleERC20SY"); // 0xfcf22a9a515753d83e4f2a81cf368c7226408c64f52411ae95241ebf5ed53304
|
|
13
|
+
|
|
14
|
+
bytes32 public constant ERC4626_WITH_ADAPTER_ID = keccak256("PendleERC4626WithAdapterSY"); // 0x73f41560741d6765943d3c955034291fe23d9141e3a4719bc97422d5bf019adc
|
|
15
|
+
bytes32 public constant ERC4626_NO_REDEEM_WITH_ADAPTER_ID = keccak256("PendleERC4626NoRedeemWithAdapterSY"); // 0x3b8dd2b992f773444e5422ba1db289c4657c57110d740dca7975dc095632ef23
|
|
16
|
+
bytes32 public constant ERC20_WITH_ADAPTER_ID = keccak256("PendleERC20WithAdapterSY"); // 0xe5cce2b1999bf8c2cc4cf6d96d0569a24d8b782ba1647c09a8e1aa8bbfb98996
|
|
17
|
+
bytes32 public constant ERC4626_NO_DEPOSIT_NO_REDEEM = keccak256("PendleERC4626NoRedeemNoDepositUpgSY"); // 0x5c1cddc0128e0b02bb711f84a022bf1c13177d4ab028830b702f3a77280025ea
|
|
19
18
|
|
|
20
19
|
address public immutable syFactory;
|
|
21
20
|
|
|
@@ -36,12 +35,13 @@ contract PendleCommonPoolDeployHelperV2 is PendlePoolDeployHelperV2, BoringOwnab
|
|
|
36
35
|
function deployCommonMarketById(
|
|
37
36
|
bytes32 id,
|
|
38
37
|
bytes memory constructorParams,
|
|
38
|
+
bytes memory initData,
|
|
39
39
|
PoolConfig memory config,
|
|
40
40
|
address tokenToSeedLiqudity,
|
|
41
41
|
uint256 amountToSeed,
|
|
42
42
|
address syOwner
|
|
43
43
|
) external returns (PoolDeploymentAddrs memory) {
|
|
44
|
-
address SY = IPCommonSYFactory(syFactory).
|
|
44
|
+
address SY = IPCommonSYFactory(syFactory).deployUpgradableSY(id, constructorParams, initData, syOwner);
|
|
45
45
|
return deploy5115MarketAndSeedLiquidity(SY, config, tokenToSeedLiqudity, amountToSeed);
|
|
46
46
|
}
|
|
47
47
|
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
pragma solidity ^0.8.17;
|
|
3
3
|
|
|
4
4
|
import "../../interfaces/IPAllActionV3.sol";
|
|
5
|
-
import "../../interfaces/
|
|
5
|
+
import "../../interfaces/IPMarketFactory.sol";
|
|
6
6
|
import "../../interfaces/IPYieldContractFactory.sol";
|
|
7
|
-
import "../../interfaces/
|
|
7
|
+
import "../../interfaces/IPMarket.sol";
|
|
8
8
|
// import "../core/StandardizedYield/implementations/PendleERC4626SY.sol";
|
|
9
9
|
import "../../core/libraries/TokenHelper.sol";
|
|
10
10
|
|
|
@@ -53,7 +53,7 @@ contract PendlePoolDeployHelper is TokenHelper {
|
|
|
53
53
|
params.expiry,
|
|
54
54
|
params.doCacheIndexSameBlock
|
|
55
55
|
);
|
|
56
|
-
market =
|
|
56
|
+
market = IPMarketFactory(marketFactory).createNewMarket(
|
|
57
57
|
PT,
|
|
58
58
|
params.scalarRoot,
|
|
59
59
|
params.initialRateAnchor,
|
|
@@ -120,15 +120,15 @@ contract PendlePoolDeployHelper is TokenHelper {
|
|
|
120
120
|
int256 initialRateAnchor
|
|
121
121
|
) external returns (address newMarket) {
|
|
122
122
|
(, IPPrincipalToken PT, ) = IPMarket(oldMarket).readTokens();
|
|
123
|
-
newMarket =
|
|
123
|
+
newMarket = IPMarketFactory(marketFactory).createNewMarket(
|
|
124
124
|
address(PT),
|
|
125
125
|
scalarRoot,
|
|
126
126
|
initialRateAnchor,
|
|
127
127
|
lnFeeRateRoot
|
|
128
128
|
);
|
|
129
129
|
_transferFrom(IERC20(oldMarket), msg.sender, oldMarket, amountLp);
|
|
130
|
-
(uint256 netSyOut, uint256 netPtOut) =
|
|
131
|
-
|
|
130
|
+
(uint256 netSyOut, uint256 netPtOut) = IPMarket(oldMarket).burn(newMarket, newMarket, amountLp);
|
|
131
|
+
IPMarket(newMarket).mint(msg.sender, netSyOut, netPtOut);
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
receive() external payable {}
|
|
@@ -3,9 +3,9 @@ pragma solidity ^0.8.17;
|
|
|
3
3
|
|
|
4
4
|
import "../../core/libraries/TokenHelper.sol";
|
|
5
5
|
import "../../interfaces/IPAllActionV3.sol";
|
|
6
|
-
import "../../interfaces/
|
|
6
|
+
import "../../interfaces/IPMarketFactory.sol";
|
|
7
7
|
import "../../interfaces/IPYieldContractFactory.sol";
|
|
8
|
-
import "../../interfaces/
|
|
8
|
+
import "../../interfaces/IPMarket.sol";
|
|
9
9
|
import "./lib/MarketDeployLib.sol";
|
|
10
10
|
|
|
11
11
|
contract PendlePoolDeployHelperV2 is TokenHelper {
|
|
@@ -82,7 +82,7 @@ contract PendlePoolDeployHelperV2 is TokenHelper {
|
|
|
82
82
|
addrs.SY = SY;
|
|
83
83
|
(addrs.PT, addrs.YT) = _createPYIfNotExist(SY, params.expiry);
|
|
84
84
|
|
|
85
|
-
addrs.market =
|
|
85
|
+
addrs.market = IPMarketFactory(marketFactory).createNewMarket(
|
|
86
86
|
addrs.PT,
|
|
87
87
|
params.scalarRoot,
|
|
88
88
|
params.initialRateAnchor,
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
pragma solidity ^0.8.0;
|
|
3
|
+
|
|
4
|
+
import {OAppUpgradeable, Origin, MessagingFee, MessagingReceipt} from "@layerzerolabs/oapp-evm-upgradeable/contracts/oapp/OAppUpgradeable.sol";
|
|
5
|
+
import {OAppOptionsType3Upgradeable} from "@layerzerolabs/oapp-evm-upgradeable/contracts/oapp/libs/OAppOptionsType3Upgradeable.sol";
|
|
6
|
+
|
|
7
|
+
abstract contract PendleCrossChainOracleBaseApp_Init is OAppUpgradeable, OAppOptionsType3Upgradeable {
|
|
8
|
+
address payable public immutable refundAddress;
|
|
9
|
+
|
|
10
|
+
uint256[100] private __gap;
|
|
11
|
+
|
|
12
|
+
constructor(address _endpoint, address payable _refundAddress) OAppUpgradeable(_endpoint) {
|
|
13
|
+
refundAddress = _refundAddress;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function __PendleCrossChainOracleBaseApp_initialize(
|
|
17
|
+
address _owner,
|
|
18
|
+
address _delegate
|
|
19
|
+
) internal virtual onlyInitializing {
|
|
20
|
+
__OApp_init(_delegate);
|
|
21
|
+
_transferOwnership(_owner);
|
|
22
|
+
}
|
|
23
|
+
}
|