@pendle/core-v2 6.3.2-swaphubtest2 → 6.3.3
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/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/PendleMsgSenderAppUpg.sol/PendleMsgSenderAppUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/ExcessivelySafeCall.sol/ExcessivelySafeCall.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol/LayerZeroHelper.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/PendleMerkleDistributor.sol/PendleMerkleDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/PendleMultiTokenMerkleDistributor.sol/PendleMultiTokenMerkleDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.dbg.json +1 -1
- 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/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.dbg.json +1 -1
- 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/VeHistoryLib.sol/CheckpointHelper.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.dbg.json +1 -1
- 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/OracleLib.sol/OracleLib.dbg.json +1 -1
- 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/PendleMarketV6.sol/PendleMarketV6.dbg.json +1 -1
- 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/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/PendleYieldContractFactoryUpg.sol/PendleYieldContractFactoryUpg.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.dbg.json +1 -1
- package/build/artifacts/contracts/core/erc20/PendleERC20.sol/PendleERC20.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/ArrayLib.sol/ArrayLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/BaseSplitCodeFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/CodeDeployer.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeableV2.sol/BoringOwnableUpgradeableData.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeableV2.sol/BoringOwnableUpgradeableV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/ExpiryUtilsLib.sol/ExpiryUtils.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/MiniHelpers.sol/MiniHelpers.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/StringLib.sol/StringLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/TokenHelper.sol/TokenHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/math/LogExpMath.sol/LogExpMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/math/PMath.sol/PMath.dbg.json +1 -1
- package/build/artifacts/contracts/cross-chain/FixedPricePTAMM.sol/FixedPricePTAMM.dbg.json +1 -1
- package/build/artifacts/contracts/cross-chain/factory/hub/PendlePTOFTAdapterFactory.sol/PendlePTOFTAdapterFactory.dbg.json +1 -1
- package/build/artifacts/contracts/cross-chain/oftImpl/hub/OFTAdapterImpl.sol/OFTAdapterImpl.dbg.json +1 -1
- package/build/artifacts/contracts/cross-chain/oftImpl/spoke/PendleBridgedPrincipalToken.sol/PendleBridgedPrincipalToken.dbg.json +1 -1
- package/build/artifacts/contracts/deprecated/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/deprecated/VeDistributor/PendleFeeDistributorV2.sol/PendleFeeDistributorV2.dbg.json +1 -1
- 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 +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/IPLimitRouterCallback.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarketFactory.sol/IPMarketFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/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/LimitRouterBase.sol/LimitRouterBase.dbg.json +1 -1
- package/build/artifacts/contracts/limit/helpers/NonceManager.sol/NonceManager.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AddressProvider.sol/AddressProvider.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/AutomateReady.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/IAutomate.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/IOpsProxyFactory.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/ITaskTreasuryUpgradable.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BalanceReader.sol/BalanceReader.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol/BaseSplitCodeFactoryContract.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BytesLib.sol/BytesLib.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/EmptyUUPS.sol/EmptyUUPS.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/ExpiredLpPtRedeemer.sol/ExpiredLpPtRedeemer.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/LegacyNFTHelper.sol/LegacyNFTHelper.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/LegacyNFTHelper.sol/StarNFTV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/LimitBackendHelperV2.sol/LimitBackendHelperV2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/MarketSweed.sol/MarketSweed.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/Multicall2.sol/Multicall2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleAPIFeeDepositor.sol/PendleAPIFeeDepositor.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/PendleAPIFeeDepositor.sol/PendleAPIFeeDepositor.json +102 -0
- package/build/artifacts/contracts/offchain-helpers/PendleExchangeRateOracle.sol/PendleExchangeRateOracle.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleFeeSetter.sol/PendleFeeSetter.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleGovernanceProxy.sol/PendleGovernanceProxy.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleLPWrapper.sol/PendleLPWrapper.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleLPWrapperFactory.sol/PendleLPWrapperFactory.dbg.json +1 -1
- 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/PendleMulticallV1.sol/PendleMulticallV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallV2.sol/PendleMulticallV2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleOffchainStorage.sol/PendleOffchainStorage.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleWstETHPriceFeed.sol/PendleWstETHPriceFeed.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/SimulateHelper.sol/SimulateHelper.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/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/PendleCommonSYFactory.sol/PendleCommonSYFactory.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelper.sol/PendlePoolDeployHelper.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelperV2.sol/PendlePoolDeployHelperV2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/deploy/lib/MarketDeployLib.sol/MarketDeployLib.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/errors/SDKErrorsDirectory.sol/SDKErrorsDirectory.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.dbg.json +1 -1
- 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/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.dbg.json +1 -1
- 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/ActionStorageStatic.sol/ActionStorageStatic.dbg.json +1 -1
- 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/MarketApproxLibV1.sol/MarketApproxPtInLibV1.dbg.json +1 -1
- 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/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/PendleExchangeRateOracleV2.sol/PendleExchangeRateOracleV2.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/CrossChainOracle/libraries/ExchangeRateMsgCodec.sol/ExchangeRateMsgCodec.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/PendleLpOracleLib.sol/PendleLpOracleLib.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/PendlePYLpOracle.sol/PendlePYLpOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/PendlePYOracleLib.sol/PendlePYOracleLib.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracle.sol/PendleChainlinkOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracleFactory.sol/PendleChainlinkOracleFactory.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracleWithQuote.sol/PendleChainlinkOracleWithQuote.dbg.json +1 -1
- 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/BoringPYUsdChainlinkSYOracle.sol/BoringPYUsdChainlinkSYOracle.dbg.json +1 -1
- 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/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/router/ActionStorageV4.sol/ActionStorageV4.dbg.json +1 -1
- package/build/artifacts/contracts/router/PendleRouterV4.sol/PendleRouterV4.dbg.json +1 -1
- package/build/artifacts/contracts/router/Reflector.sol/Reflector.dbg.json +1 -1
- 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/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/MarketApproxEstimateLib.sol/MarketApproxEstimateLib.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/MarketApproxLibOnchain.sol/MarketApproxPtInLibOnchain.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/MarketApproxLibOnchain.sol/MarketApproxPtOutLibOnchain.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtInLibV2.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtOutLibV2.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/IPSwapAggregator.sol/IPSwapAggregator.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/OKXScaleHelper.sol/IOKXDexRouter.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/OKXScaleHelper.sol/OKXScaleHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/ParaswapScaleHelper.sol/IAugustusV6.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/ParaswapScaleHelper.sol/ParaswapScaleHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/IKyberScalingHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/IOdosRouterV2.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwap.dbg.json +1 -1
- package/contracts/offchain-helpers/PendleAPIFeeDepositor.sol +33 -0
- package/contracts/offchain-helpers/PendleMerkleDepositor.sol +64 -0
- package/deployments/1-core.json +2 -1
- package/deployments/10-core.json +2 -1
- package/deployments/146-core.json +2 -1
- package/deployments/42161-core.json +2 -1
- package/deployments/42161-offchain-helper.json +2 -1
- package/deployments/5000-core.json +2 -1
- package/deployments/56-core.json +2 -1
- package/deployments/80094-core.json +2 -1
- package/deployments/8453-core.json +2 -1
- package/deployments/9745-core.json +2 -1
- package/deployments/999-core.json +2 -1
- package/package.json +2 -2
- package/typechain-types/ActionCrossChain.ts +161 -0
- package/typechain-types/ActionDelegateBase.ts +57 -0
- package/typechain-types/BasePendleBridgedPrincipalToken.ts +1689 -0
- package/typechain-types/EIP712.ts +135 -0
- package/typechain-types/ERC20Permit.ts +586 -0
- package/typechain-types/IERC5267.ts +135 -0
- package/typechain-types/IPActionCrossChain.ts +161 -0
- package/typechain-types/IPMarketFactoryV3.ts +321 -0
- package/typechain-types/IPMarketV3.ts +1068 -0
- package/typechain-types/LimitBackendHelper.ts +287 -0
- package/typechain-types/OverfillMathLib.ts +81 -0
- package/typechain-types/PendleAPIFeeDepositor.ts +181 -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/PendleERC20Permit.ts +508 -0
- package/typechain-types/PendleERC20PermitUpg.ts +517 -0
- package/typechain-types/PendleERC20Upg.ts +348 -0
- package/typechain-types/PendleMarketFactoryV3.ts +719 -0
- package/typechain-types/PendleMarketV3.ts +1195 -0
- package/typechain-types/PendleMerkleDepositor.ts +171 -0
- package/typechain-types/PendleYieldContractFactory.ts +801 -0
- package/typechain-types/ShortStrings.ts +57 -0
- package/typechain-types/factories/ActionCrossChain__factory.ts +152 -0
- package/typechain-types/factories/ActionDelegateBase__factory.ts +80 -0
- package/typechain-types/factories/BasePendleBridgedPrincipalToken__factory.ts +1548 -0
- package/typechain-types/factories/EIP712__factory.ts +85 -0
- package/typechain-types/factories/ERC20Permit__factory.ts +433 -0
- package/typechain-types/factories/IERC5267__factory.ts +72 -0
- package/typechain-types/factories/IPActionCrossChain__factory.ts +114 -0
- package/typechain-types/factories/IPMarketFactoryV3__factory.ts +217 -0
- package/typechain-types/factories/IPMarketV3__factory.ts +845 -0
- package/typechain-types/factories/LimitBackendHelper__factory.ts +232 -0
- package/typechain-types/factories/OverfillMathLib__factory.ts +77 -0
- package/typechain-types/factories/PendleAPIFeeDepositor__factory.ts +164 -0
- 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/PendleERC20PermitUpg__factory.ts +389 -0
- package/typechain-types/factories/PendleERC20Permit__factory.ts +470 -0
- package/typechain-types/factories/PendleERC20Upg__factory.ts +261 -0
- package/typechain-types/factories/PendleMarketFactoryV3__factory.ts +714 -0
- package/typechain-types/factories/PendleMarketV3__factory.ts +1211 -0
- package/typechain-types/factories/PendleMerkleDepositor__factory.ts +164 -0
- package/typechain-types/factories/PendleYieldContractFactory__factory.ts +674 -0
- package/typechain-types/factories/ShortStrings__factory.ts +77 -0
- package/typechain-types/hardhat.d.ts +54 -72
- package/typechain-types/index.ts +12 -14
- package/build/artifacts/contracts/cross-chain/swap-hub/DepositBox.sol/DepositBox.dbg.json +0 -4
- package/build/artifacts/contracts/cross-chain/swap-hub/DepositBox.sol/DepositBox.json +0 -201
- package/build/artifacts/contracts/cross-chain/swap-hub/PendleCrossChainSwapHub.sol/PendleCrossChainSwapHub.dbg.json +0 -4
- package/build/artifacts/contracts/cross-chain/swap-hub/PendleCrossChainSwapHub.sol/PendleCrossChainSwapHub.json +0 -1519
- package/build/artifacts/contracts/cross-chain/swap-hub/SwapHubBase.sol/SwapHubBase.dbg.json +0 -4
- package/build/artifacts/contracts/cross-chain/swap-hub/SwapHubBase.sol/SwapHubBase.json +0 -1490
- package/build/artifacts/contracts/cross-chain/swap-hub/swap/IPSwapExecutor.sol/IPSwapExecutor.dbg.json +0 -4
- package/build/artifacts/contracts/cross-chain/swap-hub/swap/IPSwapExecutor.sol/IPSwapExecutor.json +0 -56
- package/build/artifacts/contracts/cross-chain/swap-hub/swap/SwapExecutor.sol/SwapExecutor.dbg.json +0 -4
- package/build/artifacts/contracts/cross-chain/swap-hub/swap/SwapExecutor.sol/SwapExecutor.json +0 -60
- package/build/artifacts/contracts/interfaces/IPCrossChainSwapHub.sol/IPCrossChainSwapHub.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IPCrossChainSwapHub.sol/IPCrossChainSwapHub.json +0 -1353
- package/build/artifacts/contracts/interfaces/IPDepositBox.sol/IPDepositBox.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IPDepositBox.sol/IPDepositBox.json +0 -150
- package/contracts/cross-chain/swap-hub/DepositBox.sol +0 -72
- package/contracts/cross-chain/swap-hub/PendleCrossChainSwapHub.sol +0 -206
- package/contracts/cross-chain/swap-hub/SwapHubBase.sol +0 -273
- package/contracts/cross-chain/swap-hub/swap/IPSwapExecutor.sol +0 -14
- package/contracts/cross-chain/swap-hub/swap/SwapExecutor.sol +0 -33
- package/contracts/interfaces/IPCrossChainSwapHub.sol +0 -168
- package/contracts/interfaces/IPDepositBox.sol +0 -25
- package/typechain-types/DepositBox.ts +0 -304
- package/typechain-types/IPCrossChainSwapHub.ts +0 -1043
- package/typechain-types/IPDepositBox.ts +0 -257
- package/typechain-types/IPSwapExecutor.ts +0 -129
- package/typechain-types/PendleCrossChainSwapHub.ts +0 -1267
- package/typechain-types/SwapExecutor.ts +0 -129
- package/typechain-types/SwapHubBase.ts +0 -1242
- package/typechain-types/factories/DepositBox__factory.ts +0 -259
- package/typechain-types/factories/IPCrossChainSwapHub__factory.ts +0 -1368
- package/typechain-types/factories/IPDepositBox__factory.ts +0 -162
- package/typechain-types/factories/IPSwapExecutor__factory.ts +0 -71
- package/typechain-types/factories/PendleCrossChainSwapHub__factory.ts +0 -1588
- package/typechain-types/factories/SwapExecutor__factory.ts +0 -110
- package/typechain-types/factories/SwapHubBase__factory.ts +0 -1502
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"_format": "hh-sol-artifact-1",
|
|
3
|
-
"contractName": "IPDepositBox",
|
|
4
|
-
"sourceName": "contracts/interfaces/IPDepositBox.sol",
|
|
5
|
-
"abi": [
|
|
6
|
-
{
|
|
7
|
-
"inputs": [],
|
|
8
|
-
"name": "BOX_ID",
|
|
9
|
-
"outputs": [
|
|
10
|
-
{
|
|
11
|
-
"internalType": "uint32",
|
|
12
|
-
"name": "",
|
|
13
|
-
"type": "uint32"
|
|
14
|
-
}
|
|
15
|
-
],
|
|
16
|
-
"stateMutability": "view",
|
|
17
|
-
"type": "function"
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"inputs": [],
|
|
21
|
-
"name": "HUB",
|
|
22
|
-
"outputs": [
|
|
23
|
-
{
|
|
24
|
-
"internalType": "address",
|
|
25
|
-
"name": "",
|
|
26
|
-
"type": "address"
|
|
27
|
-
}
|
|
28
|
-
],
|
|
29
|
-
"stateMutability": "view",
|
|
30
|
-
"type": "function"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"inputs": [],
|
|
34
|
-
"name": "OWNER",
|
|
35
|
-
"outputs": [
|
|
36
|
-
{
|
|
37
|
-
"internalType": "address",
|
|
38
|
-
"name": "",
|
|
39
|
-
"type": "address"
|
|
40
|
-
}
|
|
41
|
-
],
|
|
42
|
-
"stateMutability": "view",
|
|
43
|
-
"type": "function"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"inputs": [],
|
|
47
|
-
"name": "TREASURY",
|
|
48
|
-
"outputs": [
|
|
49
|
-
{
|
|
50
|
-
"internalType": "address",
|
|
51
|
-
"name": "",
|
|
52
|
-
"type": "address"
|
|
53
|
-
}
|
|
54
|
-
],
|
|
55
|
-
"stateMutability": "view",
|
|
56
|
-
"type": "function"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"inputs": [
|
|
60
|
-
{
|
|
61
|
-
"components": [
|
|
62
|
-
{
|
|
63
|
-
"internalType": "address",
|
|
64
|
-
"name": "token",
|
|
65
|
-
"type": "address"
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"internalType": "uint256",
|
|
69
|
-
"name": "amount",
|
|
70
|
-
"type": "uint256"
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
"internalType": "address",
|
|
74
|
-
"name": "spender",
|
|
75
|
-
"type": "address"
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"internalType": "bytes",
|
|
79
|
-
"name": "data",
|
|
80
|
-
"type": "bytes"
|
|
81
|
-
}
|
|
82
|
-
],
|
|
83
|
-
"internalType": "struct ApprovedCall",
|
|
84
|
-
"name": "call",
|
|
85
|
-
"type": "tuple"
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
"internalType": "address",
|
|
89
|
-
"name": "nativeRefund",
|
|
90
|
-
"type": "address"
|
|
91
|
-
}
|
|
92
|
-
],
|
|
93
|
-
"name": "approveAndCall",
|
|
94
|
-
"outputs": [
|
|
95
|
-
{
|
|
96
|
-
"internalType": "bytes",
|
|
97
|
-
"name": "",
|
|
98
|
-
"type": "bytes"
|
|
99
|
-
}
|
|
100
|
-
],
|
|
101
|
-
"stateMutability": "payable",
|
|
102
|
-
"type": "function"
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
"inputs": [
|
|
106
|
-
{
|
|
107
|
-
"internalType": "address",
|
|
108
|
-
"name": "token",
|
|
109
|
-
"type": "address"
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
"internalType": "uint256",
|
|
113
|
-
"name": "amount",
|
|
114
|
-
"type": "uint256"
|
|
115
|
-
}
|
|
116
|
-
],
|
|
117
|
-
"name": "payTreasury",
|
|
118
|
-
"outputs": [],
|
|
119
|
-
"stateMutability": "nonpayable",
|
|
120
|
-
"type": "function"
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
"inputs": [
|
|
124
|
-
{
|
|
125
|
-
"internalType": "address",
|
|
126
|
-
"name": "to",
|
|
127
|
-
"type": "address"
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
"internalType": "address",
|
|
131
|
-
"name": "token",
|
|
132
|
-
"type": "address"
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
"internalType": "uint256",
|
|
136
|
-
"name": "amount",
|
|
137
|
-
"type": "uint256"
|
|
138
|
-
}
|
|
139
|
-
],
|
|
140
|
-
"name": "withdrawTo",
|
|
141
|
-
"outputs": [],
|
|
142
|
-
"stateMutability": "nonpayable",
|
|
143
|
-
"type": "function"
|
|
144
|
-
}
|
|
145
|
-
],
|
|
146
|
-
"bytecode": "0x",
|
|
147
|
-
"deployedBytecode": "0x",
|
|
148
|
-
"linkReferences": {},
|
|
149
|
-
"deployedLinkReferences": {}
|
|
150
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
-
pragma solidity ^0.8.30;
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
IOFT,
|
|
6
|
-
MessagingFee,
|
|
7
|
-
MessagingReceipt,
|
|
8
|
-
OFTReceipt,
|
|
9
|
-
SendParam
|
|
10
|
-
} from "@layerzerolabs/oft-evm/contracts/interfaces/IOFT.sol";
|
|
11
|
-
import {ApprovedCall, IPDepositBox} from "../../interfaces/IPDepositBox.sol";
|
|
12
|
-
import {SwapData} from "./swap/IPSwapExecutor.sol";
|
|
13
|
-
import {SwapHubBase} from "./SwapHubBase.sol";
|
|
14
|
-
|
|
15
|
-
contract PendleCrossChainSwapHub is SwapHubBase {
|
|
16
|
-
constructor(address beaconProxyCodeContract_, address depositBoxBeacon_)
|
|
17
|
-
SwapHubBase(beaconProxyCodeContract_, depositBoxBeacon_)
|
|
18
|
-
{
|
|
19
|
-
_disableInitializers();
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function initialize(address _owner) external initializer {
|
|
23
|
-
__EIP712_init("Pendle Cross Chain Swap Hub", "1");
|
|
24
|
-
__BoringOwnableV2_init(_owner);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function withdrawToken(WithdrawTokenMessage memory ms, bytes memory sig) external onlyExecutor {
|
|
28
|
-
_handleWithdrawToken({ms: ms, sig: sig, claimFailed: false});
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function bridgeToken(BridgeTokenMessage memory ms, bytes memory sig) external payable onlyExecutor {
|
|
32
|
-
_handleBridgeToken({ms: ms, sig: sig, claimFailed: false});
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function swapToken(SwapTokenMessage memory ms, bytes memory sig) external onlyExecutor {
|
|
36
|
-
_handleSwapToken({ms: ms, sig: sig, claimFailed: false});
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function buyCrossChainPt(BuyCrossChainPtMessage memory ms, bytes memory sig) external payable onlyExecutor {
|
|
40
|
-
_handleBuyCrossChainPt({ms: ms, sig: sig, claimFailed: false});
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function claimFee(WithdrawTokenMessage memory ms, bytes memory sig) external onlyExecutor {
|
|
44
|
-
_handleWithdrawToken({ms: ms, sig: sig, claimFailed: true});
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
function claimFee(BridgeTokenMessage memory ms, bytes memory sig) external onlyExecutor {
|
|
48
|
-
_handleBridgeToken({ms: ms, sig: sig, claimFailed: true});
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function claimFee(SwapTokenMessage memory ms, bytes memory sig) external onlyExecutor {
|
|
52
|
-
_handleSwapToken({ms: ms, sig: sig, claimFailed: true});
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function claimFee(BuyCrossChainPtMessage memory ms, bytes memory sig) external onlyExecutor {
|
|
56
|
-
_handleBuyCrossChainPt({ms: ms, sig: sig, claimFailed: true});
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
function _handleWithdrawToken(WithdrawTokenMessage memory ms, bytes memory sig, bool claimFailed) internal {
|
|
60
|
-
bytes32 actionHash = hashTypedData(ms);
|
|
61
|
-
_verifyOwnerSig(ms.owner, ms.expiry, ms.nonce, actionHash, sig, !claimFailed);
|
|
62
|
-
|
|
63
|
-
IPDepositBox box = _checkAndDeployBox(ms.owner, ms.boxId);
|
|
64
|
-
|
|
65
|
-
if (claimFailed) {
|
|
66
|
-
_markFailedAndTakeFee(actionHash, box, ms.token, ms.amountFee);
|
|
67
|
-
emit ClaimFeeForFailedAction(ms.owner, ms.boxId, actionHash, ms.token, ms.amountFee);
|
|
68
|
-
} else {
|
|
69
|
-
box.withdrawTo(ms.receiver, ms.token, ms.amountWithdraw);
|
|
70
|
-
|
|
71
|
-
_markSucceededAndTakeFee(actionHash, box, ms.token, ms.amountFee);
|
|
72
|
-
emit WithdrawToken(ms.owner, ms.boxId, actionHash, ms.receiver, ms.token, ms.amountWithdraw, ms.amountFee);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
function _handleBridgeToken(BridgeTokenMessage memory ms, bytes memory sig, bool claimFailed) internal {
|
|
77
|
-
bytes32 actionHash = hashTypedData(ms);
|
|
78
|
-
_verifyOwnerSig(ms.owner, ms.expiry, ms.nonce, actionHash, sig, !claimFailed);
|
|
79
|
-
|
|
80
|
-
IPDepositBox box = _checkAndDeployBox(ms.owner, ms.boxId);
|
|
81
|
-
|
|
82
|
-
if (claimFailed) {
|
|
83
|
-
_markFailedAndTakeFee(actionHash, box, ms.token, ms.amountFee);
|
|
84
|
-
emit ClaimFeeForFailedAction(ms.owner, ms.boxId, actionHash, ms.token, ms.amountFee);
|
|
85
|
-
} else {
|
|
86
|
-
_bridgeToken(ms, box, msg.value);
|
|
87
|
-
|
|
88
|
-
_markSucceededAndTakeFee(actionHash, box, ms.token, ms.amountFee);
|
|
89
|
-
emit BridgeToken(
|
|
90
|
-
ms.owner, ms.boxId, actionHash, ms.bridgeExtRouter, ms.token, ms.amountBridge, ms.amountFee
|
|
91
|
-
);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
function _handleSwapToken(SwapTokenMessage memory ms, bytes memory sig, bool claimFailed) internal {
|
|
96
|
-
bytes32 actionHash = hashTypedData(ms);
|
|
97
|
-
_verifyOwnerSig(ms.owner, ms.expiry, ms.nonce, actionHash, sig, !claimFailed);
|
|
98
|
-
|
|
99
|
-
IPDepositBox box = _checkAndDeployBox(ms.owner, ms.boxId);
|
|
100
|
-
|
|
101
|
-
if (claimFailed) {
|
|
102
|
-
_markFailedAndTakeFee(actionHash, box, ms.tokenSpent, ms.amountFee);
|
|
103
|
-
emit ClaimFeeForFailedAction(ms.owner, ms.boxId, actionHash, ms.tokenSpent, ms.amountFee);
|
|
104
|
-
} else {
|
|
105
|
-
uint256 netTokenReceived = _swapToken(ms, box);
|
|
106
|
-
require(netTokenReceived >= ms.minReceived, InsufficientTokenReceived());
|
|
107
|
-
|
|
108
|
-
_markSucceededAndTakeFee(actionHash, box, ms.tokenSpent, ms.amountFee);
|
|
109
|
-
emit SwapToken(
|
|
110
|
-
ms.owner,
|
|
111
|
-
ms.boxId,
|
|
112
|
-
actionHash,
|
|
113
|
-
ms.tokenSpent,
|
|
114
|
-
ms.amountSpent,
|
|
115
|
-
ms.amountFee,
|
|
116
|
-
ms.tokenReceived,
|
|
117
|
-
netTokenReceived
|
|
118
|
-
);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
function _handleBuyCrossChainPt(BuyCrossChainPtMessage memory ms, bytes memory sig, bool claimFailed) internal {
|
|
123
|
-
bytes32 actionHash = hashTypedData(ms);
|
|
124
|
-
_verifyOwnerSig(ms.owner, ms.expiry, ms.nonce, actionHash, sig, !claimFailed);
|
|
125
|
-
|
|
126
|
-
IPDepositBox box = _checkAndDeployBox(ms.owner, ms.boxId);
|
|
127
|
-
|
|
128
|
-
if (claimFailed) {
|
|
129
|
-
_markFailedAndTakeFee(actionHash, box, ms.tokenSpent, ms.amountFee);
|
|
130
|
-
emit ClaimFeeForFailedAction(ms.owner, ms.boxId, actionHash, ms.tokenSpent, ms.amountFee);
|
|
131
|
-
} else {
|
|
132
|
-
address pt = IOFT(ms.ptAdapter).token();
|
|
133
|
-
uint256 netPtReceived = _buyPtAndBridge(ms, box, pt, msg.value);
|
|
134
|
-
require(netPtReceived >= ms.minPtReceived, InsufficientTokenReceived());
|
|
135
|
-
|
|
136
|
-
_markSucceededAndTakeFee(actionHash, box, ms.tokenSpent, ms.amountFee);
|
|
137
|
-
emit BuyCrossChainPt(
|
|
138
|
-
ms.owner,
|
|
139
|
-
ms.boxId,
|
|
140
|
-
actionHash,
|
|
141
|
-
ms.tokenSpent,
|
|
142
|
-
ms.amountSpent,
|
|
143
|
-
ms.amountFee,
|
|
144
|
-
ms.ptAdapter,
|
|
145
|
-
pt,
|
|
146
|
-
netPtReceived
|
|
147
|
-
);
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
function _bridgeToken(BridgeTokenMessage memory ms, IPDepositBox box, uint256 nativeFee) internal {
|
|
152
|
-
// forgefmt: disable-next-item
|
|
153
|
-
ApprovedCall memory call = ApprovedCall({
|
|
154
|
-
token: ms.token,
|
|
155
|
-
amount: ms.amountBridge,
|
|
156
|
-
spender: ms.bridgeExtRouter,
|
|
157
|
-
data: ms.bridgeCalldata
|
|
158
|
-
});
|
|
159
|
-
box.approveAndCall{value: nativeFee}(call, msg.sender);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
function _swapToken(SwapTokenMessage memory ms, IPDepositBox box) internal returns (uint256 rawTokenReceived) {
|
|
163
|
-
SwapData memory swapData = SwapData({
|
|
164
|
-
tokenIn: ms.tokenSpent,
|
|
165
|
-
amountIn: ms.amountSpent,
|
|
166
|
-
tokenOut: ms.tokenReceived,
|
|
167
|
-
extRouter: ms.swapExtRouter,
|
|
168
|
-
extCalldata: ms.swapCalldata
|
|
169
|
-
});
|
|
170
|
-
rawTokenReceived = _swapFromBox(box, ms.swapExecutor, swapData, ms.receiver);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
function _buyPtAndBridge(BuyCrossChainPtMessage memory ms, IPDepositBox box, address pt, uint256 nativeFee)
|
|
174
|
-
internal
|
|
175
|
-
returns (uint256 netPtReceived)
|
|
176
|
-
{
|
|
177
|
-
SwapData memory swapData = SwapData({
|
|
178
|
-
tokenIn: ms.tokenSpent,
|
|
179
|
-
amountIn: ms.amountSpent,
|
|
180
|
-
tokenOut: pt,
|
|
181
|
-
extRouter: ms.swapExtRouter,
|
|
182
|
-
extCalldata: ms.swapCalldata
|
|
183
|
-
});
|
|
184
|
-
uint256 rawPtReceived = _swapFromBox(box, ms.swapExecutor, swapData, address(box));
|
|
185
|
-
|
|
186
|
-
SendParam memory sendParam = SendParam({
|
|
187
|
-
dstEid: ms.dstEid,
|
|
188
|
-
to: ms.receiver,
|
|
189
|
-
amountLD: rawPtReceived,
|
|
190
|
-
minAmountLD: 0,
|
|
191
|
-
extraOptions: "",
|
|
192
|
-
composeMsg: "",
|
|
193
|
-
oftCmd: ""
|
|
194
|
-
});
|
|
195
|
-
MessagingFee memory sendFee = MessagingFee({nativeFee: nativeFee, lzTokenFee: 0});
|
|
196
|
-
ApprovedCall memory call = ApprovedCall({
|
|
197
|
-
token: pt,
|
|
198
|
-
amount: rawPtReceived,
|
|
199
|
-
spender: ms.ptAdapter,
|
|
200
|
-
data: abi.encodeCall(IOFT.send, (sendParam, sendFee, msg.sender))
|
|
201
|
-
});
|
|
202
|
-
(, OFTReceipt memory oftReceipt) =
|
|
203
|
-
abi.decode(box.approveAndCall{value: nativeFee}(call, msg.sender), (MessagingReceipt, OFTReceipt));
|
|
204
|
-
netPtReceived = oftReceipt.amountReceivedLD;
|
|
205
|
-
}
|
|
206
|
-
}
|