@pendle/core-v2 6.3.1-sweedtest → 6.3.2-pendle-merkle-transfer
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol/PendleMsgReceiveEndpointUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol/PendleMsgReceiveEndpointUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiverAppUpg.sol/PendleMsgReceiverAppUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol/PendleMsgSendEndpointUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol/PendleMsgSendEndpointUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSenderAppUpg.sol/PendleMsgSenderAppUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/ExcessivelySafeCall.sol/ExcessivelySafeCall.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/ExcessivelySafeCall.sol/ExcessivelySafeCall.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol/LayerZeroHelper.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol/LayerZeroHelper.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/PendleMerkleDistributor.sol/PendleMerkleDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/PendleMerkleDistributor.sol/PendleMerkleDistributor.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/PendleMultiTokenMerkleDistributor.sol/PendleMultiTokenMerkleDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/PendleMultiTokenMerkleDistributor.sol/PendleMultiTokenMerkleDistributor.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol/VotingEscrowTokenBase.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/libraries/WeekMath.sol/WeekMath.dbg.json +1 -1
- package/build/artifacts/contracts/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/PendleMarketFactoryV6Upg.sol/PendleMarketFactoryV6Upg.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarketFactoryV6Upg.sol/PendleMarketFactoryV6Upg.json +2 -2
- package/build/artifacts/contracts/core/Market/PendleMarketV6.sol/PendleMarketV6.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarketV6.sol/PendleMarketV6.json +2 -2
- package/build/artifacts/contracts/core/RewardManager/RewardManager.sol/RewardManager.dbg.json +1 -1
- package/build/artifacts/contracts/core/RewardManager/RewardManagerAbstract.sol/RewardManagerAbstract.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/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 +2 -2
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactoryUpg.sol/PendleYieldContractFactoryUpg.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactoryUpg.sol/PendleYieldContractFactoryUpg.json +2 -2
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.json +2 -2
- package/build/artifacts/contracts/core/erc20/PendleERC20.sol/PendleERC20.dbg.json +1 -1
- package/build/artifacts/contracts/core/erc20/PendleERC20.sol/PendleERC20.json +2 -2
- package/build/artifacts/contracts/core/libraries/ArrayLib.sol/ArrayLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/ArrayLib.sol/ArrayLib.json +2 -2
- package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/BaseSplitCodeFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/BaseSplitCodeFactory.json +2 -2
- package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/CodeDeployer.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/CodeDeployer.json +2 -2
- package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeableV2.sol/BoringOwnableUpgradeableData.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeableV2.sol/BoringOwnableUpgradeableData.json +2 -2
- package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeableV2.sol/BoringOwnableUpgradeableV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.json +2 -2
- package/build/artifacts/contracts/core/libraries/ExpiryUtilsLib.sol/ExpiryUtils.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/ExpiryUtilsLib.sol/ExpiryUtils.json +2 -2
- package/build/artifacts/contracts/core/libraries/MiniHelpers.sol/MiniHelpers.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/StringLib.sol/StringLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/StringLib.sol/StringLib.json +2 -2
- package/build/artifacts/contracts/core/libraries/TokenHelper.sol/TokenHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/math/LogExpMath.sol/LogExpMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/math/LogExpMath.sol/LogExpMath.json +2 -2
- package/build/artifacts/contracts/core/libraries/math/PMath.sol/PMath.dbg.json +1 -1
- package/build/artifacts/contracts/cross-chain/FixedPricePTAMM.sol/FixedPricePTAMM.dbg.json +1 -1
- package/build/artifacts/contracts/cross-chain/FixedPricePTAMM.sol/FixedPricePTAMM.json +2 -2
- package/build/artifacts/contracts/cross-chain/factory/hub/PendlePTOFTAdapterFactory.sol/PendlePTOFTAdapterFactory.dbg.json +1 -1
- package/build/artifacts/contracts/cross-chain/factory/hub/PendlePTOFTAdapterFactory.sol/PendlePTOFTAdapterFactory.json +2 -2
- 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/cross-chain/oftImpl/spoke/PendleBridgedPrincipalToken.sol/PendleBridgedPrincipalToken.json +2 -2
- 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/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 +1 -1
- package/build/artifacts/contracts/interfaces/IPFeeDistributor.sol/IPFeeDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPFeeDistributorV2.sol/IPFeeDistributorV2.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPFixedPricePTAMM.sol/IPFixedPricePTAMM.dbg.json +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/IPGaugeController.sol/IPGaugeController.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPGaugeControllerMainchain.sol/IPGaugeControllerMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPGovernanceProxy.sol/IPGovernanceProxy.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPInterestManagerYT.sol/IPInterestManagerYT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPInterestManagerYTV2.sol/IPInterestManagerYTV2.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPLPWrapperFactory.sol/IPLPWrapperFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitOrderType.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouter.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouter.json +0 -42
- 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 +0 -13
- package/build/artifacts/contracts/interfaces/IPMarketFactory.sol/IPMarketFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarketSwapCallback.sol/IPMarketSwapCallback.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/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/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/IPYieldToken.sol/IPYieldToken.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPYieldTokenV2.sol/IPYieldTokenV2.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IRedstonePriceFeed.sol/IRedstonePriceFeed.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IRewardManager.sol/IRewardManager.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IStandardizedYield.sol/IStandardizedYield.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IWETH.sol/IWETH.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IWstETH.sol/IWstETH.dbg.json +1 -1
- package/build/artifacts/contracts/limit/LimitMathCore.sol/LimitMathCore.dbg.json +1 -1
- package/build/artifacts/contracts/limit/LimitMathCore.sol/LimitMathCore.json +2 -2
- package/build/artifacts/contracts/limit/LimitRouterBase.sol/LimitRouterBase.dbg.json +1 -1
- package/build/artifacts/contracts/limit/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/AddressProvider.sol/AddressProvider.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/AutomateReady.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/IAutomate.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/IOpsProxyFactory.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/ITaskTreasuryUpgradable.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BalanceReader.sol/BalanceReader.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BalanceReader.sol/BalanceReader.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol/BaseSplitCodeFactoryContract.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol/BaseSplitCodeFactoryContract.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/BytesLib.sol/BytesLib.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BytesLib.sol/BytesLib.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/EmptyUUPS.sol/EmptyUUPS.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/EmptyUUPS.sol/EmptyUUPS.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/ExpiredLpPtRedeemer.sol/ExpiredLpPtRedeemer.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/ExpiredLpPtRedeemer.sol/ExpiredLpPtRedeemer.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/LegacyNFTHelper.sol/LegacyNFTHelper.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/LegacyNFTHelper.sol/LegacyNFTHelper.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/LegacyNFTHelper.sol/StarNFTV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/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/Multicall2.sol/Multicall2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/Multicall2.sol/Multicall2.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleExchangeRateOracle.sol/PendleExchangeRateOracle.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleExchangeRateOracle.sol/PendleExchangeRateOracle.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleGovernanceProxy.sol/PendleGovernanceProxy.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleGovernanceProxy.sol/PendleGovernanceProxy.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleLPWrapper.sol/PendleLPWrapper.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleLPWrapper.sol/PendleLPWrapper.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleLPWrapperFactory.sol/PendleLPWrapperFactory.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleLPWrapperFactory.sol/PendleLPWrapperFactory.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleMerkleDepositor.sol/PendleMerkleDepositor.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/PendleMerkleDepositor.sol/PendleMerkleDepositor.json +102 -0
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallOwnerV1.sol/PendleMulticallOwnerV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallOwnerV1.sol/PendleMulticallOwnerV1.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallV1.sol/PendleMulticallV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallV1.sol/PendleMulticallV1.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallV2.sol/PendleMulticallV2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallV2.sol/PendleMulticallV2.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleOffchainStorage.sol/PendleOffchainStorage.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleOffchainStorage.sol/PendleOffchainStorage.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleWstETHPriceFeed.sol/PendleWstETHPriceFeed.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleWstETHPriceFeed.sol/PendleWstETHPriceFeed.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/SimulateHelper.sol/SimulateHelper.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/SimulateHelper.sol/SimulateHelper.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/SupplyCapReader.sol/IPossibleSupplyCapInterface.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/SupplyCapReader.sol/SupplyCapReader.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonPoolDeployHelperV2.sol/PendleCommonPoolDeployHelperV2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonPoolDeployHelperV2.sol/PendleCommonPoolDeployHelperV2.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonSYFactory.sol/PendleCommonSYFactory.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonSYFactory.sol/PendleCommonSYFactory.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelper.sol/PendlePoolDeployHelper.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelper.sol/PendlePoolDeployHelper.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelperV2.sol/PendlePoolDeployHelperV2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelperV2.sol/PendlePoolDeployHelperV2.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/deploy/lib/MarketDeployLib.sol/MarketDeployLib.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/deploy/lib/MarketDeployLib.sol/MarketDeployLib.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/errors/SDKErrorsDirectory.sol/SDKErrorsDirectory.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/errors/SDKErrorsDirectory.sol/SDKErrorsDirectory.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol/MarketApproxPtInLibV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol/MarketApproxPtInLibV1.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol/MarketApproxPtOutLibV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol/MarketApproxPtOutLibV1.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/StorageLayout.sol/StorageLayout.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/CrossChainOracle/base/PendleCrossChainOracleBaseApp_Init.sol/PendleCrossChainOracleBaseApp_Init.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/CrossChainOracle/exchangeRate/PendleExchangeRateOracleApp.sol/PendleExchangeRateOracleApp.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/CrossChainOracle/exchangeRate/PendleExchangeRateOracleApp.sol/PendleExchangeRateOracleApp.json +2 -2
- package/build/artifacts/contracts/oracles/CrossChainOracle/exchangeRate/PendleExchangeRateOracleV2.sol/PendleExchangeRateOracleV2.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/CrossChainOracle/exchangeRate/PendleExchangeRateOracleV2.sol/PendleExchangeRateOracleV2.json +2 -2
- package/build/artifacts/contracts/oracles/CrossChainOracle/libraries/ExchangeRateMsgCodec.sol/ExchangeRateMsgCodec.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/CrossChainOracle/libraries/ExchangeRateMsgCodec.sol/ExchangeRateMsgCodec.json +2 -2
- 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/IOKXDexRouter.json +0 -171
- package/build/artifacts/contracts/router/swap-aggregator/OKXScaleHelper.sol/OKXScaleHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/ParaswapScaleHelper.sol/IAugustusV6.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/ParaswapScaleHelper.sol/ParaswapScaleHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/ParaswapScaleHelper.sol/ParaswapScaleHelper.json +2 -2
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/IKyberScalingHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/IOdosRouterV2.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwap.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwap.json +2 -2
- package/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol +17 -15
- package/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiverAppUpg.sol +1 -1
- package/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol +16 -14
- package/contracts/LiquidityMining/CrossChainMsg/PendleMsgSenderAppUpg.sol +3 -2
- package/contracts/LiquidityMining/CrossChainMsg/libraries/ExcessivelySafeCall.sol +12 -9
- package/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol +12 -12
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol +10 -8
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol +12 -6
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol +11 -4
- package/contracts/LiquidityMining/PendleMerkleDistributor.sol +13 -11
- package/contracts/LiquidityMining/PendleMultiTokenMerkleDistributor.sol +22 -17
- package/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol +28 -21
- package/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol +27 -31
- package/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol +23 -19
- package/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol +8 -7
- package/contracts/LiquidityMining/libraries/VeBalanceLib.sol +5 -6
- package/contracts/core/Market/MarketMathCore.sol +112 -78
- package/contracts/core/Market/OracleLib.sol +41 -34
- package/contracts/core/Market/PendleGauge.sol +8 -8
- package/contracts/core/Market/PendleMarketFactoryV6Upg.sol +16 -19
- package/contracts/core/Market/PendleMarketV6.sol +65 -63
- package/contracts/core/RewardManager/RewardManager.sol +8 -8
- package/contracts/core/RewardManager/RewardManagerAbstract.sol +5 -6
- package/contracts/core/StandardizedYield/PYIndex.sol +2 -2
- package/contracts/core/YieldContracts/InterestManagerYT.sol +9 -8
- package/contracts/core/YieldContracts/PendlePrincipalToken.sol +8 -4
- package/contracts/core/YieldContracts/PendleYieldContractFactoryUpg.sol +12 -15
- package/contracts/core/YieldContracts/PendleYieldToken.sol +41 -54
- package/contracts/core/erc20/PendleERC20.sol +6 -9
- package/contracts/core/libraries/ArrayLib.sol +13 -11
- package/contracts/core/libraries/BaseSplitCodeFactory.sol +29 -22
- package/contracts/core/libraries/BoringOwnableUpgradeableV2.sol +1 -2
- package/contracts/core/libraries/Errors.sol +4 -1
- package/contracts/core/libraries/ExpiryUtilsLib.sol +10 -10
- package/contracts/core/libraries/StringLib.sol +13 -13
- package/contracts/core/libraries/TokenHelper.sol +3 -3
- package/contracts/core/libraries/math/LogExpMath.sol +67 -77
- package/contracts/cross-chain/FixedPricePTAMM.sol +39 -38
- package/contracts/cross-chain/factory/hub/PendlePTOFTAdapterFactory.sol +1 -1
- package/contracts/cross-chain/oftImpl/spoke/PendleBridgedPrincipalToken.sol +1 -1
- package/contracts/deprecated/VeDistributor/PendleFeeDistributor.sol +12 -15
- package/contracts/deprecated/VeDistributor/PendleFeeDistributorV2.sol +24 -21
- package/contracts/interfaces/ILayerZeroEndpoint.sol +3 -5
- package/contracts/interfaces/IPActionCallbackV3.sol +1 -1
- package/contracts/interfaces/IPActionInfoStatic.sol +3 -1
- package/contracts/interfaces/IPActionMarketAuxStatic.sol +15 -11
- package/contracts/interfaces/IPActionMarketCoreStatic.sol +109 -58
- package/contracts/interfaces/IPActionMintRedeemStatic.sol +26 -21
- package/contracts/interfaces/IPActionMiscV3.sol +44 -24
- package/contracts/interfaces/IPActionSimple.sol +43 -24
- package/contracts/interfaces/IPActionVePendleStatic.sol +5 -4
- package/contracts/interfaces/IPAllActionTypeV3.sol +16 -14
- package/contracts/interfaces/IPAllActionV3.sol +4 -4
- package/contracts/interfaces/IPAllEventsV3.sol +21 -5
- package/contracts/interfaces/IPBridgedPrincipalToken.sol +2 -2
- package/contracts/interfaces/IPCommonSYFactory.sol +6 -3
- package/contracts/interfaces/IPExchangeRateOracleApp.sol +26 -25
- package/contracts/interfaces/IPFeeDistributorV2.sol +16 -13
- package/contracts/interfaces/IPFixedPricePTAMM.sol +34 -22
- package/contracts/interfaces/IPGovernanceProxy.sol +6 -2
- package/contracts/interfaces/IPInterestManagerYTV2.sol +3 -4
- package/contracts/interfaces/IPLimitRouter.sol +16 -16
- package/contracts/interfaces/IPMarket.sol +35 -25
- package/contracts/interfaces/IPMarketFactory.sol +16 -9
- package/contracts/interfaces/IPMerkleDistributor.sol +10 -6
- package/contracts/interfaces/IPMsgSendEndpoint.sol +12 -7
- package/contracts/interfaces/IPMultiTokenMerkleDistributor.sol +12 -6
- package/contracts/interfaces/IPPYLpOracle.sol +4 -1
- package/contracts/interfaces/IPRouterStatic.sol +3 -3
- package/contracts/interfaces/IPVotingController.sol +4 -4
- package/contracts/interfaces/IPVotingEscrowMainchain.sol +1 -1
- package/contracts/interfaces/IPYieldContractFactory.sol +5 -3
- package/contracts/interfaces/IPYieldToken.sol +11 -8
- package/contracts/interfaces/IPYieldTokenV2.sol +11 -8
- package/contracts/interfaces/IStandardizedYield.sol +17 -16
- package/contracts/limit/LimitMathCore.sol +56 -38
- package/contracts/limit/LimitRouterBase.sol +88 -66
- package/contracts/limit/PendleLimitRouter.sol +7 -11
- package/contracts/offchain-helpers/AddressProvider.sol +1 -1
- package/contracts/offchain-helpers/AutomateReady.sol +2 -2
- package/contracts/offchain-helpers/BalanceReader.sol +9 -21
- package/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol +7 -5
- package/contracts/offchain-helpers/Broadcaster.sol +3 -3
- package/contracts/offchain-helpers/BytesLib.sol +5 -3
- package/contracts/offchain-helpers/EmptyUUPS.sol +2 -2
- package/contracts/offchain-helpers/ExpiredLpPtRedeemer.sol +8 -5
- package/contracts/offchain-helpers/LegacyNFTHelper.sol +5 -1
- package/contracts/offchain-helpers/LimitBackendHelperV2.sol +12 -12
- package/contracts/offchain-helpers/Multicall2.sol +7 -9
- package/contracts/offchain-helpers/PendleExchangeRateOracle.sol +8 -4
- package/contracts/offchain-helpers/PendleGovernanceProxy.sol +10 -7
- package/contracts/offchain-helpers/PendleLPWrapper.sol +3 -12
- package/contracts/offchain-helpers/PendleLPWrapperFactory.sol +2 -2
- package/contracts/offchain-helpers/PendleMerkleDepositor.sol +64 -0
- package/contracts/offchain-helpers/PendleMulticallV1.sol +7 -7
- package/contracts/offchain-helpers/PendleMulticallV2.sol +12 -13
- package/contracts/offchain-helpers/PendleOffchainStorage.sol +1 -1
- package/contracts/offchain-helpers/PendleWstETHPriceFeed.sol +2 -4
- package/contracts/offchain-helpers/SimulateHelper.sol +6 -7
- package/contracts/offchain-helpers/deploy/PendleCommonPoolDeployHelperV2.sol +32 -13
- package/contracts/offchain-helpers/deploy/PendleCommonSYFactory.sol +11 -7
- package/contracts/offchain-helpers/deploy/PendlePoolDeployHelper.sol +35 -16
- package/contracts/offchain-helpers/deploy/PendlePoolDeployHelperV2.sol +35 -15
- package/contracts/offchain-helpers/deploy/lib/MarketDeployLib.sol +13 -12
- package/contracts/offchain-helpers/errors/SDKErrorsDirectory.sol +4 -1
- package/contracts/offchain-helpers/router-static/PendleRouterStatic.sol +1 -1
- package/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol +9 -12
- package/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol +91 -60
- package/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol +190 -103
- package/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol +26 -26
- package/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol +3 -3
- package/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol +10 -8
- package/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol +40 -100
- package/contracts/oracles/CrossChainOracle/base/PendleCrossChainOracleBaseApp_Init.sol +6 -14
- package/contracts/oracles/CrossChainOracle/exchangeRate/PendleExchangeRateOracleApp.sol +47 -55
- package/contracts/oracles/CrossChainOracle/exchangeRate/PendleExchangeRateOracleV2.sol +3 -2
- package/contracts/oracles/CrossChainOracle/libraries/ExchangeRateMsgCodec.sol +12 -12
- package/contracts/oracles/PtYtLpOracle/PendleLpOracleLib.sol +20 -17
- package/contracts/oracles/PtYtLpOracle/PendlePYLpOracle.sol +19 -15
- package/contracts/oracles/PtYtLpOracle/PendlePYOracleLib.sol +6 -7
- package/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracle.sol +9 -13
- package/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracleFactory.sol +21 -20
- package/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracleWithQuote.sol +7 -4
- package/contracts/oracles/PtYtLpOracle/samples/BoringLpSeller.sol +2 -2
- package/contracts/oracles/PtYtLpOracle/samples/BoringPYUsdChainlinkAssetOracle.sol +10 -13
- package/contracts/oracles/PtYtLpOracle/samples/BoringPYUsdChainlinkSYOracle.sol +10 -13
- package/contracts/oracles/PtYtLpOracle/samples/BoringPtSeller.sol +5 -6
- package/contracts/oracles/StatelessWrapper/PendleSparkLinearDiscountOracleFactoryWrapper.sol +1 -1
- package/contracts/oracles/internal/PendleSparkLinearDiscountOracleFactory.sol +3 -3
- package/contracts/router/ActionAddRemoveLiqV3.sol +150 -55
- package/contracts/router/ActionCallbackV3.sol +13 -20
- package/contracts/router/ActionMiscV3.sol +78 -54
- package/contracts/router/ActionSimple.sol +128 -76
- package/contracts/router/ActionSwapPTV3.sol +19 -7
- package/contracts/router/ActionSwapYTV3.sol +20 -8
- package/contracts/router/PendleRouterV4.sol +1 -1
- package/contracts/router/Reflector.sol +21 -15
- package/contracts/router/base/ActionBase.sol +105 -61
- package/contracts/router/base/ActionDelegateBase.sol +38 -39
- package/contracts/router/base/CallbackHelper.sol +19 -21
- package/contracts/router/math/ApproxStateLib.sol +28 -28
- package/contracts/router/math/MarketApproxEstimateLib.sol +13 -11
- package/contracts/router/math/MarketApproxLibOnchain.sol +24 -47
- package/contracts/router/math/MarketApproxLibV2.sol +44 -63
- package/contracts/router/swap-aggregator/OKXScaleHelper.sol +55 -191
- package/contracts/router/swap-aggregator/ParaswapScaleHelper.sol +48 -34
- package/contracts/router/swap-aggregator/PendleSwap.sol +28 -26
- package/deployments/1-core.json +3 -3
- package/deployments/1-offchain-helper.json +1 -2
- package/deployments/10-core.json +3 -3
- package/deployments/10-offchain-helper.json +1 -2
- package/deployments/146-core.json +3 -3
- package/deployments/146-offchain-helper.json +1 -2
- package/deployments/42161-core.json +3 -3
- package/deployments/42161-offchain-helper.json +1 -2
- package/deployments/5000-core.json +3 -3
- package/deployments/5000-offchain-helper.json +1 -2
- package/deployments/56-core.json +3 -3
- package/deployments/56-offchain-helper.json +1 -2
- package/deployments/80094-core.json +3 -3
- package/deployments/80094-offchain-helper.json +1 -2
- package/deployments/8453-core.json +3 -3
- package/deployments/8453-offchain-helper.json +1 -2
- package/deployments/9745-core.json +3 -3
- package/deployments/9745-offchain-helper.json +1 -2
- package/deployments/999-core.json +3 -3
- package/deployments/999-offchain-helper.json +1 -2
- package/package.json +5 -3
- package/typechain-types/ActionCrossChain.ts +161 -0
- package/typechain-types/BasePendleBridgedPrincipalToken.ts +1689 -0
- package/typechain-types/IOKXDexRouter.ts +0 -99
- package/typechain-types/IPActionCrossChain.ts +161 -0
- package/typechain-types/IPLimitRouter.ts +0 -69
- package/typechain-types/IPMarket.ts +0 -13
- package/typechain-types/LimitBackendHelper.ts +287 -0
- package/typechain-types/PendleBridgedPrincipalToken_18Decimals.ts +1689 -0
- package/typechain-types/PendleBridgedPrincipalToken_6Decimals.ts +1689 -0
- package/typechain-types/PendleBridgedPrincipalToken_8Decimals.ts +1689 -0
- package/typechain-types/PendleMerkleDepositor.ts +171 -0
- package/typechain-types/factories/ActionAddRemoveLiqV3__factory.ts +1 -1
- package/typechain-types/factories/ActionCallbackV3__factory.ts +1 -1
- package/typechain-types/factories/ActionCrossChain__factory.ts +152 -0
- 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/AddressProvider__factory.ts +1 -1
- package/typechain-types/factories/BalanceReader__factory.ts +1 -1
- package/typechain-types/factories/BasePendleBridgedPrincipalToken__factory.ts +1548 -0
- package/typechain-types/factories/BaseSplitCodeFactoryContract__factory.ts +1 -1
- package/typechain-types/factories/BoringOwnableUpgradeableData__factory.ts +1 -1
- package/typechain-types/factories/BoringPYUsdChainlinkAssetOracle__factory.ts +1 -1
- package/typechain-types/factories/BoringPYUsdChainlinkSYOracle__factory.ts +1 -1
- package/typechain-types/factories/Broadcaster__factory.ts +1 -1
- package/typechain-types/factories/EmptyUUPS__factory.ts +1 -1
- package/typechain-types/factories/Errors__factory.ts +1 -1
- package/typechain-types/factories/ExchangeRateMsgCodec__factory.ts +1 -1
- package/typechain-types/factories/ExpiredLpPtRedeemer__factory.ts +1 -1
- package/typechain-types/factories/FixedPricePTAMM__factory.ts +1 -1
- package/typechain-types/factories/IOKXDexRouter__factory.ts +0 -171
- package/typechain-types/factories/{IMarketSweed__factory.ts → IPActionCrossChain__factory.ts} +22 -61
- package/typechain-types/factories/IPLimitRouter__factory.ts +0 -42
- package/typechain-types/factories/IPMarket__factory.ts +0 -13
- package/typechain-types/factories/LegacyNFTHelper__factory.ts +1 -1
- package/typechain-types/factories/LimitBackendHelperV2__factory.ts +1 -1
- package/typechain-types/factories/LimitBackendHelper__factory.ts +232 -0
- package/typechain-types/factories/Multicall2__factory.ts +1 -1
- package/typechain-types/factories/OracleLib__factory.ts +1 -1
- package/typechain-types/factories/OverfillMathLib__factory.ts +1 -1
- package/typechain-types/factories/PendleBridgedPrincipalToken_18Decimals__factory.ts +1652 -0
- package/typechain-types/factories/PendleBridgedPrincipalToken_6Decimals__factory.ts +1650 -0
- package/typechain-types/factories/PendleBridgedPrincipalToken_8Decimals__factory.ts +1650 -0
- package/typechain-types/factories/PendleBridgedPrincipalToken__factory.ts +1 -1
- package/typechain-types/factories/PendleChainlinkOracleFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleChainlinkOracleWithQuote__factory.ts +1 -1
- package/typechain-types/factories/PendleChainlinkOracle__factory.ts +1 -1
- package/typechain-types/factories/PendleCommonPoolDeployHelperV2__factory.ts +1 -1
- package/typechain-types/factories/PendleCommonSYFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleERC20__factory.ts +1 -1
- package/typechain-types/factories/PendleExchangeRateOracleApp__factory.ts +1 -1
- package/typechain-types/factories/PendleExchangeRateOracleV2__factory.ts +1 -1
- package/typechain-types/factories/PendleExchangeRateOracle__factory.ts +1 -1
- package/typechain-types/factories/PendleFeeDistributorV2__factory.ts +1 -1
- package/typechain-types/factories/PendleFeeDistributor__factory.ts +1 -1
- package/typechain-types/factories/PendleGaugeControllerMainchainUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleGaugeControllerSidechainUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleGovernanceProxy__factory.ts +1 -1
- package/typechain-types/factories/PendleLPWrapperFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleLPWrapper__factory.ts +1 -1
- package/typechain-types/factories/PendleLimitRouter__factory.ts +1 -1
- package/typechain-types/factories/PendleMarketFactoryV6Upg__factory.ts +1 -1
- package/typechain-types/factories/PendleMarketV6__factory.ts +1 -1
- package/typechain-types/factories/PendleMerkleDepositor__factory.ts +164 -0
- package/typechain-types/factories/PendleMerkleDistributor__factory.ts +1 -1
- package/typechain-types/factories/PendleMsgReceiveEndpointUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleMsgSendEndpointUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleMultiTokenMerkleDistributor__factory.ts +1 -1
- package/typechain-types/factories/PendleMulticallOwnerV1__factory.ts +1 -1
- package/typechain-types/factories/PendleMulticallV1__factory.ts +1 -1
- package/typechain-types/factories/PendleMulticallV2__factory.ts +1 -1
- package/typechain-types/factories/PendleOffchainStorage__factory.ts +1 -1
- package/typechain-types/factories/PendlePTOFTAdapterFactory__factory.ts +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 +1 -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/PendleSwap__factory.ts +1 -1
- package/typechain-types/factories/PendleVotingControllerUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleWstETHPriceFeed__factory.ts +1 -1
- package/typechain-types/factories/PendleYieldContractFactoryUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleYieldToken__factory.ts +1 -1
- package/typechain-types/factories/Reflector__factory.ts +1 -1
- package/typechain-types/factories/SDKErrorsDirectory__factory.ts +1 -1
- package/typechain-types/factories/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 +9 -18
- package/typechain-types/index.ts +2 -4
- package/build/artifacts/contracts/interfaces/IMarketSweed.sol/IMarketSweed.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IMarketSweed.sol/IMarketSweed.json +0 -141
- package/build/artifacts/contracts/offchain-helpers/MarketSweed.sol/MarketSweed.dbg.json +0 -4
- package/build/artifacts/contracts/offchain-helpers/MarketSweed.sol/MarketSweed.json +0 -314
- package/build/artifacts/contracts/offchain-helpers/PendleFeeSetter.sol/PendleFeeSetter.dbg.json +0 -4
- package/build/artifacts/contracts/offchain-helpers/PendleFeeSetter.sol/PendleFeeSetter.json +0 -326
- package/contracts/interfaces/IMarketSweed.sol +0 -23
- package/contracts/offchain-helpers/MarketSweed.sol +0 -250
- package/contracts/offchain-helpers/PendleFeeSetter.sol +0 -149
- package/typechain-types/IMarketSweed.ts +0 -203
- package/typechain-types/LimitMathCore.ts +0 -102
- package/typechain-types/MarketSweed.ts +0 -242
- package/typechain-types/factories/LimitMathCore__factory.ts +0 -87
- package/typechain-types/factories/MarketSweed__factory.ts +0 -364
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
2
|
pragma solidity ^0.8.17;
|
|
3
3
|
|
|
4
|
-
import "../../core/libraries/BaseSplitCodeFactory.sol";
|
|
5
4
|
import "../../core/libraries/BoringOwnableUpgradeableV2.sol";
|
|
5
|
+
import "../../core/libraries/BaseSplitCodeFactory.sol";
|
|
6
6
|
import "../../interfaces/IOwnable.sol";
|
|
7
7
|
import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
|
|
8
8
|
|
|
@@ -41,8 +41,10 @@ contract PendleCommonSYFactory is BoringOwnableUpgradeableV2 {
|
|
|
41
41
|
|
|
42
42
|
function setSYCreationCode(bytes32 id, CreationCode memory code) external onlyOwner {
|
|
43
43
|
if (
|
|
44
|
-
code.creationCodeContractA == address(0) ||
|
|
45
|
-
|
|
44
|
+
code.creationCodeContractA == address(0) ||
|
|
45
|
+
code.creationCodeContractB == address(0) ||
|
|
46
|
+
code.creationCodeSizeA == 0 ||
|
|
47
|
+
code.creationCodeSizeB == 0
|
|
46
48
|
) {
|
|
47
49
|
revert InvalidCreationCode(id, code);
|
|
48
50
|
}
|
|
@@ -71,10 +73,12 @@ contract PendleCommonSYFactory is BoringOwnableUpgradeableV2 {
|
|
|
71
73
|
IOwnable(SY).transferOwnership(syOwner, true, false);
|
|
72
74
|
}
|
|
73
75
|
|
|
74
|
-
function deployUpgradableSY(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
function deployUpgradableSY(
|
|
77
|
+
bytes32 id,
|
|
78
|
+
bytes memory constructorParams,
|
|
79
|
+
bytes memory initData,
|
|
80
|
+
address syOwner
|
|
81
|
+
) external returns (address) {
|
|
78
82
|
CreationCode memory code = creationCodes[id];
|
|
79
83
|
|
|
80
84
|
if (code.creationCodeContractA == address(0)) {
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
pragma solidity ^0.8.17;
|
|
3
3
|
|
|
4
4
|
import "../../interfaces/IPAllActionV3.sol";
|
|
5
|
-
import "../../interfaces/IPMarket.sol";
|
|
6
5
|
import "../../interfaces/IPMarketFactory.sol";
|
|
7
6
|
import "../../interfaces/IPYieldContractFactory.sol";
|
|
7
|
+
import "../../interfaces/IPMarket.sol";
|
|
8
8
|
// import "../core/StandardizedYield/implementations/PendleERC4626SY.sol";
|
|
9
9
|
import "../../core/libraries/TokenHelper.sol";
|
|
10
10
|
|
|
@@ -44,20 +44,32 @@ contract PendlePoolDeployHelper is TokenHelper {
|
|
|
44
44
|
_seedLiquidity(market, address(SY), address(PT), address(YT), tokenToSeedLiqudity, amountToSeed);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
function _deployPYAndMarket(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
{
|
|
51
|
-
(PT, YT) = IPYieldContractFactory(yieldContractFactory)
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
47
|
+
function _deployPYAndMarket(
|
|
48
|
+
address SY,
|
|
49
|
+
PoolDeploymentParams memory params
|
|
50
|
+
) internal returns (address PT, address YT, address market) {
|
|
51
|
+
(PT, YT) = IPYieldContractFactory(yieldContractFactory).createYieldContract(
|
|
52
|
+
SY,
|
|
53
|
+
params.expiry,
|
|
54
|
+
params.doCacheIndexSameBlock
|
|
55
|
+
);
|
|
56
|
+
market = IPMarketFactory(marketFactory).createNewMarket(
|
|
57
|
+
PT,
|
|
58
|
+
params.scalarRoot,
|
|
59
|
+
params.initialRateAnchor,
|
|
60
|
+
params.lnFeeRateRoot
|
|
61
|
+
);
|
|
55
62
|
emit MarketDeployment(market, SY, PT, YT, params);
|
|
56
63
|
}
|
|
57
64
|
|
|
58
|
-
function _seedLiquidity(
|
|
59
|
-
|
|
60
|
-
|
|
65
|
+
function _seedLiquidity(
|
|
66
|
+
address market,
|
|
67
|
+
address SY,
|
|
68
|
+
address PT,
|
|
69
|
+
address YT,
|
|
70
|
+
address token,
|
|
71
|
+
uint256 amountToSeed
|
|
72
|
+
) internal {
|
|
61
73
|
_transferIn(token, msg.sender, amountToSeed);
|
|
62
74
|
|
|
63
75
|
// Approval
|
|
@@ -81,7 +93,10 @@ contract PendlePoolDeployHelper is TokenHelper {
|
|
|
81
93
|
tokenMintSy: token,
|
|
82
94
|
pendleSwap: address(0),
|
|
83
95
|
swapData: SwapData({
|
|
84
|
-
swapType: SwapType.NONE,
|
|
96
|
+
swapType: SwapType.NONE,
|
|
97
|
+
extRouter: address(0),
|
|
98
|
+
extCalldata: abi.encode(),
|
|
99
|
+
needScale: false
|
|
85
100
|
})
|
|
86
101
|
})
|
|
87
102
|
);
|
|
@@ -104,9 +119,13 @@ contract PendlePoolDeployHelper is TokenHelper {
|
|
|
104
119
|
int256 scalarRoot,
|
|
105
120
|
int256 initialRateAnchor
|
|
106
121
|
) external returns (address newMarket) {
|
|
107
|
-
(, IPPrincipalToken PT,) = IPMarket(oldMarket).readTokens();
|
|
108
|
-
newMarket =
|
|
109
|
-
|
|
122
|
+
(, IPPrincipalToken PT, ) = IPMarket(oldMarket).readTokens();
|
|
123
|
+
newMarket = IPMarketFactory(marketFactory).createNewMarket(
|
|
124
|
+
address(PT),
|
|
125
|
+
scalarRoot,
|
|
126
|
+
initialRateAnchor,
|
|
127
|
+
lnFeeRateRoot
|
|
128
|
+
);
|
|
110
129
|
_transferFrom(IERC20(oldMarket), msg.sender, oldMarket, amountLp);
|
|
111
130
|
(uint256 netSyOut, uint256 netPtOut) = IPMarket(oldMarket).burn(newMarket, newMarket, amountLp);
|
|
112
131
|
IPMarket(newMarket).mint(msg.sender, netSyOut, netPtOut);
|
|
@@ -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/IPMarket.sol";
|
|
7
6
|
import "../../interfaces/IPMarketFactory.sol";
|
|
8
7
|
import "../../interfaces/IPYieldContractFactory.sol";
|
|
8
|
+
import "../../interfaces/IPMarket.sol";
|
|
9
9
|
import "./lib/MarketDeployLib.sol";
|
|
10
10
|
|
|
11
11
|
contract PendlePoolDeployHelperV2 is TokenHelper {
|
|
@@ -61,12 +61,15 @@ contract PendlePoolDeployHelperV2 is TokenHelper {
|
|
|
61
61
|
return addrs;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
function _deployPYAndMarket(
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
{
|
|
68
|
-
(uint256 scalarRoot, uint256 initialRateAnchor) =
|
|
69
|
-
|
|
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
|
+
);
|
|
70
73
|
|
|
71
74
|
params = PoolDeploymentParams({
|
|
72
75
|
expiry: config.expiry,
|
|
@@ -79,8 +82,12 @@ contract PendlePoolDeployHelperV2 is TokenHelper {
|
|
|
79
82
|
addrs.SY = SY;
|
|
80
83
|
(addrs.PT, addrs.YT) = _createPYIfNotExist(SY, params.expiry);
|
|
81
84
|
|
|
82
|
-
addrs.market = IPMarketFactory(marketFactory)
|
|
83
|
-
|
|
85
|
+
addrs.market = IPMarketFactory(marketFactory).createNewMarket(
|
|
86
|
+
addrs.PT,
|
|
87
|
+
params.scalarRoot,
|
|
88
|
+
params.initialRateAnchor,
|
|
89
|
+
params.lnFeeRateRoot
|
|
90
|
+
);
|
|
84
91
|
|
|
85
92
|
emit MarketDeployment(addrs, params);
|
|
86
93
|
}
|
|
@@ -88,8 +95,11 @@ contract PendlePoolDeployHelperV2 is TokenHelper {
|
|
|
88
95
|
function _createPYIfNotExist(address SY, uint32 expiry) internal returns (address PT, address YT) {
|
|
89
96
|
PT = IPYieldContractFactory(yieldContractFactory).getPT(SY, uint256(expiry));
|
|
90
97
|
if (PT == address(0)) {
|
|
91
|
-
(PT, YT) =
|
|
92
|
-
|
|
98
|
+
(PT, YT) = IPYieldContractFactory(yieldContractFactory).createYieldContract(
|
|
99
|
+
SY,
|
|
100
|
+
expiry,
|
|
101
|
+
doCacheIndexSameBlock
|
|
102
|
+
);
|
|
93
103
|
} else {
|
|
94
104
|
YT = IPYieldContractFactory(yieldContractFactory).getYT(SY, expiry);
|
|
95
105
|
}
|
|
@@ -125,7 +135,10 @@ contract PendlePoolDeployHelperV2 is TokenHelper {
|
|
|
125
135
|
tokenMintSy: token,
|
|
126
136
|
pendleSwap: address(0),
|
|
127
137
|
swapData: SwapData({
|
|
128
|
-
swapType: SwapType.NONE,
|
|
138
|
+
swapType: SwapType.NONE,
|
|
139
|
+
extRouter: address(0),
|
|
140
|
+
extCalldata: abi.encode(),
|
|
141
|
+
needScale: false
|
|
129
142
|
})
|
|
130
143
|
})
|
|
131
144
|
);
|
|
@@ -134,12 +147,19 @@ contract PendlePoolDeployHelperV2 is TokenHelper {
|
|
|
134
147
|
}
|
|
135
148
|
|
|
136
149
|
uint256 initialProportion = MarketDeployLib.calcInitialProportion(
|
|
137
|
-
params.expiry,
|
|
150
|
+
params.expiry,
|
|
151
|
+
params.scalarRoot.Uint(),
|
|
152
|
+
params.initialRateAnchor.Uint(),
|
|
153
|
+
desiredImpliedRate
|
|
138
154
|
);
|
|
139
155
|
|
|
140
156
|
// mint PY
|
|
141
|
-
uint256 amountPY =
|
|
142
|
-
|
|
157
|
+
uint256 amountPY = IPAllActionV3(router).mintPyFromSy(
|
|
158
|
+
address(this),
|
|
159
|
+
addrs.YT,
|
|
160
|
+
amountSY.mulDown(initialProportion),
|
|
161
|
+
0
|
|
162
|
+
);
|
|
143
163
|
|
|
144
164
|
// mint LP
|
|
145
165
|
IPAllActionV3(router).addLiquidityDualSyAndPt(msg.sender, addrs.market, _selfBalance(addrs.SY), amountPY, 0);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
2
|
pragma solidity ^0.8.17;
|
|
3
3
|
|
|
4
|
-
import "../../../core/libraries/math/LogExpMath.sol";
|
|
5
4
|
import "../../../core/libraries/math/PMath.sol";
|
|
5
|
+
import "../../../core/libraries/math/LogExpMath.sol";
|
|
6
6
|
|
|
7
7
|
library MarketDeployLib {
|
|
8
8
|
using PMath for uint256;
|
|
@@ -11,7 +11,7 @@ library MarketDeployLib {
|
|
|
11
11
|
using LogExpMath for int256;
|
|
12
12
|
|
|
13
13
|
uint256 internal constant YEAR = 365 days;
|
|
14
|
-
uint256 internal constant LN_9 =
|
|
14
|
+
uint256 internal constant LN_9 = 2197224577336219648;
|
|
15
15
|
|
|
16
16
|
struct CalcParamsArgs {
|
|
17
17
|
uint256 yearsToExpiry;
|
|
@@ -20,11 +20,11 @@ library MarketDeployLib {
|
|
|
20
20
|
uint256 rateDiff;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
function calcParams(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
{
|
|
23
|
+
function calcParams(
|
|
24
|
+
uint256 rateMin,
|
|
25
|
+
uint256 rateMax,
|
|
26
|
+
uint256 expiry
|
|
27
|
+
) internal view returns (uint256 scalarRoot, uint256 initialRateAnchor) {
|
|
28
28
|
CalcParamsArgs memory args;
|
|
29
29
|
|
|
30
30
|
args.yearsToExpiry = (expiry - block.timestamp).divDown(YEAR);
|
|
@@ -47,11 +47,12 @@ library MarketDeployLib {
|
|
|
47
47
|
uint256 lnProportion;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
function calcInitialProportion(
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
function calcInitialProportion(
|
|
51
|
+
uint256 expiry,
|
|
52
|
+
uint256 scalarRoot,
|
|
53
|
+
uint256 rateAnchor,
|
|
54
|
+
uint256 desiredImpliedRate
|
|
55
|
+
) internal view returns (uint256 initialProportion) {
|
|
55
56
|
CalcInitialProportionArgs memory args;
|
|
56
57
|
|
|
57
58
|
args.timeToExpiry = expiry - block.timestamp;
|
|
@@ -14,7 +14,10 @@ library SDKErrorsDirectory {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
error ApproxBinarySearchInputInvalid(
|
|
17
|
-
uint256 approxGuessMin,
|
|
17
|
+
uint256 approxGuessMin,
|
|
18
|
+
uint256 approxGuessMax,
|
|
19
|
+
uint256 minGuessMin,
|
|
20
|
+
uint256 maxGuessMax
|
|
18
21
|
);
|
|
19
22
|
error ApproxDstExecutionGasNotSet();
|
|
20
23
|
error ApproxFail();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
2
|
pragma solidity ^0.8.17;
|
|
3
3
|
|
|
4
|
+
import "@openzeppelin/contracts/proxy/Proxy.sol";
|
|
4
5
|
import "../../interfaces/IPRouterStatic.sol";
|
|
5
6
|
import "./base/StorageLayout.sol";
|
|
6
|
-
import "@openzeppelin/contracts/proxy/Proxy.sol";
|
|
7
7
|
|
|
8
8
|
// solhint-disable no-empty-blocks
|
|
9
9
|
contract PendleRouterStatic is Proxy, StorageLayout {
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
pragma solidity ^0.8.17;
|
|
3
3
|
|
|
4
4
|
import "../../../interfaces/IPMarket.sol";
|
|
5
|
-
import "../../../interfaces/IPMarketFactory.sol";
|
|
6
5
|
import "../../../interfaces/IPRouterStatic.sol";
|
|
7
6
|
import "../../../interfaces/IPYieldContractFactory.sol";
|
|
7
|
+
import "../../../interfaces/IPMarketFactory.sol";
|
|
8
8
|
|
|
9
9
|
// solhint-disable no-empty-blocks
|
|
10
10
|
contract ActionInfoStatic is IPActionInfoStatic {
|
|
@@ -19,11 +19,9 @@ contract ActionInfoStatic is IPActionInfoStatic {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
/// can be SY, PY or Market
|
|
22
|
-
function getTokensInOut(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
returns (address[] memory tokensIn, address[] memory tokensOut)
|
|
26
|
-
{
|
|
22
|
+
function getTokensInOut(
|
|
23
|
+
address token
|
|
24
|
+
) external view returns (address[] memory tokensIn, address[] memory tokensOut) {
|
|
27
25
|
try IStandardizedYield(token).getTokensIn() returns (address[] memory res) {
|
|
28
26
|
return (res, IStandardizedYield(token).getTokensOut());
|
|
29
27
|
} catch {}
|
|
@@ -77,7 +75,7 @@ contract ActionInfoStatic is IPActionInfoStatic {
|
|
|
77
75
|
if (uint256(state.totalLp) == 0) return res; // market not initialized
|
|
78
76
|
|
|
79
77
|
// LP PT SY
|
|
80
|
-
(IStandardizedYield SY, IPPrincipalToken PT,) = _market.readTokens();
|
|
78
|
+
(IStandardizedYield SY, IPPrincipalToken PT, ) = _market.readTokens();
|
|
81
79
|
|
|
82
80
|
uint256 userLp = _balanceOf(market, user);
|
|
83
81
|
uint256 userPt = (userLp * uint256(state.totalPt)) / uint256(state.totalLp);
|
|
@@ -94,11 +92,10 @@ contract ActionInfoStatic is IPActionInfoStatic {
|
|
|
94
92
|
res.unclaimedRewards = _zipTokenAmounts(rewardTokens, rewardsOut);
|
|
95
93
|
}
|
|
96
94
|
|
|
97
|
-
function _zipTokenAmounts(
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
{
|
|
95
|
+
function _zipTokenAmounts(
|
|
96
|
+
address[] memory tokens,
|
|
97
|
+
uint256[] memory amounts
|
|
98
|
+
) internal pure returns (TokenAmount[] memory res) {
|
|
102
99
|
res = new TokenAmount[](tokens.length);
|
|
103
100
|
|
|
104
101
|
for (uint256 i = 0; i < tokens.length; i++) {
|
|
@@ -3,8 +3,8 @@ pragma solidity ^0.8.17;
|
|
|
3
3
|
|
|
4
4
|
import "../../../interfaces/IPMarket.sol";
|
|
5
5
|
import "../../../interfaces/IPRouterStatic.sol";
|
|
6
|
-
import "./MarketApproxLibV1.sol";
|
|
7
6
|
import "./StorageLayout.sol";
|
|
7
|
+
import "./MarketApproxLibV1.sol";
|
|
8
8
|
|
|
9
9
|
contract ActionMarketAuxStatic is IPActionMarketAuxStatic {
|
|
10
10
|
using MarketMathCore for MarketState;
|
|
@@ -14,7 +14,9 @@ contract ActionMarketAuxStatic is IPActionMarketAuxStatic {
|
|
|
14
14
|
using PYIndexLib for PYIndex;
|
|
15
15
|
using PYIndexLib for IPYieldToken;
|
|
16
16
|
|
|
17
|
-
function getMarketState(
|
|
17
|
+
function getMarketState(
|
|
18
|
+
address market
|
|
19
|
+
)
|
|
18
20
|
public
|
|
19
21
|
view
|
|
20
22
|
returns (
|
|
@@ -39,8 +41,13 @@ contract ActionMarketAuxStatic is IPActionMarketAuxStatic {
|
|
|
39
41
|
if (IPMarket(market).isExpired()) return PMath.ONE;
|
|
40
42
|
|
|
41
43
|
MarketPreCompute memory comp = state.getMarketPreCompute(_pyIndex(market), block.timestamp);
|
|
42
|
-
int256 preFeeExchangeRate =
|
|
43
|
-
|
|
44
|
+
int256 preFeeExchangeRate = MarketMathCore._getExchangeRate(
|
|
45
|
+
state.totalPt,
|
|
46
|
+
comp.totalAsset,
|
|
47
|
+
comp.rateScalar,
|
|
48
|
+
comp.rateAnchor,
|
|
49
|
+
0
|
|
50
|
+
);
|
|
44
51
|
return preFeeExchangeRate.Uint();
|
|
45
52
|
}
|
|
46
53
|
|
|
@@ -52,7 +59,11 @@ contract ActionMarketAuxStatic is IPActionMarketAuxStatic {
|
|
|
52
59
|
MarketPreCompute memory comp = state.getMarketPreCompute(_pyIndex(market), block.timestamp);
|
|
53
60
|
|
|
54
61
|
int256 preFeeExchangeRate = MarketMathCore._getExchangeRate(
|
|
55
|
-
state.totalPt,
|
|
62
|
+
state.totalPt,
|
|
63
|
+
comp.totalAsset,
|
|
64
|
+
comp.rateScalar,
|
|
65
|
+
comp.rateAnchor,
|
|
66
|
+
netPtToAccount
|
|
56
67
|
);
|
|
57
68
|
|
|
58
69
|
if (netPtToAccount > 0) {
|
|
@@ -94,23 +105,23 @@ contract ActionMarketAuxStatic is IPActionMarketAuxStatic {
|
|
|
94
105
|
/**
|
|
95
106
|
* @notice get the rate of yieldToken & PT
|
|
96
107
|
* @return yieldToken the address of yieldToken
|
|
97
|
-
* @return netPtOut the amount of PT that can be swapped from 1 yieldToken (10**yieldToken.decimals()). If can't
|
|
98
|
-
* swap, return type(uint256).max
|
|
99
|
-
* @return netYieldTokenOut the amount of yieldToken that can be swapped from 1 PT (10**PT.decimals()). If can't
|
|
100
|
-
* swap, return type(uint256).max
|
|
108
|
+
* @return netPtOut the amount of PT that can be swapped from 1 yieldToken (10**yieldToken.decimals()). If can't swap, return type(uint256).max
|
|
109
|
+
* @return netYieldTokenOut the amount of yieldToken that can be swapped from 1 PT (10**PT.decimals()). If can't swap, return type(uint256).max
|
|
101
110
|
*/
|
|
102
|
-
function getYieldTokenAndPtRate(
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
{
|
|
107
|
-
(IStandardizedYield SY, IPPrincipalToken PT,) = _readTokens(market);
|
|
111
|
+
function getYieldTokenAndPtRate(
|
|
112
|
+
address market
|
|
113
|
+
) public view returns (address yieldToken, uint256 netPtOut, uint256 netYieldTokenOut) {
|
|
114
|
+
(IStandardizedYield SY, IPPrincipalToken PT, ) = _readTokens(market);
|
|
108
115
|
yieldToken = SY.yieldToken();
|
|
109
116
|
uint256 yieldDecimals = IERC20Metadata(yieldToken).decimals();
|
|
110
117
|
uint256 ptDecimals = PT.decimals();
|
|
111
118
|
|
|
112
119
|
try IPRouterStatic(address(this)).swapExactTokenForPtStatic(market, yieldToken, 10 ** yieldDecimals) returns (
|
|
113
|
-
uint256 netPtOutRet,
|
|
120
|
+
uint256 netPtOutRet,
|
|
121
|
+
uint256,
|
|
122
|
+
uint256,
|
|
123
|
+
uint256,
|
|
124
|
+
uint256
|
|
114
125
|
) {
|
|
115
126
|
netPtOut = netPtOutRet;
|
|
116
127
|
} catch {
|
|
@@ -118,7 +129,11 @@ contract ActionMarketAuxStatic is IPActionMarketAuxStatic {
|
|
|
118
129
|
}
|
|
119
130
|
|
|
120
131
|
try IPRouterStatic(address(this)).swapExactPtForTokenStatic(market, 10 ** ptDecimals, yieldToken) returns (
|
|
121
|
-
uint256 netYieldTokenOutRet,
|
|
132
|
+
uint256 netYieldTokenOutRet,
|
|
133
|
+
uint256,
|
|
134
|
+
uint256,
|
|
135
|
+
uint256,
|
|
136
|
+
uint256
|
|
122
137
|
) {
|
|
123
138
|
netYieldTokenOut = netYieldTokenOutRet;
|
|
124
139
|
} catch {
|
|
@@ -129,23 +144,23 @@ contract ActionMarketAuxStatic is IPActionMarketAuxStatic {
|
|
|
129
144
|
/**
|
|
130
145
|
* @notice get the rate of yieldToken & YT
|
|
131
146
|
* @return yieldToken the address of yieldToken
|
|
132
|
-
* @return netYtOut the amount of YT that can be swapped from 1 yieldToken (10**yieldToken.decimals()). If can't
|
|
133
|
-
* swap, return type(uint256).max
|
|
134
|
-
* @return netYieldTokenOut the amount of yieldToken that can be swapped from 1 YT (10**YT.decimals()). If can't
|
|
135
|
-
* swap, return type(uint256).max
|
|
147
|
+
* @return netYtOut the amount of YT that can be swapped from 1 yieldToken (10**yieldToken.decimals()). If can't swap, return type(uint256).max
|
|
148
|
+
* @return netYieldTokenOut the amount of yieldToken that can be swapped from 1 YT (10**YT.decimals()). If can't swap, return type(uint256).max
|
|
136
149
|
*/
|
|
137
|
-
function getYieldTokenAndYtRate(
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
{
|
|
142
|
-
(IStandardizedYield SY,, IPYieldToken YT) = _readTokens(market);
|
|
150
|
+
function getYieldTokenAndYtRate(
|
|
151
|
+
address market
|
|
152
|
+
) public view returns (address yieldToken, uint256 netYtOut, uint256 netYieldTokenOut) {
|
|
153
|
+
(IStandardizedYield SY, , IPYieldToken YT) = _readTokens(market);
|
|
143
154
|
yieldToken = SY.yieldToken();
|
|
144
155
|
uint256 yieldDecimals = IERC20Metadata(yieldToken).decimals();
|
|
145
156
|
uint256 ytDecimals = YT.decimals();
|
|
146
157
|
|
|
147
158
|
try IPRouterStatic(address(this)).swapExactTokenForYtStatic(market, yieldToken, 10 ** yieldDecimals) returns (
|
|
148
|
-
uint256 netYtOutRet,
|
|
159
|
+
uint256 netYtOutRet,
|
|
160
|
+
uint256,
|
|
161
|
+
uint256,
|
|
162
|
+
uint256,
|
|
163
|
+
uint256
|
|
149
164
|
) {
|
|
150
165
|
netYtOut = netYtOutRet;
|
|
151
166
|
} catch {
|
|
@@ -153,7 +168,14 @@ contract ActionMarketAuxStatic is IPActionMarketAuxStatic {
|
|
|
153
168
|
}
|
|
154
169
|
|
|
155
170
|
try IPRouterStatic(address(this)).swapExactYtForTokenStatic(market, 10 ** ytDecimals, yieldToken) returns (
|
|
156
|
-
uint256 netYieldTokenOutRet,
|
|
171
|
+
uint256 netYieldTokenOutRet,
|
|
172
|
+
uint256,
|
|
173
|
+
uint256,
|
|
174
|
+
uint256,
|
|
175
|
+
uint256,
|
|
176
|
+
uint256,
|
|
177
|
+
uint256,
|
|
178
|
+
uint256
|
|
157
179
|
) {
|
|
158
180
|
netYieldTokenOut = netYieldTokenOutRet;
|
|
159
181
|
} catch {
|
|
@@ -162,17 +184,17 @@ contract ActionMarketAuxStatic is IPActionMarketAuxStatic {
|
|
|
162
184
|
}
|
|
163
185
|
|
|
164
186
|
function getLpToSyRate(address market) public view returns (uint256) {
|
|
165
|
-
(IStandardizedYield SY
|
|
187
|
+
(IStandardizedYield SY, , ) = _readTokens(market);
|
|
166
188
|
return getLpToAssetRate(market).divDown(SY.exchangeRate());
|
|
167
189
|
}
|
|
168
190
|
|
|
169
191
|
function getPtToSyRate(address market) public view returns (uint256) {
|
|
170
|
-
(IStandardizedYield SY
|
|
192
|
+
(IStandardizedYield SY, , ) = _readTokens(market);
|
|
171
193
|
return getPtToAssetRate(market).divDown(SY.exchangeRate());
|
|
172
194
|
}
|
|
173
195
|
|
|
174
196
|
function getYtToSyRate(address market) external view returns (uint256) {
|
|
175
|
-
(IStandardizedYield SY
|
|
197
|
+
(IStandardizedYield SY, , ) = _readTokens(market);
|
|
176
198
|
return getYtToAssetRate(market).divDown(SY.exchangeRate());
|
|
177
199
|
}
|
|
178
200
|
|
|
@@ -188,7 +210,8 @@ contract ActionMarketAuxStatic is IPActionMarketAuxStatic {
|
|
|
188
210
|
MarketPreCompute memory comp = state.getMarketPreCompute(pyIndexCurrent, block.timestamp);
|
|
189
211
|
|
|
190
212
|
totalHypotheticalAsset =
|
|
191
|
-
comp.totalAsset +
|
|
213
|
+
comp.totalAsset +
|
|
214
|
+
state.totalPt.mulDown(int256(_getPtToAssetRate(market, state, pyIndexCurrent)));
|
|
192
215
|
}
|
|
193
216
|
|
|
194
217
|
return totalHypotheticalAsset.divDown(state.totalLp).Uint();
|
|
@@ -204,7 +227,11 @@ contract ActionMarketAuxStatic is IPActionMarketAuxStatic {
|
|
|
204
227
|
}
|
|
205
228
|
|
|
206
229
|
/// @param slippage A fixed-point number with 18 decimal places
|
|
207
|
-
function swapExactSyForPtStaticAndGenerateApproxParams(
|
|
230
|
+
function swapExactSyForPtStaticAndGenerateApproxParams(
|
|
231
|
+
address market,
|
|
232
|
+
uint256 exactSyIn,
|
|
233
|
+
uint256 slippage
|
|
234
|
+
)
|
|
208
235
|
external
|
|
209
236
|
view
|
|
210
237
|
returns (
|
|
@@ -238,17 +265,17 @@ contract ActionMarketAuxStatic is IPActionMarketAuxStatic {
|
|
|
238
265
|
ApproxParams memory approxParams
|
|
239
266
|
)
|
|
240
267
|
{
|
|
241
|
-
(netPtOut, netSyMinted, netSyFee, priceImpact, exchangeRateAfter) =
|
|
242
|
-
|
|
268
|
+
(netPtOut, netSyMinted, netSyFee, priceImpact, exchangeRateAfter) = IPActionMarketCoreStatic(address(this))
|
|
269
|
+
.swapExactTokenForPtStatic(market, tokenIn, amountTokenIn);
|
|
243
270
|
approxParams = genApproxParamsToSwapExactSyForPt(market, netPtOut, slippage);
|
|
244
271
|
}
|
|
245
272
|
|
|
246
273
|
/// @param slippage A fixed-point number with 18 decimal places
|
|
247
|
-
function genApproxParamsToSwapExactSyForPt(
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
{
|
|
274
|
+
function genApproxParamsToSwapExactSyForPt(
|
|
275
|
+
address market,
|
|
276
|
+
uint256 netPtOut,
|
|
277
|
+
uint256 slippage
|
|
278
|
+
) public view returns (ApproxParams memory) {
|
|
252
279
|
MarketState memory state = _readState(market);
|
|
253
280
|
MarketPreCompute memory comp = state.getMarketPreCompute(_pyIndex(market), block.timestamp);
|
|
254
281
|
|
|
@@ -258,11 +285,12 @@ contract ActionMarketAuxStatic is IPActionMarketAuxStatic {
|
|
|
258
285
|
}
|
|
259
286
|
|
|
260
287
|
/// @param slippage A fixed-point number with 18 decimal places
|
|
261
|
-
function genApproxParamsPtOut(
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
288
|
+
function genApproxParamsPtOut(
|
|
289
|
+
uint256 netPtOut,
|
|
290
|
+
uint256 guessLowerBound,
|
|
291
|
+
uint256 guessUpperBound,
|
|
292
|
+
uint256 slippage
|
|
293
|
+
) internal pure returns (ApproxParams memory) {
|
|
266
294
|
uint256 guessOffchain = netPtOut;
|
|
267
295
|
uint256 MAX_ITERATION = 30;
|
|
268
296
|
|
|
@@ -272,18 +300,23 @@ contract ActionMarketAuxStatic is IPActionMarketAuxStatic {
|
|
|
272
300
|
uint256 guessMin = PMath.max(guessLowerBound, netPtOut.tweakDown(slippage));
|
|
273
301
|
uint256 guessMax = PMath.min(guessUpperBound, netPtOut.tweakUp(5 * slippage));
|
|
274
302
|
|
|
275
|
-
return
|
|
276
|
-
|
|
277
|
-
|
|
303
|
+
return
|
|
304
|
+
ApproxParams({
|
|
305
|
+
guessOffchain: guessOffchain,
|
|
306
|
+
maxIteration: MAX_ITERATION,
|
|
307
|
+
eps: eps,
|
|
308
|
+
guessMin: guessMin,
|
|
309
|
+
guessMax: guessMax
|
|
310
|
+
});
|
|
278
311
|
}
|
|
279
312
|
|
|
280
|
-
function _getPtToAssetRate(
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
{
|
|
313
|
+
function _getPtToAssetRate(
|
|
314
|
+
address market,
|
|
315
|
+
MarketState memory state,
|
|
316
|
+
PYIndex pyIndexCurrent
|
|
317
|
+
) internal view returns (uint256 ptToAssetRate) {
|
|
285
318
|
if (state.expiry <= block.timestamp) {
|
|
286
|
-
(IStandardizedYield SY
|
|
319
|
+
(IStandardizedYield SY, , ) = _readTokens(market);
|
|
287
320
|
return (SY.exchangeRate().divDown(PYIndex.unwrap(pyIndexCurrent)));
|
|
288
321
|
}
|
|
289
322
|
uint256 timeToExpiry = state.expiry - block.timestamp;
|
|
@@ -312,11 +345,9 @@ contract ActionMarketAuxStatic is IPActionMarketAuxStatic {
|
|
|
312
345
|
return IPRouterStatic(address(this)).readMarketState(market);
|
|
313
346
|
}
|
|
314
347
|
|
|
315
|
-
function _readTokens(
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
returns (IStandardizedYield _SY, IPPrincipalToken _PT, IPYieldToken _YT)
|
|
319
|
-
{
|
|
348
|
+
function _readTokens(
|
|
349
|
+
address market
|
|
350
|
+
) internal view returns (IStandardizedYield _SY, IPPrincipalToken _PT, IPYieldToken _YT) {
|
|
320
351
|
return IPMarket(market).readTokens();
|
|
321
352
|
}
|
|
322
353
|
|