@pendle/core-v2 6.4.4-unichain → 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 +4 -0
- package/build/artifacts/contracts/cross-chain/swap-hub/PendleCrossChainSwapHub.sol/PendleCrossChainSwapHub.json +1005 -0
- package/build/artifacts/contracts/cross-chain/swap-hub/SwapHubBase.sol/SwapHubBase.dbg.json +4 -0
- package/build/artifacts/contracts/cross-chain/swap-hub/SwapHubBase.sol/SwapHubBase.json +976 -0
- 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 +4 -0
- package/build/artifacts/contracts/interfaces/IPCrossChainSwapHub.sol/IPCrossChainSwapHub.json +813 -0
- package/build/artifacts/contracts/interfaces/IPDepositBox.sol/IPDepositBox.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPDepositBox.sol/IPDepositBox.json +124 -0
- 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/DepositBox.sol +66 -0
- package/contracts/cross-chain/deposit-box/DepositBoxFactory.sol +44 -0
- package/contracts/cross-chain/swap-hub/PendleCrossChainSwapHub.sol +101 -0
- package/contracts/cross-chain/swap-hub/SwapHubBase.sol +184 -0
- package/contracts/interfaces/IPCrossChainSwapHub.sol +108 -0
- package/contracts/interfaces/IPDepositBox.sol +22 -0
- 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 +2 -2
- package/typechain-types/DepositBox.ts +260 -0
- package/typechain-types/DepositBoxFactory.ts +226 -0
- package/typechain-types/{PendleERC20PermitUpg.ts → ERC20Upgradeable.ts} +61 -152
- package/typechain-types/{PendleERC20Upg.ts → IERC20MetadataUpgradeable.ts} +5 -14
- package/typechain-types/{PendleERC20Permit.ts → IERC20Upgradeable.ts} +5 -213
- package/typechain-types/{OverfillMathLib.ts → ILegacyMarket.ts} +25 -13
- package/typechain-types/IPCrossChainSwapHub.ts +656 -0
- package/typechain-types/IPDepositBox.ts +213 -0
- 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 +911 -0
- package/typechain-types/PendleGauge.ts +0 -63
- package/typechain-types/PendleGaugeControllerUpg.ts +686 -0
- package/typechain-types/{PendleMarketFactoryV3.ts → PendleMarketFactoryV7Upg.ts} +59 -18
- package/typechain-types/{PendleMarketV3.ts → PendleMarketV7.ts} +44 -10
- package/typechain-types/StakedPendle.ts +1058 -0
- package/typechain-types/SwapHubBase.ts +886 -0
- package/typechain-types/factories/ActionAddRemoveLiqV3__factory.ts +1 -1
- package/typechain-types/factories/ActionCallbackV3__factory.ts +1 -1
- package/typechain-types/factories/ActionCrossChain__factory.ts +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 +222 -0
- 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/{PendleERC20Upg__factory.ts → IERC20MetadataUpgradeable__factory.ts} +12 -21
- package/typechain-types/factories/{IPMarketFactoryV3__factory.ts → IERC20Upgradeable__factory.ts} +78 -86
- package/typechain-types/factories/ILegacyMarket__factory.ts +42 -0
- package/typechain-types/factories/IPCrossChainSwapHub__factory.ts +828 -0
- package/typechain-types/factories/IPDepositBoxFactory__factory.ts +123 -0
- package/typechain-types/factories/IPDepositBox__factory.ts +136 -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/{PendleERC20PermitUpg__factory.ts → IPStakedPendle__factory.ts} +166 -189
- 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 +1074 -0
- 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 +988 -0
- package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +1 -1
- package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +1 -1
- package/typechain-types/hardhat.d.ts +127 -109
- package/typechain-types/index.ts +32 -30
- 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/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/typechain-types/ActionDelegateBase.ts +0 -57
- package/typechain-types/BasePendleBridgedPrincipalToken.ts +0 -1689
- package/typechain-types/EIP712.ts +0 -135
- package/typechain-types/ERC20Permit.ts +0 -586
- package/typechain-types/IERC5267.ts +0 -135
- package/typechain-types/IPMarketFactoryV3.ts +0 -321
- package/typechain-types/IPMarketV3.ts +0 -1068
- package/typechain-types/LimitBackendHelper.ts +0 -287
- package/typechain-types/PendleBridgedPrincipalToken_18Decimals.ts +0 -1689
- package/typechain-types/PendleBridgedPrincipalToken_6Decimals.ts +0 -1689
- package/typechain-types/PendleBridgedPrincipalToken_8Decimals.ts +0 -1689
- package/typechain-types/PendleYieldContractFactory.ts +0 -801
- package/typechain-types/ShortStrings.ts +0 -57
- package/typechain-types/factories/ActionDelegateBase__factory.ts +0 -80
- package/typechain-types/factories/BasePendleBridgedPrincipalToken__factory.ts +0 -1548
- package/typechain-types/factories/EIP712__factory.ts +0 -85
- package/typechain-types/factories/ERC20Permit__factory.ts +0 -433
- package/typechain-types/factories/IERC5267__factory.ts +0 -72
- package/typechain-types/factories/IPMarketV3__factory.ts +0 -845
- package/typechain-types/factories/LimitBackendHelper__factory.ts +0 -232
- package/typechain-types/factories/OverfillMathLib__factory.ts +0 -77
- package/typechain-types/factories/PendleBridgedPrincipalToken_18Decimals__factory.ts +0 -1652
- package/typechain-types/factories/PendleBridgedPrincipalToken_6Decimals__factory.ts +0 -1650
- package/typechain-types/factories/PendleBridgedPrincipalToken_8Decimals__factory.ts +0 -1650
- package/typechain-types/factories/PendleERC20Permit__factory.ts +0 -470
- package/typechain-types/factories/PendleMarketFactoryV3__factory.ts +0 -714
- package/typechain-types/factories/PendleMarketV3__factory.ts +0 -1211
- package/typechain-types/factories/PendleYieldContractFactory__factory.ts +0 -674
- package/typechain-types/factories/ShortStrings__factory.ts +0 -77
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity ^0.8.30;
|
|
3
|
+
|
|
4
|
+
import {SignatureChecker} from "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol";
|
|
5
|
+
import {EIP712Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";
|
|
6
|
+
import {BoringOwnableUpgradeableV2} from "../../core/libraries/BoringOwnableUpgradeableV2.sol";
|
|
7
|
+
import {TokenHelper} from "../../core/libraries/TokenHelper.sol";
|
|
8
|
+
import {IPCrossChainSwapHub} from "../../interfaces/IPCrossChainSwapHub.sol";
|
|
9
|
+
import {ApprovedCall, IPDepositBox} from "../../interfaces/IPDepositBox.sol";
|
|
10
|
+
import {IPDepositBoxFactory} from "../../interfaces/IPDepositBoxFactory.sol";
|
|
11
|
+
|
|
12
|
+
abstract contract SwapHubBase is IPCrossChainSwapHub, EIP712Upgradeable, BoringOwnableUpgradeableV2, TokenHelper {
|
|
13
|
+
// forgefmt: disable-next-item
|
|
14
|
+
bytes32 internal constant BOX_PERMIT_TYPEHASH = keccak256(
|
|
15
|
+
"BoxPermit("
|
|
16
|
+
"address owner,"
|
|
17
|
+
"uint32 boxId,"
|
|
18
|
+
"uint256 expiry,"
|
|
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,"
|
|
28
|
+
"address token,"
|
|
29
|
+
"uint256 amountWithdraw,"
|
|
30
|
+
"uint256 amountFee"
|
|
31
|
+
")"
|
|
32
|
+
"BoxPermit("
|
|
33
|
+
"address owner,"
|
|
34
|
+
"uint32 boxId,"
|
|
35
|
+
"uint256 expiry,"
|
|
36
|
+
"uint256 requestId,"
|
|
37
|
+
"uint256 nonce"
|
|
38
|
+
")"
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
// forgefmt: disable-next-item
|
|
42
|
+
bytes32 internal constant BRIDGE_TOKEN_MESSAGE_TYPEHASH = keccak256(
|
|
43
|
+
"BridgeTokenMessage("
|
|
44
|
+
"BoxPermit permit,"
|
|
45
|
+
"address token,"
|
|
46
|
+
"uint256 amountBridge,"
|
|
47
|
+
"uint256 amountFee,"
|
|
48
|
+
//
|
|
49
|
+
"address bridgeExtRouter,"
|
|
50
|
+
"address bridgeApprove,"
|
|
51
|
+
"bytes bridgeCalldata"
|
|
52
|
+
")"
|
|
53
|
+
"BoxPermit("
|
|
54
|
+
"address owner,"
|
|
55
|
+
"uint32 boxId,"
|
|
56
|
+
"uint256 expiry,"
|
|
57
|
+
"uint256 requestId,"
|
|
58
|
+
"uint256 nonce"
|
|
59
|
+
")"
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
// forgefmt: disable-next-item
|
|
63
|
+
bytes32 internal constant SWAP_TOKEN_MESSAGE_TYPEHASH = keccak256(
|
|
64
|
+
"SwapTokenMessage("
|
|
65
|
+
"BoxPermit permit,"
|
|
66
|
+
"address tokenSpent,"
|
|
67
|
+
"uint256 amountSpent,"
|
|
68
|
+
"address tokenReceived,"
|
|
69
|
+
"uint256 minReceived,"
|
|
70
|
+
//
|
|
71
|
+
"address swapExtRouter,"
|
|
72
|
+
"address swapApprove,"
|
|
73
|
+
"bytes swapCalldata"
|
|
74
|
+
")"
|
|
75
|
+
"BoxPermit("
|
|
76
|
+
"address owner,"
|
|
77
|
+
"uint32 boxId,"
|
|
78
|
+
"uint256 expiry,"
|
|
79
|
+
"uint256 requestId,"
|
|
80
|
+
"uint256 nonce"
|
|
81
|
+
")"
|
|
82
|
+
);
|
|
83
|
+
|
|
84
|
+
address public immutable TREASURY;
|
|
85
|
+
IPDepositBoxFactory public immutable DEPOSIT_BOX_FACTORY;
|
|
86
|
+
|
|
87
|
+
address public executor;
|
|
88
|
+
address public proposer;
|
|
89
|
+
mapping(uint256 requestId => uint256 nonce) public requestNonce;
|
|
90
|
+
|
|
91
|
+
constructor(address treasury_, address depositBoxFactory_) {
|
|
92
|
+
TREASURY = treasury_;
|
|
93
|
+
DEPOSIT_BOX_FACTORY = IPDepositBoxFactory(depositBoxFactory_);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
modifier onlyExecutor() {
|
|
97
|
+
require(msg.sender == executor, Unauthorized());
|
|
98
|
+
_;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function setExecutor(address executor_) external onlyOwner {
|
|
102
|
+
executor = executor_;
|
|
103
|
+
emit SetExecutor(executor);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function setProposer(address proposer_) external onlyOwner {
|
|
107
|
+
proposer = proposer_;
|
|
108
|
+
emit SetProposer(proposer);
|
|
109
|
+
}
|
|
110
|
+
|
|
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
|
+
);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function hashTypedData(WithdrawTokenMessage memory ms) public view returns (bytes32) {
|
|
118
|
+
return _hashTypedDataV4(
|
|
119
|
+
keccak256(
|
|
120
|
+
abi.encode(
|
|
121
|
+
WITHDRAW_TOKEN_MESSAGE_TYPEHASH, hashBoxPermit(ms.permit), ms.token, ms.amountWithdraw, ms.amountFee
|
|
122
|
+
)
|
|
123
|
+
)
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function hashTypedData(BridgeTokenMessage memory ms) public view returns (bytes32) {
|
|
128
|
+
return _hashTypedDataV4(
|
|
129
|
+
keccak256(
|
|
130
|
+
abi.encode(
|
|
131
|
+
BRIDGE_TOKEN_MESSAGE_TYPEHASH,
|
|
132
|
+
hashBoxPermit(ms.permit),
|
|
133
|
+
ms.token,
|
|
134
|
+
ms.amountBridge,
|
|
135
|
+
ms.amountFee,
|
|
136
|
+
//
|
|
137
|
+
ms.bridgeExtRouter,
|
|
138
|
+
ms.bridgeApprove,
|
|
139
|
+
keccak256(ms.bridgeCalldata)
|
|
140
|
+
)
|
|
141
|
+
)
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function hashTypedData(SwapTokenMessage memory ms) public view returns (bytes32) {
|
|
146
|
+
return _hashTypedDataV4(
|
|
147
|
+
keccak256(
|
|
148
|
+
abi.encode(
|
|
149
|
+
SWAP_TOKEN_MESSAGE_TYPEHASH,
|
|
150
|
+
hashBoxPermit(ms.permit),
|
|
151
|
+
ms.tokenSpent,
|
|
152
|
+
ms.amountSpent,
|
|
153
|
+
ms.tokenReceived,
|
|
154
|
+
ms.minReceived,
|
|
155
|
+
//
|
|
156
|
+
ms.swapExtRouter,
|
|
157
|
+
ms.swapApprove,
|
|
158
|
+
keccak256(ms.swapCalldata)
|
|
159
|
+
)
|
|
160
|
+
)
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
|
|
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;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
function _checkBoxPermit(BoxPermit memory permit, bytes32 messageHash, bytes memory signature)
|
|
178
|
+
internal
|
|
179
|
+
returns (IPDepositBox)
|
|
180
|
+
{
|
|
181
|
+
_verifyProposerSig(permit.expiry, permit.requestId, permit.nonce, messageHash, signature);
|
|
182
|
+
return DEPOSIT_BOX_FACTORY.deployDepositBox(permit.owner, permit.boxId);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
pragma solidity ^0.8.0;
|
|
3
|
+
|
|
4
|
+
interface IPCrossChainSwapHub {
|
|
5
|
+
error InsufficientTokenReceived();
|
|
6
|
+
error InvalidNonce();
|
|
7
|
+
error InvalidSignature();
|
|
8
|
+
error MessageExpired();
|
|
9
|
+
error Unauthorized();
|
|
10
|
+
|
|
11
|
+
struct BoxPermit {
|
|
12
|
+
address owner;
|
|
13
|
+
uint32 boxId;
|
|
14
|
+
uint256 expiry;
|
|
15
|
+
uint256 requestId;
|
|
16
|
+
uint256 nonce;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
struct WithdrawTokenMessage {
|
|
20
|
+
BoxPermit permit;
|
|
21
|
+
address token;
|
|
22
|
+
uint256 amountWithdraw;
|
|
23
|
+
uint256 amountFee;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
struct BridgeTokenMessage {
|
|
27
|
+
BoxPermit permit;
|
|
28
|
+
address token;
|
|
29
|
+
uint256 amountBridge;
|
|
30
|
+
uint256 amountFee;
|
|
31
|
+
//
|
|
32
|
+
address bridgeExtRouter;
|
|
33
|
+
address bridgeApprove;
|
|
34
|
+
bytes bridgeCalldata;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
struct SwapTokenMessage {
|
|
38
|
+
BoxPermit permit;
|
|
39
|
+
address tokenSpent;
|
|
40
|
+
uint256 amountSpent;
|
|
41
|
+
address tokenReceived;
|
|
42
|
+
uint256 minReceived;
|
|
43
|
+
//
|
|
44
|
+
address swapExtRouter;
|
|
45
|
+
address swapApprove;
|
|
46
|
+
bytes swapCalldata;
|
|
47
|
+
}
|
|
48
|
+
|
|
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
|
+
);
|
|
58
|
+
|
|
59
|
+
event BridgeToken(
|
|
60
|
+
address owner,
|
|
61
|
+
uint32 boxId,
|
|
62
|
+
uint256 requestId,
|
|
63
|
+
uint256 nonce,
|
|
64
|
+
address bridgeExtRouter,
|
|
65
|
+
address token,
|
|
66
|
+
uint256 amountBridge,
|
|
67
|
+
uint256 amountFee
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
event SwapToken(
|
|
71
|
+
address owner,
|
|
72
|
+
uint32 boxId,
|
|
73
|
+
uint256 requestId,
|
|
74
|
+
uint256 nonce,
|
|
75
|
+
address tokenSpent,
|
|
76
|
+
uint256 amountSpent,
|
|
77
|
+
address tokenReceived,
|
|
78
|
+
uint256 netTokenReceived
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
event SetExecutor(address executor);
|
|
82
|
+
|
|
83
|
+
event SetProposer(address proposer);
|
|
84
|
+
|
|
85
|
+
function executor() external view returns (address);
|
|
86
|
+
|
|
87
|
+
function proposer() external view returns (address);
|
|
88
|
+
|
|
89
|
+
function setExecutor(address executor) external;
|
|
90
|
+
|
|
91
|
+
function setProposer(address proposer) external;
|
|
92
|
+
|
|
93
|
+
function requestNonce(uint256 requestId) external view returns (uint256);
|
|
94
|
+
|
|
95
|
+
function hashBoxPermit(BoxPermit memory permit) external view returns (bytes32);
|
|
96
|
+
|
|
97
|
+
function hashTypedData(WithdrawTokenMessage memory message) external view returns (bytes32);
|
|
98
|
+
|
|
99
|
+
function hashTypedData(BridgeTokenMessage memory message) external view returns (bytes32);
|
|
100
|
+
|
|
101
|
+
function hashTypedData(SwapTokenMessage memory message) external view returns (bytes32);
|
|
102
|
+
|
|
103
|
+
function withdrawToken(WithdrawTokenMessage memory message, bytes memory signature) external;
|
|
104
|
+
|
|
105
|
+
function bridgeToken(BridgeTokenMessage memory message, bytes memory signature) external payable;
|
|
106
|
+
|
|
107
|
+
function swapToken(SwapTokenMessage memory message, bytes memory signature) external;
|
|
108
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
pragma solidity ^0.8.0;
|
|
3
|
+
|
|
4
|
+
struct ApprovedCall {
|
|
5
|
+
address token;
|
|
6
|
+
uint256 amount;
|
|
7
|
+
address approveTo;
|
|
8
|
+
address callTo;
|
|
9
|
+
bytes data;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface IPDepositBox {
|
|
13
|
+
function MANAGER() external view returns (address);
|
|
14
|
+
|
|
15
|
+
function OWNER() external view returns (address);
|
|
16
|
+
|
|
17
|
+
function BOX_ID() external view returns (uint32);
|
|
18
|
+
|
|
19
|
+
function withdrawTo(address to, address token, uint256 amount) external;
|
|
20
|
+
|
|
21
|
+
function approveAndCall(ApprovedCall memory call, address nativeRefund) external payable returns (bytes memory);
|
|
22
|
+
}
|
|
@@ -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
|
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity ^0.8.17;
|
|
3
|
+
|
|
4
|
+
import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
|
|
5
|
+
|
|
6
|
+
interface IPStakedPendle {
|
|
7
|
+
struct Call3 {
|
|
8
|
+
bool allowFailure;
|
|
9
|
+
bytes callData;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
struct Result {
|
|
13
|
+
bool success;
|
|
14
|
+
bytes returnData;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
struct UserCooldown {
|
|
18
|
+
uint104 cooldownStart;
|
|
19
|
+
uint152 amount;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
event CooldownDurationAndFeeUpdated(uint24 newDuration, uint64 instantUnstakeFeeRate);
|
|
23
|
+
|
|
24
|
+
event Staked(address indexed user, uint256 amount);
|
|
25
|
+
|
|
26
|
+
event Unstaked(address indexed user, uint256 amountAfterFee, uint256 fee);
|
|
27
|
+
|
|
28
|
+
event CooldownCanceled(address indexed user, uint256 amount);
|
|
29
|
+
|
|
30
|
+
event CooldownInitiated(address indexed user, uint256 amount, uint256 cooldownStart);
|
|
31
|
+
|
|
32
|
+
event FeeReceiverUpdated(address indexed feeReceiver);
|
|
33
|
+
|
|
34
|
+
// ======== Getters ========
|
|
35
|
+
|
|
36
|
+
function PENDLE() external view returns (address);
|
|
37
|
+
|
|
38
|
+
function cooldownDuration() external view returns (uint24);
|
|
39
|
+
|
|
40
|
+
function instantUnstakeFeeRate() external view returns (uint64);
|
|
41
|
+
|
|
42
|
+
function feeReceiver() external view returns (address);
|
|
43
|
+
|
|
44
|
+
// ======== Staking functions ========
|
|
45
|
+
|
|
46
|
+
function userCooldown(address user) external view returns (uint104 cooldownStart, uint152 amount);
|
|
47
|
+
|
|
48
|
+
function stake(uint256 amount) external;
|
|
49
|
+
|
|
50
|
+
function cooldown(uint256 amount) external;
|
|
51
|
+
|
|
52
|
+
function cancelCooldown() external;
|
|
53
|
+
|
|
54
|
+
// fee-free, after cooldown
|
|
55
|
+
function finalizeCooldown() external returns (uint256 amount);
|
|
56
|
+
|
|
57
|
+
// instant, but with fee
|
|
58
|
+
function instantUnstake(uint256 amount) external returns (uint256 amountAfterFee, uint256 fee);
|
|
59
|
+
|
|
60
|
+
// ======== Misc helper functions =======
|
|
61
|
+
|
|
62
|
+
function multicall(Call3[] calldata calls) external returns (Result[] memory res);
|
|
63
|
+
|
|
64
|
+
// ======== Admin functions ========
|
|
65
|
+
|
|
66
|
+
function setCooldownDurationAndFee(uint24 newDuration, uint64 newInstantUnstakeFeeRate) external;
|
|
67
|
+
|
|
68
|
+
function setFeeReceiver(address newFeeReceiver) external;
|
|
69
|
+
}
|
|
@@ -6,6 +6,10 @@ import "../interfaces/IPMarket.sol";
|
|
|
6
6
|
import "../interfaces/IStandardizedYield.sol";
|
|
7
7
|
import "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";
|
|
8
8
|
|
|
9
|
+
interface ILegacyMarket {
|
|
10
|
+
function activeBalance(address user) external view returns (uint256);
|
|
11
|
+
}
|
|
12
|
+
|
|
9
13
|
contract BalanceReader is UUPSUpgradeable, BoringOwnableUpgradeableV2 {
|
|
10
14
|
struct UserMarketInfo {
|
|
11
15
|
uint256 lpBalance;
|
|
@@ -44,7 +48,13 @@ contract BalanceReader is UUPSUpgradeable, BoringOwnableUpgradeableV2 {
|
|
|
44
48
|
(, IPPrincipalToken PT, IPYieldToken YT) = market.readTokens();
|
|
45
49
|
|
|
46
50
|
info.lpBalance = market.balanceOf(user);
|
|
47
|
-
|
|
51
|
+
|
|
52
|
+
try ILegacyMarket(address(market)).activeBalance(user) returns (uint256 activeBalance) {
|
|
53
|
+
info.lpActiveBalance = activeBalance;
|
|
54
|
+
} catch {
|
|
55
|
+
info.lpActiveBalance = 0;
|
|
56
|
+
}
|
|
57
|
+
|
|
48
58
|
info.lpRewardsOut = _redeemRewards(market, user);
|
|
49
59
|
|
|
50
60
|
info.ytBalance = YT.balanceOf(user);
|