@pendle/core-v2 6.4.4-swaphubtest → 6.5.0-swaphubtest
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol/PendleMsgReceiveEndpointUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol/PendleMsgReceiveEndpointUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiverAppUpg.sol/PendleMsgReceiverAppUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol/PendleMsgSendEndpointUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol/PendleMsgSendEndpointUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSenderAppUpg.sol/PendleMsgSenderAppUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/ExcessivelySafeCall.sol/ExcessivelySafeCall.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol/LayerZeroHelper.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerUpg.sol/PendleGaugeControllerUpg.dbg.json +4 -0
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerUpg.sol/PendleGaugeControllerUpg.json +457 -0
- 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/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/LiquidityMining/sPendle/StakedPendle.sol/StakedPendle.dbg.json +4 -0
- package/build/artifacts/contracts/LiquidityMining/sPendle/StakedPendle.sol/StakedPendle.json +733 -0
- package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.json +2 -2
- package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.json +2 -2
- package/build/artifacts/contracts/core/Market/PendleGauge.sol/PendleGauge.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleGauge.sol/PendleGauge.json +0 -51
- package/build/artifacts/contracts/core/Market/PendleMarketFactoryV7Upg.sol/PendleMarketFactoryV7Upg.dbg.json +4 -0
- package/build/artifacts/contracts/core/Market/PendleMarketFactoryV7Upg.sol/PendleMarketFactoryV7Upg.json +618 -0
- package/build/artifacts/contracts/core/Market/PendleMarketV7.sol/PendleMarketV7.dbg.json +4 -0
- package/build/artifacts/contracts/core/Market/PendleMarketV7.sol/PendleMarketV7.json +1157 -0
- package/build/artifacts/contracts/core/RewardManager/RewardManager.sol/RewardManager.dbg.json +1 -1
- package/build/artifacts/contracts/core/RewardManager/RewardManagerAbstract.sol/RewardManagerAbstract.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/SYUtils.sol/SYUtils.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/InterestManagerYT.sol/InterestManagerYT.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.json +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/libraries/ArrayLib.sol/ArrayLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/BaseSplitCodeFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/CodeDeployer.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeableV2.sol/BoringOwnableUpgradeableData.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeableV2.sol/BoringOwnableUpgradeableV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.json +3 -3
- 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/core/libraries/math/PMath.sol/PMath.json +2 -2
- 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/deposit-box/DepositBox.sol/DepositBox.dbg.json +4 -0
- package/build/artifacts/contracts/cross-chain/deposit-box/DepositBox.sol/DepositBox.json +170 -0
- package/build/artifacts/contracts/cross-chain/deposit-box/DepositBoxFactory.sol/DepositBoxFactory.dbg.json +4 -0
- package/build/artifacts/contracts/cross-chain/deposit-box/DepositBoxFactory.sol/DepositBoxFactory.json +124 -0
- 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/cross-chain/swap-hub/PendleCrossChainSwapHub.sol/PendleCrossChainSwapHub.dbg.json +1 -1
- package/build/artifacts/contracts/cross-chain/swap-hub/PendleCrossChainSwapHub.sol/PendleCrossChainSwapHub.json +302 -511
- package/build/artifacts/contracts/cross-chain/swap-hub/SwapHubBase.sol/SwapHubBase.dbg.json +1 -1
- package/build/artifacts/contracts/cross-chain/swap-hub/SwapHubBase.sol/SwapHubBase.json +301 -501
- 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 +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/IPActionCrossChain.sol/IPActionCrossChain.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 +1 -1
- package/build/artifacts/contracts/interfaces/IPCrossChainSwapHub.sol/IPCrossChainSwapHub.json +265 -478
- package/build/artifacts/contracts/interfaces/IPDepositBox.sol/IPDepositBox.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPDepositBoxFactory.sol/IPDepositBoxFactory.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPDepositBoxFactory.sol/IPDepositBoxFactory.json +108 -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/IPGauge.sol/IPGauge.json +0 -51
- package/build/artifacts/contracts/interfaces/IPGaugeController.sol/IPGaugeController.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPGaugeController.sol/IPGaugeController.json +102 -11
- package/build/artifacts/contracts/interfaces/IPGovernanceProxy.sol/IPGovernanceProxy.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPInterestManagerYT.sol/IPInterestManagerYT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPInterestManagerYTV2.sol/IPInterestManagerYTV2.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPLPWrapperFactory.sol/IPLPWrapperFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitOrderType.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouter.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouterCallback.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.json +0 -19
- 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/IPStakedPendle.sol/IPStakedPendle.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPStakedPendle.sol/IPStakedPendle.json +351 -0
- 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/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/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/BalanceReader.sol/ILegacyMarket.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/BalanceReader.sol/ILegacyMarket.json +30 -0
- package/build/artifacts/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol/BaseSplitCodeFactoryContract.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/ExpiredLpPtRedeemer.sol/ExpiredLpPtRedeemer.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/LegacyNFTHelper.sol/LegacyNFTHelper.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/LegacyNFTHelper.sol/StarNFTV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/LimitBackendHelperV2.sol/LimitBackendHelperV2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/LimitBackendHelperV2.sol/LimitBackendHelperV2.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/MarketSweed.sol/MarketSweed.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/MarketSweed.sol/MarketSweed.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/Multicall2.sol/Multicall2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleAPIFeeDepositor.sol/PendleAPIFeeDepositor.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleAPIFeeDepositor.sol/PendleAPIFeeDepositor.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 +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleFeeSetter.sol/PendleFeeSetter.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleGovernanceProxy.sol/PendleGovernanceProxy.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleLPWrapper.sol/PendleLPWrapper.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleLPWrapper.sol/PendleLPWrapper.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleLPWrapperFactory.sol/PendleLPWrapperFactory.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleLPWrapperFactory.sol/PendleLPWrapperFactory.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleMerkleDepositor.sol/PendleMerkleDepositor.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleMerkleDepositor.sol/PendleMerkleDepositor.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallOwnerV1.sol/PendleMulticallOwnerV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallV1.sol/PendleMulticallV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallV2.sol/PendleMulticallV2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleOffchainStorage.sol/PendleOffchainStorage.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleWstETHPriceFeed.sol/PendleWstETHPriceFeed.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/SimulateHelper.sol/SimulateHelper.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/SimulateHelper.sol/SimulateHelper.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/SupplyCapReader.sol/IPossibleSupplyCapInterface.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/SupplyCapReader.sol/SupplyCapReader.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonPoolDeployHelperV2.sol/PendleCommonPoolDeployHelperV2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonPoolDeployHelperV2.sol/PendleCommonPoolDeployHelperV2.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonSYFactory.sol/PendleCommonSYFactory.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelper.sol/PendlePoolDeployHelper.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelper.sol/PendlePoolDeployHelper.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelperV2.sol/PendlePoolDeployHelperV2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelperV2.sol/PendlePoolDeployHelperV2.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/deploy/lib/MarketDeployLib.sol/MarketDeployLib.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/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/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/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/PendleBoringOneracle.sol/PendleBoringOneracle.json +2 -2
- package/build/artifacts/contracts/oracles/internal/PendleBoringSolvBTCOneracle.sol/PendleBoringSolvBTCOneracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleBoringSolvBTCOneracle.sol/PendleBoringSolvBTCOneracle.json +2 -2
- package/build/artifacts/contracts/oracles/internal/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/PendleRedStoneRateOracleAdapter.sol/PendleRedStoneRateOracleAdapter.json +2 -2
- 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/ActionCrossChain.sol/ActionCrossChain.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionCrossChain.sol/ActionCrossChain.json +2 -2
- package/build/artifacts/contracts/router/ActionMiscV3.sol/ActionMiscV3.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionMiscV3.sol/ActionMiscV3.json +2 -2
- package/build/artifacts/contracts/router/ActionSimple.sol/ActionSimple.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSimple.sol/ActionSimple.json +2 -2
- package/build/artifacts/contracts/router/ActionStorageV4.sol/ActionStorageV4.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionStorageV4.sol/ActionStorageV4.json +2 -2
- package/build/artifacts/contracts/router/ActionSwapPTV3.sol/ActionSwapPTV3.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapPTV3.sol/ActionSwapPTV3.json +2 -2
- package/build/artifacts/contracts/router/ActionSwapYTV3.sol/ActionSwapYTV3.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapYTV3.sol/ActionSwapYTV3.json +2 -2
- package/build/artifacts/contracts/router/PendleRouterV4.sol/PendleRouterV4.dbg.json +1 -1
- package/build/artifacts/contracts/router/PendleRouterV4.sol/PendleRouterV4.json +2 -2
- package/build/artifacts/contracts/router/Reflector.sol/Reflector.dbg.json +1 -1
- package/build/artifacts/contracts/router/Reflector.sol/Reflector.json +2 -2
- package/build/artifacts/contracts/router/RouterStorage.sol/RouterStorage.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/ActionBase.sol/ActionBase.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/ActionDelegateBase.sol/ActionDelegateBase.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/ActionDelegateBase.sol/ActionDelegateBase.json +2 -2
- package/build/artifacts/contracts/router/base/CallbackHelper.sol/CallbackHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/ApproxStateLib.sol/ApproxStateLib.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/ApproxStateLib.sol/ApproxStateLib.json +2 -2
- package/build/artifacts/contracts/router/math/MarketApproxEstimateLib.sol/MarketApproxEstimateLib.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/MarketApproxEstimateLib.sol/MarketApproxEstimateLib.json +2 -2
- package/build/artifacts/contracts/router/math/MarketApproxLibOnchain.sol/MarketApproxPtInLibOnchain.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/MarketApproxLibOnchain.sol/MarketApproxPtInLibOnchain.json +2 -2
- package/build/artifacts/contracts/router/math/MarketApproxLibOnchain.sol/MarketApproxPtOutLibOnchain.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/MarketApproxLibOnchain.sol/MarketApproxPtOutLibOnchain.json +2 -2
- package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtInLibV2.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtInLibV2.json +2 -2
- package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtOutLibV2.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtOutLibV2.json +2 -2
- package/build/artifacts/contracts/router/swap-aggregator/IPSwapAggregator.sol/IPSwapAggregator.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/OKXScaleHelper.sol/IOKXDexRouter.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/OKXScaleHelper.sol/OKXScaleHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/ParaswapScaleHelper.sol/IAugustusV6.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/ParaswapScaleHelper.sol/ParaswapScaleHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/IKyberScalingHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/IOdosRouterV2.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwap.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwap.json +2 -2
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerUpg.sol +122 -0
- package/contracts/LiquidityMining/sPendle/StakedPendle.sol +129 -0
- package/contracts/core/Market/PendleGauge.sol +1 -76
- package/contracts/core/Market/{PendleMarketFactoryV6Upg.sol → PendleMarketFactoryV7Upg.sol} +3 -6
- package/contracts/core/Market/{PendleMarketV6.sol → PendleMarketV7.sol} +16 -16
- package/contracts/core/libraries/Errors.sol +1 -1
- package/contracts/core/libraries/TokenHelper.sol +6 -2
- package/contracts/core/libraries/math/PMath.sol +5 -0
- package/contracts/cross-chain/deposit-box/DepositBoxFactory.sol +44 -0
- package/contracts/cross-chain/swap-hub/PendleCrossChainSwapHub.sol +37 -114
- package/contracts/cross-chain/swap-hub/SwapHubBase.sol +82 -172
- package/contracts/interfaces/IPCrossChainSwapHub.sol +34 -73
- package/contracts/interfaces/IPDepositBoxFactory.sol +19 -0
- package/contracts/interfaces/IPGauge.sol +0 -6
- package/contracts/interfaces/IPGaugeController.sol +20 -3
- package/contracts/interfaces/IPMarket.sol +12 -0
- package/contracts/interfaces/IPStakedPendle.sol +69 -0
- package/contracts/offchain-helpers/BalanceReader.sol +11 -1
- package/contracts/offchain-helpers/MarketSweed.sol +46 -54
- package/contracts/offchain-helpers/PendleMerkleDepositor.sol +5 -6
- package/contracts/router/ActionCrossChain.sol +14 -18
- package/contracts/router/Reflector.sol +19 -2
- package/deployments/1-core.json +3 -2
- package/deployments/10-core.json +1 -1
- package/deployments/130-core.json +2 -1
- package/deployments/146-core.json +1 -1
- package/deployments/42161-core.json +1 -1
- package/deployments/5000-core.json +1 -1
- package/deployments/56-core.json +1 -1
- package/deployments/80094-core.json +1 -1
- package/deployments/8453-core.json +1 -1
- package/deployments/9745-core.json +4 -3
- package/deployments/999-core.json +6 -6
- package/package.json +1 -1
- package/typechain-types/DepositBoxFactory.ts +226 -0
- package/typechain-types/ERC20Upgradeable.ts +426 -0
- package/typechain-types/IERC20MetadataUpgradeable.ts +339 -0
- package/typechain-types/IERC20Upgradeable.ts +300 -0
- package/typechain-types/ILegacyMarket.ts +93 -0
- package/typechain-types/IPCrossChainSwapHub.ts +183 -409
- package/typechain-types/IPDepositBoxFactory.ts +226 -0
- package/typechain-types/IPGauge.ts +7 -81
- package/typechain-types/IPGaugeController.ts +168 -38
- package/typechain-types/IPMarket.ts +0 -19
- package/typechain-types/IPStakedPendle.ts +558 -0
- package/typechain-types/PendleCrossChainSwapHub.ts +226 -434
- package/typechain-types/PendleGauge.ts +0 -63
- package/typechain-types/PendleGaugeControllerUpg.ts +686 -0
- package/typechain-types/PendleMarketFactoryV7Upg.ts +760 -0
- package/typechain-types/PendleMarketV7.ts +1229 -0
- package/typechain-types/StakedPendle.ts +1058 -0
- package/typechain-types/SwapHubBase.ts +225 -433
- package/typechain-types/factories/ActionAddRemoveLiqV3__factory.ts +1 -1
- package/typechain-types/factories/ActionCallbackV3__factory.ts +1 -1
- package/typechain-types/factories/ActionCrossChain__factory.ts +1 -1
- package/typechain-types/factories/ActionInfoStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionMarketAuxStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionMarketCoreStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionMintRedeemStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionMiscV3__factory.ts +1 -1
- package/typechain-types/factories/ActionSimple__factory.ts +1 -1
- package/typechain-types/factories/ActionStorageStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionStorageV4__factory.ts +1 -1
- package/typechain-types/factories/ActionSwapPTV3__factory.ts +1 -1
- package/typechain-types/factories/ActionSwapYTV3__factory.ts +1 -1
- package/typechain-types/factories/ActionVePendleStatic__factory.ts +1 -1
- package/typechain-types/factories/BalanceReader__factory.ts +1 -1
- package/typechain-types/factories/BoringPYUsdChainlinkAssetOracle__factory.ts +1 -1
- package/typechain-types/factories/BoringPYUsdChainlinkSYOracle__factory.ts +1 -1
- package/typechain-types/factories/Broadcaster__factory.ts +1 -1
- package/typechain-types/factories/DepositBoxFactory__factory.ts +189 -0
- package/typechain-types/factories/DepositBox__factory.ts +1 -1
- package/typechain-types/factories/ERC20Upgradeable__factory.ts +347 -0
- package/typechain-types/factories/Errors__factory.ts +2 -2
- 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/IERC20MetadataUpgradeable__factory.ts +252 -0
- package/typechain-types/factories/IERC20Upgradeable__factory.ts +209 -0
- package/typechain-types/factories/ILegacyMarket__factory.ts +42 -0
- package/typechain-types/factories/IPCrossChainSwapHub__factory.ts +264 -477
- package/typechain-types/factories/IPDepositBoxFactory__factory.ts +123 -0
- package/typechain-types/factories/IPGaugeController__factory.ts +102 -11
- package/typechain-types/factories/IPGauge__factory.ts +0 -51
- package/typechain-types/factories/IPMarket__factory.ts +0 -19
- package/typechain-types/factories/IPStakedPendle__factory.ts +366 -0
- package/typechain-types/factories/LimitBackendHelperV2__factory.ts +1 -1
- package/typechain-types/factories/MarketSweed__factory.ts +1 -1
- package/typechain-types/factories/OracleLib__factory.ts +1 -1
- package/typechain-types/factories/PendleAPIFeeDepositor__factory.ts +1 -1
- package/typechain-types/factories/PendleBoringOneracle__factory.ts +1 -1
- package/typechain-types/factories/PendleBoringSolvBTCOneracle__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/PendleCrossChainSwapHub__factory.ts +304 -517
- package/typechain-types/factories/PendleExchangeRateOracleApp__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/PendleFeeSetter__factory.ts +1 -1
- package/typechain-types/factories/PendleGaugeControllerUpg__factory.ts +519 -0
- package/typechain-types/factories/PendleGauge__factory.ts +0 -51
- 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/PendleMarketFactoryV7Upg__factory.ts +710 -0
- package/typechain-types/factories/PendleMarketV6__factory.ts +1 -1
- package/typechain-types/factories/PendleMarketV7__factory.ts +1233 -0
- package/typechain-types/factories/PendleMerkleDepositor__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/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/PendleRedStoneRateOracleAdapter__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/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/SimulateHelper__factory.ts +1 -1
- package/typechain-types/factories/StakedPendle__factory.ts +785 -0
- package/typechain-types/factories/SwapHubBase__factory.ts +300 -500
- package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +1 -1
- package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +1 -1
- package/typechain-types/hardhat.d.ts +87 -87
- package/typechain-types/index.ts +24 -24
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.dbg.json +0 -4
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.json +0 -451
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.dbg.json +0 -4
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.json +0 -557
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.dbg.json +0 -4
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.json +0 -547
- package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.dbg.json +0 -4
- package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.json +0 -1311
- package/build/artifacts/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.dbg.json +0 -4
- package/build/artifacts/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.json +0 -764
- package/build/artifacts/contracts/core/Market/PendleMarketFactoryV6Upg.sol/PendleMarketFactoryV6Upg.dbg.json +0 -4
- package/build/artifacts/contracts/core/Market/PendleMarketFactoryV6Upg.sol/PendleMarketFactoryV6Upg.json +0 -636
- package/build/artifacts/contracts/core/Market/PendleMarketV6.sol/PendleMarketV6.dbg.json +0 -4
- package/build/artifacts/contracts/core/Market/PendleMarketV6.sol/PendleMarketV6.json +0 -1181
- 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 -170
- package/build/artifacts/contracts/deprecated/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.dbg.json +0 -4
- package/build/artifacts/contracts/deprecated/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.json +0 -598
- package/build/artifacts/contracts/interfaces/IPGaugeControllerMainchain.sol/IPGaugeControllerMainchain.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IPGaugeControllerMainchain.sol/IPGaugeControllerMainchain.json +0 -183
- package/build/artifacts/contracts/interfaces/IPVotingController.sol/IPVotingController.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IPVotingController.sol/IPVotingController.json +0 -380
- package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.dbg.json +0 -4
- package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.json +0 -262
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol +0 -164
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol +0 -42
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol +0 -36
- package/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol +0 -304
- package/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol +0 -301
- package/contracts/deprecated/VeDistributor/PendleFeeDistributor.sol +0 -204
- package/contracts/interfaces/IPGaugeControllerMainchain.sol +0 -8
- package/contracts/interfaces/IPVotingController.sol +0 -43
- package/contracts/offchain-helpers/Broadcaster.sol +0 -48
- /package/contracts/cross-chain/{swap-hub → deposit-box}/DepositBox.sol +0 -0
|
@@ -1,274 +1,184 @@
|
|
|
1
1
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
2
|
pragma solidity ^0.8.30;
|
|
3
3
|
|
|
4
|
-
import {Create2} from "@openzeppelin/contracts/utils/Create2.sol";
|
|
5
4
|
import {SignatureChecker} from "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol";
|
|
6
5
|
import {EIP712Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";
|
|
7
6
|
import {BoringOwnableUpgradeableV2} from "../../core/libraries/BoringOwnableUpgradeableV2.sol";
|
|
8
7
|
import {TokenHelper} from "../../core/libraries/TokenHelper.sol";
|
|
9
8
|
import {IPCrossChainSwapHub} from "../../interfaces/IPCrossChainSwapHub.sol";
|
|
10
9
|
import {ApprovedCall, IPDepositBox} from "../../interfaces/IPDepositBox.sol";
|
|
11
|
-
import {
|
|
10
|
+
import {IPDepositBoxFactory} from "../../interfaces/IPDepositBoxFactory.sol";
|
|
12
11
|
|
|
13
12
|
abstract contract SwapHubBase is IPCrossChainSwapHub, EIP712Upgradeable, BoringOwnableUpgradeableV2, TokenHelper {
|
|
14
13
|
// forgefmt: disable-next-item
|
|
15
|
-
bytes32 internal constant
|
|
16
|
-
"
|
|
14
|
+
bytes32 internal constant BOX_PERMIT_TYPEHASH = keccak256(
|
|
15
|
+
"BoxPermit("
|
|
17
16
|
"address owner,"
|
|
18
17
|
"uint32 boxId,"
|
|
19
18
|
"uint256 expiry,"
|
|
20
|
-
"uint256
|
|
21
|
-
|
|
19
|
+
"uint256 requestId,"
|
|
20
|
+
"uint256 nonce"
|
|
21
|
+
")"
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
// forgefmt: disable-next-item
|
|
25
|
+
bytes32 internal constant WITHDRAW_TOKEN_MESSAGE_TYPEHASH = keccak256(
|
|
26
|
+
"WithdrawTokenMessage("
|
|
27
|
+
"BoxPermit permit,"
|
|
22
28
|
"address token,"
|
|
23
29
|
"uint256 amountWithdraw,"
|
|
24
30
|
"uint256 amountFee"
|
|
25
31
|
")"
|
|
32
|
+
"BoxPermit("
|
|
33
|
+
"address owner,"
|
|
34
|
+
"uint32 boxId,"
|
|
35
|
+
"uint256 expiry,"
|
|
36
|
+
"uint256 requestId,"
|
|
37
|
+
"uint256 nonce"
|
|
38
|
+
")"
|
|
26
39
|
);
|
|
27
40
|
|
|
28
41
|
// forgefmt: disable-next-item
|
|
29
42
|
bytes32 internal constant BRIDGE_TOKEN_MESSAGE_TYPEHASH = keccak256(
|
|
30
43
|
"BridgeTokenMessage("
|
|
31
|
-
"
|
|
32
|
-
"uint32 boxId,"
|
|
33
|
-
"uint256 expiry,"
|
|
34
|
-
"uint256 nonce,"
|
|
35
|
-
//
|
|
44
|
+
"BoxPermit permit,"
|
|
36
45
|
"address token,"
|
|
37
46
|
"uint256 amountBridge,"
|
|
38
47
|
"uint256 amountFee,"
|
|
39
|
-
"bool pullFromOwner,"
|
|
40
48
|
//
|
|
41
49
|
"address bridgeExtRouter,"
|
|
42
50
|
"address bridgeApprove,"
|
|
43
51
|
"bytes bridgeCalldata"
|
|
44
52
|
")"
|
|
53
|
+
"BoxPermit("
|
|
54
|
+
"address owner,"
|
|
55
|
+
"uint32 boxId,"
|
|
56
|
+
"uint256 expiry,"
|
|
57
|
+
"uint256 requestId,"
|
|
58
|
+
"uint256 nonce"
|
|
59
|
+
")"
|
|
45
60
|
);
|
|
46
61
|
|
|
47
62
|
// forgefmt: disable-next-item
|
|
48
63
|
bytes32 internal constant SWAP_TOKEN_MESSAGE_TYPEHASH = keccak256(
|
|
49
64
|
"SwapTokenMessage("
|
|
50
|
-
"
|
|
51
|
-
"uint32 boxId,"
|
|
52
|
-
"uint256 expiry,"
|
|
53
|
-
"uint256 nonce,"
|
|
54
|
-
//
|
|
65
|
+
"BoxPermit permit,"
|
|
55
66
|
"address tokenSpent,"
|
|
56
67
|
"uint256 amountSpent,"
|
|
57
|
-
"uint256 amountFee,"
|
|
58
68
|
"address tokenReceived,"
|
|
59
69
|
"uint256 minReceived,"
|
|
60
|
-
"bool pullFromOwner,"
|
|
61
|
-
"bool sendToOwner,"
|
|
62
70
|
//
|
|
63
71
|
"address swapExtRouter,"
|
|
64
72
|
"address swapApprove,"
|
|
65
73
|
"bytes swapCalldata"
|
|
66
74
|
")"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
// forgefmt: disable-next-item
|
|
70
|
-
bytes32 internal constant BUY_CROSS_CHAIN_PT_MESSAGE_TYPEHASH = keccak256(
|
|
71
|
-
"BuyCrossChainPtMessage("
|
|
75
|
+
"BoxPermit("
|
|
72
76
|
"address owner,"
|
|
73
77
|
"uint32 boxId,"
|
|
74
78
|
"uint256 expiry,"
|
|
75
|
-
"uint256
|
|
76
|
-
|
|
77
|
-
"address tokenSpent,"
|
|
78
|
-
"uint256 amountSpent,"
|
|
79
|
-
"uint256 amountFee,"
|
|
80
|
-
"address ptAdapter,"
|
|
81
|
-
"uint256 minPtReceived,"
|
|
82
|
-
"uint32 dstEid,"
|
|
83
|
-
"bytes32 receiver,"
|
|
84
|
-
"bool pullFromOwner,"
|
|
85
|
-
//
|
|
86
|
-
"address swapExtRouter,"
|
|
87
|
-
"address swapApprove,"
|
|
88
|
-
"bytes swapCalldata"
|
|
79
|
+
"uint256 requestId,"
|
|
80
|
+
"uint256 nonce"
|
|
89
81
|
")"
|
|
90
82
|
);
|
|
91
83
|
|
|
92
84
|
address public immutable TREASURY;
|
|
85
|
+
IPDepositBoxFactory public immutable DEPOSIT_BOX_FACTORY;
|
|
93
86
|
|
|
94
|
-
|
|
95
|
-
address public
|
|
96
|
-
|
|
97
|
-
bytes32 public immutable DEPOSIT_BOX_CODE_HASH;
|
|
98
|
-
|
|
99
|
-
mapping(address owner => uint256 nonce) public ownerNonce;
|
|
100
|
-
mapping(address executor => bool) public isExecutor;
|
|
87
|
+
address public executor;
|
|
88
|
+
address public proposer;
|
|
89
|
+
mapping(uint256 requestId => uint256 nonce) public requestNonce;
|
|
101
90
|
|
|
102
|
-
constructor(address treasury_, address
|
|
91
|
+
constructor(address treasury_, address depositBoxFactory_) {
|
|
103
92
|
TREASURY = treasury_;
|
|
104
|
-
|
|
105
|
-
DEPOSIT_BOX_BEACON = depositBoxBeacon_;
|
|
106
|
-
DEPOSIT_BOX_CODE_HASH =
|
|
107
|
-
keccak256(abi.encodePacked(beaconProxyCodeContract_.code, abi.encode(depositBoxBeacon_, "")));
|
|
93
|
+
DEPOSIT_BOX_FACTORY = IPDepositBoxFactory(depositBoxFactory_);
|
|
108
94
|
}
|
|
109
95
|
|
|
110
96
|
modifier onlyExecutor() {
|
|
111
|
-
require(
|
|
97
|
+
require(msg.sender == executor, Unauthorized());
|
|
112
98
|
_;
|
|
113
99
|
}
|
|
114
100
|
|
|
115
|
-
function setExecutor(address
|
|
116
|
-
|
|
117
|
-
emit SetExecutor(executor
|
|
101
|
+
function setExecutor(address executor_) external onlyOwner {
|
|
102
|
+
executor = executor_;
|
|
103
|
+
emit SetExecutor(executor);
|
|
118
104
|
}
|
|
119
105
|
|
|
120
|
-
function
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
returns (address box, bytes32 salt, bool deployed)
|
|
124
|
-
{
|
|
125
|
-
salt = keccak256(abi.encode(owner, boxId));
|
|
126
|
-
box = Create2.computeAddress(salt, DEPOSIT_BOX_CODE_HASH);
|
|
127
|
-
deployed = box.code.length > 0;
|
|
106
|
+
function setProposer(address proposer_) external onlyOwner {
|
|
107
|
+
proposer = proposer_;
|
|
108
|
+
emit SetProposer(proposer);
|
|
128
109
|
}
|
|
129
110
|
|
|
130
|
-
function
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
bytes memory bytecode = abi.encodePacked(BEACON_PROXY_CODE_CONTRACT.code, abi.encode(DEPOSIT_BOX_BEACON, ""));
|
|
137
|
-
assert(Create2.deploy(0, salt, bytecode) == box);
|
|
138
|
-
DepositBox(payable(box)).initialize(owner, boxId);
|
|
139
|
-
return IPDepositBox(box);
|
|
111
|
+
function hashBoxPermit(BoxPermit memory permit) public pure returns (bytes32) {
|
|
112
|
+
return keccak256(
|
|
113
|
+
abi.encode(BOX_PERMIT_TYPEHASH, permit.owner, permit.boxId, permit.expiry, permit.requestId, permit.nonce)
|
|
114
|
+
);
|
|
140
115
|
}
|
|
141
116
|
|
|
142
|
-
function hashTypedData(WithdrawTokenMessage memory
|
|
117
|
+
function hashTypedData(WithdrawTokenMessage memory ms) public view returns (bytes32) {
|
|
143
118
|
return _hashTypedDataV4(
|
|
144
119
|
keccak256(
|
|
145
120
|
abi.encode(
|
|
146
|
-
WITHDRAW_TOKEN_MESSAGE_TYPEHASH,
|
|
147
|
-
message.owner,
|
|
148
|
-
message.boxId,
|
|
149
|
-
message.expiry,
|
|
150
|
-
message.nonce,
|
|
151
|
-
//
|
|
152
|
-
message.token,
|
|
153
|
-
message.amountWithdraw,
|
|
154
|
-
message.amountFee
|
|
121
|
+
WITHDRAW_TOKEN_MESSAGE_TYPEHASH, hashBoxPermit(ms.permit), ms.token, ms.amountWithdraw, ms.amountFee
|
|
155
122
|
)
|
|
156
123
|
)
|
|
157
124
|
);
|
|
158
125
|
}
|
|
159
126
|
|
|
160
|
-
function hashTypedData(BridgeTokenMessage memory
|
|
127
|
+
function hashTypedData(BridgeTokenMessage memory ms) public view returns (bytes32) {
|
|
161
128
|
return _hashTypedDataV4(
|
|
162
129
|
keccak256(
|
|
163
130
|
abi.encode(
|
|
164
131
|
BRIDGE_TOKEN_MESSAGE_TYPEHASH,
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
132
|
+
hashBoxPermit(ms.permit),
|
|
133
|
+
ms.token,
|
|
134
|
+
ms.amountBridge,
|
|
135
|
+
ms.amountFee,
|
|
169
136
|
//
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
message.pullFromOwner,
|
|
174
|
-
//
|
|
175
|
-
message.bridgeExtRouter,
|
|
176
|
-
message.bridgeApprove,
|
|
177
|
-
keccak256(message.bridgeCalldata)
|
|
137
|
+
ms.bridgeExtRouter,
|
|
138
|
+
ms.bridgeApprove,
|
|
139
|
+
keccak256(ms.bridgeCalldata)
|
|
178
140
|
)
|
|
179
141
|
)
|
|
180
142
|
);
|
|
181
143
|
}
|
|
182
144
|
|
|
183
|
-
function hashTypedData(SwapTokenMessage memory
|
|
145
|
+
function hashTypedData(SwapTokenMessage memory ms) public view returns (bytes32) {
|
|
184
146
|
return _hashTypedDataV4(
|
|
185
147
|
keccak256(
|
|
186
148
|
abi.encode(
|
|
187
149
|
SWAP_TOKEN_MESSAGE_TYPEHASH,
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
message.tokenSpent,
|
|
194
|
-
message.amountSpent,
|
|
195
|
-
message.amountFee,
|
|
196
|
-
message.tokenReceived,
|
|
197
|
-
message.minReceived,
|
|
198
|
-
message.pullFromOwner,
|
|
199
|
-
message.sendToOwner,
|
|
150
|
+
hashBoxPermit(ms.permit),
|
|
151
|
+
ms.tokenSpent,
|
|
152
|
+
ms.amountSpent,
|
|
153
|
+
ms.tokenReceived,
|
|
154
|
+
ms.minReceived,
|
|
200
155
|
//
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
keccak256(
|
|
156
|
+
ms.swapExtRouter,
|
|
157
|
+
ms.swapApprove,
|
|
158
|
+
keccak256(ms.swapCalldata)
|
|
204
159
|
)
|
|
205
160
|
)
|
|
206
161
|
);
|
|
207
162
|
}
|
|
208
163
|
|
|
209
|
-
function
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
message.amountSpent,
|
|
221
|
-
message.amountFee,
|
|
222
|
-
message.ptAdapter,
|
|
223
|
-
message.minPtReceived,
|
|
224
|
-
message.dstEid,
|
|
225
|
-
message.receiver,
|
|
226
|
-
message.pullFromOwner,
|
|
227
|
-
//
|
|
228
|
-
message.swapExtRouter,
|
|
229
|
-
message.swapApprove,
|
|
230
|
-
keccak256(message.swapCalldata)
|
|
231
|
-
)
|
|
232
|
-
)
|
|
233
|
-
);
|
|
164
|
+
function _verifyProposerSig(
|
|
165
|
+
uint256 expiry,
|
|
166
|
+
uint256 requestId,
|
|
167
|
+
uint256 nonce,
|
|
168
|
+
bytes32 messageHash,
|
|
169
|
+
bytes memory signature
|
|
170
|
+
) internal {
|
|
171
|
+
require(expiry > block.timestamp, MessageExpired());
|
|
172
|
+
require(SignatureChecker.isValidSignatureNow(proposer, messageHash, signature), InvalidSignature());
|
|
173
|
+
require(requestNonce[requestId] + 1 == nonce, InvalidNonce());
|
|
174
|
+
requestNonce[requestId] = nonce;
|
|
234
175
|
}
|
|
235
176
|
|
|
236
|
-
function
|
|
177
|
+
function _checkBoxPermit(BoxPermit memory permit, bytes32 messageHash, bytes memory signature)
|
|
237
178
|
internal
|
|
179
|
+
returns (IPDepositBox)
|
|
238
180
|
{
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
require(ownerNonce[owner] < nonce, InvalidNonce());
|
|
242
|
-
ownerNonce[owner] = nonce;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
function _swapFromBox(
|
|
246
|
-
IPDepositBox box,
|
|
247
|
-
address tokenSpent,
|
|
248
|
-
uint256 amountSpent,
|
|
249
|
-
address tokenReceived,
|
|
250
|
-
address swapExtRouter,
|
|
251
|
-
address swapApprove,
|
|
252
|
-
bytes memory swapCalldata,
|
|
253
|
-
address receiver
|
|
254
|
-
) internal returns (uint256 rawTokenReceived) {
|
|
255
|
-
// forgefmt: disable-next-item
|
|
256
|
-
ApprovedCall memory call = ApprovedCall({
|
|
257
|
-
token: tokenSpent,
|
|
258
|
-
amount: amountSpent,
|
|
259
|
-
approveTo: swapApprove,
|
|
260
|
-
callTo: swapExtRouter,
|
|
261
|
-
data: swapCalldata
|
|
262
|
-
});
|
|
263
|
-
|
|
264
|
-
uint256 preBalance = _selfBalance(tokenReceived);
|
|
265
|
-
box.approveAndCall(call, address(box));
|
|
266
|
-
rawTokenReceived = _selfBalance(tokenReceived) - preBalance;
|
|
267
|
-
|
|
268
|
-
_transferOut(tokenReceived, receiver, rawTokenReceived);
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
function _addressToBytes32(address addr) internal pure returns (bytes32) {
|
|
272
|
-
return bytes32(uint256(uint160(addr)));
|
|
181
|
+
_verifyProposerSig(permit.expiry, permit.requestId, permit.nonce, messageHash, signature);
|
|
182
|
+
return DEPOSIT_BOX_FACTORY.deployDepositBox(permit.owner, permit.boxId);
|
|
273
183
|
}
|
|
274
184
|
}
|
|
@@ -5,30 +5,29 @@ interface IPCrossChainSwapHub {
|
|
|
5
5
|
error InsufficientTokenReceived();
|
|
6
6
|
error InvalidNonce();
|
|
7
7
|
error InvalidSignature();
|
|
8
|
-
error InvalidReceiver();
|
|
9
8
|
error MessageExpired();
|
|
9
|
+
error Unauthorized();
|
|
10
10
|
|
|
11
|
-
struct
|
|
11
|
+
struct BoxPermit {
|
|
12
12
|
address owner;
|
|
13
13
|
uint32 boxId;
|
|
14
14
|
uint256 expiry;
|
|
15
|
+
uint256 requestId;
|
|
15
16
|
uint256 nonce;
|
|
16
|
-
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
struct WithdrawTokenMessage {
|
|
20
|
+
BoxPermit permit;
|
|
17
21
|
address token;
|
|
18
22
|
uint256 amountWithdraw;
|
|
19
23
|
uint256 amountFee;
|
|
20
24
|
}
|
|
21
25
|
|
|
22
26
|
struct BridgeTokenMessage {
|
|
23
|
-
|
|
24
|
-
uint32 boxId;
|
|
25
|
-
uint256 expiry;
|
|
26
|
-
uint256 nonce;
|
|
27
|
-
//
|
|
27
|
+
BoxPermit permit;
|
|
28
28
|
address token;
|
|
29
29
|
uint256 amountBridge;
|
|
30
30
|
uint256 amountFee;
|
|
31
|
-
bool pullFromOwner;
|
|
32
31
|
//
|
|
33
32
|
address bridgeExtRouter;
|
|
34
33
|
address bridgeApprove;
|
|
@@ -36,96 +35,64 @@ interface IPCrossChainSwapHub {
|
|
|
36
35
|
}
|
|
37
36
|
|
|
38
37
|
struct SwapTokenMessage {
|
|
39
|
-
|
|
40
|
-
uint32 boxId;
|
|
41
|
-
uint256 expiry;
|
|
42
|
-
uint256 nonce;
|
|
43
|
-
//
|
|
38
|
+
BoxPermit permit;
|
|
44
39
|
address tokenSpent;
|
|
45
40
|
uint256 amountSpent;
|
|
46
|
-
uint256 amountFee;
|
|
47
41
|
address tokenReceived;
|
|
48
42
|
uint256 minReceived;
|
|
49
|
-
bool pullFromOwner;
|
|
50
|
-
bool sendToOwner;
|
|
51
|
-
//
|
|
52
|
-
address swapExtRouter;
|
|
53
|
-
address swapApprove;
|
|
54
|
-
bytes swapCalldata;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
struct BuyCrossChainPtMessage {
|
|
58
|
-
address owner;
|
|
59
|
-
uint32 boxId;
|
|
60
|
-
uint256 expiry;
|
|
61
|
-
uint256 nonce;
|
|
62
|
-
//
|
|
63
|
-
address tokenSpent;
|
|
64
|
-
uint256 amountSpent;
|
|
65
|
-
uint256 amountFee;
|
|
66
|
-
address ptAdapter;
|
|
67
|
-
uint256 minPtReceived;
|
|
68
|
-
uint32 dstEid;
|
|
69
|
-
bytes32 receiver;
|
|
70
|
-
bool pullFromOwner;
|
|
71
43
|
//
|
|
72
44
|
address swapExtRouter;
|
|
73
45
|
address swapApprove;
|
|
74
46
|
bytes swapCalldata;
|
|
75
47
|
}
|
|
76
48
|
|
|
77
|
-
event WithdrawToken(
|
|
49
|
+
event WithdrawToken(
|
|
50
|
+
address owner,
|
|
51
|
+
uint32 boxId,
|
|
52
|
+
uint256 requestId,
|
|
53
|
+
uint256 nonce,
|
|
54
|
+
address token,
|
|
55
|
+
uint256 amountWithdraw,
|
|
56
|
+
uint256 amountFee
|
|
57
|
+
);
|
|
78
58
|
|
|
79
59
|
event BridgeToken(
|
|
80
|
-
address
|
|
60
|
+
address owner,
|
|
81
61
|
uint32 boxId,
|
|
62
|
+
uint256 requestId,
|
|
63
|
+
uint256 nonce,
|
|
82
64
|
address bridgeExtRouter,
|
|
83
65
|
address token,
|
|
84
66
|
uint256 amountBridge,
|
|
85
|
-
uint256 amountFee
|
|
86
|
-
bool pullFromOwner
|
|
67
|
+
uint256 amountFee
|
|
87
68
|
);
|
|
88
69
|
|
|
89
70
|
event SwapToken(
|
|
90
|
-
address
|
|
71
|
+
address owner,
|
|
91
72
|
uint32 boxId,
|
|
73
|
+
uint256 requestId,
|
|
74
|
+
uint256 nonce,
|
|
92
75
|
address tokenSpent,
|
|
93
76
|
uint256 amountSpent,
|
|
94
|
-
uint256 amountFee,
|
|
95
77
|
address tokenReceived,
|
|
96
|
-
uint256 netTokenReceived
|
|
97
|
-
bool pullFromOwner,
|
|
98
|
-
bool sendToOwner
|
|
78
|
+
uint256 netTokenReceived
|
|
99
79
|
);
|
|
100
80
|
|
|
101
|
-
event
|
|
102
|
-
address indexed owner,
|
|
103
|
-
uint32 boxId,
|
|
104
|
-
address tokenSpent,
|
|
105
|
-
uint256 amountSpent,
|
|
106
|
-
uint256 amountFee,
|
|
107
|
-
address ptAdapter,
|
|
108
|
-
address pt,
|
|
109
|
-
uint256 netPtReceived,
|
|
110
|
-
bool pullFromOwner
|
|
111
|
-
);
|
|
81
|
+
event SetExecutor(address executor);
|
|
112
82
|
|
|
113
|
-
event
|
|
83
|
+
event SetProposer(address proposer);
|
|
114
84
|
|
|
115
|
-
function
|
|
85
|
+
function executor() external view returns (address);
|
|
116
86
|
|
|
117
|
-
function
|
|
87
|
+
function proposer() external view returns (address);
|
|
118
88
|
|
|
119
|
-
function
|
|
89
|
+
function setExecutor(address executor) external;
|
|
120
90
|
|
|
121
|
-
function
|
|
91
|
+
function setProposer(address proposer) external;
|
|
122
92
|
|
|
123
|
-
function
|
|
93
|
+
function requestNonce(uint256 requestId) external view returns (uint256);
|
|
124
94
|
|
|
125
|
-
function
|
|
126
|
-
external
|
|
127
|
-
view
|
|
128
|
-
returns (address box, bytes32 salt, bool deployed);
|
|
95
|
+
function hashBoxPermit(BoxPermit memory permit) external view returns (bytes32);
|
|
129
96
|
|
|
130
97
|
function hashTypedData(WithdrawTokenMessage memory message) external view returns (bytes32);
|
|
131
98
|
|
|
@@ -133,15 +100,9 @@ interface IPCrossChainSwapHub {
|
|
|
133
100
|
|
|
134
101
|
function hashTypedData(SwapTokenMessage memory message) external view returns (bytes32);
|
|
135
102
|
|
|
136
|
-
function hashTypedData(BuyCrossChainPtMessage memory message) external view returns (bytes32);
|
|
137
|
-
|
|
138
103
|
function withdrawToken(WithdrawTokenMessage memory message, bytes memory signature) external;
|
|
139
104
|
|
|
140
105
|
function bridgeToken(BridgeTokenMessage memory message, bytes memory signature) external payable;
|
|
141
106
|
|
|
142
107
|
function swapToken(SwapTokenMessage memory message, bytes memory signature) external;
|
|
143
|
-
|
|
144
|
-
function buyCrossChainPt(BuyCrossChainPtMessage memory message, bytes memory signature) external payable;
|
|
145
|
-
|
|
146
|
-
function setExecutor(address executor, bool isExecutor) external;
|
|
147
108
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
pragma solidity ^0.8.0;
|
|
3
|
+
|
|
4
|
+
import {IPDepositBox} from "./IPDepositBox.sol";
|
|
5
|
+
|
|
6
|
+
interface IPDepositBoxFactory {
|
|
7
|
+
function computeDepositBox(address owner, uint32 boxId)
|
|
8
|
+
external
|
|
9
|
+
view
|
|
10
|
+
returns (address box, bytes32 salt, bool deployed);
|
|
11
|
+
|
|
12
|
+
function deployDepositBox(address owner, uint32 boxId) external returns (IPDepositBox box);
|
|
13
|
+
|
|
14
|
+
function BEACON_PROXY_CODE_CONTRACT() external view returns (address);
|
|
15
|
+
|
|
16
|
+
function DEPOSIT_BOX_BEACON() external view returns (address);
|
|
17
|
+
|
|
18
|
+
function DEPOSIT_BOX_CODE_HASH() external view returns (bytes32);
|
|
19
|
+
}
|
|
@@ -3,10 +3,4 @@ pragma solidity ^0.8.0;
|
|
|
3
3
|
|
|
4
4
|
interface IPGauge {
|
|
5
5
|
event RedeemRewards(address indexed user, uint256[] rewardsOut);
|
|
6
|
-
|
|
7
|
-
event UpdateActiveBalance(address indexed user, uint256 newActiveBalance);
|
|
8
|
-
|
|
9
|
-
function totalActiveSupply() external view returns (uint256);
|
|
10
|
-
|
|
11
|
-
function activeBalance(address user) external view returns (uint256);
|
|
12
6
|
}
|
|
@@ -4,17 +4,34 @@ pragma solidity ^0.8.0;
|
|
|
4
4
|
interface IPGaugeController {
|
|
5
5
|
event MarketClaimReward(address indexed market, uint256 amount);
|
|
6
6
|
|
|
7
|
+
// deprecated from MarketV7 onwards
|
|
7
8
|
event ReceiveVotingResults(uint128 indexed wTime, address[] markets, uint256[] pendleAmounts);
|
|
8
9
|
|
|
10
|
+
// deprecated from MarketV7 onwards
|
|
9
11
|
event UpdateMarketReward(address indexed market, uint256 pendlePerSec, uint256 incentiveEndsAt);
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
event UpdateMarketRewardV2(address indexed market, uint128 pendlePerSec, uint128 incentiveEndsAt);
|
|
14
|
+
|
|
15
|
+
event WhitelistMarketSet(address indexed market, bool isWhitelisted);
|
|
16
|
+
|
|
17
|
+
function setRewardDatas(
|
|
18
|
+
address[] calldata markets,
|
|
19
|
+
uint128[] calldata pendlePerSecs,
|
|
20
|
+
uint128[] calldata incentiveEndsAts
|
|
21
|
+
) external;
|
|
12
22
|
|
|
13
23
|
function withdrawPendle(uint256 amount) external;
|
|
14
24
|
|
|
15
|
-
function pendle() external returns (address);
|
|
25
|
+
function pendle() external view returns (address);
|
|
16
26
|
|
|
17
27
|
function redeemMarketReward() external;
|
|
18
28
|
|
|
19
|
-
function rewardData(address
|
|
29
|
+
function rewardData(address market)
|
|
30
|
+
external
|
|
31
|
+
view
|
|
32
|
+
returns (uint128 pendlePerSec, uint128 accumulatedPendle, uint128 lastUpdated, uint128 incentiveEndsAt);
|
|
33
|
+
|
|
34
|
+
function isWhitelisted(address market) external view returns (bool);
|
|
35
|
+
|
|
36
|
+
function whitelistMarkets(address[] memory markets, bool _isWhitelisted) external;
|
|
20
37
|
}
|
|
@@ -86,4 +86,16 @@ interface IPMarket is IPGauge, IERC20Metadata {
|
|
|
86
86
|
function VERSION() external pure returns (uint256);
|
|
87
87
|
|
|
88
88
|
function reentrancyGuardEntered() external view returns (bool);
|
|
89
|
+
|
|
90
|
+
/*///////////////////////////////////////////////////////////////
|
|
91
|
+
LEGACY FUNCTIONS
|
|
92
|
+
//////////////////////////////////////////////////////////////*/
|
|
93
|
+
|
|
94
|
+
/// @dev Kept for backward compatibility
|
|
95
|
+
/// @dev From version 7, this function returns `totalSupply()`.
|
|
96
|
+
function totalActiveSupply() external view returns (uint256);
|
|
97
|
+
|
|
98
|
+
/// @dev Kept for backward compatibility
|
|
99
|
+
/// @dev From version 7, this function returns `balanceOf(user)`.
|
|
100
|
+
function activeBalance(address user) external view returns (uint256);
|
|
89
101
|
}
|