@pendle/core-v2 6.3.0-beta → 6.3.0-sweedtest
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol/PendleMsgReceiveEndpointUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol/PendleMsgReceiveEndpointUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiverAppUpg.sol/PendleMsgReceiverAppUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol/PendleMsgSendEndpointUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol/PendleMsgSendEndpointUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSenderAppUpg.sol/PendleMsgSenderAppUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/ExcessivelySafeCall.sol/ExcessivelySafeCall.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/ExcessivelySafeCall.sol/ExcessivelySafeCall.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol/LayerZeroHelper.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol/LayerZeroHelper.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/PendleMerkleDistributor.sol/PendleMerkleDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/PendleMerkleDistributor.sol/PendleMerkleDistributor.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/PendleMultiTokenMerkleDistributor.sol/PendleMultiTokenMerkleDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/PendleMultiTokenMerkleDistributor.sol/PendleMultiTokenMerkleDistributor.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol/VotingEscrowTokenBase.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/libraries/WeekMath.sol/WeekMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.json +2 -2
- package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.json +2 -2
- package/build/artifacts/contracts/core/Market/PendleGauge.sol/PendleGauge.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarketFactoryV6Upg.sol/PendleMarketFactoryV6Upg.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarketFactoryV6Upg.sol/PendleMarketFactoryV6Upg.json +2 -2
- package/build/artifacts/contracts/core/Market/PendleMarketV6.sol/PendleMarketV6.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarketV6.sol/PendleMarketV6.json +2 -2
- package/build/artifacts/contracts/core/RewardManager/RewardManager.sol/RewardManager.dbg.json +1 -1
- package/build/artifacts/contracts/core/RewardManager/RewardManagerAbstract.sol/RewardManagerAbstract.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/SYUtils.sol/SYUtils.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/InterestManagerYT.sol/InterestManagerYT.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.json +2 -2
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactoryUpg.sol/PendleYieldContractFactoryUpg.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactoryUpg.sol/PendleYieldContractFactoryUpg.json +2 -2
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.json +2 -2
- package/build/artifacts/contracts/core/erc20/PendleERC20.sol/PendleERC20.dbg.json +1 -1
- package/build/artifacts/contracts/core/erc20/PendleERC20.sol/PendleERC20.json +2 -2
- package/build/artifacts/contracts/core/libraries/ArrayLib.sol/ArrayLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/ArrayLib.sol/ArrayLib.json +2 -2
- package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/BaseSplitCodeFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/BaseSplitCodeFactory.json +2 -2
- package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/CodeDeployer.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/CodeDeployer.json +2 -2
- package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeableV2.sol/BoringOwnableUpgradeableData.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeableV2.sol/BoringOwnableUpgradeableData.json +2 -2
- package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeableV2.sol/BoringOwnableUpgradeableV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.json +18 -2
- package/build/artifacts/contracts/core/libraries/ExpiryUtilsLib.sol/ExpiryUtils.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/ExpiryUtilsLib.sol/ExpiryUtils.json +2 -2
- package/build/artifacts/contracts/core/libraries/MiniHelpers.sol/MiniHelpers.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/StringLib.sol/StringLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/StringLib.sol/StringLib.json +2 -2
- package/build/artifacts/contracts/core/libraries/TokenHelper.sol/TokenHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/math/LogExpMath.sol/LogExpMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/math/LogExpMath.sol/LogExpMath.json +2 -2
- package/build/artifacts/contracts/core/libraries/math/PMath.sol/PMath.dbg.json +1 -1
- package/build/artifacts/contracts/cross-chain/FixedPricePTAMM.sol/FixedPricePTAMM.dbg.json +1 -1
- package/build/artifacts/contracts/cross-chain/FixedPricePTAMM.sol/FixedPricePTAMM.json +2 -2
- package/build/artifacts/contracts/cross-chain/factory/hub/PendlePTOFTAdapterFactory.sol/PendlePTOFTAdapterFactory.dbg.json +1 -1
- package/build/artifacts/contracts/cross-chain/factory/hub/PendlePTOFTAdapterFactory.sol/PendlePTOFTAdapterFactory.json +2 -2
- package/build/artifacts/contracts/cross-chain/oftImpl/hub/OFTAdapterImpl.sol/OFTAdapterImpl.dbg.json +1 -1
- package/build/artifacts/contracts/cross-chain/oftImpl/spoke/PendleBridgedPrincipalToken.sol/PendleBridgedPrincipalToken.dbg.json +1 -1
- package/build/artifacts/contracts/cross-chain/oftImpl/spoke/PendleBridgedPrincipalToken.sol/PendleBridgedPrincipalToken.json +2 -2
- package/build/artifacts/contracts/deprecated/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/deprecated/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.json +2 -2
- package/build/artifacts/contracts/deprecated/VeDistributor/PendleFeeDistributorV2.sol/PendleFeeDistributorV2.dbg.json +1 -1
- package/build/artifacts/contracts/deprecated/VeDistributor/PendleFeeDistributorV2.sol/PendleFeeDistributorV2.json +2 -2
- package/build/artifacts/contracts/interfaces/IAddressProvider.sol/IAddressProvider.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ILPWrapper.sol/ILPWrapper.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ILayerZeroEndpoint.sol/ILayerZeroEndpoint.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ILayerZeroReceiver.sol/ILayerZeroReceiver.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IMarketSweed.sol/IMarketSweed.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IMarketSweed.sol/IMarketSweed.json +141 -0
- package/build/artifacts/contracts/interfaces/IOwnable.sol/IOwnable.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiqV3.sol/IPActionAddRemoveLiqV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionCallbackV3.sol/IPActionCallbackV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionInfoStatic.sol/IPActionInfoStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMarketAuxStatic.sol/IPActionMarketAuxStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMarketCoreStatic.sol/IPActionMarketCoreStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMintRedeemStatic.sol/IPActionMintRedeemStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMiscV3.sol/IPActionMiscV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSimple.sol/IPActionSimple.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionStorageStatic.sol/IPActionStorageStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionStorageV4.sol/IPActionStorageV4.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapPTV3.sol/IPActionSwapPTV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapYTV3.sol/IPActionSwapYTV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionVePendleStatic.sol/IPActionVePendleStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllActionV3.sol/IPAllActionV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionAddRemoveLiqV3Events.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionMiscV3Events.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionStorageEvents.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionSwapPTV3Events.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionSwapYTV3Events.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPAllEventsV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPBridgedPrincipalToken.sol/IPBridgedPrincipalToken.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPChainlinkOracle.sol/IPChainlinkOracle.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPChainlinkOracleEssential.sol/IPChainlinkOracleEssential.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPChainlinkOracleFactory.sol/IPChainlinkOracleFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPChainlinkOracleWithQuote.sol/IPChainlinkOracleWithQuote.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPCommonPoolDeployHelperV2.sol/IPCommonPoolDeployHelperV2.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPCommonSYFactory.sol/IPCommonSYFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPExchangeRateOracle.sol/IPExchangeRateOracle.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPExchangeRateOracleApp.sol/IPExchangeRateOracleApp.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPExchangeRateOracleApp.sol/IPExchangeRateOracleApp.json +135 -0
- package/build/artifacts/contracts/interfaces/IPFeeDistributor.sol/IPFeeDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPFeeDistributorV2.sol/IPFeeDistributorV2.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPFixedPricePTAMM.sol/IPFixedPricePTAMM.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPFixedPricePTAMM.sol/IPFixedPricePTAMMSwapCallback.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPGauge.sol/IPGauge.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPGaugeController.sol/IPGaugeController.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPGaugeControllerMainchain.sol/IPGaugeControllerMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPGovernanceProxy.sol/IPGovernanceProxy.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPInterestManagerYT.sol/IPInterestManagerYT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPInterestManagerYTV2.sol/IPInterestManagerYTV2.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPLPWrapperFactory.sol/IPLPWrapperFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitOrderType.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouter.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouter.json +42 -0
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouterCallback.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.json +13 -0
- package/build/artifacts/contracts/interfaces/IPMarketFactory.sol/IPMarketFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarketSwapCallback.sol/IPMarketSwapCallback.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMerkleDistributor.sol/IPMerkleDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMiniDiamond.sol/IPMiniDiamond.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMsgReceiverApp.sol/IPMsgReceiverApp.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMsgSendEndpoint.sol/IPMsgSendEndpoint.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMultiTokenMerkleDistributor.sol/IPMultiTokenMerkleDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPOffchainStorage.sol/IPOffchainStorage.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPOracleForSy.sol/IPOracleForSy.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPTOFTAdapterFactory.sol/IPPTOFTAdapterFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPYLpOracle.sol/IPPYLpOracle.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPausingInterface.sol/IPPausingInterface.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPoolDeployHelperV2.sol/IPPoolDeployHelperV2.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPriceFeed.sol/IPPriceFeed.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPrincipalToken.sol/IPPrincipalToken.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPReflector.sol/IPReflector.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPRouterStatic.sol/IPRouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPTokenWithSupplyCap.sol/IPTokenWithSupplyCap.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPVeToken.sol/IPVeToken.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPVotingController.sol/IPVotingController.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPVotingEscrowMainchain.sol/IPVotingEscrowMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPYieldContractFactory.sol/IPYieldContractFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPYieldToken.sol/IPYieldToken.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPYieldTokenV2.sol/IPYieldTokenV2.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IRedstonePriceFeed.sol/IRedstonePriceFeed.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IRewardManager.sol/IRewardManager.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IStandardizedYield.sol/IStandardizedYield.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IWETH.sol/IWETH.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IWstETH.sol/IWstETH.dbg.json +1 -1
- package/build/artifacts/contracts/limit/LimitMathCore.sol/LimitMathCore.dbg.json +1 -1
- package/build/artifacts/contracts/limit/LimitMathCore.sol/LimitMathCore.json +2 -2
- package/build/artifacts/contracts/limit/LimitRouterBase.sol/LimitRouterBase.dbg.json +1 -1
- package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.dbg.json +1 -1
- package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.json +2 -2
- package/build/artifacts/contracts/limit/helpers/NonceManager.sol/NonceManager.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AddressProvider.sol/AddressProvider.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AddressProvider.sol/AddressProvider.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/AutomateReady.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/IAutomate.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/IOpsProxyFactory.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/ITaskTreasuryUpgradable.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BalanceReader.sol/BalanceReader.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BalanceReader.sol/BalanceReader.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol/BaseSplitCodeFactoryContract.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol/BaseSplitCodeFactoryContract.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/BytesLib.sol/BytesLib.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BytesLib.sol/BytesLib.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/EmptyUUPS.sol/EmptyUUPS.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/EmptyUUPS.sol/EmptyUUPS.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/ExpiredLpPtRedeemer.sol/ExpiredLpPtRedeemer.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/ExpiredLpPtRedeemer.sol/ExpiredLpPtRedeemer.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/LegacyNFTHelper.sol/LegacyNFTHelper.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/LegacyNFTHelper.sol/LegacyNFTHelper.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/LegacyNFTHelper.sol/StarNFTV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/LimitBackendHelperV2.sol/LimitBackendHelperV2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/LimitBackendHelperV2.sol/LimitBackendHelperV2.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/MarketSweed.sol/MarketSweed.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/MarketSweed.sol/MarketSweed.json +314 -0
- package/build/artifacts/contracts/offchain-helpers/Multicall2.sol/Multicall2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/Multicall2.sol/Multicall2.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleExchangeRateOracle.sol/PendleExchangeRateOracle.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleExchangeRateOracle.sol/PendleExchangeRateOracle.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleFeeSetter.sol/PendleFeeSetter.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/PendleFeeSetter.sol/PendleFeeSetter.json +326 -0
- package/build/artifacts/contracts/offchain-helpers/PendleGovernanceProxy.sol/PendleGovernanceProxy.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleGovernanceProxy.sol/PendleGovernanceProxy.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleLPWrapper.sol/PendleLPWrapper.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleLPWrapper.sol/PendleLPWrapper.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleLPWrapperFactory.sol/PendleLPWrapperFactory.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleLPWrapperFactory.sol/PendleLPWrapperFactory.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallOwnerV1.sol/PendleMulticallOwnerV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallOwnerV1.sol/PendleMulticallOwnerV1.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallV1.sol/PendleMulticallV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallV1.sol/PendleMulticallV1.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallV2.sol/PendleMulticallV2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallV2.sol/PendleMulticallV2.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleOffchainStorage.sol/PendleOffchainStorage.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleOffchainStorage.sol/PendleOffchainStorage.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleWstETHPriceFeed.sol/PendleWstETHPriceFeed.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleWstETHPriceFeed.sol/PendleWstETHPriceFeed.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/SimulateHelper.sol/SimulateHelper.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/SimulateHelper.sol/SimulateHelper.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/SupplyCapReader.sol/IPossibleSupplyCapInterface.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/SupplyCapReader.sol/SupplyCapReader.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonPoolDeployHelperV2.sol/PendleCommonPoolDeployHelperV2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonPoolDeployHelperV2.sol/PendleCommonPoolDeployHelperV2.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonSYFactory.sol/PendleCommonSYFactory.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonSYFactory.sol/PendleCommonSYFactory.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelper.sol/PendlePoolDeployHelper.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelper.sol/PendlePoolDeployHelper.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelperV2.sol/PendlePoolDeployHelperV2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelperV2.sol/PendlePoolDeployHelperV2.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/deploy/lib/MarketDeployLib.sol/MarketDeployLib.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/deploy/lib/MarketDeployLib.sol/MarketDeployLib.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/errors/SDKErrorsDirectory.sol/SDKErrorsDirectory.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/errors/SDKErrorsDirectory.sol/SDKErrorsDirectory.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol/MarketApproxPtInLibV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol/MarketApproxPtInLibV1.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol/MarketApproxPtOutLibV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol/MarketApproxPtOutLibV1.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/StorageLayout.sol/StorageLayout.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/CrossChainOracle/base/PendleCrossChainOracleBaseApp_Init.sol/PendleCrossChainOracleBaseApp_Init.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/CrossChainOracle/base/PendleCrossChainOracleBaseApp_Init.sol/PendleCrossChainOracleBaseApp_Init.json +13 -13
- 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 +150 -12
- package/build/artifacts/contracts/oracles/CrossChainOracle/exchangeRate/PendleExchangeRateOracleV2.sol/PendleExchangeRateOracleV2.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/CrossChainOracle/exchangeRate/PendleExchangeRateOracleV2.sol/PendleExchangeRateOracleV2.json +2 -2
- package/build/artifacts/contracts/oracles/CrossChainOracle/libraries/ExchangeRateMsgCodec.sol/ExchangeRateMsgCodec.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/CrossChainOracle/libraries/ExchangeRateMsgCodec.sol/ExchangeRateMsgCodec.json +2 -2
- package/build/artifacts/contracts/oracles/PtYtLpOracle/PendleLpOracleLib.sol/PendleLpOracleLib.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/PendleLpOracleLib.sol/PendleLpOracleLib.json +2 -2
- package/build/artifacts/contracts/oracles/PtYtLpOracle/PendlePYLpOracle.sol/PendlePYLpOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/PendlePYLpOracle.sol/PendlePYLpOracle.json +2 -2
- package/build/artifacts/contracts/oracles/PtYtLpOracle/PendlePYOracleLib.sol/PendlePYOracleLib.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/PendlePYOracleLib.sol/PendlePYOracleLib.json +2 -2
- package/build/artifacts/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracle.sol/PendleChainlinkOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracle.sol/PendleChainlinkOracle.json +2 -2
- package/build/artifacts/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracleFactory.sol/PendleChainlinkOracleFactory.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracleFactory.sol/PendleChainlinkOracleFactory.json +2 -2
- package/build/artifacts/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracleWithQuote.sol/PendleChainlinkOracleWithQuote.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracleWithQuote.sol/PendleChainlinkOracleWithQuote.json +2 -2
- package/build/artifacts/contracts/oracles/PtYtLpOracle/samples/BoringLpSeller.sol/BoringLpSeller.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/samples/BoringPYUsdChainlinkAssetOracle.sol/BoringPYUsdChainlinkAssetOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/samples/BoringPYUsdChainlinkAssetOracle.sol/BoringPYUsdChainlinkAssetOracle.json +2 -2
- package/build/artifacts/contracts/oracles/PtYtLpOracle/samples/BoringPYUsdChainlinkSYOracle.sol/BoringPYUsdChainlinkSYOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/samples/BoringPYUsdChainlinkSYOracle.sol/BoringPYUsdChainlinkSYOracle.json +2 -2
- package/build/artifacts/contracts/oracles/PtYtLpOracle/samples/BoringPtSeller.sol/BoringPtSeller.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/StatelessWrapper/PendleLinearDiscountOracleWrapper.sol/PendleLinearDiscountOracleWrapper.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/StatelessWrapper/PendleSparkLinearDiscountOracleFactoryWrapper.sol/PendleSparkLinearDiscountOracleFactoryWrapper.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/StatelessWrapper/PendleSparkLinearDiscountOracleFactoryWrapper.sol/PendleSparkLinearDiscountOracleFactoryWrapper.json +2 -2
- package/build/artifacts/contracts/oracles/internal/PendleBoringOneracle.sol/PendleBoringOneracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleBoringSolvBTCOneracle.sol/PendleBoringSolvBTCOneracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleLpLinearDiscountOracle.sol/LPExpiry.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleLpLinearDiscountOracle.sol/PendleLpLinearDiscountOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleLpLinearDiscountOracleFactory.sol/PendleLpLinearDiscountOracleFactory.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleRedStoneRateOracleAdapter.sol/PendleRedStoneRateOracleAdapter.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleSparkLinearDiscountOracle.sol/PTExpiry.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleSparkLinearDiscountOracle.sol/PendleSparkLinearDiscountOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleSparkLinearDiscountOracleFactory.sol/PendleSparkLinearDiscountOracleFactory.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleSparkLinearDiscountOracleFactory.sol/PendleSparkLinearDiscountOracleFactory.json +2 -2
- package/build/artifacts/contracts/router/ActionAddRemoveLiqV3.sol/ActionAddRemoveLiqV3.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionAddRemoveLiqV3.sol/ActionAddRemoveLiqV3.json +2 -2
- package/build/artifacts/contracts/router/ActionCallbackV3.sol/ActionCallbackV3.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionCallbackV3.sol/ActionCallbackV3.json +2 -2
- package/build/artifacts/contracts/router/ActionMiscV3.sol/ActionMiscV3.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionMiscV3.sol/ActionMiscV3.json +2 -2
- package/build/artifacts/contracts/router/ActionSimple.sol/ActionSimple.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSimple.sol/ActionSimple.json +2 -2
- package/build/artifacts/contracts/router/ActionStorageV4.sol/ActionStorageV4.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionStorageV4.sol/ActionStorageV4.json +2 -2
- package/build/artifacts/contracts/router/ActionSwapPTV3.sol/ActionSwapPTV3.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapPTV3.sol/ActionSwapPTV3.json +2 -2
- package/build/artifacts/contracts/router/ActionSwapYTV3.sol/ActionSwapYTV3.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapYTV3.sol/ActionSwapYTV3.json +2 -2
- package/build/artifacts/contracts/router/PendleRouterV4.sol/PendleRouterV4.dbg.json +1 -1
- package/build/artifacts/contracts/router/PendleRouterV4.sol/PendleRouterV4.json +2 -2
- package/build/artifacts/contracts/router/Reflector.sol/Reflector.dbg.json +1 -1
- package/build/artifacts/contracts/router/Reflector.sol/Reflector.json +2 -2
- package/build/artifacts/contracts/router/RouterStorage.sol/RouterStorage.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/ActionBase.sol/ActionBase.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/ActionDelegateBase.sol/ActionDelegateBase.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/ActionDelegateBase.sol/ActionDelegateBase.json +2 -2
- package/build/artifacts/contracts/router/base/CallbackHelper.sol/CallbackHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/ApproxStateLib.sol/ApproxStateLib.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/ApproxStateLib.sol/ApproxStateLib.json +2 -2
- package/build/artifacts/contracts/router/math/MarketApproxEstimateLib.sol/MarketApproxEstimateLib.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/MarketApproxEstimateLib.sol/MarketApproxEstimateLib.json +2 -2
- package/build/artifacts/contracts/router/math/MarketApproxLibOnchain.sol/MarketApproxPtInLibOnchain.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/MarketApproxLibOnchain.sol/MarketApproxPtInLibOnchain.json +2 -2
- package/build/artifacts/contracts/router/math/MarketApproxLibOnchain.sol/MarketApproxPtOutLibOnchain.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/MarketApproxLibOnchain.sol/MarketApproxPtOutLibOnchain.json +2 -2
- package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtInLibV2.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtInLibV2.json +2 -2
- package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtOutLibV2.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtOutLibV2.json +2 -2
- package/build/artifacts/contracts/router/swap-aggregator/IPSwapAggregator.sol/IPSwapAggregator.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/OKXScaleHelper.sol/IOKXDexRouter.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/OKXScaleHelper.sol/IOKXDexRouter.json +171 -0
- package/build/artifacts/contracts/router/swap-aggregator/OKXScaleHelper.sol/OKXScaleHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/ParaswapScaleHelper.sol/IAugustusV6.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/ParaswapScaleHelper.sol/ParaswapScaleHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/ParaswapScaleHelper.sol/ParaswapScaleHelper.json +2 -2
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/IKyberScalingHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/IOdosRouterV2.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwap.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwap.json +2 -2
- package/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol +15 -17
- package/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiverAppUpg.sol +1 -1
- package/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol +14 -16
- package/contracts/LiquidityMining/CrossChainMsg/PendleMsgSenderAppUpg.sol +2 -3
- package/contracts/LiquidityMining/CrossChainMsg/libraries/ExcessivelySafeCall.sol +9 -12
- package/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol +12 -12
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol +8 -10
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol +6 -12
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol +4 -11
- package/contracts/LiquidityMining/PendleMerkleDistributor.sol +11 -13
- package/contracts/LiquidityMining/PendleMultiTokenMerkleDistributor.sol +17 -22
- package/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol +21 -28
- package/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol +31 -27
- package/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol +19 -23
- package/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol +7 -8
- package/contracts/LiquidityMining/libraries/VeBalanceLib.sol +6 -5
- package/contracts/core/Market/MarketMathCore.sol +78 -112
- package/contracts/core/Market/OracleLib.sol +34 -41
- package/contracts/core/Market/PendleGauge.sol +8 -8
- package/contracts/core/Market/PendleMarketFactoryV6Upg.sol +19 -16
- package/contracts/core/Market/PendleMarketV6.sol +63 -65
- package/contracts/core/RewardManager/RewardManager.sol +8 -8
- package/contracts/core/RewardManager/RewardManagerAbstract.sol +6 -5
- package/contracts/core/StandardizedYield/PYIndex.sol +2 -2
- package/contracts/core/YieldContracts/InterestManagerYT.sol +8 -9
- package/contracts/core/YieldContracts/PendlePrincipalToken.sol +4 -8
- package/contracts/core/YieldContracts/PendleYieldContractFactoryUpg.sol +15 -12
- package/contracts/core/YieldContracts/PendleYieldToken.sol +54 -41
- package/contracts/core/erc20/PendleERC20.sol +9 -6
- package/contracts/core/libraries/ArrayLib.sol +11 -13
- package/contracts/core/libraries/BaseSplitCodeFactory.sol +22 -29
- package/contracts/core/libraries/BoringOwnableUpgradeableV2.sol +2 -1
- package/contracts/core/libraries/Errors.sol +2 -4
- package/contracts/core/libraries/ExpiryUtilsLib.sol +10 -10
- package/contracts/core/libraries/StringLib.sol +13 -13
- package/contracts/core/libraries/TokenHelper.sol +3 -3
- package/contracts/core/libraries/math/LogExpMath.sol +77 -67
- package/contracts/cross-chain/FixedPricePTAMM.sol +38 -39
- package/contracts/cross-chain/factory/hub/PendlePTOFTAdapterFactory.sol +1 -1
- package/contracts/cross-chain/oftImpl/spoke/PendleBridgedPrincipalToken.sol +1 -1
- package/contracts/deprecated/VeDistributor/PendleFeeDistributor.sol +15 -12
- package/contracts/deprecated/VeDistributor/PendleFeeDistributorV2.sol +21 -24
- package/contracts/interfaces/ILayerZeroEndpoint.sol +5 -3
- package/contracts/interfaces/IMarketSweed.sol +23 -0
- package/contracts/interfaces/IPActionCallbackV3.sol +1 -1
- package/contracts/interfaces/IPActionInfoStatic.sol +1 -3
- package/contracts/interfaces/IPActionMarketAuxStatic.sol +11 -15
- package/contracts/interfaces/IPActionMarketCoreStatic.sol +58 -109
- package/contracts/interfaces/IPActionMintRedeemStatic.sol +21 -26
- package/contracts/interfaces/IPActionMiscV3.sol +24 -44
- package/contracts/interfaces/IPActionSimple.sol +24 -43
- package/contracts/interfaces/IPActionVePendleStatic.sol +4 -5
- package/contracts/interfaces/IPAllActionTypeV3.sol +14 -16
- package/contracts/interfaces/IPAllActionV3.sol +4 -4
- package/contracts/interfaces/IPAllEventsV3.sol +5 -21
- package/contracts/interfaces/IPBridgedPrincipalToken.sol +2 -2
- package/contracts/interfaces/IPCommonSYFactory.sol +3 -6
- package/contracts/interfaces/IPExchangeRateOracleApp.sol +44 -17
- package/contracts/interfaces/IPFeeDistributorV2.sol +13 -16
- package/contracts/interfaces/IPFixedPricePTAMM.sol +22 -34
- package/contracts/interfaces/IPGovernanceProxy.sol +2 -6
- package/contracts/interfaces/IPInterestManagerYTV2.sol +4 -3
- package/contracts/interfaces/IPLimitRouter.sol +16 -16
- package/contracts/interfaces/IPMarket.sol +25 -35
- package/contracts/interfaces/IPMarketFactory.sol +9 -16
- package/contracts/interfaces/IPMerkleDistributor.sol +6 -10
- package/contracts/interfaces/IPMsgSendEndpoint.sol +7 -12
- package/contracts/interfaces/IPMultiTokenMerkleDistributor.sol +6 -12
- package/contracts/interfaces/IPPYLpOracle.sol +1 -4
- package/contracts/interfaces/IPRouterStatic.sol +3 -3
- package/contracts/interfaces/IPVotingController.sol +4 -4
- package/contracts/interfaces/IPVotingEscrowMainchain.sol +1 -1
- package/contracts/interfaces/IPYieldContractFactory.sol +3 -5
- package/contracts/interfaces/IPYieldToken.sol +8 -11
- package/contracts/interfaces/IPYieldTokenV2.sol +8 -11
- package/contracts/interfaces/IStandardizedYield.sol +16 -17
- package/contracts/limit/LimitMathCore.sol +38 -56
- package/contracts/limit/LimitRouterBase.sol +66 -88
- package/contracts/limit/PendleLimitRouter.sol +11 -7
- package/contracts/offchain-helpers/AddressProvider.sol +1 -1
- package/contracts/offchain-helpers/AutomateReady.sol +2 -2
- package/contracts/offchain-helpers/BalanceReader.sol +21 -9
- package/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol +5 -7
- package/contracts/offchain-helpers/Broadcaster.sol +3 -3
- package/contracts/offchain-helpers/BytesLib.sol +3 -5
- package/contracts/offchain-helpers/EmptyUUPS.sol +2 -2
- package/contracts/offchain-helpers/ExpiredLpPtRedeemer.sol +5 -8
- package/contracts/offchain-helpers/LegacyNFTHelper.sol +1 -5
- package/contracts/offchain-helpers/LimitBackendHelperV2.sol +12 -12
- package/contracts/offchain-helpers/MarketSweed.sol +246 -0
- package/contracts/offchain-helpers/Multicall2.sol +9 -7
- package/contracts/offchain-helpers/PendleExchangeRateOracle.sol +4 -8
- package/contracts/offchain-helpers/PendleFeeSetter.sol +149 -0
- package/contracts/offchain-helpers/PendleGovernanceProxy.sol +7 -10
- package/contracts/offchain-helpers/PendleLPWrapper.sol +12 -3
- package/contracts/offchain-helpers/PendleLPWrapperFactory.sol +2 -2
- package/contracts/offchain-helpers/PendleMulticallV1.sol +7 -7
- package/contracts/offchain-helpers/PendleMulticallV2.sol +13 -12
- package/contracts/offchain-helpers/PendleOffchainStorage.sol +1 -1
- package/contracts/offchain-helpers/PendleWstETHPriceFeed.sol +4 -2
- package/contracts/offchain-helpers/SimulateHelper.sol +7 -6
- package/contracts/offchain-helpers/deploy/PendleCommonPoolDeployHelperV2.sol +13 -32
- package/contracts/offchain-helpers/deploy/PendleCommonSYFactory.sol +7 -11
- package/contracts/offchain-helpers/deploy/PendlePoolDeployHelper.sol +16 -35
- package/contracts/offchain-helpers/deploy/PendlePoolDeployHelperV2.sol +15 -35
- package/contracts/offchain-helpers/deploy/lib/MarketDeployLib.sol +12 -13
- package/contracts/offchain-helpers/errors/SDKErrorsDirectory.sol +1 -4
- package/contracts/offchain-helpers/router-static/PendleRouterStatic.sol +1 -1
- package/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol +12 -9
- package/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol +60 -91
- package/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol +103 -190
- package/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol +26 -26
- package/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol +3 -3
- package/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol +8 -10
- package/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol +100 -40
- package/contracts/oracles/CrossChainOracle/base/PendleCrossChainOracleBaseApp_Init.sol +18 -9
- package/contracts/oracles/CrossChainOracle/exchangeRate/PendleExchangeRateOracleApp.sol +118 -52
- package/contracts/oracles/CrossChainOracle/exchangeRate/PendleExchangeRateOracleV2.sol +2 -3
- package/contracts/oracles/CrossChainOracle/libraries/ExchangeRateMsgCodec.sol +12 -12
- package/contracts/oracles/PtYtLpOracle/PendleLpOracleLib.sol +17 -20
- package/contracts/oracles/PtYtLpOracle/PendlePYLpOracle.sol +15 -19
- package/contracts/oracles/PtYtLpOracle/PendlePYOracleLib.sol +7 -6
- package/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracle.sol +13 -9
- package/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracleFactory.sol +20 -21
- package/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracleWithQuote.sol +4 -7
- package/contracts/oracles/PtYtLpOracle/samples/BoringLpSeller.sol +2 -2
- package/contracts/oracles/PtYtLpOracle/samples/BoringPYUsdChainlinkAssetOracle.sol +13 -10
- package/contracts/oracles/PtYtLpOracle/samples/BoringPYUsdChainlinkSYOracle.sol +13 -10
- package/contracts/oracles/PtYtLpOracle/samples/BoringPtSeller.sol +6 -5
- package/contracts/oracles/StatelessWrapper/PendleSparkLinearDiscountOracleFactoryWrapper.sol +1 -1
- package/contracts/oracles/internal/PendleSparkLinearDiscountOracleFactory.sol +3 -3
- package/contracts/router/ActionAddRemoveLiqV3.sol +55 -150
- package/contracts/router/ActionCallbackV3.sol +20 -13
- package/contracts/router/ActionMiscV3.sol +54 -78
- package/contracts/router/ActionSimple.sol +76 -128
- package/contracts/router/ActionSwapPTV3.sol +7 -19
- package/contracts/router/ActionSwapYTV3.sol +8 -20
- package/contracts/router/PendleRouterV4.sol +1 -1
- package/contracts/router/Reflector.sol +15 -21
- package/contracts/router/base/ActionBase.sol +61 -105
- package/contracts/router/base/ActionDelegateBase.sol +39 -38
- package/contracts/router/base/CallbackHelper.sol +21 -19
- package/contracts/router/math/ApproxStateLib.sol +28 -28
- package/contracts/router/math/MarketApproxEstimateLib.sol +11 -13
- package/contracts/router/math/MarketApproxLibOnchain.sol +47 -24
- package/contracts/router/math/MarketApproxLibV2.sol +63 -44
- package/contracts/router/swap-aggregator/OKXScaleHelper.sol +191 -55
- package/contracts/router/swap-aggregator/ParaswapScaleHelper.sol +34 -48
- package/contracts/router/swap-aggregator/PendleSwap.sol +26 -28
- package/deployments/1-core.json +5 -2
- package/deployments/1-offchain-helper.json +2 -1
- package/deployments/10-core.json +5 -2
- package/deployments/10-offchain-helper.json +2 -1
- package/deployments/146-core.json +5 -2
- package/deployments/146-offchain-helper.json +2 -1
- package/deployments/42161-core.json +7 -3
- package/deployments/42161-offchain-helper.json +2 -1
- package/deployments/5000-core.json +5 -2
- package/deployments/5000-offchain-helper.json +2 -1
- package/deployments/56-core.json +5 -2
- package/deployments/56-offchain-helper.json +2 -1
- package/deployments/80094-core.json +5 -2
- package/deployments/80094-offchain-helper.json +2 -1
- package/deployments/8453-core.json +5 -2
- package/deployments/8453-offchain-helper.json +2 -1
- package/deployments/9745-core.json +5 -2
- package/deployments/9745-offchain-helper.json +2 -1
- package/deployments/999-core.json +5 -2
- package/deployments/999-offchain-helper.json +2 -1
- package/package.json +4 -6
- package/typechain-types/IMarketSweed.ts +203 -0
- package/typechain-types/IOKXDexRouter.ts +99 -0
- package/typechain-types/IPExchangeRateOracleApp.ts +83 -0
- package/typechain-types/IPLimitRouter.ts +69 -0
- package/typechain-types/IPMarket.ts +13 -0
- package/typechain-types/LimitMathCore.ts +102 -0
- package/typechain-types/MarketSweed.ts +242 -0
- package/typechain-types/OverfillMathLib.ts +81 -0
- package/typechain-types/PendleCrossChainOracleBaseApp_Init.ts +13 -19
- package/typechain-types/PendleExchangeRateOracleApp.ts +73 -9
- package/typechain-types/PendleFeeSetter.ts +188 -3
- package/typechain-types/factories/ActionAddRemoveLiqV3__factory.ts +1 -1
- package/typechain-types/factories/ActionCallbackV3__factory.ts +1 -1
- package/typechain-types/factories/ActionDelegateBase__factory.ts +1 -1
- package/typechain-types/factories/ActionInfoStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionMarketAuxStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionMarketCoreStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionMintRedeemStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionMiscV3__factory.ts +1 -1
- package/typechain-types/factories/ActionSimple__factory.ts +1 -1
- package/typechain-types/factories/ActionStorageStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionStorageV4__factory.ts +1 -1
- package/typechain-types/factories/ActionSwapPTV3__factory.ts +1 -1
- package/typechain-types/factories/ActionSwapYTV3__factory.ts +1 -1
- package/typechain-types/factories/ActionVePendleStatic__factory.ts +1 -1
- package/typechain-types/factories/AddressProvider__factory.ts +1 -1
- package/typechain-types/factories/BalanceReader__factory.ts +1 -1
- package/typechain-types/factories/BaseSplitCodeFactoryContract__factory.ts +1 -1
- package/typechain-types/factories/BoringOwnableUpgradeableData__factory.ts +1 -1
- package/typechain-types/factories/BoringPYUsdChainlinkAssetOracle__factory.ts +1 -1
- package/typechain-types/factories/BoringPYUsdChainlinkSYOracle__factory.ts +1 -1
- package/typechain-types/factories/Broadcaster__factory.ts +1 -1
- package/typechain-types/factories/EmptyUUPS__factory.ts +1 -1
- package/typechain-types/factories/Errors__factory.ts +17 -1
- package/typechain-types/factories/ExchangeRateMsgCodec__factory.ts +1 -1
- package/typechain-types/factories/ExpiredLpPtRedeemer__factory.ts +1 -1
- package/typechain-types/factories/FixedPricePTAMM__factory.ts +1 -1
- package/typechain-types/factories/{IPActionCrossChain__factory.ts → IMarketSweed__factory.ts} +61 -22
- package/typechain-types/factories/IOKXDexRouter__factory.ts +171 -0
- package/typechain-types/factories/IPExchangeRateOracleApp__factory.ts +135 -0
- package/typechain-types/factories/IPLimitRouter__factory.ts +42 -0
- package/typechain-types/factories/IPMarket__factory.ts +13 -0
- package/typechain-types/factories/LegacyNFTHelper__factory.ts +1 -1
- package/typechain-types/factories/LimitBackendHelperV2__factory.ts +1 -1
- package/typechain-types/factories/LimitMathCore__factory.ts +87 -0
- package/typechain-types/factories/MarketSweed__factory.ts +364 -0
- package/typechain-types/factories/Multicall2__factory.ts +1 -1
- package/typechain-types/factories/OracleLib__factory.ts +1 -1
- package/typechain-types/factories/OverfillMathLib__factory.ts +77 -0
- package/typechain-types/factories/PendleBridgedPrincipalToken__factory.ts +1 -1
- package/typechain-types/factories/PendleChainlinkOracleFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleChainlinkOracleWithQuote__factory.ts +1 -1
- package/typechain-types/factories/PendleChainlinkOracle__factory.ts +1 -1
- package/typechain-types/factories/PendleCommonPoolDeployHelperV2__factory.ts +1 -1
- package/typechain-types/factories/PendleCommonSYFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleCrossChainOracleBaseApp_Init__factory.ts +13 -13
- package/typechain-types/factories/PendleERC20__factory.ts +1 -1
- package/typechain-types/factories/PendleExchangeRateOracleApp__factory.ts +150 -19
- package/typechain-types/factories/PendleExchangeRateOracleV2__factory.ts +1 -1
- package/typechain-types/factories/PendleExchangeRateOracle__factory.ts +1 -1
- package/typechain-types/factories/PendleFeeDistributorV2__factory.ts +1 -1
- package/typechain-types/factories/PendleFeeDistributor__factory.ts +1 -1
- package/typechain-types/factories/PendleFeeSetter__factory.ts +140 -2
- package/typechain-types/factories/PendleGaugeControllerMainchainUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleGaugeControllerSidechainUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleGovernanceProxy__factory.ts +1 -1
- package/typechain-types/factories/PendleLPWrapperFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleLPWrapper__factory.ts +1 -1
- package/typechain-types/factories/PendleLimitRouter__factory.ts +1 -1
- package/typechain-types/factories/PendleMarketFactoryV6Upg__factory.ts +1 -1
- package/typechain-types/factories/PendleMarketV6__factory.ts +1 -1
- package/typechain-types/factories/PendleMerkleDistributor__factory.ts +1 -1
- package/typechain-types/factories/PendleMsgReceiveEndpointUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleMsgSendEndpointUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleMultiTokenMerkleDistributor__factory.ts +1 -1
- package/typechain-types/factories/PendleMulticallOwnerV1__factory.ts +1 -1
- package/typechain-types/factories/PendleMulticallV1__factory.ts +1 -1
- package/typechain-types/factories/PendleMulticallV2__factory.ts +1 -1
- package/typechain-types/factories/PendleOffchainStorage__factory.ts +1 -1
- package/typechain-types/factories/PendlePTOFTAdapterFactory__factory.ts +1 -1
- package/typechain-types/factories/PendlePYLpOracle__factory.ts +1 -1
- package/typechain-types/factories/PendlePoolDeployHelperV2__factory.ts +1 -1
- package/typechain-types/factories/PendlePoolDeployHelper__factory.ts +1 -1
- package/typechain-types/factories/PendlePrincipalToken__factory.ts +1 -1
- package/typechain-types/factories/PendleRouterStatic__factory.ts +1 -1
- package/typechain-types/factories/PendleRouterV4__factory.ts +1 -1
- package/typechain-types/factories/PendleSparkLinearDiscountOracleFactoryWrapper__factory.ts +1 -1
- package/typechain-types/factories/PendleSparkLinearDiscountOracleFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleSwap__factory.ts +1 -1
- package/typechain-types/factories/PendleVotingControllerUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleWstETHPriceFeed__factory.ts +1 -1
- package/typechain-types/factories/PendleYieldContractFactoryUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleYieldToken__factory.ts +1 -1
- package/typechain-types/factories/Reflector__factory.ts +1 -1
- package/typechain-types/factories/SDKErrorsDirectory__factory.ts +1 -1
- package/typechain-types/factories/SimulateHelper__factory.ts +1 -1
- package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +1 -1
- package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +1 -1
- package/typechain-types/hardhat.d.ts +27 -0
- package/typechain-types/index.ts +6 -0
- package/typechain-types/ActionCrossChain.ts +0 -161
- package/typechain-types/BasePendleBridgedPrincipalToken.ts +0 -1689
- package/typechain-types/IPActionCrossChain.ts +0 -161
- 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/factories/ActionCrossChain__factory.ts +0 -152
- package/typechain-types/factories/BasePendleBridgedPrincipalToken__factory.ts +0 -1548
- package/typechain-types/factories/LimitBackendHelper__factory.ts +0 -232
- 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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
2
|
pragma solidity ^0.8.0;
|
|
3
|
-
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
|
|
4
|
-
import "./IRewardManager.sol";
|
|
5
3
|
import "./IPInterestManagerYTV2.sol";
|
|
4
|
+
import "./IRewardManager.sol";
|
|
5
|
+
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
|
|
6
6
|
|
|
7
7
|
interface IPYieldTokenV2 is IERC20Metadata, IRewardManager, IPInterestManagerYTV2 {
|
|
8
8
|
event Mint(
|
|
@@ -29,16 +29,13 @@ interface IPYieldTokenV2 is IERC20Metadata, IRewardManager, IPInterestManagerYTV
|
|
|
29
29
|
|
|
30
30
|
function redeemPY(address receiver) external returns (uint256 amountSyOut);
|
|
31
31
|
|
|
32
|
-
function redeemPYMulti(
|
|
33
|
-
|
|
34
|
-
uint256[]
|
|
35
|
-
) external returns (uint256[] memory amountSyOuts);
|
|
32
|
+
function redeemPYMulti(address[] calldata receivers, uint256[] calldata amountPYToRedeems)
|
|
33
|
+
external
|
|
34
|
+
returns (uint256[] memory amountSyOuts);
|
|
36
35
|
|
|
37
|
-
function redeemDueInterestAndRewards(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
bool redeemRewards
|
|
41
|
-
) external returns (uint256 interestOut, uint256[] memory rewardsOut);
|
|
36
|
+
function redeemDueInterestAndRewards(address user, bool redeemInterest, bool redeemRewards)
|
|
37
|
+
external
|
|
38
|
+
returns (uint256 interestOut, uint256[] memory rewardsOut);
|
|
42
39
|
|
|
43
40
|
function rewardIndexesCurrent() external returns (uint256[] memory);
|
|
44
41
|
|
|
@@ -64,12 +64,10 @@ interface IStandardizedYield is IERC20Metadata {
|
|
|
64
64
|
* Requirements:
|
|
65
65
|
* - (`tokenIn`) must be a valid base token.
|
|
66
66
|
*/
|
|
67
|
-
function deposit(
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
uint256
|
|
71
|
-
uint256 minSharesOut
|
|
72
|
-
) external payable returns (uint256 amountSharesOut);
|
|
67
|
+
function deposit(address receiver, address tokenIn, uint256 amountTokenToDeposit, uint256 minSharesOut)
|
|
68
|
+
external
|
|
69
|
+
payable
|
|
70
|
+
returns (uint256 amountSharesOut);
|
|
73
71
|
|
|
74
72
|
/**
|
|
75
73
|
* @notice redeems an amount of base tokens by burning some shares
|
|
@@ -95,9 +93,9 @@ interface IStandardizedYield is IERC20Metadata {
|
|
|
95
93
|
/**
|
|
96
94
|
* @notice exchangeRate * syBalance / 1e18 must return the asset balance of the account
|
|
97
95
|
* @notice vice-versa, if a user uses some amount of tokens equivalent to X asset, the amount of sy
|
|
98
|
-
|
|
96
|
+
* exchangeRate / 1e18
|
|
99
97
|
* @dev SYUtils's assetToSy & syToAsset should be used instead of raw multiplication
|
|
100
|
-
& division
|
|
98
|
+
* & division
|
|
101
99
|
*/
|
|
102
100
|
function exchangeRate() external view returns (uint256 res);
|
|
103
101
|
|
|
@@ -146,20 +144,21 @@ interface IStandardizedYield is IERC20Metadata {
|
|
|
146
144
|
|
|
147
145
|
function isValidTokenOut(address token) external view returns (bool);
|
|
148
146
|
|
|
149
|
-
function previewDeposit(
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
147
|
+
function previewDeposit(address tokenIn, uint256 amountTokenToDeposit)
|
|
148
|
+
external
|
|
149
|
+
view
|
|
150
|
+
returns (uint256 amountSharesOut);
|
|
153
151
|
|
|
154
|
-
function previewRedeem(
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
152
|
+
function previewRedeem(address tokenOut, uint256 amountSharesToRedeem)
|
|
153
|
+
external
|
|
154
|
+
view
|
|
155
|
+
returns (uint256 amountTokenOut);
|
|
158
156
|
|
|
159
157
|
/**
|
|
160
158
|
* @notice This function contains information to interpret what the asset is
|
|
161
159
|
* @return assetType the type of the asset (0 for ERC20 tokens, 1 for AMM liquidity tokens,
|
|
162
|
-
|
|
160
|
+
* 2 for bridged yield bearing tokens like wstETH, rETH on Arbi whose the underlying asset doesn't exist on the
|
|
161
|
+
* chain)
|
|
163
162
|
* @return assetAddress the address of the asset
|
|
164
163
|
* @return assetDecimals the decimals of the asset
|
|
165
164
|
*/
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
pragma solidity ^0.8.0;
|
|
4
4
|
|
|
5
|
-
import "../interfaces/IPLimitRouter.sol";
|
|
6
5
|
import "../core/Market/MarketMathCore.sol";
|
|
6
|
+
import "../interfaces/IPLimitRouter.sol";
|
|
7
7
|
import "../interfaces/IPMarketFactory.sol";
|
|
8
8
|
|
|
9
9
|
library LimitMathCore {
|
|
@@ -12,37 +12,29 @@ library LimitMathCore {
|
|
|
12
12
|
using PMath for uint256;
|
|
13
13
|
using PMath for int256;
|
|
14
14
|
|
|
15
|
-
function calcBatch(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
params,
|
|
23
|
-
IPYieldToken(YT).expiry() - block.timestamp,
|
|
24
|
-
IPYieldToken(YT).pyIndexCurrent(),
|
|
25
|
-
lnFeeRateRoot
|
|
26
|
-
);
|
|
15
|
+
function calcBatch(FillOrderParams[] memory params, address YT, uint256 lnFeeRateRoot)
|
|
16
|
+
internal
|
|
17
|
+
returns (IPLimitOrderType.FillResults memory out)
|
|
18
|
+
{
|
|
19
|
+
return calcBatch(
|
|
20
|
+
params, IPYieldToken(YT).expiry() - block.timestamp, IPYieldToken(YT).pyIndexCurrent(), lnFeeRateRoot
|
|
21
|
+
);
|
|
27
22
|
}
|
|
28
23
|
|
|
29
24
|
// --- PURE FUNCTIONS ---
|
|
30
|
-
function calcBatch(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
) internal pure returns (IPLimitOrderType.FillResults memory out) {
|
|
25
|
+
function calcBatch(FillOrderParams[] memory params, uint256 timeToExpiry, uint256 pyIndex, uint256 lnFeeRateRoot)
|
|
26
|
+
internal
|
|
27
|
+
pure
|
|
28
|
+
returns (IPLimitOrderType.FillResults memory out)
|
|
29
|
+
{
|
|
36
30
|
uint256 len = params.length;
|
|
37
31
|
out.netMakings = new uint256[](len);
|
|
38
32
|
out.netTakings = new uint256[](len);
|
|
39
33
|
out.netFees = new uint256[](len);
|
|
40
34
|
out.notionalVolumes = new uint256[](len);
|
|
41
35
|
|
|
42
|
-
function(uint256, uint256, PYIndex, uint256)
|
|
43
|
-
|
|
44
|
-
pure
|
|
45
|
-
returns (uint256, uint256, uint256) calc = getCalcFunctions(params[0].order.orderType);
|
|
36
|
+
function(uint256, uint256, PYIndex, uint256) internal pure returns (uint256, uint256, uint256) calc =
|
|
37
|
+
getCalcFunctions(params[0].order.orderType);
|
|
46
38
|
|
|
47
39
|
uint256 feeRate = impliedRateToExchangeRate(lnFeeRateRoot, timeToExpiry);
|
|
48
40
|
|
|
@@ -53,12 +45,8 @@ library LimitMathCore {
|
|
|
53
45
|
uint256 exchangeRate = impliedRateToExchangeRate(param.order.lnImpliedRate, timeToExpiry);
|
|
54
46
|
|
|
55
47
|
out.netMakings[i] = param.makingAmount;
|
|
56
|
-
(out.netTakings[i], out.netFees[i], out.notionalVolumes[i]) =
|
|
57
|
-
out.netMakings[i],
|
|
58
|
-
exchangeRate,
|
|
59
|
-
PYIndex.wrap(pyIndex),
|
|
60
|
-
feeRate
|
|
61
|
-
);
|
|
48
|
+
(out.netTakings[i], out.netFees[i], out.notionalVolumes[i]) =
|
|
49
|
+
calc(out.netMakings[i], exchangeRate, PYIndex.wrap(pyIndex), feeRate);
|
|
62
50
|
|
|
63
51
|
require(out.netTakings[i] > 0, "LOP: can't swap 0 amount");
|
|
64
52
|
|
|
@@ -69,12 +57,11 @@ library LimitMathCore {
|
|
|
69
57
|
}
|
|
70
58
|
}
|
|
71
59
|
|
|
72
|
-
function calcSyForPt(
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
) internal pure returns (uint256 takePt, uint256 fee, uint256 notionalVolume) {
|
|
60
|
+
function calcSyForPt(uint256 makeSy, uint256 r, PYIndex index, uint256 f)
|
|
61
|
+
internal
|
|
62
|
+
pure
|
|
63
|
+
returns (uint256 takePt, uint256 fee, uint256 notionalVolume)
|
|
64
|
+
{
|
|
78
65
|
// takePt = makeSy * index * r
|
|
79
66
|
// fee = makeSy * (f - 1) / f
|
|
80
67
|
// notionalVolume = makeSy
|
|
@@ -84,12 +71,11 @@ library LimitMathCore {
|
|
|
84
71
|
notionalVolume = makeSy;
|
|
85
72
|
}
|
|
86
73
|
|
|
87
|
-
function calcPtForSy(
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
) internal pure returns (uint256 takeSy, uint256 fee, uint256 notionalVolume) {
|
|
74
|
+
function calcPtForSy(uint256 makePt, uint256 r, PYIndex index, uint256 f)
|
|
75
|
+
internal
|
|
76
|
+
pure
|
|
77
|
+
returns (uint256 takeSy, uint256 fee, uint256 notionalVolume)
|
|
78
|
+
{
|
|
93
79
|
// takeAsset = make / r
|
|
94
80
|
// takeSy = takeAsset / index
|
|
95
81
|
// fee = takeSy * (f-1)
|
|
@@ -100,12 +86,11 @@ library LimitMathCore {
|
|
|
100
86
|
notionalVolume = takeSy;
|
|
101
87
|
}
|
|
102
88
|
|
|
103
|
-
function calcSyForYt(
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
) internal pure returns (uint256 takeYt, uint256 fee, uint256 notionalVolume) {
|
|
89
|
+
function calcSyForYt(uint256 makeSy, uint256 r, PYIndex index, uint256 f)
|
|
90
|
+
internal
|
|
91
|
+
pure
|
|
92
|
+
returns (uint256 takeYt, uint256 fee, uint256 notionalVolume)
|
|
93
|
+
{
|
|
109
94
|
// pt = makeSy * index * r
|
|
110
95
|
// yt = pt / (r-1)
|
|
111
96
|
// fee = makeSy * (f-1) / (r-1)
|
|
@@ -117,12 +102,11 @@ library LimitMathCore {
|
|
|
117
102
|
notionalVolume = makeSy.divDown(pt_yt_ratio);
|
|
118
103
|
}
|
|
119
104
|
|
|
120
|
-
function calcYtForSy(
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
) internal pure returns (uint256 takeSy, uint256 fee, uint256 notionalVolume) {
|
|
105
|
+
function calcYtForSy(uint256 makeYt, uint256 r, PYIndex index, uint256 f)
|
|
106
|
+
internal
|
|
107
|
+
pure
|
|
108
|
+
returns (uint256 takeSy, uint256 fee, uint256 notionalVolume)
|
|
109
|
+
{
|
|
126
110
|
// pt = yt * (r-1)
|
|
127
111
|
// takeSy = pt / r / index
|
|
128
112
|
// feeSy = takeSy * (f-1) / f / (r-1)
|
|
@@ -138,9 +122,7 @@ library LimitMathCore {
|
|
|
138
122
|
return MarketMathCore._getExchangeRateFromImpliedRate(lnRate, timeToExpiry).Uint();
|
|
139
123
|
}
|
|
140
124
|
|
|
141
|
-
function getCalcFunctions(
|
|
142
|
-
IPLimitOrderType.OrderType t
|
|
143
|
-
)
|
|
125
|
+
function getCalcFunctions(IPLimitOrderType.OrderType t)
|
|
144
126
|
internal
|
|
145
127
|
pure
|
|
146
128
|
returns (function(uint256, uint256, PYIndex, uint256) internal pure returns (uint256, uint256, uint256) calc)
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
pragma solidity ^0.8.17;
|
|
4
4
|
|
|
5
|
-
import "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol";
|
|
6
|
-
import "@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol";
|
|
7
|
-
import "../interfaces/IPLimitRouter.sol";
|
|
8
5
|
import "../core/libraries/BoringOwnableUpgradeableV2.sol";
|
|
9
6
|
import "../core/libraries/TokenHelper.sol";
|
|
7
|
+
import "../interfaces/IPLimitRouter.sol";
|
|
10
8
|
import "../interfaces/IStandardizedYield.sol";
|
|
11
|
-
import "./helpers/NonceManager.sol";
|
|
12
9
|
import "../interfaces/IWETH.sol";
|
|
13
10
|
import {LimitMathCore as LimitMath} from "./LimitMathCore.sol";
|
|
11
|
+
import "./helpers/NonceManager.sol";
|
|
12
|
+
import "@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol";
|
|
13
|
+
import "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol";
|
|
14
14
|
|
|
15
15
|
abstract contract LimitRouterBase is
|
|
16
16
|
EIP712Upgradeable,
|
|
@@ -22,15 +22,14 @@ abstract contract LimitRouterBase is
|
|
|
22
22
|
using SafeERC20 for IERC20;
|
|
23
23
|
using PMath for uint256;
|
|
24
24
|
|
|
25
|
-
bytes32 internal constant LIMIT_ORDER_TYPEHASH =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
);
|
|
25
|
+
bytes32 internal constant LIMIT_ORDER_TYPEHASH = keccak256(
|
|
26
|
+
"Order(uint256 salt,uint256 expiry,uint256 nonce,uint8 orderType,address token,address YT,address maker,address receiver,uint256 makingAmount,uint256 lnImpliedRate,uint256 failSafeRate,bytes permit)"
|
|
27
|
+
);
|
|
29
28
|
|
|
30
29
|
uint128 internal constant _ORDER_DOES_NOT_EXIST = 0;
|
|
31
30
|
uint128 internal constant _ORDER_FILLED = 1;
|
|
32
|
-
uint256 internal constant NEW_PRIME =
|
|
33
|
-
uint256 internal constant MAX_LN_FEE_RATE_ROOT =
|
|
31
|
+
uint256 internal constant NEW_PRIME = 12_421;
|
|
32
|
+
uint256 internal constant MAX_LN_FEE_RATE_ROOT = 48_790_164_169_432_003; // ln(1.05)
|
|
34
33
|
|
|
35
34
|
bytes private constant EMPTY_BYTES = abi.encode();
|
|
36
35
|
|
|
@@ -70,7 +69,8 @@ abstract contract LimitRouterBase is
|
|
|
70
69
|
FillOrderParams[] memory params,
|
|
71
70
|
address receiver,
|
|
72
71
|
uint256 maxTaking,
|
|
73
|
-
bytes calldata
|
|
72
|
+
bytes calldata,
|
|
73
|
+
/*optData*/
|
|
74
74
|
bytes memory callback
|
|
75
75
|
) external returns (uint256 actualMaking, uint256 actualTaking, uint256 totalFee, bytes memory callbackReturn) {
|
|
76
76
|
params = _validateSkipSigAndFilterOrders(params);
|
|
@@ -94,16 +94,18 @@ abstract contract LimitRouterBase is
|
|
|
94
94
|
bytes callback;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
function fillNoOrders(
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
function fillNoOrders(bytes memory callback)
|
|
98
|
+
internal
|
|
99
|
+
returns (uint256 actualMaking, uint256 actualTaking, uint256 totalFee, bytes memory callbackReturn)
|
|
100
|
+
{
|
|
100
101
|
callbackReturn = callbackIfNeeded(0, 0, 0, callback);
|
|
101
102
|
return (0, 0, 0, callbackReturn);
|
|
102
103
|
}
|
|
103
104
|
|
|
104
|
-
function fillTokenForPY(
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
function fillTokenForPY(Args memory a)
|
|
106
|
+
internal
|
|
107
|
+
returns (uint256 actualMaking, uint256 actualTaking, uint256 totalFee, bytes memory callbackReturn)
|
|
108
|
+
{
|
|
107
109
|
(address SY, address PT, address YT, bytes32[] memory orderHashes) = _checkSig_updMakingAndStatus(a.params);
|
|
108
110
|
|
|
109
111
|
// Token => This
|
|
@@ -131,9 +133,10 @@ abstract contract LimitRouterBase is
|
|
|
131
133
|
_emitEvents(a.params, orderHashes, fromMakers, out.netTakings, out.netFees, out.notionalVolumes);
|
|
132
134
|
}
|
|
133
135
|
|
|
134
|
-
function fillPYForToken(
|
|
135
|
-
|
|
136
|
-
|
|
136
|
+
function fillPYForToken(Args memory a)
|
|
137
|
+
internal
|
|
138
|
+
returns (uint256 actualMaking, uint256 actualTaking, uint256 totalFee, bytes memory callbackReturn)
|
|
139
|
+
{
|
|
137
140
|
(address SY, address PT, address YT, bytes32[] memory orderHashes) = _checkSig_updMakingAndStatus(a.params);
|
|
138
141
|
|
|
139
142
|
FillResults memory out = LimitMath.calcBatch(a.params, YT, getLnFeeRateRoot(YT));
|
|
@@ -162,9 +165,11 @@ abstract contract LimitRouterBase is
|
|
|
162
165
|
}
|
|
163
166
|
|
|
164
167
|
// ----------------- verify & convert functions -----------------
|
|
165
|
-
function _validateSkipSigAndFilterOrders(
|
|
166
|
-
|
|
167
|
-
|
|
168
|
+
function _validateSkipSigAndFilterOrders(FillOrderParams[] memory params)
|
|
169
|
+
internal
|
|
170
|
+
view
|
|
171
|
+
returns (FillOrderParams[] memory res)
|
|
172
|
+
{
|
|
168
173
|
uint256 len = params.length;
|
|
169
174
|
require(len != 0, "LOP: empty batch");
|
|
170
175
|
|
|
@@ -192,19 +197,18 @@ abstract contract LimitRouterBase is
|
|
|
192
197
|
}
|
|
193
198
|
}
|
|
194
199
|
|
|
195
|
-
function _checkSig_updMakingAndStatus(
|
|
196
|
-
|
|
197
|
-
|
|
200
|
+
function _checkSig_updMakingAndStatus(FillOrderParams[] memory params)
|
|
201
|
+
internal
|
|
202
|
+
returns (address SY, address PT, address YT, bytes32[] memory orderHashes)
|
|
203
|
+
{
|
|
198
204
|
uint256 len = params.length;
|
|
199
205
|
orderHashes = new bytes32[](len);
|
|
200
206
|
|
|
201
207
|
for (uint256 i = 0; i < len; i++) {
|
|
202
208
|
FillOrderParams memory param = params[i];
|
|
203
209
|
|
|
204
|
-
(bytes32 orderHash, uint256 remainingMakerAmount, uint256 filledMakerAmount) =
|
|
205
|
-
param.order,
|
|
206
|
-
param.signature
|
|
207
|
-
);
|
|
210
|
+
(bytes32 orderHash, uint256 remainingMakerAmount, uint256 filledMakerAmount) =
|
|
211
|
+
_checkSig(param.order, param.signature);
|
|
208
212
|
uint256 netMaking = PMath.min(param.makingAmount, remainingMakerAmount);
|
|
209
213
|
|
|
210
214
|
unchecked {
|
|
@@ -252,26 +256,17 @@ abstract contract LimitRouterBase is
|
|
|
252
256
|
}
|
|
253
257
|
}
|
|
254
258
|
|
|
255
|
-
function callbackIfNeeded(
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
bytes memory callback
|
|
260
|
-
) internal returns (bytes memory callbackReturn) {
|
|
259
|
+
function callbackIfNeeded(uint256 actualMaking, uint256 actualTaking, uint256 totalFee, bytes memory callback)
|
|
260
|
+
internal
|
|
261
|
+
returns (bytes memory callbackReturn)
|
|
262
|
+
{
|
|
261
263
|
if (callback.length > 0) {
|
|
262
|
-
callbackReturn =
|
|
263
|
-
actualMaking,
|
|
264
|
-
actualTaking,
|
|
265
|
-
totalFee,
|
|
266
|
-
callback
|
|
267
|
-
);
|
|
264
|
+
callbackReturn =
|
|
265
|
+
IPLimitRouterCallback(msg.sender).limitRouterCallback(actualMaking, actualTaking, totalFee, callback);
|
|
268
266
|
}
|
|
269
267
|
}
|
|
270
268
|
|
|
271
|
-
function _checkSig(
|
|
272
|
-
Order memory order,
|
|
273
|
-
bytes memory signature
|
|
274
|
-
)
|
|
269
|
+
function _checkSig(Order memory order, bytes memory signature)
|
|
275
270
|
public
|
|
276
271
|
view
|
|
277
272
|
returns (
|
|
@@ -301,10 +296,10 @@ abstract contract LimitRouterBase is
|
|
|
301
296
|
|
|
302
297
|
// ----------------- simple helper functions functions -----------------
|
|
303
298
|
|
|
304
|
-
function _transferFromMakers_mintSy_updMakings(
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
299
|
+
function _transferFromMakers_mintSy_updMakings(address SY, FillOrderParams[] memory params)
|
|
300
|
+
internal
|
|
301
|
+
returns (uint256[] memory fromMakers)
|
|
302
|
+
{
|
|
308
303
|
uint256 len = params.length;
|
|
309
304
|
fromMakers = new uint256[](len);
|
|
310
305
|
|
|
@@ -340,19 +335,13 @@ abstract contract LimitRouterBase is
|
|
|
340
335
|
}
|
|
341
336
|
_safeApproveInf(token, SY);
|
|
342
337
|
return
|
|
343
|
-
IStandardizedYield(SY).deposit{value: token == NATIVE ? netTokenIn : 0}(
|
|
344
|
-
address(this),
|
|
345
|
-
token,
|
|
346
|
-
netTokenIn,
|
|
347
|
-
0
|
|
348
|
-
);
|
|
338
|
+
IStandardizedYield(SY).deposit{value: token == NATIVE ? netTokenIn : 0}(address(this), token, netTokenIn, 0);
|
|
349
339
|
}
|
|
350
340
|
|
|
351
|
-
function _redeemSy_transferToMakers(
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
) internal returns (uint256[] memory toMakers) {
|
|
341
|
+
function _redeemSy_transferToMakers(address SY, FillOrderParams[] memory params, uint256[] memory netSyOuts)
|
|
342
|
+
internal
|
|
343
|
+
returns (uint256[] memory toMakers)
|
|
344
|
+
{
|
|
356
345
|
uint256 len = params.length;
|
|
357
346
|
toMakers = new uint256[](len);
|
|
358
347
|
|
|
@@ -401,18 +390,14 @@ abstract contract LimitRouterBase is
|
|
|
401
390
|
}
|
|
402
391
|
|
|
403
392
|
function __stillShared(address currentShared, address nextToken) private view returns (bool) {
|
|
404
|
-
return
|
|
405
|
-
(currentShared == nextToken)
|
|
406
|
-
(currentShared == NATIVE && nextToken == WNATIVE) ||
|
|
407
|
-
(currentShared == WNATIVE && nextToken == NATIVE);
|
|
393
|
+
return (currentShared == nextToken) || (currentShared == NATIVE && nextToken == WNATIVE)
|
|
394
|
+
|| (currentShared == WNATIVE && nextToken == NATIVE);
|
|
408
395
|
}
|
|
409
396
|
|
|
410
|
-
function __redeemSy_Single(
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
uint256 netSyIn
|
|
415
|
-
) private returns (uint256 netTokenOut) {
|
|
397
|
+
function __redeemSy_Single(address receiver, address SY, address tokenOut, uint256 netSyIn)
|
|
398
|
+
private
|
|
399
|
+
returns (uint256 netTokenOut)
|
|
400
|
+
{
|
|
416
401
|
if (tokenOut == NATIVE || tokenOut == WNATIVE) {
|
|
417
402
|
address otherToken = tokenOut == NATIVE ? WNATIVE : NATIVE;
|
|
418
403
|
address tokenRedeemSy = IStandardizedYield(SY).isValidTokenOut(tokenOut) ? tokenOut : otherToken;
|
|
@@ -432,12 +417,9 @@ abstract contract LimitRouterBase is
|
|
|
432
417
|
}
|
|
433
418
|
|
|
434
419
|
// ! Allow self-fill of orders
|
|
435
|
-
function _transferFromMakers(
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
address to,
|
|
439
|
-
uint256[] memory netIn
|
|
440
|
-
) internal {
|
|
420
|
+
function _transferFromMakers(IERC20 token, FillOrderParams[] memory params, address to, uint256[] memory netIn)
|
|
421
|
+
internal
|
|
422
|
+
{
|
|
441
423
|
uint256 len = params.length;
|
|
442
424
|
for (uint256 i = 0; i < len; i++) {
|
|
443
425
|
if (params[i].order.maker == to) continue;
|
|
@@ -445,12 +427,9 @@ abstract contract LimitRouterBase is
|
|
|
445
427
|
}
|
|
446
428
|
}
|
|
447
429
|
|
|
448
|
-
function _transferToMakers(
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
FillOrderParams[] memory params,
|
|
452
|
-
uint256[] memory netOut
|
|
453
|
-
) internal {
|
|
430
|
+
function _transferToMakers(IERC20 token, address payer, FillOrderParams[] memory params, uint256[] memory netOut)
|
|
431
|
+
internal
|
|
432
|
+
{
|
|
454
433
|
uint256 len = params.length;
|
|
455
434
|
for (uint256 i = 0; i < len; i++) {
|
|
456
435
|
if (payer == params[i].order.receiver) continue;
|
|
@@ -486,11 +465,10 @@ abstract contract LimitRouterBase is
|
|
|
486
465
|
}
|
|
487
466
|
|
|
488
467
|
/// @dev if zero fees are intended, it must be explicitly allowed again
|
|
489
|
-
function setLnFeeRateRoots(
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
) public onlyHelperAndOwner {
|
|
468
|
+
function setLnFeeRateRoots(address[] memory YTs, uint256[] memory lnFeeRateRoots, bool allowZeroFees)
|
|
469
|
+
public
|
|
470
|
+
onlyHelperAndOwner
|
|
471
|
+
{
|
|
494
472
|
uint256 len = YTs.length;
|
|
495
473
|
require(len == lnFeeRateRoots.length, "LOP: length mismatch");
|
|
496
474
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
2
|
pragma solidity ^0.8.17;
|
|
3
3
|
|
|
4
|
-
import "./LimitRouterBase.sol";
|
|
5
4
|
import "../core/libraries/Errors.sol";
|
|
5
|
+
import "./LimitRouterBase.sol";
|
|
6
6
|
|
|
7
7
|
contract PendleLimitRouter is LimitRouterBase {
|
|
8
8
|
using Address for address;
|
|
@@ -39,9 +39,11 @@ contract PendleLimitRouter is LimitRouterBase {
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
function orderStatusesRaw(
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
function orderStatusesRaw(bytes32[] memory orderHashes)
|
|
43
|
+
public
|
|
44
|
+
view
|
|
45
|
+
returns (uint256[] memory remainingsRaw, uint256[] memory filledAmounts)
|
|
46
|
+
{
|
|
45
47
|
uint256 len = orderHashes.length;
|
|
46
48
|
remainingsRaw = new uint256[](len);
|
|
47
49
|
filledAmounts = new uint256[](len);
|
|
@@ -52,9 +54,11 @@ contract PendleLimitRouter is LimitRouterBase {
|
|
|
52
54
|
}
|
|
53
55
|
}
|
|
54
56
|
|
|
55
|
-
function orderStatuses(
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
function orderStatuses(bytes32[] memory orderHashes)
|
|
58
|
+
external
|
|
59
|
+
view
|
|
60
|
+
returns (uint256[] memory remainings, uint256[] memory filledAmounts)
|
|
61
|
+
{
|
|
58
62
|
(remainings, filledAmounts) = orderStatusesRaw(orderHashes);
|
|
59
63
|
for (uint256 i = 0; i < remainings.length; i++) {
|
|
60
64
|
require(remainings[i] != _ORDER_DOES_NOT_EXIST, "LOP: Unknown order");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
pragma solidity ^0.8.17;
|
|
2
2
|
|
|
3
|
-
import "../interfaces/IAddressProvider.sol";
|
|
4
3
|
import "../core/libraries/BoringOwnableUpgradeableV2.sol";
|
|
4
|
+
import "../interfaces/IAddressProvider.sol";
|
|
5
5
|
|
|
6
6
|
contract AddressProvider is IAddressProvider, BoringOwnableUpgradeableV2 {
|
|
7
7
|
mapping(uint256 => address) public get;
|
|
@@ -72,7 +72,7 @@ abstract contract AutomateReady {
|
|
|
72
72
|
constructor(address _automate, address _taskCreator) {
|
|
73
73
|
automate = IAutomate(_automate);
|
|
74
74
|
_gelato = IAutomate(_automate).gelato();
|
|
75
|
-
(dedicatedMsgSender,
|
|
75
|
+
(dedicatedMsgSender,) = IOpsProxyFactory(OPS_PROXY_FACTORY).getProxyOf(_taskCreator);
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
/**
|
|
@@ -83,7 +83,7 @@ abstract contract AutomateReady {
|
|
|
83
83
|
*/
|
|
84
84
|
function _transfer(uint256 _fee, address _feeToken) internal {
|
|
85
85
|
if (_feeToken == ETH) {
|
|
86
|
-
(bool success,
|
|
86
|
+
(bool success,) = _gelato.call{value: _fee}("");
|
|
87
87
|
require(success, "_transfer: ETH transfer failed");
|
|
88
88
|
} else {
|
|
89
89
|
SafeERC20.safeTransfer(IERC20(_feeToken), _gelato, _fee);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
2
|
pragma solidity ^0.8.17;
|
|
3
3
|
|
|
4
|
-
import "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";
|
|
5
4
|
import "../core/libraries/BoringOwnableUpgradeableV2.sol";
|
|
6
5
|
import "../interfaces/IPMarket.sol";
|
|
7
6
|
import "../interfaces/IStandardizedYield.sol";
|
|
7
|
+
import "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";
|
|
8
8
|
|
|
9
9
|
contract BalanceReader is UUPSUpgradeable, BoringOwnableUpgradeableV2 {
|
|
10
10
|
struct UserMarketInfo {
|
|
@@ -66,7 +66,12 @@ contract BalanceReader is UUPSUpgradeable, BoringOwnableUpgradeableV2 {
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
function _redeemRewards(IPMarket market, address user)
|
|
69
|
+
function _redeemRewards(IPMarket market, address user)
|
|
70
|
+
internal
|
|
71
|
+
returns (
|
|
72
|
+
uint256[] memory /*rewardsOut*/
|
|
73
|
+
)
|
|
74
|
+
{
|
|
70
75
|
try market.redeemRewards(user) returns (uint256[] memory rewardsOut) {
|
|
71
76
|
return rewardsOut;
|
|
72
77
|
} catch {
|
|
@@ -74,13 +79,15 @@ contract BalanceReader is UUPSUpgradeable, BoringOwnableUpgradeableV2 {
|
|
|
74
79
|
}
|
|
75
80
|
}
|
|
76
81
|
|
|
77
|
-
function _redeemDueInterestAndRewards(
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
82
|
+
function _redeemDueInterestAndRewards(IPYieldToken YT, address user)
|
|
83
|
+
internal
|
|
84
|
+
returns (
|
|
85
|
+
uint256, /*interestOut*/
|
|
86
|
+
uint256[] memory /*rewardsOut*/
|
|
87
|
+
)
|
|
88
|
+
{
|
|
81
89
|
try YT.redeemDueInterestAndRewards(user, true, true) returns (
|
|
82
|
-
uint256 interestOut,
|
|
83
|
-
uint256[] memory rewardsOut
|
|
90
|
+
uint256 interestOut, uint256[] memory rewardsOut
|
|
84
91
|
) {
|
|
85
92
|
return (interestOut, rewardsOut);
|
|
86
93
|
} catch {
|
|
@@ -88,7 +95,12 @@ contract BalanceReader is UUPSUpgradeable, BoringOwnableUpgradeableV2 {
|
|
|
88
95
|
}
|
|
89
96
|
}
|
|
90
97
|
|
|
91
|
-
function _claimRewards(IStandardizedYield SY, address user)
|
|
98
|
+
function _claimRewards(IStandardizedYield SY, address user)
|
|
99
|
+
internal
|
|
100
|
+
returns (
|
|
101
|
+
uint256[] memory /*rewardsOut*/
|
|
102
|
+
)
|
|
103
|
+
{
|
|
92
104
|
try SY.claimRewards(user) returns (uint256[] memory rewardsOut) {
|
|
93
105
|
return rewardsOut;
|
|
94
106
|
} catch {
|