@pendle/core-v2 6.3.2-pendle-merkle-transfer → 6.3.2-swaphubtest2
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/cross-chain/swap-hub/DepositBox.sol/DepositBox.dbg.json +4 -0
- package/build/artifacts/contracts/cross-chain/swap-hub/DepositBox.sol/DepositBox.json +201 -0
- package/build/artifacts/contracts/cross-chain/swap-hub/PendleCrossChainSwapHub.sol/PendleCrossChainSwapHub.dbg.json +4 -0
- package/build/artifacts/contracts/cross-chain/swap-hub/PendleCrossChainSwapHub.sol/PendleCrossChainSwapHub.json +1519 -0
- package/build/artifacts/contracts/cross-chain/swap-hub/SwapHubBase.sol/SwapHubBase.dbg.json +4 -0
- package/build/artifacts/contracts/cross-chain/swap-hub/SwapHubBase.sol/SwapHubBase.json +1490 -0
- package/build/artifacts/contracts/cross-chain/swap-hub/swap/IPSwapExecutor.sol/IPSwapExecutor.dbg.json +4 -0
- package/build/artifacts/contracts/cross-chain/swap-hub/swap/IPSwapExecutor.sol/IPSwapExecutor.json +56 -0
- package/build/artifacts/contracts/cross-chain/swap-hub/swap/SwapExecutor.sol/SwapExecutor.dbg.json +4 -0
- package/build/artifacts/contracts/cross-chain/swap-hub/swap/SwapExecutor.sol/SwapExecutor.json +60 -0
- package/build/artifacts/contracts/deprecated/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/deprecated/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.json +2 -2
- package/build/artifacts/contracts/deprecated/VeDistributor/PendleFeeDistributorV2.sol/PendleFeeDistributorV2.dbg.json +1 -1
- package/build/artifacts/contracts/deprecated/VeDistributor/PendleFeeDistributorV2.sol/PendleFeeDistributorV2.json +2 -2
- package/build/artifacts/contracts/interfaces/IAddressProvider.sol/IAddressProvider.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ILPWrapper.sol/ILPWrapper.dbg.json +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/IPCrossChainSwapHub.sol/IPCrossChainSwapHub.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPCrossChainSwapHub.sol/IPCrossChainSwapHub.json +1353 -0
- package/build/artifacts/contracts/interfaces/IPDepositBox.sol/IPDepositBox.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPDepositBox.sol/IPDepositBox.json +150 -0
- 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 +42 -0
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouterCallback.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.json +13 -0
- 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/MarketSweed.sol/MarketSweed.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/MarketSweed.sol/MarketSweed.json +314 -0
- 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/PendleFeeSetter.sol/PendleFeeSetter.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/PendleFeeSetter.sol/PendleFeeSetter.json +326 -0
- package/build/artifacts/contracts/offchain-helpers/PendleGovernanceProxy.sol/PendleGovernanceProxy.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleGovernanceProxy.sol/PendleGovernanceProxy.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleLPWrapper.sol/PendleLPWrapper.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleLPWrapper.sol/PendleLPWrapper.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleLPWrapperFactory.sol/PendleLPWrapperFactory.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleLPWrapperFactory.sol/PendleLPWrapperFactory.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallOwnerV1.sol/PendleMulticallOwnerV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallOwnerV1.sol/PendleMulticallOwnerV1.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallV1.sol/PendleMulticallV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallV1.sol/PendleMulticallV1.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallV2.sol/PendleMulticallV2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallV2.sol/PendleMulticallV2.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleOffchainStorage.sol/PendleOffchainStorage.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleOffchainStorage.sol/PendleOffchainStorage.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleWstETHPriceFeed.sol/PendleWstETHPriceFeed.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleWstETHPriceFeed.sol/PendleWstETHPriceFeed.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/SimulateHelper.sol/SimulateHelper.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/SimulateHelper.sol/SimulateHelper.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/SupplyCapReader.sol/IPossibleSupplyCapInterface.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/SupplyCapReader.sol/SupplyCapReader.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/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 +171 -0
- 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 +15 -17
- package/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiverAppUpg.sol +1 -1
- package/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol +14 -16
- package/contracts/LiquidityMining/CrossChainMsg/PendleMsgSenderAppUpg.sol +2 -3
- package/contracts/LiquidityMining/CrossChainMsg/libraries/ExcessivelySafeCall.sol +9 -12
- package/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol +12 -12
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol +8 -10
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol +6 -12
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol +4 -11
- package/contracts/LiquidityMining/PendleMerkleDistributor.sol +11 -13
- package/contracts/LiquidityMining/PendleMultiTokenMerkleDistributor.sol +17 -22
- package/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol +21 -28
- package/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol +31 -27
- package/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol +19 -23
- package/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol +7 -8
- package/contracts/LiquidityMining/libraries/VeBalanceLib.sol +6 -5
- package/contracts/core/Market/MarketMathCore.sol +78 -112
- package/contracts/core/Market/OracleLib.sol +34 -41
- package/contracts/core/Market/PendleGauge.sol +8 -8
- package/contracts/core/Market/PendleMarketFactoryV6Upg.sol +19 -16
- package/contracts/core/Market/PendleMarketV6.sol +63 -65
- package/contracts/core/RewardManager/RewardManager.sol +8 -8
- package/contracts/core/RewardManager/RewardManagerAbstract.sol +6 -5
- package/contracts/core/StandardizedYield/PYIndex.sol +2 -2
- package/contracts/core/YieldContracts/InterestManagerYT.sol +8 -9
- package/contracts/core/YieldContracts/PendlePrincipalToken.sol +4 -8
- package/contracts/core/YieldContracts/PendleYieldContractFactoryUpg.sol +15 -12
- package/contracts/core/YieldContracts/PendleYieldToken.sol +54 -41
- package/contracts/core/erc20/PendleERC20.sol +9 -6
- package/contracts/core/libraries/ArrayLib.sol +11 -13
- package/contracts/core/libraries/BaseSplitCodeFactory.sol +22 -29
- package/contracts/core/libraries/BoringOwnableUpgradeableV2.sol +2 -1
- package/contracts/core/libraries/Errors.sol +1 -4
- 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 +77 -67
- package/contracts/cross-chain/FixedPricePTAMM.sol +38 -39
- package/contracts/cross-chain/factory/hub/PendlePTOFTAdapterFactory.sol +1 -1
- package/contracts/cross-chain/oftImpl/spoke/PendleBridgedPrincipalToken.sol +1 -1
- package/contracts/cross-chain/swap-hub/DepositBox.sol +72 -0
- package/contracts/cross-chain/swap-hub/PendleCrossChainSwapHub.sol +206 -0
- package/contracts/cross-chain/swap-hub/SwapHubBase.sol +273 -0
- package/contracts/cross-chain/swap-hub/swap/IPSwapExecutor.sol +14 -0
- package/contracts/cross-chain/swap-hub/swap/SwapExecutor.sol +33 -0
- package/contracts/deprecated/VeDistributor/PendleFeeDistributor.sol +15 -12
- package/contracts/deprecated/VeDistributor/PendleFeeDistributorV2.sol +21 -24
- package/contracts/interfaces/ILayerZeroEndpoint.sol +5 -3
- package/contracts/interfaces/IMarketSweed.sol +23 -0
- package/contracts/interfaces/IPActionCallbackV3.sol +1 -1
- package/contracts/interfaces/IPActionInfoStatic.sol +1 -3
- package/contracts/interfaces/IPActionMarketAuxStatic.sol +11 -15
- package/contracts/interfaces/IPActionMarketCoreStatic.sol +58 -109
- package/contracts/interfaces/IPActionMintRedeemStatic.sol +21 -26
- package/contracts/interfaces/IPActionMiscV3.sol +24 -44
- package/contracts/interfaces/IPActionSimple.sol +24 -43
- package/contracts/interfaces/IPActionVePendleStatic.sol +4 -5
- package/contracts/interfaces/IPAllActionTypeV3.sol +14 -16
- package/contracts/interfaces/IPAllActionV3.sol +4 -4
- package/contracts/interfaces/IPAllEventsV3.sol +5 -21
- package/contracts/interfaces/IPBridgedPrincipalToken.sol +2 -2
- package/contracts/interfaces/IPCommonSYFactory.sol +3 -6
- package/contracts/interfaces/IPCrossChainSwapHub.sol +168 -0
- package/contracts/interfaces/IPDepositBox.sol +25 -0
- package/contracts/interfaces/IPExchangeRateOracleApp.sol +25 -26
- package/contracts/interfaces/IPFeeDistributorV2.sol +13 -16
- package/contracts/interfaces/IPFixedPricePTAMM.sol +22 -34
- package/contracts/interfaces/IPGovernanceProxy.sol +2 -6
- package/contracts/interfaces/IPInterestManagerYTV2.sol +4 -3
- package/contracts/interfaces/IPLimitRouter.sol +16 -16
- package/contracts/interfaces/IPMarket.sol +25 -35
- package/contracts/interfaces/IPMarketFactory.sol +9 -16
- package/contracts/interfaces/IPMerkleDistributor.sol +6 -10
- package/contracts/interfaces/IPMsgSendEndpoint.sol +7 -12
- package/contracts/interfaces/IPMultiTokenMerkleDistributor.sol +6 -12
- package/contracts/interfaces/IPPYLpOracle.sol +1 -4
- 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 +3 -5
- package/contracts/interfaces/IPYieldToken.sol +8 -11
- package/contracts/interfaces/IPYieldTokenV2.sol +8 -11
- package/contracts/interfaces/IStandardizedYield.sol +16 -17
- package/contracts/limit/LimitMathCore.sol +38 -56
- package/contracts/limit/LimitRouterBase.sol +66 -88
- package/contracts/limit/PendleLimitRouter.sol +11 -7
- package/contracts/offchain-helpers/AddressProvider.sol +1 -1
- package/contracts/offchain-helpers/AutomateReady.sol +2 -2
- package/contracts/offchain-helpers/BalanceReader.sol +21 -9
- package/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol +5 -7
- package/contracts/offchain-helpers/Broadcaster.sol +3 -3
- package/contracts/offchain-helpers/BytesLib.sol +3 -5
- package/contracts/offchain-helpers/EmptyUUPS.sol +2 -2
- package/contracts/offchain-helpers/ExpiredLpPtRedeemer.sol +5 -8
- package/contracts/offchain-helpers/LegacyNFTHelper.sol +1 -5
- package/contracts/offchain-helpers/LimitBackendHelperV2.sol +12 -12
- package/contracts/offchain-helpers/MarketSweed.sol +250 -0
- package/contracts/offchain-helpers/Multicall2.sol +9 -7
- package/contracts/offchain-helpers/PendleExchangeRateOracle.sol +4 -8
- package/contracts/offchain-helpers/PendleFeeSetter.sol +149 -0
- package/contracts/offchain-helpers/PendleGovernanceProxy.sol +7 -10
- package/contracts/offchain-helpers/PendleLPWrapper.sol +12 -3
- package/contracts/offchain-helpers/PendleLPWrapperFactory.sol +2 -2
- package/contracts/offchain-helpers/PendleMulticallV1.sol +7 -7
- package/contracts/offchain-helpers/PendleMulticallV2.sol +13 -12
- package/contracts/offchain-helpers/PendleOffchainStorage.sol +1 -1
- package/contracts/offchain-helpers/PendleWstETHPriceFeed.sol +4 -2
- package/contracts/offchain-helpers/SimulateHelper.sol +7 -6
- package/contracts/offchain-helpers/deploy/PendleCommonPoolDeployHelperV2.sol +13 -32
- package/contracts/offchain-helpers/deploy/PendleCommonSYFactory.sol +7 -11
- package/contracts/offchain-helpers/deploy/PendlePoolDeployHelper.sol +16 -35
- package/contracts/offchain-helpers/deploy/PendlePoolDeployHelperV2.sol +15 -35
- package/contracts/offchain-helpers/deploy/lib/MarketDeployLib.sol +12 -13
- package/contracts/offchain-helpers/errors/SDKErrorsDirectory.sol +1 -4
- package/contracts/offchain-helpers/router-static/PendleRouterStatic.sol +1 -1
- package/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol +12 -9
- package/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol +60 -91
- package/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol +103 -190
- 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 +8 -10
- package/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol +100 -40
- package/contracts/oracles/CrossChainOracle/base/PendleCrossChainOracleBaseApp_Init.sol +14 -6
- package/contracts/oracles/CrossChainOracle/exchangeRate/PendleExchangeRateOracleApp.sol +55 -47
- package/contracts/oracles/CrossChainOracle/exchangeRate/PendleExchangeRateOracleV2.sol +2 -3
- package/contracts/oracles/CrossChainOracle/libraries/ExchangeRateMsgCodec.sol +12 -12
- package/contracts/oracles/PtYtLpOracle/PendleLpOracleLib.sol +17 -20
- package/contracts/oracles/PtYtLpOracle/PendlePYLpOracle.sol +15 -19
- package/contracts/oracles/PtYtLpOracle/PendlePYOracleLib.sol +7 -6
- package/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracle.sol +13 -9
- package/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracleFactory.sol +20 -21
- package/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracleWithQuote.sol +4 -7
- package/contracts/oracles/PtYtLpOracle/samples/BoringLpSeller.sol +2 -2
- package/contracts/oracles/PtYtLpOracle/samples/BoringPYUsdChainlinkAssetOracle.sol +13 -10
- package/contracts/oracles/PtYtLpOracle/samples/BoringPYUsdChainlinkSYOracle.sol +13 -10
- package/contracts/oracles/PtYtLpOracle/samples/BoringPtSeller.sol +6 -5
- package/contracts/oracles/StatelessWrapper/PendleSparkLinearDiscountOracleFactoryWrapper.sol +1 -1
- package/contracts/oracles/internal/PendleSparkLinearDiscountOracleFactory.sol +3 -3
- package/contracts/router/ActionAddRemoveLiqV3.sol +55 -150
- package/contracts/router/ActionCallbackV3.sol +20 -13
- package/contracts/router/ActionMiscV3.sol +54 -78
- package/contracts/router/ActionSimple.sol +76 -128
- package/contracts/router/ActionSwapPTV3.sol +7 -19
- package/contracts/router/ActionSwapYTV3.sol +8 -20
- package/contracts/router/PendleRouterV4.sol +1 -1
- package/contracts/router/Reflector.sol +15 -21
- package/contracts/router/base/ActionBase.sol +61 -105
- package/contracts/router/base/ActionDelegateBase.sol +39 -38
- package/contracts/router/base/CallbackHelper.sol +21 -19
- package/contracts/router/math/ApproxStateLib.sol +28 -28
- package/contracts/router/math/MarketApproxEstimateLib.sol +11 -13
- package/contracts/router/math/MarketApproxLibOnchain.sol +47 -24
- package/contracts/router/math/MarketApproxLibV2.sol +63 -44
- package/contracts/router/swap-aggregator/OKXScaleHelper.sol +125 -54
- package/contracts/router/swap-aggregator/ParaswapScaleHelper.sol +34 -48
- package/contracts/router/swap-aggregator/PendleSwap.sol +26 -28
- package/deployments/1-core.json +3 -3
- package/deployments/1-offchain-helper.json +2 -1
- package/deployments/10-core.json +3 -3
- package/deployments/10-offchain-helper.json +2 -1
- package/deployments/146-core.json +3 -3
- package/deployments/146-offchain-helper.json +2 -1
- package/deployments/42161-core.json +3 -3
- package/deployments/42161-offchain-helper.json +2 -1
- package/deployments/5000-core.json +3 -3
- package/deployments/5000-offchain-helper.json +2 -1
- package/deployments/56-core.json +3 -3
- package/deployments/56-offchain-helper.json +2 -1
- package/deployments/80094-core.json +3 -3
- package/deployments/80094-offchain-helper.json +2 -1
- package/deployments/8453-core.json +3 -3
- package/deployments/8453-offchain-helper.json +2 -1
- package/deployments/9745-core.json +3 -3
- package/deployments/9745-offchain-helper.json +2 -1
- package/deployments/999-core.json +3 -3
- package/deployments/999-offchain-helper.json +2 -1
- package/package.json +3 -5
- package/typechain-types/DepositBox.ts +304 -0
- package/typechain-types/IMarketSweed.ts +203 -0
- package/typechain-types/IOKXDexRouter.ts +99 -0
- package/typechain-types/IPCrossChainSwapHub.ts +1043 -0
- package/typechain-types/IPDepositBox.ts +257 -0
- package/typechain-types/IPLimitRouter.ts +69 -0
- package/typechain-types/IPMarket.ts +13 -0
- package/typechain-types/IPSwapExecutor.ts +129 -0
- package/typechain-types/MarketSweed.ts +242 -0
- package/typechain-types/PendleCrossChainSwapHub.ts +1267 -0
- package/typechain-types/SwapExecutor.ts +129 -0
- package/typechain-types/SwapHubBase.ts +1242 -0
- package/typechain-types/factories/ActionAddRemoveLiqV3__factory.ts +1 -1
- package/typechain-types/factories/ActionCallbackV3__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/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/DepositBox__factory.ts +259 -0
- 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/{IPActionCrossChain__factory.ts → IMarketSweed__factory.ts} +61 -22
- package/typechain-types/factories/IOKXDexRouter__factory.ts +171 -0
- package/typechain-types/factories/IPCrossChainSwapHub__factory.ts +1368 -0
- package/typechain-types/factories/IPDepositBox__factory.ts +162 -0
- package/typechain-types/factories/IPLimitRouter__factory.ts +42 -0
- package/typechain-types/factories/IPMarket__factory.ts +13 -0
- package/typechain-types/factories/IPSwapExecutor__factory.ts +71 -0
- package/typechain-types/factories/LegacyNFTHelper__factory.ts +1 -1
- package/typechain-types/factories/LimitBackendHelperV2__factory.ts +1 -1
- package/typechain-types/factories/MarketSweed__factory.ts +364 -0
- package/typechain-types/factories/Multicall2__factory.ts +1 -1
- package/typechain-types/factories/OracleLib__factory.ts +1 -1
- 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/PendleCrossChainSwapHub__factory.ts +1588 -0
- 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/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/SwapExecutor__factory.ts +110 -0
- package/typechain-types/factories/SwapHubBase__factory.ts +1502 -0
- package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +1 -1
- package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +1 -1
- package/typechain-types/hardhat.d.ts +90 -45
- package/typechain-types/index.ts +18 -10
- package/build/artifacts/contracts/offchain-helpers/PendleMerkleDepositor.sol/PendleMerkleDepositor.dbg.json +0 -4
- package/build/artifacts/contracts/offchain-helpers/PendleMerkleDepositor.sol/PendleMerkleDepositor.json +0 -102
- package/contracts/offchain-helpers/PendleMerkleDepositor.sol +0 -64
- package/typechain-types/ActionCrossChain.ts +0 -161
- package/typechain-types/ActionDelegateBase.ts +0 -57
- package/typechain-types/BasePendleBridgedPrincipalToken.ts +0 -1689
- package/typechain-types/EIP712.ts +0 -135
- package/typechain-types/ERC20Permit.ts +0 -586
- package/typechain-types/IERC5267.ts +0 -135
- package/typechain-types/IPActionCrossChain.ts +0 -161
- package/typechain-types/IPMarketFactoryV3.ts +0 -321
- package/typechain-types/IPMarketV3.ts +0 -1068
- package/typechain-types/LimitBackendHelper.ts +0 -287
- package/typechain-types/OverfillMathLib.ts +0 -81
- 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/PendleERC20Permit.ts +0 -508
- package/typechain-types/PendleERC20PermitUpg.ts +0 -517
- package/typechain-types/PendleERC20Upg.ts +0 -348
- package/typechain-types/PendleMarketFactoryV3.ts +0 -719
- package/typechain-types/PendleMarketV3.ts +0 -1195
- package/typechain-types/PendleMerkleDepositor.ts +0 -171
- package/typechain-types/PendleYieldContractFactory.ts +0 -801
- package/typechain-types/ShortStrings.ts +0 -57
- package/typechain-types/factories/ActionCrossChain__factory.ts +0 -152
- package/typechain-types/factories/ActionDelegateBase__factory.ts +0 -80
- package/typechain-types/factories/BasePendleBridgedPrincipalToken__factory.ts +0 -1548
- package/typechain-types/factories/EIP712__factory.ts +0 -85
- package/typechain-types/factories/ERC20Permit__factory.ts +0 -433
- package/typechain-types/factories/IERC5267__factory.ts +0 -72
- package/typechain-types/factories/IPMarketFactoryV3__factory.ts +0 -217
- package/typechain-types/factories/IPMarketV3__factory.ts +0 -845
- package/typechain-types/factories/LimitBackendHelper__factory.ts +0 -232
- package/typechain-types/factories/OverfillMathLib__factory.ts +0 -77
- 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/PendleERC20PermitUpg__factory.ts +0 -389
- package/typechain-types/factories/PendleERC20Permit__factory.ts +0 -470
- package/typechain-types/factories/PendleERC20Upg__factory.ts +0 -261
- package/typechain-types/factories/PendleMarketFactoryV3__factory.ts +0 -714
- package/typechain-types/factories/PendleMarketV3__factory.ts +0 -1211
- package/typechain-types/factories/PendleMerkleDepositor__factory.ts +0 -164
- package/typechain-types/factories/PendleYieldContractFactory__factory.ts +0 -674
- package/typechain-types/factories/ShortStrings__factory.ts +0 -77
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
2
|
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
|
3
|
-
// documentation files (the “Software”), to deal in the Software without restriction, including without limitation
|
|
3
|
+
// documentation files (the “Software”), to deal in the Software without restriction, including without limitation
|
|
4
|
+
// the
|
|
4
5
|
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
|
|
5
6
|
// permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
7
|
|
|
7
8
|
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
|
|
8
9
|
// Software.
|
|
9
10
|
|
|
10
|
-
// THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
|
11
|
+
// THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
|
12
|
+
// THE
|
|
11
13
|
// WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
12
14
|
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
13
15
|
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -56,32 +58,33 @@ library LogExpMath {
|
|
|
56
58
|
uint256 constant MILD_EXPONENT_BOUND = 2 ** 254 / uint256(ONE_20);
|
|
57
59
|
|
|
58
60
|
// 18 decimal constants
|
|
59
|
-
int256 constant x0 =
|
|
60
|
-
int256 constant a0 =
|
|
61
|
-
|
|
62
|
-
int256 constant
|
|
61
|
+
int256 constant x0 = 128_000_000_000_000_000_000; // 2ˆ7
|
|
62
|
+
int256 constant a0 = 38_877_084_059_945_950_922_200_000_000_000_000_000_000_000_000_000_000_000; // eˆ(x0) (no
|
|
63
|
+
// decimals)
|
|
64
|
+
int256 constant x1 = 64_000_000_000_000_000_000; // 2ˆ6
|
|
65
|
+
int256 constant a1 = 6_235_149_080_811_616_882_910_000_000; // eˆ(x1) (no decimals)
|
|
63
66
|
|
|
64
67
|
// 20 decimal constants
|
|
65
|
-
int256 constant x2 =
|
|
66
|
-
int256 constant a2 =
|
|
67
|
-
int256 constant x3 =
|
|
68
|
-
int256 constant a3 =
|
|
69
|
-
int256 constant x4 =
|
|
70
|
-
int256 constant a4 =
|
|
71
|
-
int256 constant x5 =
|
|
72
|
-
int256 constant a5 =
|
|
73
|
-
int256 constant x6 =
|
|
74
|
-
int256 constant a6 =
|
|
75
|
-
int256 constant x7 =
|
|
76
|
-
int256 constant a7 =
|
|
77
|
-
int256 constant x8 =
|
|
78
|
-
int256 constant a8 =
|
|
79
|
-
int256 constant x9 =
|
|
80
|
-
int256 constant a9 =
|
|
81
|
-
int256 constant x10 =
|
|
82
|
-
int256 constant a10 =
|
|
83
|
-
int256 constant x11 =
|
|
84
|
-
int256 constant a11 =
|
|
68
|
+
int256 constant x2 = 3_200_000_000_000_000_000_000; // 2ˆ5
|
|
69
|
+
int256 constant a2 = 7_896_296_018_268_069_516_100_000_000_000_000; // eˆ(x2)
|
|
70
|
+
int256 constant x3 = 1_600_000_000_000_000_000_000; // 2ˆ4
|
|
71
|
+
int256 constant a3 = 888_611_052_050_787_263_676_000_000; // eˆ(x3)
|
|
72
|
+
int256 constant x4 = 800_000_000_000_000_000_000; // 2ˆ3
|
|
73
|
+
int256 constant a4 = 298_095_798_704_172_827_474_000; // eˆ(x4)
|
|
74
|
+
int256 constant x5 = 400_000_000_000_000_000_000; // 2ˆ2
|
|
75
|
+
int256 constant a5 = 5_459_815_003_314_423_907_810; // eˆ(x5)
|
|
76
|
+
int256 constant x6 = 200_000_000_000_000_000_000; // 2ˆ1
|
|
77
|
+
int256 constant a6 = 738_905_609_893_065_022_723; // eˆ(x6)
|
|
78
|
+
int256 constant x7 = 100_000_000_000_000_000_000; // 2ˆ0
|
|
79
|
+
int256 constant a7 = 271_828_182_845_904_523_536; // eˆ(x7)
|
|
80
|
+
int256 constant x8 = 50_000_000_000_000_000_000; // 2ˆ-1
|
|
81
|
+
int256 constant a8 = 164_872_127_070_012_814_685; // eˆ(x8)
|
|
82
|
+
int256 constant x9 = 25_000_000_000_000_000_000; // 2ˆ-2
|
|
83
|
+
int256 constant a9 = 128_402_541_668_774_148_407; // eˆ(x9)
|
|
84
|
+
int256 constant x10 = 12_500_000_000_000_000_000; // 2ˆ-3
|
|
85
|
+
int256 constant a10 = 113_314_845_306_682_631_683; // eˆ(x10)
|
|
86
|
+
int256 constant x11 = 6_250_000_000_000_000_000; // 2ˆ-4
|
|
87
|
+
int256 constant a11 = 106_449_445_891_785_942_956; // eˆ(x11)
|
|
85
88
|
|
|
86
89
|
/**
|
|
87
90
|
* @dev Natural exponentiation (e^x) with signed 18 decimal fixed point exponent.
|
|
@@ -93,28 +96,29 @@ library LogExpMath {
|
|
|
93
96
|
require(x >= MIN_NATURAL_EXPONENT && x <= MAX_NATURAL_EXPONENT, "Invalid exponent");
|
|
94
97
|
|
|
95
98
|
if (x < 0) {
|
|
96
|
-
// We only handle positive exponents: e^(-x) is computed as 1 / e^x. We can safely make x positive since
|
|
97
|
-
// fits in the signed 256 bit range (as it is larger than MIN_NATURAL_EXPONENT).
|
|
99
|
+
// We only handle positive exponents: e^(-x) is computed as 1 / e^x. We can safely make x positive since
|
|
100
|
+
// it fits in the signed 256 bit range (as it is larger than MIN_NATURAL_EXPONENT).
|
|
98
101
|
// Fixed point division requires multiplying by ONE_18.
|
|
99
102
|
return ((ONE_18 * ONE_18) / exp(-x));
|
|
100
103
|
}
|
|
101
104
|
|
|
102
|
-
// First, we use the fact that e^(x+y) = e^x * e^y to decompose x into a sum of powers of two, which we call
|
|
103
|
-
// where x_n == 2^(7 - n), and e^x_n = a_n has been precomputed. We choose the first x_n, x0, to equal
|
|
105
|
+
// First, we use the fact that e^(x+y) = e^x * e^y to decompose x into a sum of powers of two, which we call
|
|
106
|
+
// x_n, where x_n == 2^(7 - n), and e^x_n = a_n has been precomputed. We choose the first x_n, x0, to equal
|
|
107
|
+
// 2^7
|
|
104
108
|
// because all larger powers are larger than MAX_NATURAL_EXPONENT, and therefore not present in the
|
|
105
109
|
// decomposition.
|
|
106
|
-
// At the end of this process we will have the product of all e^x_n = a_n that apply, and the remainder of
|
|
107
|
-
// decomposition, which will be lower than the smallest x_n.
|
|
110
|
+
// At the end of this process we will have the product of all e^x_n = a_n that apply, and the remainder of
|
|
111
|
+
// this decomposition, which will be lower than the smallest x_n.
|
|
108
112
|
// exp(x) = k_0 * a_0 * k_1 * a_1 * ... + k_n * a_n * exp(remainder), where each k_n equals either 0 or 1.
|
|
109
113
|
// We mutate x by subtracting x_n, making it the remainder of the decomposition.
|
|
110
114
|
|
|
111
115
|
// The first two a_n (e^(2^7) and e^(2^6)) are too large if stored as 18 decimal numbers, and could cause
|
|
112
116
|
// intermediate overflows. Instead we store them as plain integers, with 0 decimals.
|
|
113
|
-
// Additionally, x0 + x1 is larger than MAX_NATURAL_EXPONENT, which means they will not both be present in
|
|
114
|
-
// decomposition.
|
|
117
|
+
// Additionally, x0 + x1 is larger than MAX_NATURAL_EXPONENT, which means they will not both be present in
|
|
118
|
+
// the decomposition.
|
|
115
119
|
|
|
116
|
-
// For each x_n, we test if that term is present in the decomposition (if x is larger than it), and if so
|
|
117
|
-
// it and compute the accumulated product.
|
|
120
|
+
// For each x_n, we test if that term is present in the decomposition (if x is larger than it), and if so
|
|
121
|
+
// deduct it and compute the accumulated product.
|
|
118
122
|
|
|
119
123
|
int256 firstAN;
|
|
120
124
|
if (x >= x0) {
|
|
@@ -131,8 +135,8 @@ library LogExpMath {
|
|
|
131
135
|
// smaller terms.
|
|
132
136
|
x *= 100;
|
|
133
137
|
|
|
134
|
-
// `product` is the accumulated product of all a_n (except a0 and a1), which starts at 20 decimal fixed
|
|
135
|
-
// one. Recall that fixed point multiplication requires dividing by ONE_20.
|
|
138
|
+
// `product` is the accumulated product of all a_n (except a0 and a1), which starts at 20 decimal fixed
|
|
139
|
+
// point one. Recall that fixed point multiplication requires dividing by ONE_20.
|
|
136
140
|
int256 product = ONE_20;
|
|
137
141
|
|
|
138
142
|
if (x >= x2) {
|
|
@@ -170,8 +174,8 @@ library LogExpMath {
|
|
|
170
174
|
|
|
171
175
|
// x10 and x11 are unnecessary here since we have high enough precision already.
|
|
172
176
|
|
|
173
|
-
// Now we need to compute e^x, where x is small (in particular, it is smaller than x9). We use the Taylor
|
|
174
|
-
// expansion for e^x: 1 + x + (x^2 / 2!) + (x^3 / 3!) + ... + (x^n / n!).
|
|
177
|
+
// Now we need to compute e^x, where x is small (in particular, it is smaller than x9). We use the Taylor
|
|
178
|
+
// series expansion for e^x: 1 + x + (x^2 / 2!) + (x^3 / 3!) + ... + (x^n / n!).
|
|
175
179
|
|
|
176
180
|
int256 seriesSum = ONE_20; // The initial one in the sum, with 20 decimal places.
|
|
177
181
|
int256 term; // Each term in the sum, where the nth term is (x^n / n!).
|
|
@@ -219,8 +223,9 @@ library LogExpMath {
|
|
|
219
223
|
// 12 Taylor terms are sufficient for 18 decimal precision.
|
|
220
224
|
|
|
221
225
|
// We now have the first a_n (with no decimals), and the product of all other a_n present, and the Taylor
|
|
222
|
-
// approximation of the exponentiation of the remainder (both with 20 decimals). All that remains is to
|
|
223
|
-
// all three (one 20 decimal fixed point multiplication, dividing by ONE_20, and one integer
|
|
226
|
+
// approximation of the exponentiation of the remainder (both with 20 decimals). All that remains is to
|
|
227
|
+
// multiply all three (one 20 decimal fixed point multiplication, dividing by ONE_20, and one integer
|
|
228
|
+
// multiplication),
|
|
224
229
|
// and then drop two digits to return an 18 decimal value.
|
|
225
230
|
|
|
226
231
|
return (((product * seriesSum) / ONE_20) * firstAN) / 100;
|
|
@@ -266,10 +271,11 @@ library LogExpMath {
|
|
|
266
271
|
require(x < 2 ** 255, "x out of bounds");
|
|
267
272
|
int256 x_int256 = int256(x);
|
|
268
273
|
|
|
269
|
-
// We will compute y * ln(x) in a single step. Depending on the value of x, we can either use ln or ln_36.
|
|
270
|
-
// both cases, we leave the division by ONE_18 (due to fixed point multiplication) to the end.
|
|
274
|
+
// We will compute y * ln(x) in a single step. Depending on the value of x, we can either use ln or ln_36.
|
|
275
|
+
// In both cases, we leave the division by ONE_18 (due to fixed point multiplication) to the end.
|
|
271
276
|
|
|
272
|
-
// This prevents y * ln(x) from overflowing, and at the same time guarantees y fits in the signed 256 bit
|
|
277
|
+
// This prevents y * ln(x) from overflowing, and at the same time guarantees y fits in the signed 256 bit
|
|
278
|
+
// range.
|
|
273
279
|
require(y < MILD_EXPONENT_BOUND, "y out of bounds");
|
|
274
280
|
int256 y_int256 = int256(y);
|
|
275
281
|
|
|
@@ -277,8 +283,8 @@ library LogExpMath {
|
|
|
277
283
|
if (LN_36_LOWER_BOUND < x_int256 && x_int256 < LN_36_UPPER_BOUND) {
|
|
278
284
|
int256 ln_36_x = _ln_36(x_int256);
|
|
279
285
|
|
|
280
|
-
// ln_36_x has 36 decimal places, so multiplying by y_int256 isn't as straightforward, since we can't
|
|
281
|
-
// bring y_int256 to 36 decimal places, as it might overflow. Instead, we perform two 18 decimal
|
|
286
|
+
// ln_36_x has 36 decimal places, so multiplying by y_int256 isn't as straightforward, since we can't
|
|
287
|
+
// just bring y_int256 to 36 decimal places, as it might overflow. Instead, we perform two 18 decimal
|
|
282
288
|
// multiplications and add the results: one with the first 18 decimals of ln_36_x, and one with the
|
|
283
289
|
// (downscaled) last 18 decimals.
|
|
284
290
|
logx_times_y = ((ln_36_x / ONE_18) * y_int256 + ((ln_36_x % ONE_18) * y_int256) / ONE_18);
|
|
@@ -289,8 +295,7 @@ library LogExpMath {
|
|
|
289
295
|
|
|
290
296
|
// Finally, we compute exp(y * ln(x)) to arrive at x^y
|
|
291
297
|
require(
|
|
292
|
-
MIN_NATURAL_EXPONENT <= logx_times_y && logx_times_y <= MAX_NATURAL_EXPONENT,
|
|
293
|
-
"product out of bounds"
|
|
298
|
+
MIN_NATURAL_EXPONENT <= logx_times_y && logx_times_y <= MAX_NATURAL_EXPONENT, "product out of bounds"
|
|
294
299
|
);
|
|
295
300
|
|
|
296
301
|
return uint256(exp(logx_times_y));
|
|
@@ -304,25 +309,27 @@ library LogExpMath {
|
|
|
304
309
|
unchecked {
|
|
305
310
|
if (a < ONE_18) {
|
|
306
311
|
// Since ln(a^k) = k * ln(a), we can compute ln(a) as ln(a) = ln((1/a)^(-1)) = - ln((1/a)). If a is less
|
|
307
|
-
// than one, 1/a will be greater than one, and this if statement will not be entered in the recursive
|
|
308
|
-
// Fixed point division requires multiplying by ONE_18.
|
|
312
|
+
// than one, 1/a will be greater than one, and this if statement will not be entered in the recursive
|
|
313
|
+
// call. Fixed point division requires multiplying by ONE_18.
|
|
309
314
|
return (-_ln((ONE_18 * ONE_18) / a));
|
|
310
315
|
}
|
|
311
316
|
|
|
312
|
-
// First, we use the fact that ln^(a * b) = ln(a) + ln(b) to decompose ln(a) into a sum of powers of two,
|
|
313
|
-
// we call x_n, where x_n == 2^(7 - n), which are the natural logarithm of precomputed quantities a_n
|
|
314
|
-
//
|
|
315
|
-
//
|
|
316
|
-
//
|
|
317
|
-
//
|
|
317
|
+
// First, we use the fact that ln^(a * b) = ln(a) + ln(b) to decompose ln(a) into a sum of powers of two,
|
|
318
|
+
// which we call x_n, where x_n == 2^(7 - n), which are the natural logarithm of precomputed quantities a_n
|
|
319
|
+
// (that is,
|
|
320
|
+
// ln(a_n) = x_n). We choose the first x_n, x0, to equal 2^7 because the exponential of all larger powers
|
|
321
|
+
// cannot be represented as 18 fixed point decimal numbers in 256 bits, and are therefore larger than a.
|
|
322
|
+
// At the end of this process we will have the sum of all x_n = ln(a_n) that apply, and the remainder of
|
|
323
|
+
// this decomposition, which will be lower than the smallest a_n.
|
|
318
324
|
// ln(a) = k_0 * x_0 + k_1 * x_1 + ... + k_n * x_n + ln(remainder), where each k_n equals either 0 or 1.
|
|
319
325
|
// We mutate a by subtracting a_n, making it the remainder of the decomposition.
|
|
320
326
|
|
|
321
|
-
// For reasons related to how `exp` works, the first two a_n (e^(2^7) and e^(2^6)) are not stored as fixed
|
|
322
|
-
// numbers with 18 decimals, but instead as plain integers with 0 decimals, so we need to multiply
|
|
327
|
+
// For reasons related to how `exp` works, the first two a_n (e^(2^7) and e^(2^6)) are not stored as fixed
|
|
328
|
+
// point numbers with 18 decimals, but instead as plain integers with 0 decimals, so we need to multiply
|
|
329
|
+
// them by
|
|
323
330
|
// ONE_18 to convert them to fixed point.
|
|
324
|
-
// For each a_n, we test if that term is present in the decomposition (if a is larger than it), and if so
|
|
325
|
-
// by it and compute the accumulated sum.
|
|
331
|
+
// For each a_n, we test if that term is present in the decomposition (if a is larger than it), and if so
|
|
332
|
+
// divide by it and compute the accumulated sum.
|
|
326
333
|
|
|
327
334
|
int256 sum = 0;
|
|
328
335
|
if (a >= a0 * ONE_18) {
|
|
@@ -335,7 +342,8 @@ library LogExpMath {
|
|
|
335
342
|
sum += x1;
|
|
336
343
|
}
|
|
337
344
|
|
|
338
|
-
// All other a_n and x_n are stored as 20 digit fixed point numbers, so we convert the sum and a to this
|
|
345
|
+
// All other a_n and x_n are stored as 20 digit fixed point numbers, so we convert the sum and a to this
|
|
346
|
+
// format.
|
|
339
347
|
sum *= 100;
|
|
340
348
|
a *= 100;
|
|
341
349
|
|
|
@@ -391,8 +399,8 @@ library LogExpMath {
|
|
|
391
399
|
sum += x11;
|
|
392
400
|
}
|
|
393
401
|
|
|
394
|
-
// a is now a small number (smaller than a_11, which roughly equals 1.06). This means we can use a Taylor
|
|
395
|
-
// that converges rapidly for values of `a` close to one - the same one used in ln_36.
|
|
402
|
+
// a is now a small number (smaller than a_11, which roughly equals 1.06). This means we can use a Taylor
|
|
403
|
+
// series that converges rapidly for values of `a` close to one - the same one used in ln_36.
|
|
396
404
|
// Let z = (a - 1) / (a + 1).
|
|
397
405
|
// ln(a) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))
|
|
398
406
|
|
|
@@ -428,8 +436,9 @@ library LogExpMath {
|
|
|
428
436
|
// Finally, we multiply by 2 (non fixed point) to compute ln(remainder)
|
|
429
437
|
seriesSum *= 2;
|
|
430
438
|
|
|
431
|
-
// We now have the sum of all x_n present, and the Taylor approximation of the logarithm of the remainder
|
|
432
|
-
// with 20 decimals). All that remains is to sum these two, and then drop two digits to return a 18
|
|
439
|
+
// We now have the sum of all x_n present, and the Taylor approximation of the logarithm of the remainder
|
|
440
|
+
// (both with 20 decimals). All that remains is to sum these two, and then drop two digits to return a 18
|
|
441
|
+
// decimal
|
|
433
442
|
// value.
|
|
434
443
|
|
|
435
444
|
return (sum + seriesSum) / 100;
|
|
@@ -437,7 +446,8 @@ library LogExpMath {
|
|
|
437
446
|
}
|
|
438
447
|
|
|
439
448
|
/**
|
|
440
|
-
* @dev Intrnal high precision (36 decimal places) natural logarithm (ln(x)) with signed 18 decimal fixed point
|
|
449
|
+
* @dev Intrnal high precision (36 decimal places) natural logarithm (ln(x)) with signed 18 decimal fixed point
|
|
450
|
+
* argument,
|
|
441
451
|
* for x close to one.
|
|
442
452
|
*
|
|
443
453
|
* Should only be used if x is between LN_36_LOWER_BOUND and LN_36_UPPER_BOUND.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// SPDX-License-Identifier: SEE LICENSE IN LICENSE
|
|
2
2
|
pragma solidity ^0.8.19;
|
|
3
3
|
|
|
4
|
-
import {IPFixedPricePTAMM, IPFixedPricePTAMMSwapCallback} from "../interfaces/IPFixedPricePTAMM.sol";
|
|
5
4
|
import {IPChainlinkOracleEssential} from "../interfaces/IPChainlinkOracleEssential.sol";
|
|
5
|
+
import {IPFixedPricePTAMM, IPFixedPricePTAMMSwapCallback} from "../interfaces/IPFixedPricePTAMM.sol";
|
|
6
6
|
|
|
7
7
|
import {ReentrancyGuardUpgradeable} from "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
|
|
8
8
|
|
|
9
|
-
import {PMath} from "../core/libraries/math/PMath.sol";
|
|
10
9
|
import {BoringOwnableUpgradeableV2} from "../core/libraries/BoringOwnableUpgradeableV2.sol";
|
|
11
10
|
import {TokenHelper} from "../core/libraries/TokenHelper.sol";
|
|
11
|
+
import {PMath} from "../core/libraries/math/PMath.sol";
|
|
12
12
|
import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
|
|
13
13
|
|
|
14
14
|
contract FixedPricePTAMM is
|
|
@@ -55,35 +55,36 @@ contract FixedPricePTAMM is
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
function priceOracle(
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
function priceOracle(address PT, address token)
|
|
59
|
+
public
|
|
60
|
+
view
|
|
61
|
+
returns (IPChainlinkOracleEssential oracle, uint256 multiplier)
|
|
62
|
+
{
|
|
62
63
|
oracle = IPChainlinkOracleEssential($().priceOracle[PT][token].oracle);
|
|
63
64
|
multiplier = $().priceOracle[PT][token].multiplier;
|
|
64
65
|
|
|
65
66
|
if (address(oracle) == address(0)) revert OracleNotSet(PT, token);
|
|
66
67
|
}
|
|
67
68
|
|
|
68
|
-
function previewSwapPtForExactToken(
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
uint256
|
|
72
|
-
|
|
69
|
+
function previewSwapPtForExactToken(address PT, address token, uint256 exactTokenOut)
|
|
70
|
+
public
|
|
71
|
+
view
|
|
72
|
+
returns (uint256 amountPtIn)
|
|
73
|
+
{
|
|
73
74
|
(IPChainlinkOracleEssential oracle, uint256 multiplier) = priceOracle(PT, token);
|
|
74
|
-
(, int256 rawPrice
|
|
75
|
+
(, int256 rawPrice,,,) = oracle.latestRoundData();
|
|
75
76
|
|
|
76
77
|
// ceil(exactTokenOut / (rawPrice * multiplier))
|
|
77
78
|
return (exactTokenOut * PMath.ONE * PMath.ONE).rawDivUp(rawPrice.Uint() * multiplier);
|
|
78
79
|
}
|
|
79
80
|
|
|
80
|
-
function previewSwapExactPtForToken(
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
function previewSwapExactPtForToken(address PT, uint256 exactPtIn, address token)
|
|
82
|
+
public
|
|
83
|
+
view
|
|
84
|
+
returns (uint256 amountTokenOut)
|
|
85
|
+
{
|
|
85
86
|
(IPChainlinkOracleEssential oracle, uint256 multiplier) = priceOracle(PT, token);
|
|
86
|
-
(, int256 rawPrice
|
|
87
|
+
(, int256 rawPrice,,,) = oracle.latestRoundData();
|
|
87
88
|
|
|
88
89
|
// exactPtIn * rawPrice * multiplier
|
|
89
90
|
return (exactPtIn * rawPrice.Uint() * multiplier) / (PMath.ONE * PMath.ONE);
|
|
@@ -99,31 +100,27 @@ contract FixedPricePTAMM is
|
|
|
99
100
|
return _swapPtForExactToken(receiver, PT, token, exactTokenOut, data, false);
|
|
100
101
|
}
|
|
101
102
|
|
|
102
|
-
function swapExactPtForToken(
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
uint256
|
|
106
|
-
|
|
107
|
-
bytes calldata data
|
|
108
|
-
) external nonReentrant returns (uint256 netTokenOut) {
|
|
103
|
+
function swapExactPtForToken(address receiver, address PT, uint256 exactPtIn, address token, bytes calldata data)
|
|
104
|
+
external
|
|
105
|
+
nonReentrant
|
|
106
|
+
returns (uint256 netTokenOut)
|
|
107
|
+
{
|
|
109
108
|
return _swapExactPtForToken(receiver, PT, exactPtIn, token, data, false);
|
|
110
109
|
}
|
|
111
110
|
|
|
112
|
-
function transferInThenSwapPtForExactToken(
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
) external nonReentrant returns (uint256 netPtIn) {
|
|
111
|
+
function transferInThenSwapPtForExactToken(address receiver, address PT, address token, uint256 exactTokenOut)
|
|
112
|
+
external
|
|
113
|
+
nonReentrant
|
|
114
|
+
returns (uint256 netPtIn)
|
|
115
|
+
{
|
|
118
116
|
return _swapPtForExactToken(receiver, PT, token, exactTokenOut, "", true);
|
|
119
117
|
}
|
|
120
118
|
|
|
121
|
-
function transferInThenSwapExactPtForToken(
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
uint256
|
|
125
|
-
|
|
126
|
-
) external nonReentrant returns (uint256 netPtIn) {
|
|
119
|
+
function transferInThenSwapExactPtForToken(address receiver, address PT, uint256 exactPtIn, address token)
|
|
120
|
+
external
|
|
121
|
+
nonReentrant
|
|
122
|
+
returns (uint256 netPtIn)
|
|
123
|
+
{
|
|
127
124
|
return _swapExactPtForToken(receiver, PT, exactPtIn, token, "", true);
|
|
128
125
|
}
|
|
129
126
|
|
|
@@ -161,8 +158,9 @@ contract FixedPricePTAMM is
|
|
|
161
158
|
uint256 exactTokenOut,
|
|
162
159
|
bytes memory data
|
|
163
160
|
) internal {
|
|
164
|
-
if ($().totalToken[token] < exactTokenOut)
|
|
161
|
+
if ($().totalToken[token] < exactTokenOut) {
|
|
165
162
|
revert InsufficientTokenForTrade(token, $().totalToken[token], exactTokenOut);
|
|
163
|
+
}
|
|
166
164
|
|
|
167
165
|
_transferOut(token, receiver, exactTokenOut);
|
|
168
166
|
$().totalToken[token] -= exactTokenOut;
|
|
@@ -172,8 +170,9 @@ contract FixedPricePTAMM is
|
|
|
172
170
|
}
|
|
173
171
|
|
|
174
172
|
$().totalToken[PT] += exactPtIn;
|
|
175
|
-
if (_selfBalance(PT) < $().totalToken[PT])
|
|
173
|
+
if (_selfBalance(PT) < $().totalToken[PT]) {
|
|
176
174
|
revert InsufficientPtReceived(PT, _selfBalance(PT), $().totalToken[PT]);
|
|
175
|
+
}
|
|
177
176
|
|
|
178
177
|
emit Swap(msg.sender, receiver, PT, exactPtIn, token, exactTokenOut);
|
|
179
178
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
2
|
pragma solidity ^0.8.0;
|
|
3
3
|
|
|
4
|
-
import {IPPTOFTAdapterFactory} from "../../../interfaces/IPPTOFTAdapterFactory.sol";
|
|
5
4
|
import {BoringOwnableUpgradeableV2} from "../../../core/libraries/BoringOwnableUpgradeableV2.sol";
|
|
5
|
+
import {IPPTOFTAdapterFactory} from "../../../interfaces/IPPTOFTAdapterFactory.sol";
|
|
6
6
|
import {OFTAdapterImpl} from "../../oftImpl/hub/OFTAdapterImpl.sol";
|
|
7
7
|
|
|
8
8
|
import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
pragma solidity ^0.8.19;
|
|
3
3
|
|
|
4
4
|
import {IPBridgedPrincipalToken} from "../../../interfaces/IPBridgedPrincipalToken.sol";
|
|
5
|
-
import {OFT, OFTCore
|
|
5
|
+
import {IOFT, OFT, OFTCore} from "@layerzerolabs/oft-evm/contracts/OFT.sol";
|
|
6
6
|
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
|
|
7
7
|
import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
|
|
8
8
|
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity ^0.8.30;
|
|
3
|
+
|
|
4
|
+
import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";
|
|
5
|
+
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
|
6
|
+
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
|
|
7
|
+
import {Address} from "@openzeppelin/contracts/utils/Address.sol";
|
|
8
|
+
import {TokenHelper} from "../../core/libraries/TokenHelper.sol";
|
|
9
|
+
import {ApprovedCall, IPDepositBox} from "../../interfaces/IPDepositBox.sol";
|
|
10
|
+
|
|
11
|
+
contract DepositBox is IPDepositBox, TokenHelper, Initializable {
|
|
12
|
+
using Address for address;
|
|
13
|
+
using SafeERC20 for IERC20;
|
|
14
|
+
|
|
15
|
+
address public immutable HUB;
|
|
16
|
+
address public immutable TREASURY;
|
|
17
|
+
address public OWNER;
|
|
18
|
+
uint32 public BOX_ID;
|
|
19
|
+
|
|
20
|
+
constructor(address hub_, address treasury_) {
|
|
21
|
+
_disableInitializers();
|
|
22
|
+
HUB = hub_;
|
|
23
|
+
TREASURY = treasury_;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
modifier onlyHub() {
|
|
27
|
+
require(msg.sender == HUB, "DepositBox: caller is not hub");
|
|
28
|
+
_;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function initialize(address owner_, uint32 boxId_) external initializer onlyHub {
|
|
32
|
+
OWNER = owner_;
|
|
33
|
+
BOX_ID = boxId_;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function payTreasury(address token, uint256 amount) external onlyHub {
|
|
37
|
+
_transferOut(token, TREASURY, amount);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function withdrawTo(address to, address token, uint256 amount) external onlyHub {
|
|
41
|
+
_transferOut(token, to, amount);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function approveAndCall(ApprovedCall memory call, address nativeRefund)
|
|
45
|
+
external
|
|
46
|
+
payable
|
|
47
|
+
onlyHub
|
|
48
|
+
returns (bytes memory result)
|
|
49
|
+
{
|
|
50
|
+
uint256 nativeAmount = call.token == NATIVE ? call.amount : 0;
|
|
51
|
+
uint256 nativeFee = msg.value;
|
|
52
|
+
|
|
53
|
+
uint256 initialNativeBalance = _selfBalance(NATIVE) - nativeAmount - nativeFee;
|
|
54
|
+
|
|
55
|
+
_approveForExtRouter(call.token, call.spender, call.amount);
|
|
56
|
+
result = call.spender.functionCallWithValue(call.data, nativeAmount + nativeFee);
|
|
57
|
+
_approveForExtRouter(call.token, call.spender, 0);
|
|
58
|
+
|
|
59
|
+
uint256 finalNativeBalance = _selfBalance(NATIVE);
|
|
60
|
+
|
|
61
|
+
if (finalNativeBalance > initialNativeBalance) {
|
|
62
|
+
_transferOut(NATIVE, nativeRefund, finalNativeBalance - initialNativeBalance);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function _approveForExtRouter(address token, address extRouter, uint256 amount) internal {
|
|
67
|
+
if (token == NATIVE) return;
|
|
68
|
+
IERC20(token).forceApprove(extRouter, amount);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
receive() external payable {}
|
|
72
|
+
}
|