@pendle/core-v2 3.0.0-beta-11 → 3.0.0-beta-12
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/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol +5 -23
- package/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiverAppUpg.sol +2 -5
- package/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol +6 -20
- package/contracts/LiquidityMining/CrossChainMsg/PendleMsgSenderAppUpg.sol +6 -27
- package/contracts/LiquidityMining/CrossChainMsg/libraries/ExcessivelySafeCall.sol +1 -2
- package/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol +1 -1
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol +16 -17
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol +6 -7
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol +7 -8
- package/contracts/LiquidityMining/PendleMerkleDistributor.sol +2 -11
- package/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol +14 -37
- package/contracts/LiquidityMining/VeDistributor/PendleFeeDistributorV2.sol +19 -34
- package/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol +4 -14
- package/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol +4 -16
- package/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol +11 -39
- package/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol +3 -10
- package/contracts/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol +1 -1
- package/contracts/LiquidityMining/libraries/VeBalanceLib.sol +5 -20
- package/contracts/LiquidityMining/libraries/VeHistoryLib.sol +1 -3
- package/contracts/core/Market/MarketMathCore.sol +12 -37
- package/contracts/core/Market/OracleLib.sol +6 -24
- package/contracts/core/Market/PendleExternalRewardDistributor.sol +4 -10
- package/contracts/core/Market/PendleGauge.sol +3 -9
- package/contracts/core/Market/PendleMarket.sol +14 -39
- package/contracts/core/Market/PendleMarketFactory.sol +14 -21
- package/contracts/core/Market/v2/PendleGaugeV2.sol +8 -24
- package/contracts/core/Market/v2/PendleMarketFactoryV2.sol +7 -27
- package/contracts/core/Market/v2/PendleMarketV2.sol +13 -36
- package/contracts/core/Market/v3/PendleMarketFactoryV3.sol +137 -0
- package/contracts/core/Market/v3/PendleMarketV3.sol +360 -0
- package/contracts/core/RewardManager/PendleLinearDistributor.sol +143 -0
- package/contracts/core/RewardManager/RewardManager.sol +14 -7
- package/contracts/core/RewardManager/RewardManagerAbstract.sol +5 -17
- package/contracts/core/StandardizedYield/SYBase.sol +10 -40
- package/contracts/core/StandardizedYield/SYBaseUpg.sol +197 -0
- package/contracts/core/StandardizedYield/SYBaseWithRewards.sol +9 -41
- package/contracts/core/StandardizedYield/SYBaseWithRewardsUpg.sol +88 -0
- package/contracts/core/StandardizedYield/SYUtils.sol +1 -4
- package/contracts/core/StandardizedYield/StEthHelper.sol +3 -9
- package/contracts/core/StandardizedYield/implementations/AaveV3/PendleAaveV3SY.sol +94 -0
- package/contracts/core/StandardizedYield/implementations/AaveV3/libraries/AaveAdapterLib.sol +19 -0
- package/contracts/core/StandardizedYield/implementations/AaveV3/libraries/WadRayMath.sol +126 -0
- package/contracts/core/StandardizedYield/implementations/Ankr/PendleAnkrBNBSY.sol +4 -12
- package/contracts/core/StandardizedYield/implementations/Ape/sAPE.sol +5 -19
- package/contracts/core/StandardizedYield/implementations/BalancerStable/AuraEthxBbAWethSY.sol +4 -14
- package/contracts/core/StandardizedYield/implementations/BalancerStable/AuraSwEthBbAWethSYV2.sol +4 -14
- package/contracts/core/StandardizedYield/implementations/BalancerStable/{PendleAuraWethVethSY.sol → AuraWethVethSYUpg.sol} +13 -20
- package/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraBbAWethSwethSY.sol +3 -7
- package/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethAnkrethSYV2.sol +12 -29
- package/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRocketEthSYV2.sol +12 -29
- package/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethStafiEthSY.sol +12 -29
- package/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSYV2.sol +14 -39
- package/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWstethAnkreth.sol +7 -28
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStableMath.sol +13 -30
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreviewProxy.sol +1 -1
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreviewV4.sol +50 -153
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreviewV5.sol +50 -157
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/BbAPoolHelper.sol +4 -16
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/LinearMath.sol +6 -25
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/LinearPreview.sol +36 -34
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStableMath.sol +4 -13
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStablePreview.sol +20 -58
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/PendleAuraBalancerStableLPSYV2.sol +28 -79
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/PendleAuraBalancerStableLPSYV3Upg.sol +310 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePoolUserData.sol +1 -3
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePreviewBase.sol +2 -6
- package/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenHelper.sol +5 -13
- package/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol +9 -29
- package/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotRewardHelper.sol +2 -8
- package/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatileCommon.sol +1 -5
- package/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatileLpHelper.sol +8 -19
- package/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatilePreview.sol +7 -25
- package/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/PendleCamelotV1VolatileSY.sol +8 -27
- package/contracts/core/StandardizedYield/implementations/ChainlinkRelayer/PendleChainlinkReceiver.sol +2 -2
- package/contracts/core/StandardizedYield/implementations/ChainlinkRelayer/PendleChainlinkRelayer.sol +4 -9
- package/contracts/core/StandardizedYield/implementations/Convex/PendleCurveFraxUsdcSY.sol +3 -15
- package/contracts/core/StandardizedYield/implementations/Convex/PendleCurveUsdd3CrvSY.sol +5 -23
- package/contracts/core/StandardizedYield/implementations/Convex/base/Curve3CrvPoolHelper.sol +10 -40
- package/contracts/core/StandardizedYield/implementations/Convex/base/CurveFraxUsdcPoolHelper.sol +2 -8
- package/contracts/core/StandardizedYield/implementations/Convex/base/CurveUsdd3CrvPoolHelper.sol +2 -7
- package/contracts/core/StandardizedYield/implementations/Convex/base/PendleConvexLPSY.sol +5 -20
- package/contracts/core/StandardizedYield/implementations/Flux/FluxTokenLib.sol +6 -4
- package/contracts/core/StandardizedYield/implementations/Flux/PendleFluxLendingSY.sol +3 -11
- package/contracts/core/StandardizedYield/implementations/GLP/GLPPreviewHelper.sol +3 -9
- package/contracts/core/StandardizedYield/implementations/GLP/GMTokenPricingHelper.sol +115 -0
- package/contracts/core/StandardizedYield/implementations/GLP/PendleGMV2TokenSY.sol +134 -0
- package/contracts/core/StandardizedYield/implementations/GLP/PendleGlpSY.sol +5 -19
- package/contracts/core/StandardizedYield/implementations/HMX/HLPPricingHelper.sol +3 -4
- package/contracts/core/StandardizedYield/implementations/HMX/PendleHlpSY.sol +18 -25
- package/contracts/core/StandardizedYield/implementations/Kyber/KyberMathHelper.sol +425 -0
- package/contracts/core/StandardizedYield/implementations/Kyber/KyberNftManagerBaseUpg.sol +438 -0
- package/contracts/core/StandardizedYield/implementations/Kyber/PendleKyberElasticSYUpg.sol +155 -0
- package/contracts/core/StandardizedYield/implementations/Kyber/libraries/FullMath.sol +123 -0
- package/contracts/core/StandardizedYield/implementations/Kyber/libraries/LiqDeltaMath.sol +17 -0
- package/contracts/core/StandardizedYield/implementations/Kyber/libraries/LiquidityMath.sol +74 -0
- package/contracts/core/StandardizedYield/implementations/Kyber/libraries/MathConstants.sol +19 -0
- package/contracts/core/StandardizedYield/implementations/Kyber/libraries/QtyDeltaMath.sol +103 -0
- package/contracts/core/StandardizedYield/implementations/Kyber/libraries/QuadMath.sol +31 -0
- package/contracts/core/StandardizedYield/implementations/Kyber/libraries/ReinvestmentMath.sol +26 -0
- package/contracts/core/StandardizedYield/implementations/Kyber/libraries/SafeCast.sol +73 -0
- package/contracts/core/StandardizedYield/implementations/Kyber/libraries/SwapMath.sol +272 -0
- package/contracts/core/StandardizedYield/implementations/Kyber/libraries/TickMath.sol +223 -0
- package/contracts/core/StandardizedYield/implementations/MUX/MlpPricingHelper.sol +26 -0
- package/contracts/core/StandardizedYield/implementations/MUX/PendleMlpSY.sol +195 -0
- package/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleMantleStakedEthSY.sol +12 -41
- package/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleOracleForSyProxy.sol +1 -1
- package/contracts/core/StandardizedYield/implementations/PendleArbitrumStakedEthSY.sol +13 -42
- package/contracts/core/StandardizedYield/implementations/PendleBridgedLSDSY.sol +4 -11
- package/contracts/core/StandardizedYield/implementations/PendleERC4626SY.sol +4 -16
- package/contracts/core/StandardizedYield/implementations/PendleEUSDSY.sol +3 -11
- package/contracts/core/StandardizedYield/implementations/PendleGdaiSY.sol +3 -11
- package/contracts/core/StandardizedYield/implementations/PendleLooksStakingSY.sol +5 -18
- package/contracts/core/StandardizedYield/implementations/PendleSfrxEthSY.sol +3 -7
- package/contracts/core/StandardizedYield/implementations/PendleStargateLPSY.sol +5 -18
- package/contracts/core/StandardizedYield/implementations/PendleWbEthSY.sol +3 -10
- package/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol +4 -12
- package/contracts/core/StandardizedYield/implementations/Silo/PendleSiloWithIncentiveSY.sol +157 -0
- package/contracts/core/StandardizedYield/implementations/Stader/PendleETHXSY.sol +4 -12
- package/contracts/core/StandardizedYield/implementations/Swell/PendleSwETH.sol +4 -12
- package/contracts/core/StandardizedYield/implementations/Thena/PendleThenaSY.sol +9 -29
- package/contracts/core/StandardizedYield/implementations/Thena/ThenaLpHelper.sol +3 -10
- package/contracts/core/StandardizedYield/implementations/Thena/ThenaMath.sol +9 -30
- package/contracts/core/StandardizedYield/implementations/Thena/ThenaPreview.sol +10 -40
- package/contracts/core/YieldContracts/InterestManagerYT.sol +6 -8
- package/contracts/core/YieldContracts/PendlePrincipalToken.sol +1 -1
- package/contracts/core/YieldContracts/PendleYieldContractFactory.sol +2 -3
- package/contracts/core/YieldContracts/PendleYieldToken.sol +17 -44
- package/contracts/core/YieldContractsV2/InterestManagerYTV2.sol +5 -14
- package/contracts/core/YieldContractsV2/PendlePrincipalTokenV2.sol +1 -1
- package/contracts/core/YieldContractsV2/PendleYieldContractFactoryV2.sol +2 -3
- package/contracts/core/YieldContractsV2/PendleYieldTokenV2.sol +13 -48
- package/contracts/core/erc20/PendleERC20.sol +2 -8
- package/contracts/core/erc20/PendleERC20Permit.sol +2 -6
- package/contracts/core/erc20/PendleERC20PermitUpg.sol +82 -0
- package/contracts/core/erc20/PendleERC20Upg.sol +334 -0
- package/contracts/core/libraries/ArrayLib.sol +7 -8
- package/contracts/core/libraries/BaseSplitCodeFactory.sol +1 -6
- package/contracts/core/libraries/Errors.sol +19 -1
- package/contracts/core/libraries/ExpiryUtilsLib.sol +3 -26
- package/contracts/core/libraries/StringLib.sol +5 -21
- package/contracts/core/libraries/TokenHelper.sol +3 -3
- package/contracts/core/libraries/math/LogExpMath.sol +1 -4
- package/contracts/core/libraries/math/PMath.sol +13 -15
- package/contracts/interfaces/AaveV3/IAaveV3AToken.sol +15 -0
- package/contracts/interfaces/AaveV3/IAaveV3Pool.sol +11 -0
- package/contracts/interfaces/Balancer/IComposableStable.sol +3 -4
- package/contracts/interfaces/Balancer/IERC4626LinearPool.sol +2 -10
- package/contracts/interfaces/Balancer/IMetaStablePool.sol +3 -11
- package/contracts/interfaces/Balancer/IVault.sol +3 -8
- package/contracts/interfaces/BinanceEth/IWBETH.sol +1 -1
- package/contracts/interfaces/Camelot/ICamelotNFTFactory.sol +1 -3
- package/contracts/interfaces/Camelot/ICamelotNFTHandler.sol +2 -10
- package/contracts/interfaces/Camelot/ICamelotNitroPool.sol +0 -1
- package/contracts/interfaces/Camelot/ICamelotNitroPoolFactory.sol +3 -12
- package/contracts/interfaces/Camelot/ICamelotPair.sol +5 -25
- package/contracts/interfaces/Camelot/ICamelotRouter.sol +1 -5
- package/contracts/interfaces/Camelot/IXGrail.sol +3 -11
- package/contracts/interfaces/ConvexCurve/IBooster.sol +1 -3
- package/contracts/interfaces/Curve/ICrvPool.sol +3 -12
- package/contracts/interfaces/Curve/ITriCrvPool.sol +2 -9
- package/contracts/interfaces/Flux/IFluxErc20.sol +1 -1
- package/contracts/interfaces/Flux/IFluxInterestRateModel.sol +1 -5
- package/contracts/interfaces/GMX/IGMXPriceHelper.sol +6 -0
- package/contracts/interfaces/GMX/IGMXVault.sol +2 -9
- package/contracts/interfaces/GMX/IRewardRouterV2.sol +1 -4
- package/contracts/interfaces/HMX/IHLPStaking.sol +1 -1
- package/contracts/interfaces/HMX/IHMXCalculator.sol +1 -1
- package/contracts/interfaces/HMX/IHMXCompounder.sol +1 -1
- package/contracts/interfaces/HMX/IHMXStaking.sol +1 -1
- package/contracts/interfaces/HMX/IHMXVester.sol +1 -1
- package/contracts/interfaces/IApeStaking.sol +3 -9
- package/contracts/interfaces/IBenQiInterestRateModel.sol +1 -5
- package/contracts/interfaces/IDiamondCut.sol +1 -5
- package/contracts/interfaces/IDiamondLoupe.sol +1 -3
- package/contracts/interfaces/ILayerZeroReceiver.sol +1 -6
- package/contracts/interfaces/IPActionAddRemoveLiqV3.sol +10 -2
- package/contracts/interfaces/IPActionInfoStatic.sol +4 -7
- package/contracts/interfaces/IPActionMarketAuxStatic.sol +5 -9
- package/contracts/interfaces/IPActionMarketCoreStatic.sol +118 -58
- package/contracts/interfaces/IPActionMintRedeemStatic.sol +38 -21
- package/contracts/interfaces/IPActionMiscV3.sol +51 -26
- package/contracts/interfaces/IPActionStorageStatic.sol +5 -1
- package/contracts/interfaces/IPAllActionTypeV3.sol +1 -0
- package/contracts/interfaces/IPBulkSeller.sol +49 -0
- package/contracts/interfaces/IPBulkSellerFactory.sol +12 -0
- package/contracts/interfaces/IPBulkSellerSYCallback.sol +6 -0
- package/contracts/interfaces/IPFeeDistributor.sol +1 -3
- package/contracts/interfaces/IPFeeDistributorV2.sol +8 -7
- package/contracts/interfaces/IPGaugeController.sol +2 -8
- package/contracts/interfaces/IPGaugeControllerMainchain.sol +1 -5
- package/contracts/interfaces/IPInterestManagerYT.sol +3 -3
- package/contracts/interfaces/IPInterestManagerYTV2.sol +1 -4
- package/contracts/interfaces/IPLimitRouter.sol +24 -19
- package/contracts/interfaces/IPLinearDistributor.sol +21 -0
- package/contracts/interfaces/IPMarket.sol +4 -17
- package/contracts/interfaces/IPMarketFactory.sol +2 -13
- package/contracts/interfaces/IPMarketFactoryV3.sol +24 -0
- package/contracts/interfaces/IPMarketV3.sol +8 -0
- package/contracts/interfaces/IPOffchainStorage.sol +11 -0
- package/contracts/interfaces/IPPriceFeed.sol +6 -0
- package/contracts/interfaces/IPPtOracle.sol +2 -9
- package/contracts/interfaces/IPRouterHelper.sol +11 -7
- package/contracts/interfaces/IPRouterStatic.sol +1 -3
- package/contracts/interfaces/IPVotingController.sol +7 -19
- package/contracts/interfaces/IPVotingEscrowMainchain.sol +2 -8
- package/contracts/interfaces/IPYieldToken.sol +2 -8
- package/contracts/interfaces/IPYieldTokenV2.sol +1 -6
- package/contracts/interfaces/IPendlePreviewHelper.sol +2 -8
- package/contracts/interfaces/IRewardManager.sol +1 -4
- package/contracts/interfaces/IStETH.sol +1 -4
- package/contracts/interfaces/IStandardizedYield.sol +9 -16
- package/contracts/interfaces/IStargateLP.sol +0 -3
- package/contracts/interfaces/IStargateRouter.sol +1 -5
- package/contracts/interfaces/Kyber/IKyberElasticFactory.sol +157 -0
- package/contracts/interfaces/Kyber/IKyberElasticPool.sol +101 -0
- package/contracts/interfaces/Kyber/IKyberElasticRouter.sol +98 -0
- package/contracts/interfaces/Kyber/IKyberLiquidityMining.sol +209 -0
- package/contracts/interfaces/Kyber/IKyberMathHelper.sol +28 -0
- package/contracts/interfaces/Kyber/IKyberPositionManager.sol +179 -0
- package/contracts/interfaces/Lybra/IEUSD.sol +1 -1
- package/contracts/interfaces/MUX/IMUXRewardRouter.sol +139 -0
- package/contracts/interfaces/Silo/ISilo.sol +298 -0
- package/contracts/interfaces/Silo/ISiloIncentiveController.sol +16 -0
- package/contracts/interfaces/Silo/ISiloLens.sol +6 -0
- package/contracts/interfaces/Stader/IStaderStakeManager.sol +2 -2
- package/contracts/interfaces/Thena/IThenaFactory.sol +1 -5
- package/contracts/interfaces/Thena/IThenaGaugeV2.sol +1 -2
- package/contracts/interfaces/Thena/IThenaPair.sol +3 -5
- package/contracts/limit/LimitMathCore.sol +69 -60
- package/contracts/limit/{PendleOrderMixin.sol → LimitRouterBase.sol} +96 -79
- package/contracts/limit/PendleLimitRouter.sol +9 -13
- package/contracts/offchain-helpers/AutomateReady.sol +17 -32
- package/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol +6 -3
- package/contracts/offchain-helpers/BoringLpSeller.sol +4 -17
- package/contracts/offchain-helpers/BoringPtSeller.sol +2 -7
- package/contracts/offchain-helpers/Broadcaster.sol +1 -1
- package/contracts/offchain-helpers/BytesLib.sol +26 -14
- package/contracts/offchain-helpers/EmptyUUPS.sol +0 -1
- package/contracts/offchain-helpers/LegacyNFTHelper.sol +4 -23
- package/contracts/offchain-helpers/LimitBackendHelper.sol +25 -16
- package/contracts/offchain-helpers/MarketExchangeRateLib.sol +2 -13
- package/contracts/offchain-helpers/Multicall2.sol +2 -7
- package/contracts/offchain-helpers/PendleMulticallV1.sol +7 -7
- package/contracts/offchain-helpers/PendleMulticallV2.sol +12 -13
- package/contracts/offchain-helpers/PendleOffchainStorage.sol +59 -0
- package/contracts/offchain-helpers/SimulateHelper.sol +6 -7
- package/contracts/offchain-helpers/errors/SDKErrorsDirectory.sol +15 -1
- package/contracts/oracles/PendleLpOracleLib.sol +9 -10
- package/contracts/oracles/PendlePtOracle.sol +8 -19
- package/contracts/oracles/PendlePtOracleLib.sol +8 -13
- package/contracts/oracles/samples/PendleLpGlpOracle.sol +6 -10
- package/contracts/oracles/samples/PendlePtGlpOracle.sol +6 -10
- package/contracts/oracles/samples/PendlePtUsdChainlinkOracle.sol +8 -15
- package/contracts/router/ActionAddRemoveLiqV3.sol +147 -52
- package/contracts/router/ActionCallbackV3.sol +11 -4
- package/contracts/router/ActionMiscV3.sol +43 -33
- package/contracts/router/ActionSwapPTV3.sol +18 -6
- package/contracts/router/ActionSwapYTV3.sol +42 -14
- package/contracts/router/PendleRouterHelper.sol +72 -40
- package/contracts/router/PendleRouterV3.sol +50 -50
- package/contracts/router/base/ActionBase.sol +86 -43
- package/contracts/router/base/CallbackHelper.sol +18 -20
- package/contracts/router/base/MarketApproxLib.sol +36 -32
- package/contracts/router/swap-aggregator/PendleSwap.sol +31 -7
- package/contracts/router/swap-aggregator/kyberswap/interfaces/IAggregationExecutorOptimistic.sol +63 -0
- package/contracts/router/swap-aggregator/kyberswap/interfaces/IExecutorHelper.sol +314 -0
- package/contracts/router/swap-aggregator/kyberswap/interfaces/IExecutorHelperL2.sol +560 -0
- package/contracts/router/swap-aggregator/kyberswap/{IMetaAggregationRouterV2.sol → interfaces/IMetaAggregationRouterV2.sol} +11 -6
- package/contracts/router/swap-aggregator/kyberswap/{KyberInputScalingHelper.sol → l1-contracts/InputScalingHelper.sol} +70 -19
- package/contracts/router/swap-aggregator/kyberswap/{ScalingDataLib.sol → l1-contracts/ScalingDataLib.sol} +111 -53
- package/contracts/router/swap-aggregator/kyberswap/l2-contracts/BytesHelper.sol +29 -0
- package/contracts/router/swap-aggregator/kyberswap/l2-contracts/CalldataReader.sol +149 -0
- package/contracts/router/swap-aggregator/kyberswap/l2-contracts/CalldataWriter.sol +118 -0
- package/contracts/router/swap-aggregator/kyberswap/l2-contracts/Common.sol +42 -0
- package/contracts/router/swap-aggregator/kyberswap/l2-contracts/DexScaler.sol +382 -0
- package/contracts/router/swap-aggregator/kyberswap/l2-contracts/ExecutorReader.sol +61 -0
- package/contracts/router/swap-aggregator/kyberswap/l2-contracts/InputScalingHelperL2.sol +329 -0
- package/contracts/router/swap-aggregator/kyberswap/l2-contracts/ScalingDataL2Lib.sol +173 -0
- package/contracts/router/swap-aggregator/oneinch/I1inchAggregationRouterV5.sol +4 -10
- package/contracts/router/swap-aggregator/oneinch/OneInchAggregationRouterHelper.sol +20 -14
- package/deployments/1-core.json +5 -2
- package/deployments/1-markets/EPENDLE-SEP2024.json +12 -0
- package/deployments/1-markets/SFRAX-MARCH2024.json +10 -0
- package/deployments/1-markets/SILO-CRVUSD-MARCH2024.json +10 -0
- package/deployments/10-core.json +6 -3
- package/deployments/42161-core.json +5 -2
- package/deployments/42161-markets/AAVE-USDC-JUNE2024.json +11 -0
- package/deployments/42161-markets/ARBSILO-USDC-FEB2024.json +10 -0
- package/deployments/42161-markets/GM-ARB-USDC-MARCH2024.json +10 -0
- package/deployments/42161-markets/KYBER-AXLWSTETH-WSTETH-MARCH2024.json +10 -0
- package/deployments/42161-markets/MLP-MARCH2024.json +10 -0
- package/deployments/42161-markets/WSTETH-ARBITRUM-MARCH2024.json +11 -0
- package/deployments/42161-markets/WSTETHSILO-ETH-MARCH2024.json +11 -0
- package/deployments/56-core.json +5 -2
- package/deployments/merkle-distribution/2023-10-26.json +7300 -0
- package/deployments/merkle-distribution/2023-11-30.json +7730 -0
- package/package.json +8 -8
- package/contracts/limit/helpers/ArgumentsDecoder.sol +0 -47
- package/contracts/limit/helpers/Permitable.sol +0 -48
- package/contracts/limit/helpers/RevertReasonParser.sol +0 -75
- package/contracts/offchain-helpers/ChainlinkRelayerGelato.sol +0 -37
- package/contracts/offchain-helpers/PtAndLpToAsset.sol +0 -62
- package/contracts/offchain-helpers/router-static/PendleRouterStatic.sol +0 -19
- package/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol +0 -112
- package/contracts/offchain-helpers/router-static/base/ActionLimitOrdersStatic.sol +0 -145
- package/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol +0 -171
- package/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol +0 -582
- package/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol +0 -116
- package/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol +0 -64
- package/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol +0 -53
- package/contracts/offchain-helpers/router-static/base/StorageLayout.sol +0 -18
- package/contracts/router/swap-aggregator/kyberswap/IExecutorHelper.sol +0 -231
- package/deployments/1-markets/BALANCER-LP-AURA-VETH-WETH-SEP2024.json +0 -8
- /package/contracts/router/swap-aggregator/kyberswap/{IAggregationExecutor.sol → interfaces/IAggregationExecutor.sol} +0 -0
- /package/deployments/1-markets/{BALANCER-LP-AURA-BBAWETHSWETH-SEP-26-2024.json → deprecated/BALANCER-LP-AURA-BBAWETHSWETH-SEP-26-2024.json} +0 -0
- /package/deployments/1-markets/{BALANCER-LP-AURA-ETHX-BBAWETH-SEP-26-2024.json → deprecated/BALANCER-LP-AURA-ETHX-BBAWETH-SEP-26-2024.json} +0 -0
|
@@ -0,0 +1,560 @@
|
|
|
1
|
+
pragma solidity >=0.6.12;
|
|
2
|
+
|
|
3
|
+
interface IExecutorHelperL2 {
|
|
4
|
+
struct Swap {
|
|
5
|
+
bytes data;
|
|
6
|
+
bytes4 functionSelector;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
struct SwapExecutorDescription {
|
|
10
|
+
Swap[][] swapSequences;
|
|
11
|
+
address tokenIn;
|
|
12
|
+
address tokenOut;
|
|
13
|
+
uint256 minTotalAmountOut;
|
|
14
|
+
address to;
|
|
15
|
+
uint256 deadline;
|
|
16
|
+
bytes positiveSlippageData;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
struct UniSwap {
|
|
20
|
+
address pool;
|
|
21
|
+
address tokenIn;
|
|
22
|
+
address tokenOut;
|
|
23
|
+
address recipient;
|
|
24
|
+
uint256 collectAmount; // amount that should be transferred to the pool
|
|
25
|
+
uint32 swapFee;
|
|
26
|
+
uint32 feePrecision;
|
|
27
|
+
uint32 tokenWeightInput;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
struct StableSwap {
|
|
31
|
+
address pool;
|
|
32
|
+
address tokenFrom;
|
|
33
|
+
address tokenTo;
|
|
34
|
+
uint8 tokenIndexFrom;
|
|
35
|
+
uint8 tokenIndexTo;
|
|
36
|
+
uint256 dx;
|
|
37
|
+
uint256 poolLength;
|
|
38
|
+
address poolLp;
|
|
39
|
+
bool isSaddle; // true: saddle, false: stable
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
struct CurveSwap {
|
|
43
|
+
address pool;
|
|
44
|
+
address tokenFrom;
|
|
45
|
+
address tokenTo;
|
|
46
|
+
int128 tokenIndexFrom;
|
|
47
|
+
int128 tokenIndexTo;
|
|
48
|
+
uint256 dx;
|
|
49
|
+
bool usePoolUnderlying;
|
|
50
|
+
bool useTriCrypto;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
struct UniswapV3KSElastic {
|
|
54
|
+
address recipient;
|
|
55
|
+
address pool;
|
|
56
|
+
address tokenIn;
|
|
57
|
+
address tokenOut;
|
|
58
|
+
uint256 swapAmount;
|
|
59
|
+
uint160 sqrtPriceLimitX96;
|
|
60
|
+
bool isUniV3; // true = UniV3, false = KSElastic
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
struct SwapCallbackData {
|
|
64
|
+
bytes path;
|
|
65
|
+
address payer;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
struct SwapCallbackDataPath {
|
|
69
|
+
address pool;
|
|
70
|
+
address tokenIn;
|
|
71
|
+
address tokenOut;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
struct BalancerV2 {
|
|
75
|
+
address vault;
|
|
76
|
+
bytes32 poolId;
|
|
77
|
+
address assetIn;
|
|
78
|
+
address assetOut;
|
|
79
|
+
uint256 amount;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
struct DODO {
|
|
83
|
+
address recipient;
|
|
84
|
+
address pool;
|
|
85
|
+
address tokenFrom;
|
|
86
|
+
address tokenTo;
|
|
87
|
+
uint256 amount;
|
|
88
|
+
address sellHelper;
|
|
89
|
+
bool isSellBase;
|
|
90
|
+
bool isVersion2;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
struct GMX {
|
|
94
|
+
address vault;
|
|
95
|
+
address tokenIn;
|
|
96
|
+
address tokenOut;
|
|
97
|
+
uint256 amount;
|
|
98
|
+
address receiver;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
struct Synthetix {
|
|
102
|
+
address synthetixProxy;
|
|
103
|
+
address tokenIn;
|
|
104
|
+
address tokenOut;
|
|
105
|
+
bytes32 sourceCurrencyKey;
|
|
106
|
+
uint256 sourceAmount;
|
|
107
|
+
bytes32 destinationCurrencyKey;
|
|
108
|
+
bool useAtomicExchange;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
struct WSTETH {
|
|
112
|
+
address pool;
|
|
113
|
+
uint256 amount;
|
|
114
|
+
bool isWrapping;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
struct Platypus {
|
|
118
|
+
address pool;
|
|
119
|
+
address tokenIn;
|
|
120
|
+
address tokenOut;
|
|
121
|
+
address recipient;
|
|
122
|
+
uint256 collectAmount; // amount that should be transferred to the pool
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
struct PSM {
|
|
126
|
+
address router;
|
|
127
|
+
address tokenIn;
|
|
128
|
+
address tokenOut;
|
|
129
|
+
uint256 amountIn;
|
|
130
|
+
address recipient;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
struct Maverick {
|
|
134
|
+
address pool;
|
|
135
|
+
address tokenIn;
|
|
136
|
+
address tokenOut;
|
|
137
|
+
address recipient;
|
|
138
|
+
uint256 swapAmount;
|
|
139
|
+
uint256 sqrtPriceLimitD18;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/// @notice Struct for Sync Swap
|
|
143
|
+
/// @param _data encode of (address, address, uint8) : (tokenIn, recipient, withdrawMode)
|
|
144
|
+
/// Withdraw with mode.
|
|
145
|
+
// 0 = DEFAULT
|
|
146
|
+
// 1 = UNWRAPPED
|
|
147
|
+
// 2 = WRAPPED
|
|
148
|
+
/// @param vault vault contract
|
|
149
|
+
/// @param tokenIn token input to swap
|
|
150
|
+
/// @param pool pool of SyncSwap
|
|
151
|
+
/// @param collectAmount amount that should be transferred to the pool
|
|
152
|
+
struct SyncSwap {
|
|
153
|
+
bytes _data;
|
|
154
|
+
address vault;
|
|
155
|
+
address tokenIn;
|
|
156
|
+
address pool;
|
|
157
|
+
uint256 collectAmount;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
struct AlgebraV1 {
|
|
161
|
+
address recipient;
|
|
162
|
+
address pool;
|
|
163
|
+
address tokenIn;
|
|
164
|
+
address tokenOut;
|
|
165
|
+
uint256 swapAmount;
|
|
166
|
+
uint160 sqrtPriceLimitX96;
|
|
167
|
+
uint256 senderFeeOnTransfer; // [ FoT_FLAG(1 bit) ... SENDER_ADDRESS(160 bits) ]
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
struct BalancerBatch {
|
|
171
|
+
address vault;
|
|
172
|
+
bytes32[] poolIds;
|
|
173
|
+
address[] path; // swap path from assetIn to assetOut
|
|
174
|
+
bytes[] userDatas;
|
|
175
|
+
uint256 amountIn; // assetIn amount
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
struct Mantis {
|
|
179
|
+
address pool;
|
|
180
|
+
address tokenIn;
|
|
181
|
+
address tokenOut;
|
|
182
|
+
uint256 amount;
|
|
183
|
+
address recipient;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
struct IziSwap {
|
|
187
|
+
address pool;
|
|
188
|
+
address tokenIn;
|
|
189
|
+
address tokenOut;
|
|
190
|
+
address recipient;
|
|
191
|
+
uint256 swapAmount;
|
|
192
|
+
int24 limitPoint;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
struct TraderJoeV2 {
|
|
196
|
+
address recipient;
|
|
197
|
+
address pool;
|
|
198
|
+
address tokenIn;
|
|
199
|
+
address tokenOut;
|
|
200
|
+
uint256 collectAmount; // most significant 1 bit is to determine whether pool is v2.0, else v2.1
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
struct LevelFiV2 {
|
|
204
|
+
address pool;
|
|
205
|
+
address fromToken;
|
|
206
|
+
address toToken;
|
|
207
|
+
uint256 amountIn;
|
|
208
|
+
uint256 minAmountOut;
|
|
209
|
+
address recipient; // receive token out
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
struct GMXGLP {
|
|
213
|
+
address rewardRouter;
|
|
214
|
+
address stakedGLP;
|
|
215
|
+
address glpManager;
|
|
216
|
+
address yearnVault;
|
|
217
|
+
address tokenIn;
|
|
218
|
+
address tokenOut;
|
|
219
|
+
uint256 swapAmount;
|
|
220
|
+
address recipient;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
struct Vooi {
|
|
224
|
+
address pool;
|
|
225
|
+
address fromToken;
|
|
226
|
+
address toToken;
|
|
227
|
+
uint256 fromID;
|
|
228
|
+
uint256 toID;
|
|
229
|
+
uint256 fromAmount;
|
|
230
|
+
address to;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
struct VelocoreV2 {
|
|
234
|
+
address vault;
|
|
235
|
+
address tokenIn;
|
|
236
|
+
address tokenOut;
|
|
237
|
+
uint256 amount;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
struct MaticMigrate {
|
|
241
|
+
address pool;
|
|
242
|
+
address tokenAddress; // should be POL
|
|
243
|
+
uint256 amount;
|
|
244
|
+
address recipient; // empty if migrate
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
struct Kokonut {
|
|
248
|
+
address pool;
|
|
249
|
+
uint256 dx;
|
|
250
|
+
uint256 tokenIndexFrom;
|
|
251
|
+
address fromToken;
|
|
252
|
+
address toToken;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
function executeUniswap(
|
|
256
|
+
uint256 index,
|
|
257
|
+
bytes memory data,
|
|
258
|
+
uint256 previousAmountOut,
|
|
259
|
+
address tokenIn,
|
|
260
|
+
bool getPoolOnly,
|
|
261
|
+
address nextPool
|
|
262
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
263
|
+
|
|
264
|
+
function executeKSClassic(
|
|
265
|
+
uint256 index,
|
|
266
|
+
bytes memory data,
|
|
267
|
+
uint256 previousAmountOut,
|
|
268
|
+
address tokenIn,
|
|
269
|
+
bool getPoolOnly,
|
|
270
|
+
address nextPool
|
|
271
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
272
|
+
|
|
273
|
+
function executeVelodrome(
|
|
274
|
+
uint256 index,
|
|
275
|
+
bytes memory data,
|
|
276
|
+
uint256 previousAmountOut,
|
|
277
|
+
address tokenIn,
|
|
278
|
+
bool getPoolOnly,
|
|
279
|
+
address nextPool
|
|
280
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
281
|
+
|
|
282
|
+
function executeFrax(
|
|
283
|
+
uint256 index,
|
|
284
|
+
bytes memory data,
|
|
285
|
+
uint256 previousAmountOut,
|
|
286
|
+
address tokenIn,
|
|
287
|
+
bool getPoolOnly,
|
|
288
|
+
address nextPool
|
|
289
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
290
|
+
|
|
291
|
+
function executeCamelot(
|
|
292
|
+
uint256 index,
|
|
293
|
+
bytes memory data,
|
|
294
|
+
uint256 previousAmountOut,
|
|
295
|
+
address tokenIn,
|
|
296
|
+
bool getPoolOnly,
|
|
297
|
+
address nextPool
|
|
298
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
299
|
+
|
|
300
|
+
function executeKyberLimitOrder(
|
|
301
|
+
uint256 index,
|
|
302
|
+
bytes memory data,
|
|
303
|
+
uint256 previousAmountOut,
|
|
304
|
+
address tokenIn,
|
|
305
|
+
bool getPoolOnly,
|
|
306
|
+
address nextPool
|
|
307
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
308
|
+
|
|
309
|
+
function executeRfq(
|
|
310
|
+
uint256 index,
|
|
311
|
+
bytes memory data,
|
|
312
|
+
uint256 previousAmountOut,
|
|
313
|
+
address tokenIn,
|
|
314
|
+
bool getPoolOnly,
|
|
315
|
+
address nextPool
|
|
316
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
317
|
+
|
|
318
|
+
function executeHashflow(
|
|
319
|
+
uint256 index,
|
|
320
|
+
bytes memory data,
|
|
321
|
+
uint256 previousAmountOut,
|
|
322
|
+
address tokenIn,
|
|
323
|
+
bool getPoolOnly,
|
|
324
|
+
address nextPool
|
|
325
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
326
|
+
|
|
327
|
+
function executeStableSwap(
|
|
328
|
+
uint256 index,
|
|
329
|
+
bytes memory data,
|
|
330
|
+
uint256 previousAmountOut,
|
|
331
|
+
address tokenIn,
|
|
332
|
+
bool getPoolOnly,
|
|
333
|
+
address nextPool
|
|
334
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
335
|
+
|
|
336
|
+
function executeCurve(
|
|
337
|
+
uint256 index,
|
|
338
|
+
bytes memory data,
|
|
339
|
+
uint256 previousAmountOut,
|
|
340
|
+
address tokenIn,
|
|
341
|
+
bool getPoolOnly,
|
|
342
|
+
address nextPool
|
|
343
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
344
|
+
|
|
345
|
+
function executeUniV3KSElastic(
|
|
346
|
+
uint256 index,
|
|
347
|
+
bytes memory data,
|
|
348
|
+
uint256 previousAmountOut,
|
|
349
|
+
address tokenIn,
|
|
350
|
+
bool getPoolOnly,
|
|
351
|
+
address nextPool
|
|
352
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
353
|
+
|
|
354
|
+
function executeBalV2(
|
|
355
|
+
uint256 index,
|
|
356
|
+
bytes memory data,
|
|
357
|
+
uint256 previousAmountOut,
|
|
358
|
+
address tokenIn,
|
|
359
|
+
bool getPoolOnly,
|
|
360
|
+
address nextPool
|
|
361
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
362
|
+
|
|
363
|
+
function executeDODO(
|
|
364
|
+
uint256 index,
|
|
365
|
+
bytes memory data,
|
|
366
|
+
uint256 previousAmountOut,
|
|
367
|
+
address tokenIn,
|
|
368
|
+
bool getPoolOnly,
|
|
369
|
+
address nextPool
|
|
370
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
371
|
+
|
|
372
|
+
function executeGMX(
|
|
373
|
+
uint256 index,
|
|
374
|
+
bytes memory data,
|
|
375
|
+
uint256 previousAmountOut,
|
|
376
|
+
address tokenIn,
|
|
377
|
+
bool getPoolOnly,
|
|
378
|
+
address nextPool
|
|
379
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
380
|
+
|
|
381
|
+
function executeSynthetix(
|
|
382
|
+
uint256 index,
|
|
383
|
+
bytes memory data,
|
|
384
|
+
uint256 previousAmountOut,
|
|
385
|
+
address tokenIn,
|
|
386
|
+
bool getPoolOnly,
|
|
387
|
+
address nextPool
|
|
388
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
389
|
+
|
|
390
|
+
function executeWrappedstETH(
|
|
391
|
+
uint256 index,
|
|
392
|
+
bytes memory data,
|
|
393
|
+
uint256 previousAmountOut,
|
|
394
|
+
address tokenIn,
|
|
395
|
+
bool getPoolOnly,
|
|
396
|
+
address nextPool
|
|
397
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
398
|
+
|
|
399
|
+
function executeStEth(
|
|
400
|
+
uint256 index,
|
|
401
|
+
bytes memory data,
|
|
402
|
+
uint256 previousAmountOut,
|
|
403
|
+
address tokenIn,
|
|
404
|
+
bool getPoolOnly,
|
|
405
|
+
address nextPool
|
|
406
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
407
|
+
|
|
408
|
+
function executePlatypus(
|
|
409
|
+
uint256 index,
|
|
410
|
+
bytes memory data,
|
|
411
|
+
uint256 previousAmountOut,
|
|
412
|
+
address tokenIn,
|
|
413
|
+
bool getPoolOnly,
|
|
414
|
+
address nextPool
|
|
415
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
416
|
+
|
|
417
|
+
function executePSM(
|
|
418
|
+
uint256 index,
|
|
419
|
+
bytes memory data,
|
|
420
|
+
uint256 previousAmountOut,
|
|
421
|
+
address tokenIn,
|
|
422
|
+
bool getPoolOnly,
|
|
423
|
+
address nextPool
|
|
424
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
425
|
+
|
|
426
|
+
function executeMaverick(
|
|
427
|
+
uint256 index,
|
|
428
|
+
bytes memory data,
|
|
429
|
+
uint256 previousAmountOut,
|
|
430
|
+
address tokenIn,
|
|
431
|
+
bool getPoolOnly,
|
|
432
|
+
address nextPool
|
|
433
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
434
|
+
|
|
435
|
+
function executeSyncSwap(
|
|
436
|
+
uint256 index,
|
|
437
|
+
bytes memory data,
|
|
438
|
+
uint256 previousAmountOut,
|
|
439
|
+
address tokenIn,
|
|
440
|
+
bool getPoolOnly,
|
|
441
|
+
address nextPool
|
|
442
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
443
|
+
|
|
444
|
+
function executeAlgebraV1(
|
|
445
|
+
uint256 index,
|
|
446
|
+
bytes memory data,
|
|
447
|
+
uint256 previousAmountOut,
|
|
448
|
+
address tokenIn,
|
|
449
|
+
bool getPoolOnly,
|
|
450
|
+
address nextPool
|
|
451
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
452
|
+
|
|
453
|
+
function executeBalancerBatch(
|
|
454
|
+
uint256 index,
|
|
455
|
+
bytes memory data,
|
|
456
|
+
uint256 previousAmountOut,
|
|
457
|
+
address tokenIn,
|
|
458
|
+
bool getPoolOnly,
|
|
459
|
+
address nextPool
|
|
460
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
461
|
+
|
|
462
|
+
function executeWombat(
|
|
463
|
+
uint256 index,
|
|
464
|
+
bytes memory data,
|
|
465
|
+
uint256 previousAmountOut,
|
|
466
|
+
address tokenIn,
|
|
467
|
+
bool getPoolOnly,
|
|
468
|
+
address nextPool
|
|
469
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
470
|
+
|
|
471
|
+
function executeMantis(
|
|
472
|
+
uint256 index,
|
|
473
|
+
bytes memory data,
|
|
474
|
+
uint256 previousAmountOut,
|
|
475
|
+
address tokenIn,
|
|
476
|
+
bool getPoolOnly,
|
|
477
|
+
address nextPool
|
|
478
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
479
|
+
|
|
480
|
+
function executeIziSwap(
|
|
481
|
+
uint256 index,
|
|
482
|
+
bytes memory data,
|
|
483
|
+
uint256 previousAmountOut,
|
|
484
|
+
address tokenIn,
|
|
485
|
+
bool getPoolOnly,
|
|
486
|
+
address nextPool
|
|
487
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
488
|
+
|
|
489
|
+
function executeTraderJoeV2(
|
|
490
|
+
uint256 index,
|
|
491
|
+
bytes memory data,
|
|
492
|
+
uint256 previousAmountOut,
|
|
493
|
+
address tokenIn,
|
|
494
|
+
bool getPoolOnly,
|
|
495
|
+
address nextPool
|
|
496
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
497
|
+
|
|
498
|
+
function executeLevelFiV2(
|
|
499
|
+
uint256 index,
|
|
500
|
+
bytes memory data,
|
|
501
|
+
uint256 previousAmountOut,
|
|
502
|
+
address tokenIn,
|
|
503
|
+
bool getPoolOnly,
|
|
504
|
+
address nextPool
|
|
505
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
506
|
+
|
|
507
|
+
function executeGMXGLP(
|
|
508
|
+
uint256 index,
|
|
509
|
+
bytes memory data,
|
|
510
|
+
uint256 previousAmountOut,
|
|
511
|
+
address tokenIn,
|
|
512
|
+
bool getPoolOnly,
|
|
513
|
+
address nextPool
|
|
514
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
515
|
+
|
|
516
|
+
function executeVooi(
|
|
517
|
+
uint256 index,
|
|
518
|
+
bytes memory data,
|
|
519
|
+
uint256 previousAmountOut,
|
|
520
|
+
address tokenIn,
|
|
521
|
+
bool getPoolOnly,
|
|
522
|
+
address nextPool
|
|
523
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
524
|
+
|
|
525
|
+
function executeVelocoreV2(
|
|
526
|
+
uint256 index,
|
|
527
|
+
bytes memory data,
|
|
528
|
+
uint256 previousAmountOut,
|
|
529
|
+
address tokenIn,
|
|
530
|
+
bool getPoolOnly,
|
|
531
|
+
address nextPool
|
|
532
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
533
|
+
|
|
534
|
+
function executeSmardex(
|
|
535
|
+
uint256 index,
|
|
536
|
+
bytes memory data,
|
|
537
|
+
uint256 previousAmountOut,
|
|
538
|
+
address tokenIn,
|
|
539
|
+
bool getPoolOnly,
|
|
540
|
+
address nextPool
|
|
541
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
542
|
+
|
|
543
|
+
function executeSolidlyV2(
|
|
544
|
+
uint256 index,
|
|
545
|
+
bytes memory data,
|
|
546
|
+
uint256 previousAmountOut,
|
|
547
|
+
address tokenIn,
|
|
548
|
+
bool getPoolOnly,
|
|
549
|
+
address nextPool
|
|
550
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
551
|
+
|
|
552
|
+
function executeKokonut(
|
|
553
|
+
uint256 index,
|
|
554
|
+
bytes memory data,
|
|
555
|
+
uint256 previousAmountOut,
|
|
556
|
+
address tokenIn,
|
|
557
|
+
bool getPoolOnly,
|
|
558
|
+
address nextPool
|
|
559
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
560
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity
|
|
2
|
+
pragma solidity >=0.6.12;
|
|
3
3
|
|
|
4
4
|
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
|
5
|
-
import {
|
|
5
|
+
import {IAggregationExecutor} from "./IAggregationExecutor.sol";
|
|
6
6
|
|
|
7
7
|
interface IMetaAggregationRouterV2 {
|
|
8
8
|
struct SwapDescriptionV2 {
|
|
@@ -28,10 +28,15 @@ interface IMetaAggregationRouterV2 {
|
|
|
28
28
|
bytes clientData;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
struct SimpleSwapData {
|
|
32
|
+
address[] firstPools;
|
|
33
|
+
uint256[] firstSwapAmounts;
|
|
34
|
+
bytes[] swapDatas;
|
|
35
|
+
uint256 deadline;
|
|
36
|
+
bytes positiveSlippageData;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function swap(SwapExecutionParams calldata execution) external payable returns (uint256, uint256);
|
|
35
40
|
|
|
36
41
|
function swapSimpleMode(
|
|
37
42
|
IAggregationExecutor caller,
|