@paraswap/dex-lib 4.1.19 → 4.1.20
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/abi/AaveV1_lending_pool.json +27 -0
- package/build/abi/Aave_GSM.json +751 -0
- package/build/abi/Balancer.json +257 -0
- package/build/abi/BalancerV2.json +1179 -0
- package/build/abi/RamsesV2Pool.abi.json +1554 -0
- package/build/abi/RamsesV2Quoter.abi.json +274 -0
- package/build/abi/USDM.json +807 -0
- package/build/abi/UniswapV2Router.json +397 -0
- package/build/abi/angle-transmuter/ChainlinkAccessControlledOffchainAggregator.json +1246 -0
- package/build/abi/angle-transmuter/ChainlinkEACAggregatorProxy.json +509 -0
- package/build/abi/curve-v1/CurveBUSDv2.abi.json +1356 -0
- package/build/abi/curve-v1/CurveTokenV1.json +305 -0
- package/build/abi/curve-v1/CurveTokenV2.json +318 -0
- package/build/abi/curve-v1/CurveV1StableNg.json +1452 -0
- package/build/abi/curve-v1/CurveV2Swap.json +700 -0
- package/build/abi/curve-v1/FactoryCryptoRegistry.json +316 -0
- package/build/abi/curve-v1/FactoryRegistry.json +508 -0
- package/build/abi/curve-v1/StableSwapAave.json +1152 -0
- package/build/abi/curve-v1/StableSwapBUSD.json +814 -0
- package/build/abi/curve-v1/StableSwapCompound.json +814 -0
- package/build/abi/curve-v1/StableSwapIDLE.json +1253 -0
- package/build/abi/curve-v1/StableSwapPax.json +865 -0
- package/build/abi/curve-v1/StableSwapSnow.json +900 -0
- package/build/abi/curve-v1/StableSwapUSDN.json +1004 -0
- package/build/abi/curve-v1/StableSwapUSDT.json +814 -0
- package/build/abi/curve-v1/StableSwapY.json +814 -0
- package/build/abi/inception/inception-ineth-pool.json +1062 -0
- package/build/abi/inception/inception-ineth.json +609 -0
- package/build/abi/inception/inception-ratio-feed.json +329 -0
- package/build/abi/inception/inception-vault.json +991 -0
- package/build/abi/kyberdmm/kyber-storage.abi.json +824 -0
- package/build/abi/kyberdmm.abi.json +1148 -0
- package/build/abi/maverick-v2/MaverickV2Quoter.json +278 -0
- package/build/abi/nerve/nerve-metapool.json +790 -0
- package/build/abi/platypus/asset.json +490 -0
- package/build/abi/platypus/avax-pool.json +820 -0
- package/build/abi/platypus/oracle.json +119 -0
- package/build/abi/platypus/pool.json +677 -0
- package/build/abi/smardex/all/smardex-router.json +648 -0
- package/build/abi/smardex/layer-1/smardex-factory.json +242 -0
- package/build/abi/smardex/layer-1/smardex-pool.json +506 -0
- package/build/abi/smardex/layer-2/smardex-factory.json +185 -0
- package/build/abi/smardex/layer-2/smardex-pool.json +578 -0
- package/build/abi/swaap-v1/pool.json +1346 -0
- package/build/abi/uniswap-v3/UniswapV3Quoter.abi.json +193 -0
- package/build/abi/velodrome-slipstream/VelodromeSlipstreamQuoterV2.abi.json +267 -0
- package/build/dex/aave-v1/aave-v1.d.ts +34 -0
- package/build/dex/aave-v1/aave-v1.js +180 -0
- package/build/dex/aave-v1/aave-v1.js.map +1 -0
- package/build/dex/aave-v1/config.d.ts +11 -0
- package/build/dex/aave-v1/config.js +20 -0
- package/build/dex/aave-v1/config.js.map +1 -0
- package/build/dex/aave-v1/tokens-mainnet.json +134 -0
- package/build/dex/aave-v1/tokens.d.ts +3 -0
- package/build/dex/aave-v1/tokens.js +50 -0
- package/build/dex/aave-v1/tokens.js.map +1 -0
- package/build/dex/aave-v1/types.d.ts +12 -0
- package/build/dex/aave-v1/types.js +3 -0
- package/build/dex/aave-v1/types.js.map +1 -0
- package/build/dex/balancer-v1/balancer-pools.json +33333 -0
- package/build/dex/balancer-v3/balancer-test-helpers.d.ts +5 -0
- package/build/dex/balancer-v3/balancer-test-helpers.js +25 -1
- package/build/dex/balancer-v3/balancer-test-helpers.js.map +1 -1
- package/build/dex/balancer-v3/balancer-v3-pool.js +35 -7
- package/build/dex/balancer-v3/balancer-v3-pool.js.map +1 -1
- package/build/dex/balancer-v3/balancer-v3.js +9 -2
- package/build/dex/balancer-v3/balancer-v3.js.map +1 -1
- package/build/dex/balancer-v3/config.d.ts +2 -1
- package/build/dex/balancer-v3/config.js +7 -0
- package/build/dex/balancer-v3/config.js.map +1 -1
- package/build/dex/balancer-v3/getGasCost.js +3 -0
- package/build/dex/balancer-v3/getGasCost.js.map +1 -1
- package/build/dex/balancer-v3/getOnChainState.d.ts +5 -1
- package/build/dex/balancer-v3/getOnChainState.js +69 -9
- package/build/dex/balancer-v3/getOnChainState.js.map +1 -1
- package/build/dex/balancer-v3/getPoolsApi.js +45 -7
- package/build/dex/balancer-v3/getPoolsApi.js.map +1 -1
- package/build/dex/balancer-v3/getTopPoolsApi.d.ts +4 -3
- package/build/dex/balancer-v3/getTopPoolsApi.js +17 -6
- package/build/dex/balancer-v3/getTopPoolsApi.js.map +1 -1
- package/build/dex/balancer-v3/gyroECLPPool.d.ts +11 -0
- package/build/dex/balancer-v3/gyroECLPPool.js +6 -0
- package/build/dex/balancer-v3/gyroECLPPool.js.map +1 -0
- package/build/dex/balancer-v3/hooks/directionalFeeHook.d.ts +2 -0
- package/build/dex/balancer-v3/hooks/directionalFeeHook.js +1 -0
- package/build/dex/balancer-v3/hooks/directionalFeeHook.js.map +1 -1
- package/build/dex/balancer-v3/hooks/stableSurgeHook.d.ts +2 -0
- package/build/dex/balancer-v3/hooks/stableSurgeHook.js +1 -0
- package/build/dex/balancer-v3/hooks/stableSurgeHook.js.map +1 -1
- package/build/dex/balancer-v3/types.d.ts +6 -2
- package/build/dex/balancer-v3/utils.d.ts +2 -0
- package/build/dex/balancer-v3/utils.js +11 -0
- package/build/dex/balancer-v3/utils.js.map +1 -0
- package/build/dex/bebop/websocket-fetcher.d.ts +35 -0
- package/build/dex/bebop/websocket-fetcher.js +87 -0
- package/build/dex/bebop/websocket-fetcher.js.map +1 -0
- package/build/dex/idle-dao/idle-dao-pool.d.ts +56 -0
- package/build/dex/idle-dao/idle-dao-pool.js +176 -0
- package/build/dex/idle-dao/idle-dao-pool.js.map +1 -0
- package/build/dex/idle-dao/idle-dao-pooling-pool.d.ts +16 -0
- package/build/dex/idle-dao/idle-dao-pooling-pool.js +57 -0
- package/build/dex/idle-dao/idle-dao-pooling-pool.js.map +1 -0
- package/build/dex/idle-dao/scripts.d.ts +9 -0
- package/build/dex/idle-dao/scripts.js +552 -0
- package/build/dex/idle-dao/scripts.js.map +1 -0
- package/build/dex/inception/config.d.ts +4 -0
- package/build/dex/inception/config.js +109 -0
- package/build/dex/inception/config.js.map +1 -0
- package/build/dex/inception/inception-event-pool.d.ts +16 -0
- package/build/dex/inception/inception-event-pool.js +51 -0
- package/build/dex/inception/inception-event-pool.js.map +1 -0
- package/build/dex/inception/inception-native.d.ts +43 -0
- package/build/dex/inception/inception-native.js +131 -0
- package/build/dex/inception/inception-native.js.map +1 -0
- package/build/dex/inception/inception-pool.d.ts +18 -0
- package/build/dex/inception/inception-pool.js +32 -0
- package/build/dex/inception/inception-pool.js.map +1 -0
- package/build/dex/inception/inception-price-feed.d.ts +19 -0
- package/build/dex/inception/inception-price-feed.js +51 -0
- package/build/dex/inception/inception-price-feed.js.map +1 -0
- package/build/dex/inception/inception.d.ts +43 -0
- package/build/dex/inception/inception.js +204 -0
- package/build/dex/inception/inception.js.map +1 -0
- package/build/dex/inception/tokens.d.ts +9 -0
- package/build/dex/inception/tokens.js +28 -0
- package/build/dex/inception/tokens.js.map +1 -0
- package/build/dex/inception/types.d.ts +22 -0
- package/build/dex/inception/types.js +3 -0
- package/build/dex/inception/types.js.map +1 -0
- package/build/dex/inception/utils.d.ts +6 -0
- package/build/dex/inception/utils.js +37 -0
- package/build/dex/inception/utils.js.map +1 -0
- package/build/dex/platypus/asset.d.ts +14 -0
- package/build/dex/platypus/asset.js +97 -0
- package/build/dex/platypus/asset.js.map +1 -0
- package/build/dex/platypus/config.d.ts +11 -0
- package/build/dex/platypus/config.js +69 -0
- package/build/dex/platypus/config.js.map +1 -0
- package/build/dex/platypus/platypus.d.ts +63 -0
- package/build/dex/platypus/platypus.js +473 -0
- package/build/dex/platypus/platypus.js.map +1 -0
- package/build/dex/platypus/pool-avax.d.ts +8 -0
- package/build/dex/platypus/pool-avax.js +54 -0
- package/build/dex/platypus/pool-avax.js.map +1 -0
- package/build/dex/platypus/pool-base.d.ts +19 -0
- package/build/dex/platypus/pool-base.js +86 -0
- package/build/dex/platypus/pool-base.js.map +1 -0
- package/build/dex/platypus/pool-pure.d.ts +8 -0
- package/build/dex/platypus/pool-pure.js +37 -0
- package/build/dex/platypus/pool-pure.js.map +1 -0
- package/build/dex/platypus/pool-subscriber.d.ts +14 -0
- package/build/dex/platypus/pool-subscriber.js +167 -0
- package/build/dex/platypus/pool-subscriber.js.map +1 -0
- package/build/dex/platypus/pool.d.ts +8 -0
- package/build/dex/platypus/pool.js +58 -0
- package/build/dex/platypus/pool.js.map +1 -0
- package/build/dex/platypus/types.d.ts +92 -0
- package/build/dex/platypus/types.js +10 -0
- package/build/dex/platypus/types.js.map +1 -0
- package/build/dex/quickswap/spiritswap-v3.d.ts +6 -0
- package/build/dex/quickswap/spiritswap-v3.js +19 -0
- package/build/dex/quickswap/spiritswap-v3.js.map +1 -0
- package/build/dex/smardex/config.d.ts +4 -0
- package/build/dex/smardex/config.js +64 -0
- package/build/dex/smardex/config.js.map +1 -0
- package/build/dex/smardex/constants.d.ts +18 -0
- package/build/dex/smardex/constants.js +33 -0
- package/build/dex/smardex/constants.js.map +1 -0
- package/build/dex/smardex/sdk/constants.d.ts +6 -0
- package/build/dex/smardex/sdk/constants.js +13 -0
- package/build/dex/smardex/sdk/constants.js.map +1 -0
- package/build/dex/smardex/sdk/core.d.ts +113 -0
- package/build/dex/smardex/sdk/core.js +499 -0
- package/build/dex/smardex/sdk/core.js.map +1 -0
- package/build/dex/smardex/sdk/errors.d.ts +15 -0
- package/build/dex/smardex/sdk/errors.js +22 -0
- package/build/dex/smardex/sdk/errors.js.map +1 -0
- package/build/dex/smardex/sdk/types.d.ts +62 -0
- package/build/dex/smardex/sdk/types.js +3 -0
- package/build/dex/smardex/sdk/types.js.map +1 -0
- package/build/dex/smardex/sdk/utils.d.ts +44 -0
- package/build/dex/smardex/sdk/utils.js +133 -0
- package/build/dex/smardex/sdk/utils.js.map +1 -0
- package/build/dex/smardex/smardex-event-pool.d.ts +28 -0
- package/build/dex/smardex/smardex-event-pool.js +119 -0
- package/build/dex/smardex/smardex-event-pool.js.map +1 -0
- package/build/dex/smardex/smardex.d.ts +65 -0
- package/build/dex/smardex/smardex.js +519 -0
- package/build/dex/smardex/smardex.js.map +1 -0
- package/build/dex/smardex/types.d.ts +55 -0
- package/build/dex/smardex/types.js +3 -0
- package/build/dex/smardex/types.js.map +1 -0
- package/build/dex/solidly/forks-override/cone.d.ts +22 -0
- package/build/dex/solidly/forks-override/cone.js +53 -0
- package/build/dex/solidly/forks-override/cone.js.map +1 -0
- package/build/dex/solidly/forks-override/solisnek.d.ts +8 -0
- package/build/dex/solidly/forks-override/solisnek.js +15 -0
- package/build/dex/solidly/forks-override/solisnek.js.map +1 -0
- package/build/dex/swaap-v1/config.d.ts +17 -0
- package/build/dex/swaap-v1/config.js +56 -0
- package/build/dex/swaap-v1/config.js.map +1 -0
- package/build/dex/swaap-v1/constants.d.ts +6 -0
- package/build/dex/swaap-v1/constants.js +17 -0
- package/build/dex/swaap-v1/constants.js.map +1 -0
- package/build/dex/swaap-v1/libraries/ChainlinkUtils.d.ts +25 -0
- package/build/dex/swaap-v1/libraries/ChainlinkUtils.js +62 -0
- package/build/dex/swaap-v1/libraries/ChainlinkUtils.js.map +1 -0
- package/build/dex/swaap-v1/libraries/Const.d.ts +18 -0
- package/build/dex/swaap-v1/libraries/Const.js +26 -0
- package/build/dex/swaap-v1/libraries/Const.js.map +1 -0
- package/build/dex/swaap-v1/libraries/GeometricBrownianMotion.d.ts +77 -0
- package/build/dex/swaap-v1/libraries/GeometricBrownianMotion.js +316 -0
- package/build/dex/swaap-v1/libraries/GeometricBrownianMotion.js.map +1 -0
- package/build/dex/swaap-v1/libraries/LogExpMath.d.ts +75 -0
- package/build/dex/swaap-v1/libraries/LogExpMath.js +418 -0
- package/build/dex/swaap-v1/libraries/LogExpMath.js.map +1 -0
- package/build/dex/swaap-v1/libraries/MathMMM.d.ts +185 -0
- package/build/dex/swaap-v1/libraries/MathMMM.js +453 -0
- package/build/dex/swaap-v1/libraries/MathMMM.js.map +1 -0
- package/build/dex/swaap-v1/libraries/Num.d.ts +31 -0
- package/build/dex/swaap-v1/libraries/Num.js +167 -0
- package/build/dex/swaap-v1/libraries/Num.js.map +1 -0
- package/build/dex/swaap-v1/libraries/PoolQuotations.d.ts +23 -0
- package/build/dex/swaap-v1/libraries/PoolQuotations.js +131 -0
- package/build/dex/swaap-v1/libraries/PoolQuotations.js.map +1 -0
- package/build/dex/swaap-v1/libraries/Struct.d.ts +56 -0
- package/build/dex/swaap-v1/libraries/Struct.js +3 -0
- package/build/dex/swaap-v1/libraries/Struct.js.map +1 -0
- package/build/dex/swaap-v1/swaap-v1-pool.d.ts +45 -0
- package/build/dex/swaap-v1/swaap-v1-pool.js +656 -0
- package/build/dex/swaap-v1/swaap-v1-pool.js.map +1 -0
- package/build/dex/swaap-v1/swaap-v1.d.ts +62 -0
- package/build/dex/swaap-v1/swaap-v1.js +379 -0
- package/build/dex/swaap-v1/swaap-v1.js.map +1 -0
- package/build/dex/swaap-v1/types.d.ts +106 -0
- package/build/dex/swaap-v1/types.js +9 -0
- package/build/dex/swaap-v1/types.js.map +1 -0
- package/build/dex/zerox/index.d.ts +1 -1
- package/build/dex/zerox/index.js.map +1 -1
- package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-balancerv1-curvev1-eth-usdc-gusd.json +16 -0
- package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-balancerv1-sushiv3-wbtc-eth-sushi.json +16 -0
- package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-curvev1-eth-usdc-gusd.json +16 -0
- package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-curvev1-gusd-usdc-eth.json +16 -0
- package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-dai-usdc-eth.json +16 -0
- package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-eth-usdc-dai.json +16 -0
- package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-usdc-eth-wbtc.json +16 -0
- package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-usdt-usdc-dai.json +16 -0
- package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-balancerv1-eth-usdc.json +9 -0
- package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-balancerv1-usdc-eth.json +9 -0
- package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-balancerv1-usdc-wbtc.json +9 -0
- package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-curvev1-eth-steth.json +9 -0
- package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-curvev1-steth-eth.json +9 -0
- package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-curvev1-usdc-usdt.json +9 -0
- package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-univ3-eth-usdc.json +9 -0
- package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-univ3-usdc-eth.json +9 -0
- package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-univ3-usdc-usdt.json +9 -0
- package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-balancerv1-sushiv3-wbtc-eth-sushi.json +12 -0
- package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-curvev1-eth-usdc-gusd.json +7 -0
- package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-curvev1-gusd-usdc-eth.json +7 -0
- package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-dai-usdc-eth.json +7 -0
- package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-eth-usdc-dai.json +7 -0
- package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-usdc-eth-wbtc.json +12 -0
- package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-simpleSwap-univ3-eth-usdc.json +7 -0
- package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-simpleSwap-univ3-usdc-eth.json +7 -0
- package/build/executor/fixtures/executor01/routes/price-route-multiswap-balancerv1-curvev1-eth-usdc-gusd.json +78 -0
- package/build/executor/fixtures/executor01/routes/price-route-multiswap-balancerv1-sushiv3-wbtc-eth-sushi.json +81 -0
- package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-curvev1-eth-usdc-gusd.json +78 -0
- package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-curvev1-gusd-usdc-eth.json +78 -0
- package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-dai-usdc-eth.json +81 -0
- package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-eth-usdc-dai.json +81 -0
- package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-usdc-eth-wbtc.json +81 -0
- package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-usdt-usdc-dai.json +81 -0
- package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-balancerv1-eth-usdc.json +64 -0
- package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-balancerv1-usdc-eth.json +85 -0
- package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-balancerv1-usdc-wbtc.json +64 -0
- package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-curvev1-eth-steth.json +52 -0
- package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-curvev1-steth-eth.json +52 -0
- package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-curvev1-usdc-usdt.json +52 -0
- package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-univ3-eth-usdc.json +55 -0
- package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-univ3-usdc-eth.json +55 -0
- package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-univ3-usdc-usdt.json +55 -0
- package/build/executor/fixtures/executor02/exchange-params/price-route-multiSwap-balancerv1-sushiv3-univ3-bal-eth-sushi.json +23 -0
- package/build/executor/fixtures/executor02/exchange-params/price-route-multiSwap-maverickv1-sushiv3-univ3-eth-usdc-mav.json +37 -0
- package/build/executor/fixtures/executor02/exchange-params/price-route-multiSwap-univ3-sushiv3-sushi-eth-wbtc.json +23 -0
- package/build/executor/fixtures/executor02/exchange-params/price-route-multiSwap-univ3-sushiv3-wbtc-eth-sushi.json +23 -0
- package/build/executor/fixtures/executor02/exchange-params/price-route-multiswap-curvev1-univ3-dai-usdc-eth.json +51 -0
- package/build/executor/fixtures/executor02/exchange-params/price-route-multiswap-univ3-usdt-dai-eth.json +58 -0
- package/build/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-sushiv3-balancerv1-eth-usdc.json +23 -0
- package/build/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-sushiv3-balancerv1-usdc-eth.json +23 -0
- package/build/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-sushiv3-univ3-eth-sushi.json +9 -0
- package/build/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-sushiv3-univ3-sushi-eth.json +16 -0
- package/build/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-univ3-curvev1-usdt-dai.json +23 -0
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiSwap-balancerv1-sushiv3-univ3-bal-eth-sushi.json +12 -0
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiSwap-maverickv1-sushiv3-univ3-eth-usdc-mav.json +7 -0
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiSwap-univ3-sushiv3-sushi-eth-wbtc.json +12 -0
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiSwap-univ3-sushiv3-wbtc-eth-sushi.json +12 -0
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiswap-curvev1-univ3-dai-usdc-eth.json +7 -0
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiswap-univ3-usdt-dai-eth.json +7 -0
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-simpleSwap-sushiv3-balancerv1-eth-usdc.json +7 -0
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-simpleSwap-sushiv3-balancerv1-usdc-eth.json +7 -0
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-simpleSwap-sushiv3-univ3-eth-sushi.json +7 -0
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-simpleSwap-sushiv3-univ3-sushi-eth.json +7 -0
- package/build/executor/fixtures/executor02/routes/price-route-multiSwap-balancerv1-sushiv3-univ3-bal-eth-sushi.json +130 -0
- package/build/executor/fixtures/executor02/routes/price-route-multiSwap-maverickv1-sushiv3-univ3-eth-usdc-mav.json +136 -0
- package/build/executor/fixtures/executor02/routes/price-route-multiSwap-univ3-sushiv3-sushi-eth-wbtc.json +100 -0
- package/build/executor/fixtures/executor02/routes/price-route-multiSwap-univ3-sushiv3-wbtc-eth-sushi.json +100 -0
- package/build/executor/fixtures/executor02/routes/price-route-multiswap-curvev1-univ3-dai-usdc-eth.json +166 -0
- package/build/executor/fixtures/executor02/routes/price-route-multiswap-univ3-usdt-dai-eth.json +190 -0
- package/build/executor/fixtures/executor02/routes/price-route-simpleSwap-sushiv3-balancerv1-eth-usdc.json +114 -0
- package/build/executor/fixtures/executor02/routes/price-route-simpleSwap-sushiv3-balancerv1-usdc-eth.json +114 -0
- package/build/executor/fixtures/executor02/routes/price-route-simpleSwap-sushiv3-univ3-eth-sushi.json +55 -0
- package/build/executor/fixtures/executor02/routes/price-route-simpleSwap-sushiv3-univ3-sushi-eth.json +73 -0
- package/build/executor/fixtures/executor02/routes/price-route-simpleSwap-univ3-curvev1-usdt-dai.json +82 -0
- package/package.json +2 -2
- package/src/dex/balancer-v3/balancer-api.test.ts +122 -0
- package/src/dex/balancer-v3/balancer-buffer.test.ts +75 -0
- package/src/dex/balancer-v3/balancer-gyroECLP.test.ts +76 -0
- package/src/dex/balancer-v3/balancer-stableSurge.test.ts +54 -52
- package/src/dex/balancer-v3/balancer-test-helpers.ts +52 -0
- package/src/dex/balancer-v3/balancer-test-weighted.test.ts +96 -0
- package/src/dex/balancer-v3/balancer-v3-e2e.test.ts +49 -2
- package/src/dex/balancer-v3/balancer-v3-events.test.ts +162 -1
- package/src/dex/balancer-v3/balancer-v3-pool.ts +50 -15
- package/src/dex/balancer-v3/balancer-v3.ts +14 -4
- package/src/dex/balancer-v3/config.ts +7 -0
- package/src/dex/balancer-v3/getGasCost.ts +3 -0
- package/src/dex/balancer-v3/getOnChainState.ts +101 -12
- package/src/dex/balancer-v3/getPoolsApi.ts +55 -12
- package/src/dex/balancer-v3/getTopPoolsApi.ts +29 -11
- package/src/dex/balancer-v3/gyroECLPPool.ts +17 -0
- package/src/dex/balancer-v3/hooks/directionalFeeHook.ts +2 -0
- package/src/dex/balancer-v3/hooks/stableSurgeHook.ts +2 -0
- package/src/dex/balancer-v3/types.ts +6 -2
- package/src/dex/balancer-v3/utils.ts +11 -0
- package/tests/constants-e2e.ts +9 -0
- package/tests/token-storage-slots.json +40 -0
- package/.idea/codeStyles/Project.xml +0 -59
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/inspectionProfiles/Project_Default.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/paraswap-dex-lib.iml +0 -12
- package/.idea/prettier.xml +0 -7
- package/.idea/vcs.xml +0 -6
- package/build/dex/uniswap-v3/uniswap-v3-new.d.ts +0 -94
- package/build/dex/uniswap-v3/uniswap-v3-new.js +0 -923
- package/build/dex/uniswap-v3/uniswap-v3-new.js.map +0 -1
- package/scripts/get-uniswap-v3-dexes.ts +0 -64
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DexParams } from './types';
|
|
2
|
+
import { DexConfigMap } from '../../types';
|
|
3
|
+
export declare const AaveV1Config: DexConfigMap<DexParams>;
|
|
4
|
+
export declare const Adapters: {
|
|
5
|
+
[chainId: number]: {
|
|
6
|
+
[side: string]: {
|
|
7
|
+
name: string;
|
|
8
|
+
index: number;
|
|
9
|
+
}[];
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Adapters = exports.AaveV1Config = void 0;
|
|
4
|
+
const constants_1 = require("../../constants");
|
|
5
|
+
exports.AaveV1Config = {
|
|
6
|
+
AaveV1: {
|
|
7
|
+
[constants_1.Network.MAINNET]: {},
|
|
8
|
+
},
|
|
9
|
+
};
|
|
10
|
+
exports.Adapters = {
|
|
11
|
+
[constants_1.Network.MAINNET]: {
|
|
12
|
+
[constants_1.SwapSide.SELL]: [
|
|
13
|
+
{
|
|
14
|
+
name: 'Adapter03',
|
|
15
|
+
index: 5,
|
|
16
|
+
},
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/dex/aave-v1/config.ts"],"names":[],"mappings":";;;AAEA,+CAAoD;AAEvC,QAAA,YAAY,GAA4B;IACnD,MAAM,EAAE;QACN,CAAC,mBAAO,CAAC,OAAO,CAAC,EAAE,EAAE;KACtB;CACF,CAAC;AAEW,QAAA,QAAQ,GAEjB;IACF,CAAC,mBAAO,CAAC,OAAO,CAAC,EAAE;QACjB,CAAC,oBAAQ,CAAC,IAAI,CAAC,EAAE;YACf;gBACE,IAAI,EAAE,WAAW;gBACjB,KAAK,EAAE,CAAC;aACT;SACF;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"aSymbol": "aETH",
|
|
4
|
+
"aAddress": "0x3a3a65aab0dd2a17e3f1947ba16138cd37d08c04",
|
|
5
|
+
"address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
|
|
6
|
+
"decimals": 18
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"aSymbol": "aDAI",
|
|
10
|
+
"aAddress": "0xfc1e690f61efd961294b3e1ce3313fbd8aa4f85d",
|
|
11
|
+
"address": "0x6b175474e89094c44da98b954eedeac495271d0f",
|
|
12
|
+
"decimals": 18
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"aSymbol": "aUSDC",
|
|
16
|
+
"aAddress": "0x9ba00d6856a4edf4665bca2c2309936572473b7e",
|
|
17
|
+
"address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
|
|
18
|
+
"decimals": 6
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"aSymbol": "aSUSD",
|
|
22
|
+
"aAddress": "0x625ae63000f46200499120b906716420bd059240",
|
|
23
|
+
"address": "0x57ab1e02fee23774580c119740129eac7081e9d3",
|
|
24
|
+
"decimals": 18
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"aSymbol": "aTUSD",
|
|
28
|
+
"aAddress": "0x4da9b813057d04baef4e5800e36083717b4a0341",
|
|
29
|
+
"address": "0x8dd5fbce2f6a956c3022ba3663759011dd51e73e",
|
|
30
|
+
"decimals": 18
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"aSymbol": "aUSDT",
|
|
34
|
+
"aAddress": "0x71fc860f7d3a592a4a98740e39db31d25db65ae8",
|
|
35
|
+
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
|
|
36
|
+
"decimals": 6
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"aSymbol": "aBUSD",
|
|
40
|
+
"aAddress": "0x6ee0f7bb50a54ab5253da0667b0dc2ee526c30a8",
|
|
41
|
+
"address": "0x4fabb145d64652a948d72533023f6e7a623c7c53",
|
|
42
|
+
"decimals": 18
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"aSymbol": "aBAT",
|
|
46
|
+
"aAddress": "0xe1ba0fb44ccb0d11b80f92f4f8ed94ca3ff51d00",
|
|
47
|
+
"address": "0x0d8775f648430679a709e98d2b0cb6250d2887ef",
|
|
48
|
+
"decimals": 18
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"aSymbol": "aENJ",
|
|
52
|
+
"aAddress": "0x712db54daa836b53ef1ecbb9c6ba3b9efb073f40",
|
|
53
|
+
"address": "0xf629cbd94d3791c9250152bd8dfbdf380e2a3b9c",
|
|
54
|
+
"decimals": 18
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"aSymbol": "aKNC",
|
|
58
|
+
"aAddress": "0x9d91be44c06d373a8a226e1f3b146956083803eb",
|
|
59
|
+
"address": "0xdd974d5c2e2928dea5f71b9825b8b646686bd200",
|
|
60
|
+
"decimals": 18
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"aSymbol": "aAAVE",
|
|
64
|
+
"aAddress": "0xba3d9687cf50fe253cd2e1cfeede1d6787344ed5",
|
|
65
|
+
"address": "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9",
|
|
66
|
+
"decimals": 18
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"aSymbol": "aLINK",
|
|
70
|
+
"aAddress": "0xa64bd6c70cb9051f6a9ba1f163fdc07e0dfb5f84",
|
|
71
|
+
"address": "0x514910771af9ca656af840dff83e8264ecf986ca",
|
|
72
|
+
"decimals": 18
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"aSymbol": "aMANA",
|
|
76
|
+
"aAddress": "0x6fce4a401b6b80ace52baaefe4421bd188e76f6f",
|
|
77
|
+
"address": "0x0f5d2fb29fb7d3cfee444a200298f468908cc942",
|
|
78
|
+
"decimals": 18
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"aSymbol": "aMKR",
|
|
82
|
+
"aAddress": "0x7deb5e830be29f91e298ba5ff1356bb7f8146998",
|
|
83
|
+
"address": "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2",
|
|
84
|
+
"decimals": 18
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"aSymbol": "aREN",
|
|
88
|
+
"aAddress": "0x69948cc03f478b95283f7dbf1ce764d0fc7ec54c",
|
|
89
|
+
"address": "0x408e41876cccdc0f92210600ef50372656052a38",
|
|
90
|
+
"decimals": 18
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"aSymbol": "aREP",
|
|
94
|
+
"aAddress": "0x71010a9d003445ac60c4e6a7017c1e89a477b438",
|
|
95
|
+
"address": "0xe94327d07fc17907b4db788e5adf2ed424addff6",
|
|
96
|
+
"decimals": 18
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"aSymbol": "aSNX",
|
|
100
|
+
"aAddress": "0x328c4c80bc7aca0834db37e6600a6c49e12da4de",
|
|
101
|
+
"address": "0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f",
|
|
102
|
+
"decimals": 18
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"aSymbol": "aUNI",
|
|
106
|
+
"aAddress": "0xb124541127a0a657f056d9dd06188c4f1b0e5aab",
|
|
107
|
+
"address": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984",
|
|
108
|
+
"decimals": 18
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"aSymbol": "aWBTC",
|
|
112
|
+
"aAddress": "0xfc4b8ed459e00e5400be803a9bb3954234fd50e3",
|
|
113
|
+
"address": "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",
|
|
114
|
+
"decimals": 8
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"aSymbol": "aYFI",
|
|
118
|
+
"aAddress": "0x12e51e77daaa58aa0e9247db7510ea4b46f9bead",
|
|
119
|
+
"address": "0x0bc529c00c6401aef6d220be8c6ea1667f6ad93e",
|
|
120
|
+
"decimals": 18
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"aSymbol": "aZRX",
|
|
124
|
+
"aAddress": "0x6fb0855c404e09c47c3fbca25f08d4e41f9f062f",
|
|
125
|
+
"address": "0xe41d2489571d322189246dafa5ebde1f4699f498",
|
|
126
|
+
"decimals": 18
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"aSymbol": "aLEND",
|
|
130
|
+
"aAddress": "0x7d2d3688df45ce7c552e19c27e007673da9204b8",
|
|
131
|
+
"address": "0x80fb784b7ed66730e8b1dbd9820afd29931aab03",
|
|
132
|
+
"decimals": 18
|
|
133
|
+
}
|
|
134
|
+
]
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.aaveV1GetToken = exports.isAAVEPair = void 0;
|
|
7
|
+
const constants_1 = require("../../constants");
|
|
8
|
+
const tokens_mainnet_json_1 = __importDefault(require("./tokens-mainnet.json"));
|
|
9
|
+
const Tokens = {};
|
|
10
|
+
const TokensByAddress = {};
|
|
11
|
+
const tokensByNetwork = {
|
|
12
|
+
[constants_1.Network.MAINNET]: tokens_mainnet_json_1.default,
|
|
13
|
+
};
|
|
14
|
+
for (const [key, tokens] of Object.entries(tokensByNetwork)) {
|
|
15
|
+
const network = +key;
|
|
16
|
+
Tokens[network] = {};
|
|
17
|
+
TokensByAddress[network] = {};
|
|
18
|
+
for (const token of tokens) {
|
|
19
|
+
Tokens[network][token.aSymbol] = token;
|
|
20
|
+
TokensByAddress[network][token.aAddress.toLowerCase()] = token;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
// return null if pair does not exists otherwise return the aToken
|
|
24
|
+
function isAAVEPair(network, src, dst) {
|
|
25
|
+
const srcAddr = src.address.toLowerCase();
|
|
26
|
+
const dstAddr = dst.address.toLowerCase();
|
|
27
|
+
const _src = TokensByAddress[network][srcAddr];
|
|
28
|
+
const _dst = TokensByAddress[network][dstAddr];
|
|
29
|
+
if (_src && _src.address == dstAddr) {
|
|
30
|
+
return src;
|
|
31
|
+
}
|
|
32
|
+
if (_dst && _dst.address == srcAddr) {
|
|
33
|
+
return dst;
|
|
34
|
+
}
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
exports.isAAVEPair = isAAVEPair;
|
|
38
|
+
function aaveV1GetToken(network, symbol) {
|
|
39
|
+
const aToken = Tokens[network][symbol];
|
|
40
|
+
if (!aToken) {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
address: aToken.aAddress,
|
|
45
|
+
decimals: aToken.decimals,
|
|
46
|
+
symbol: aToken.aSymbol,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
exports.aaveV1GetToken = aaveV1GetToken;
|
|
50
|
+
//# sourceMappingURL=tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../src/dex/aave-v1/tokens.ts"],"names":[],"mappings":";;;;;;AACA,+CAA0C;AAE1C,gFAAkD;AAElD,MAAM,MAAM,GAAwD,EAAE,CAAC;AACvE,MAAM,eAAe,GACnB,EAAE,CAAC;AAEL,MAAM,eAAe,GAA+B;IAClD,CAAC,mBAAO,CAAC,OAAO,CAAC,EAAE,6BAAa;CACjC,CAAC;AAEF,KAAK,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE;IAC3D,MAAM,OAAO,GAAG,CAAC,GAAG,CAAC;IACrB,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;IACrB,eAAe,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;IAC9B,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE;QAC1B,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC;QACvC,eAAe,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,GAAG,KAAK,CAAC;KAChE;CACF;AAED,kEAAkE;AAClE,SAAgB,UAAU,CACxB,OAAe,EACf,GAAU,EACV,GAAU;IAEV,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;IAC1C,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;IAE1C,MAAM,IAAI,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC;IAC/C,MAAM,IAAI,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC;IAE/C,IAAI,IAAI,IAAI,IAAI,CAAC,OAAO,IAAI,OAAO,EAAE;QACnC,OAAO,GAAG,CAAC;KACZ;IAED,IAAI,IAAI,IAAI,IAAI,CAAC,OAAO,IAAI,OAAO,EAAE;QACnC,OAAO,GAAG,CAAC;KACZ;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AApBD,gCAoBC;AAED,SAAgB,cAAc,CAAC,OAAe,EAAE,MAAc;IAC5D,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;IACvC,IAAI,CAAC,MAAM,EAAE;QACX,OAAO,IAAI,CAAC;KACb;IAED,OAAO;QACL,OAAO,EAAE,MAAM,CAAC,QAAQ;QACxB,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,MAAM,EAAE,MAAM,CAAC,OAAO;KACvB,CAAC;AACJ,CAAC;AAXD,wCAWC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare type AaveV1Data = {
|
|
2
|
+
fromAToken: boolean;
|
|
3
|
+
isV2: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare type DexParams = {};
|
|
6
|
+
export declare type AaveV1RedeemParams = [
|
|
7
|
+
_reserve: string,
|
|
8
|
+
_amount: string,
|
|
9
|
+
_referralCode: number
|
|
10
|
+
];
|
|
11
|
+
export declare type AaveV1DepositParams = [token: string];
|
|
12
|
+
export declare type AaveV1Param = AaveV1RedeemParams | AaveV1DepositParams;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/dex/aave-v1/types.ts"],"names":[],"mappings":""}
|