@paraswap/dex-lib 4.0.17 → 4.0.19
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/.vscode/launch.json +53 -0
- package/.vscode/settings.json +2 -0
- package/.vscode/tasks.json +15 -0
- package/build/abi/aavev3statav2/Factory.json +131 -0
- package/build/abi/aavev3statav2/Pool.json +1459 -0
- package/build/abi/aavev3statav2/Token.json +997 -0
- package/build/abi/uniswap-v3/AlienBaseV3Router.abi.json +52 -0
- package/build/abi/usual-m-smart-m/usualM.abi.json +483 -0
- package/build/abi/{USDM.json → usual-pp/abi.json} +269 -326
- package/build/abi/{angle-transmuter/ChainlinkAccessControlledOffchainAggregator.json → wombat/pool.json} +637 -594
- package/build/dex/aave-gsm/config.js +2 -2
- package/build/dex/aave-gsm/config.js.map +1 -1
- package/build/dex/aave-v1/aave-v1.js +1 -0
- package/build/dex/aave-v1/aave-v1.js.map +1 -1
- package/build/dex/aave-v2/tokenlist.json +904 -0
- package/build/dex/aave-v2/tokens-avalanche.json +44 -0
- package/build/dex/aave-v2/tokens-mainnet.json +188 -0
- package/build/dex/aave-v2/tokens-polygon.json +44 -0
- package/build/dex/aave-v2/tokens.js +6 -4
- package/build/dex/aave-v2/tokens.js.map +1 -1
- package/build/dex/aave-v3/config.js +6 -6
- package/build/dex/aave-v3/config.js.map +1 -1
- package/build/dex/aave-v3-stata-v2/aave-v3-stata-v2.d.ts +49 -0
- package/build/dex/aave-v3-stata-v2/aave-v3-stata-v2.js +377 -0
- package/build/dex/aave-v3-stata-v2/aave-v3-stata-v2.js.map +1 -0
- package/build/dex/aave-v3-stata-v2/config.d.ts +3 -0
- package/build/dex/aave-v3-stata-v2/config.js +21 -0
- package/build/dex/aave-v3-stata-v2/config.js.map +1 -0
- package/build/dex/aave-v3-stata-v2/tokens.d.ts +10 -0
- package/build/dex/aave-v3-stata-v2/tokens.js +43 -0
- package/build/dex/aave-v3-stata-v2/tokens.js.map +1 -0
- package/build/dex/aave-v3-stata-v2/types.d.ts +35 -0
- package/build/dex/aave-v3-stata-v2/types.js +25 -0
- package/build/dex/aave-v3-stata-v2/types.js.map +1 -0
- package/build/dex/aave-v3-stata-v2/utils.d.ts +4 -0
- package/build/dex/aave-v3-stata-v2/utils.js +67 -0
- package/build/dex/aave-v3-stata-v2/utils.js.map +1 -0
- package/build/dex/bProtocol.d.ts +18 -0
- package/build/dex/bProtocol.js +39 -0
- package/build/dex/bProtocol.js.map +1 -0
- package/build/dex/balancer-v3/abi/balancerBatchRouter.d.ts +729 -0
- package/build/dex/balancer-v3/abi/balancerBatchRouter.js +732 -0
- package/build/dex/balancer-v3/abi/balancerBatchRouter.js.map +1 -0
- package/build/dex/balancer-v3/abi/balancerRouter.d.ts +1406 -0
- package/build/dex/balancer-v3/abi/balancerRouter.js +1175 -0
- package/build/dex/balancer-v3/abi/balancerRouter.js.map +1 -0
- package/build/dex/balancer-v3/abi/vaultExtension.V3.d.ts +2081 -0
- package/build/dex/balancer-v3/abi/vaultExtension.V3.js +1851 -0
- package/build/dex/balancer-v3/abi/vaultExtension.V3.js.map +1 -0
- package/build/dex/balancer-v3/balancer-v3-sepolia-pools.d.ts +34 -0
- package/build/dex/balancer-v3/balancer-v3-sepolia-pools.js +406 -0
- package/build/dex/balancer-v3/balancer-v3-sepolia-pools.js.map +1 -0
- package/build/dex/bancor.d.ts +26 -0
- package/build/dex/bancor.js +58 -0
- package/build/dex/bancor.js.map +1 -0
- package/build/dex/compound.d.ts +18 -0
- package/build/dex/compound.js +46 -0
- package/build/dex/compound.js.map +1 -0
- package/build/dex/curve-v2.d.ts +58 -0
- package/build/dex/curve-v2.js +180 -0
- package/build/dex/curve-v2.js.map +1 -0
- package/build/dex/dodo-v1.d.ts +33 -0
- package/build/dex/dodo-v1.js +63 -0
- package/build/dex/dodo-v1.js.map +1 -0
- package/build/dex/inception/inception-event-pool.d.ts +4 -4
- package/build/dex/inception/inception-event-pool.js +7 -9
- package/build/dex/inception/inception-event-pool.js.map +1 -1
- package/build/dex/inception/inception.d.ts +6 -6
- package/build/dex/inception/inception.js +16 -40
- package/build/dex/inception/inception.js.map +1 -1
- package/build/dex/inception/utils.d.ts +1 -0
- package/build/dex/inception/utils.js +22 -1
- package/build/dex/inception/utils.js.map +1 -1
- package/build/dex/index.js +4 -0
- package/build/dex/index.js.map +1 -1
- package/build/dex/lido.d.ts +19 -0
- package/build/dex/lido.js +42 -0
- package/build/dex/lido.js.map +1 -0
- package/build/dex/maker-psm/scripts/gem.abi.json +136 -0
- package/build/dex/maker-psm/scripts/validate-state.d.ts +0 -0
- package/build/dex/maker-psm/scripts/validate-state.js +185 -0
- package/build/dex/maker-psm/scripts/validate-state.js.map +1 -0
- package/build/dex/maker-psm/scripts/vat.abi.json +243 -0
- package/build/dex/onebit.d.ts +25 -0
- package/build/dex/onebit.js +42 -0
- package/build/dex/onebit.js.map +1 -0
- package/build/dex/platypus/platypus.js +17 -3
- package/build/dex/platypus/platypus.js.map +1 -1
- package/build/dex/smoothy.d.ts +26 -0
- package/build/dex/smoothy.js +48 -0
- package/build/dex/smoothy.js.map +1 -0
- package/build/dex/solidly-v3/scripts/check-event-pool-event.d.ts +1 -0
- package/build/dex/solidly-v3/scripts/check-event-pool-event.js +53 -0
- package/build/dex/solidly-v3/scripts/check-event-pool-event.js.map +1 -0
- package/build/dex/stable-pool.d.ts +28 -0
- package/build/dex/stable-pool.js +55 -0
- package/build/dex/stable-pool.js.map +1 -0
- package/build/dex/stkgho/config.js +2 -2
- package/build/dex/stkgho/config.js.map +1 -1
- package/build/dex/swaap-v1/swaap-v1.js +4 -0
- package/build/dex/swaap-v1/swaap-v1.js.map +1 -1
- package/build/dex/trader-joe-v2.1/trader-joe-v2.1-new.d.ts +7 -0
- package/build/dex/trader-joe-v2.1/trader-joe-v2.1-new.js +20 -0
- package/build/dex/trader-joe-v2.1/trader-joe-v2.1-new.js.map +1 -0
- package/build/dex/trader-joe-v2.1.d.ts +43 -0
- package/build/dex/trader-joe-v2.1.js +79 -0
- package/build/dex/trader-joe-v2.1.js.map +1 -0
- package/build/dex/uniswap-v3/forks/alien-base-v3/alien-base-v3.d.ts +17 -0
- package/build/dex/uniswap-v3/forks/alien-base-v3/alien-base-v3.js +64 -0
- package/build/dex/uniswap-v3/forks/alien-base-v3/alien-base-v3.js.map +1 -0
- package/build/dex/uniswap-v3/forks/alien-v3/alien-v3.d.ts +17 -0
- package/build/dex/uniswap-v3/forks/alien-v3/alien-v3.js +79 -0
- package/build/dex/uniswap-v3/forks/alien-v3/alien-v3.js.map +1 -0
- package/build/dex/uniswap-v3/uniswap-v3-pricing.d.ts +4 -0
- package/build/dex/uniswap-v3/uniswap-v3-pricing.js +43 -0
- package/build/dex/uniswap-v3/uniswap-v3-pricing.js.map +1 -0
- package/build/dex/uniswap-v3/uniswap-v3-worker.d.ts +1 -0
- package/build/dex/uniswap-v3/uniswap-v3-worker.js +10 -0
- package/build/dex/uniswap-v3/uniswap-v3-worker.js.map +1 -0
- package/build/dex/usual/usual-m-smart-m.d.ts +17 -0
- package/build/dex/usual/usual-m-smart-m.js +50 -0
- package/build/dex/usual/usual-m-smart-m.js.map +1 -0
- package/build/dex/usual/usual.js +1 -1
- package/build/dex/usual/usual.js.map +1 -1
- package/build/dex/usual-m-smart-m/config.d.ts +3 -0
- package/build/dex/usual-m-smart-m/config.js +13 -0
- package/build/dex/usual-m-smart-m/config.js.map +1 -0
- package/build/dex/usual-m-smart-m/types.d.ts +7 -0
- package/build/dex/usual-m-smart-m/types.js +3 -0
- package/build/dex/usual-m-smart-m/types.js.map +1 -0
- package/build/dex/usual-m-smart-m/usual-m-smart-m.d.ts +35 -0
- package/build/dex/usual-m-smart-m/usual-m-smart-m.js +161 -0
- package/build/dex/usual-m-smart-m/usual-m-smart-m.js.map +1 -0
- package/build/dex/usual-m-usd0/config.d.ts +3 -0
- package/build/dex/usual-m-usd0/config.js +14 -0
- package/build/dex/usual-m-usd0/config.js.map +1 -0
- package/build/dex/usual-m-usd0/types.d.ts +8 -0
- package/build/dex/usual-m-usd0/types.js +3 -0
- package/build/dex/usual-m-usd0/types.js.map +1 -0
- package/build/dex/usual-m-usd0/usual-m-usd0.d.ts +35 -0
- package/build/dex/usual-m-usd0/usual-m-usd0.js +159 -0
- package/build/dex/usual-m-usd0/usual-m-usd0.js.map +1 -0
- package/build/dex/usual-pp/config.d.ts +3 -0
- package/build/dex/usual-pp/config.js +19 -0
- package/build/dex/usual-pp/config.js.map +1 -0
- package/build/dex/usual-pp/pool.d.ts +17 -0
- package/build/dex/usual-pp/pool.js +57 -0
- package/build/dex/usual-pp/pool.js.map +1 -0
- package/build/dex/usual-pp/types.d.ts +15 -0
- package/build/dex/usual-pp/types.js +3 -0
- package/build/dex/usual-pp/types.js.map +1 -0
- package/build/dex/usual-pp/usual-pp.d.ts +35 -0
- package/build/dex/usual-pp/usual-pp.js +167 -0
- package/build/dex/usual-pp/usual-pp.js.map +1 -0
- package/build/dex/usual-pp/utils.d.ts +4 -0
- package/build/dex/usual-pp/utils.js +18 -0
- package/build/dex/usual-pp/utils.js.map +1 -0
- package/package.json +2 -2
- package/src/abi/aavev3statav2/Factory.json +131 -0
- package/src/abi/aavev3statav2/Pool.json +1459 -0
- package/src/abi/aavev3statav2/Token.json +997 -0
- package/src/abi/usual-pp/abi.json +750 -0
- package/src/dex/aave-gsm/config.ts +3 -3
- package/src/dex/aave-v2/tokenlist.json +904 -0
- package/src/dex/aave-v2/tokens.ts +3 -4
- package/src/dex/aave-v3/config.ts +6 -7
- package/src/dex/aave-v3-stata-v2/aave-v3-stata-v2-e2e.test.ts +397 -0
- package/src/dex/aave-v3-stata-v2/aave-v3-stata-v2-integration.test.ts +600 -0
- package/src/dex/aave-v3-stata-v2/aave-v3-stata-v2.ts +477 -0
- package/src/dex/aave-v3-stata-v2/config.ts +24 -0
- package/src/dex/aave-v3-stata-v2/tokens.ts +48 -0
- package/src/dex/aave-v3-stata-v2/types.ts +41 -0
- package/src/dex/aave-v3-stata-v2/utils.ts +88 -0
- package/src/dex/fluid-dex/fluid-dex-e2e.test.ts +0 -10
- package/src/dex/index.ts +4 -0
- package/src/dex/stkgho/config.ts +3 -3
- package/src/dex/usual/usual.ts +1 -1
- package/src/dex/usual-pp/config.ts +18 -0
- package/src/dex/usual-pp/pool.ts +77 -0
- package/src/dex/usual-pp/types.ts +12 -0
- package/src/dex/usual-pp/usual-events.test.ts +70 -0
- package/src/dex/usual-pp/usual-integration.test.ts +143 -0
- package/src/dex/usual-pp/usual-pp.e2e.test.ts +76 -0
- package/src/dex/usual-pp/usual-pp.ts +207 -0
- package/src/dex/usual-pp/utils.ts +27 -0
- package/tests/constants-e2e.ts +11 -1
- package/build/abi/Aave_GSM.json +0 -751
- package/build/abi/Balancer.json +0 -257
- package/build/abi/BalancerV2.json +0 -1179
- package/build/abi/RamsesV2Pool.abi.json +0 -1554
- package/build/abi/RamsesV2Quoter.abi.json +0 -274
- package/build/abi/UniswapV2Router.json +0 -397
- package/build/abi/angle-transmuter/ChainlinkEACAggregatorProxy.json +0 -509
- package/build/abi/curve-v1/CurveBUSDv2.abi.json +0 -1356
- package/build/abi/curve-v1/CurveTokenV1.json +0 -305
- package/build/abi/curve-v1/CurveTokenV2.json +0 -318
- package/build/abi/curve-v1/CurveV1StableNg.json +0 -1452
- package/build/abi/curve-v1/CurveV2Swap.json +0 -700
- package/build/abi/curve-v1/FactoryCryptoRegistry.json +0 -316
- package/build/abi/curve-v1/FactoryRegistry.json +0 -508
- package/build/abi/curve-v1/StableSwapAave.json +0 -1152
- package/build/abi/curve-v1/StableSwapBUSD.json +0 -814
- package/build/abi/curve-v1/StableSwapCompound.json +0 -814
- package/build/abi/curve-v1/StableSwapIDLE.json +0 -1253
- package/build/abi/curve-v1/StableSwapPax.json +0 -865
- package/build/abi/curve-v1/StableSwapSnow.json +0 -900
- package/build/abi/curve-v1/StableSwapUSDN.json +0 -1004
- package/build/abi/curve-v1/StableSwapUSDT.json +0 -814
- package/build/abi/curve-v1/StableSwapY.json +0 -814
- package/build/abi/inception/inception-ineth.json +0 -609
- package/build/abi/kyberdmm/kyber-storage.abi.json +0 -824
- package/build/abi/kyberdmm.abi.json +0 -1148
- package/build/abi/maverick-v2/MaverickV2Quoter.json +0 -278
- package/build/abi/nerve/nerve-metapool.json +0 -790
- package/build/abi/uniswap-v3/UniswapV3Quoter.abi.json +0 -193
- package/build/abi/velodrome-slipstream/VelodromeSlipstreamQuoterV2.abi.json +0 -267
- package/build/dex/balancer-v1/balancer-pools.json +0 -33333
- package/build/dex/bebop/websocket-fetcher.d.ts +0 -35
- package/build/dex/bebop/websocket-fetcher.js +0 -87
- package/build/dex/bebop/websocket-fetcher.js.map +0 -1
- package/build/dex/idle-dao/idle-dao-pool.d.ts +0 -56
- package/build/dex/idle-dao/idle-dao-pool.js +0 -176
- package/build/dex/idle-dao/idle-dao-pool.js.map +0 -1
- package/build/dex/idle-dao/idle-dao-pooling-pool.d.ts +0 -16
- package/build/dex/idle-dao/idle-dao-pooling-pool.js +0 -57
- package/build/dex/idle-dao/idle-dao-pooling-pool.js.map +0 -1
- package/build/dex/idle-dao/scripts.d.ts +0 -9
- package/build/dex/idle-dao/scripts.js +0 -552
- package/build/dex/idle-dao/scripts.js.map +0 -1
- package/build/dex/inception/inception-native.d.ts +0 -43
- package/build/dex/inception/inception-native.js +0 -131
- package/build/dex/inception/inception-native.js.map +0 -1
- package/build/dex/inception/inception-pool.d.ts +0 -18
- package/build/dex/inception/inception-pool.js +0 -32
- package/build/dex/inception/inception-pool.js.map +0 -1
- package/build/dex/inception/inception-price-feed.d.ts +0 -19
- package/build/dex/inception/inception-price-feed.js +0 -51
- package/build/dex/inception/inception-price-feed.js.map +0 -1
- package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-balancerv1-curvev1-eth-usdc-gusd.json +0 -16
- package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-balancerv1-sushiv3-wbtc-eth-sushi.json +0 -16
- package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-curvev1-eth-usdc-gusd.json +0 -16
- package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-curvev1-gusd-usdc-eth.json +0 -16
- package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-dai-usdc-eth.json +0 -16
- package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-eth-usdc-dai.json +0 -16
- package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-usdc-eth-wbtc.json +0 -16
- package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-usdt-usdc-dai.json +0 -16
- package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-balancerv1-eth-usdc.json +0 -9
- package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-balancerv1-usdc-eth.json +0 -9
- package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-balancerv1-usdc-wbtc.json +0 -9
- package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-curvev1-eth-steth.json +0 -9
- package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-curvev1-steth-eth.json +0 -9
- package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-curvev1-usdc-usdt.json +0 -9
- package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-univ3-eth-usdc.json +0 -9
- package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-univ3-usdc-eth.json +0 -9
- package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-univ3-usdc-usdt.json +0 -9
- package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-balancerv1-sushiv3-wbtc-eth-sushi.json +0 -12
- package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-curvev1-eth-usdc-gusd.json +0 -7
- package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-curvev1-gusd-usdc-eth.json +0 -7
- package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-dai-usdc-eth.json +0 -7
- package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-eth-usdc-dai.json +0 -7
- package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-usdc-eth-wbtc.json +0 -12
- package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-simpleSwap-univ3-eth-usdc.json +0 -7
- package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-simpleSwap-univ3-usdc-eth.json +0 -7
- package/build/executor/fixtures/executor01/routes/price-route-multiswap-balancerv1-curvev1-eth-usdc-gusd.json +0 -78
- package/build/executor/fixtures/executor01/routes/price-route-multiswap-balancerv1-sushiv3-wbtc-eth-sushi.json +0 -81
- package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-curvev1-eth-usdc-gusd.json +0 -78
- package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-curvev1-gusd-usdc-eth.json +0 -78
- package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-dai-usdc-eth.json +0 -81
- package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-eth-usdc-dai.json +0 -81
- package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-usdc-eth-wbtc.json +0 -81
- package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-usdt-usdc-dai.json +0 -81
- package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-balancerv1-eth-usdc.json +0 -64
- package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-balancerv1-usdc-eth.json +0 -85
- package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-balancerv1-usdc-wbtc.json +0 -64
- package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-curvev1-eth-steth.json +0 -52
- package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-curvev1-steth-eth.json +0 -52
- package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-curvev1-usdc-usdt.json +0 -52
- package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-univ3-eth-usdc.json +0 -55
- package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-univ3-usdc-eth.json +0 -55
- package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-univ3-usdc-usdt.json +0 -55
- package/build/executor/fixtures/executor02/exchange-params/price-route-multiSwap-balancerv1-sushiv3-univ3-bal-eth-sushi.json +0 -23
- package/build/executor/fixtures/executor02/exchange-params/price-route-multiSwap-maverickv1-sushiv3-univ3-eth-usdc-mav.json +0 -37
- package/build/executor/fixtures/executor02/exchange-params/price-route-multiSwap-univ3-sushiv3-sushi-eth-wbtc.json +0 -23
- package/build/executor/fixtures/executor02/exchange-params/price-route-multiSwap-univ3-sushiv3-wbtc-eth-sushi.json +0 -23
- package/build/executor/fixtures/executor02/exchange-params/price-route-multiswap-curvev1-univ3-dai-usdc-eth.json +0 -51
- package/build/executor/fixtures/executor02/exchange-params/price-route-multiswap-univ3-usdt-dai-eth.json +0 -58
- package/build/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-sushiv3-balancerv1-eth-usdc.json +0 -23
- package/build/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-sushiv3-balancerv1-usdc-eth.json +0 -23
- package/build/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-sushiv3-univ3-eth-sushi.json +0 -9
- package/build/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-sushiv3-univ3-sushi-eth.json +0 -16
- package/build/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-univ3-curvev1-usdt-dai.json +0 -23
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiSwap-balancerv1-sushiv3-univ3-bal-eth-sushi.json +0 -12
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiSwap-maverickv1-sushiv3-univ3-eth-usdc-mav.json +0 -7
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiSwap-univ3-sushiv3-sushi-eth-wbtc.json +0 -12
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiSwap-univ3-sushiv3-wbtc-eth-sushi.json +0 -12
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiswap-curvev1-univ3-dai-usdc-eth.json +0 -7
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiswap-univ3-usdt-dai-eth.json +0 -7
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-simpleSwap-sushiv3-balancerv1-eth-usdc.json +0 -7
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-simpleSwap-sushiv3-balancerv1-usdc-eth.json +0 -7
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-simpleSwap-sushiv3-univ3-eth-sushi.json +0 -7
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-simpleSwap-sushiv3-univ3-sushi-eth.json +0 -7
- package/build/executor/fixtures/executor02/routes/price-route-multiSwap-balancerv1-sushiv3-univ3-bal-eth-sushi.json +0 -130
- package/build/executor/fixtures/executor02/routes/price-route-multiSwap-maverickv1-sushiv3-univ3-eth-usdc-mav.json +0 -136
- package/build/executor/fixtures/executor02/routes/price-route-multiSwap-univ3-sushiv3-sushi-eth-wbtc.json +0 -100
- package/build/executor/fixtures/executor02/routes/price-route-multiSwap-univ3-sushiv3-wbtc-eth-sushi.json +0 -100
- package/build/executor/fixtures/executor02/routes/price-route-multiswap-curvev1-univ3-dai-usdc-eth.json +0 -166
- package/build/executor/fixtures/executor02/routes/price-route-multiswap-univ3-usdt-dai-eth.json +0 -190
- package/build/executor/fixtures/executor02/routes/price-route-simpleSwap-sushiv3-balancerv1-eth-usdc.json +0 -114
- package/build/executor/fixtures/executor02/routes/price-route-simpleSwap-sushiv3-balancerv1-usdc-eth.json +0 -114
- package/build/executor/fixtures/executor02/routes/price-route-simpleSwap-sushiv3-univ3-eth-sushi.json +0 -55
- package/build/executor/fixtures/executor02/routes/price-route-simpleSwap-sushiv3-univ3-sushi-eth.json +0 -73
- package/build/executor/fixtures/executor02/routes/price-route-simpleSwap-univ3-curvev1-usdt-dai.json +0 -82
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { aToken, Token } from '../../types';
|
|
2
2
|
import { Network } from '../../constants';
|
|
3
|
-
import
|
|
3
|
+
import tokens from './tokenlist.json';
|
|
4
4
|
import { aaveLendingPool } from './config';
|
|
5
5
|
|
|
6
6
|
function getTokensForPool(pool: string): aToken[] {
|
|
7
|
-
return
|
|
7
|
+
return tokens
|
|
8
8
|
.filter(
|
|
9
9
|
token =>
|
|
10
10
|
token.extensions?.pool &&
|
|
11
|
-
token.extensions?.pool.toLowerCase() === pool.toLowerCase()
|
|
12
|
-
token.tags.includes('aTokenV2'),
|
|
11
|
+
token.extensions?.pool.toLowerCase() === pool.toLowerCase(),
|
|
13
12
|
)
|
|
14
13
|
.map(token => ({
|
|
15
14
|
aSymbol: token.symbol,
|
|
@@ -10,7 +10,6 @@ import {
|
|
|
10
10
|
AaveV3Fantom,
|
|
11
11
|
AaveV3Optimism,
|
|
12
12
|
AaveV3Polygon,
|
|
13
|
-
AaveV3PolygonZkEvm,
|
|
14
13
|
AaveV3Gnosis,
|
|
15
14
|
} from '@bgd-labs/aave-address-book';
|
|
16
15
|
|
|
@@ -65,12 +64,12 @@ export const Config: DexConfigMap<DexParam> = {
|
|
|
65
64
|
poolAddress: AaveV3BNB.POOL,
|
|
66
65
|
wethGatewayAddress: AaveV3BNB.WETH_GATEWAY,
|
|
67
66
|
},
|
|
68
|
-
[Network.ZKEVM]: {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
},
|
|
67
|
+
// [Network.ZKEVM]: {
|
|
68
|
+
// ethGasCost: 246 * 100,
|
|
69
|
+
// lendingGasCost: 328 * 1000,
|
|
70
|
+
// poolAddress: AaveV3PolygonZkEvm.POOL,
|
|
71
|
+
// wethGatewayAddress: AaveV3PolygonZkEvm.WETH_GATEWAY,
|
|
72
|
+
// },
|
|
74
73
|
[Network.GNOSIS]: {
|
|
75
74
|
ethGasCost: 246 * 100,
|
|
76
75
|
lendingGasCost: 328 * 1000,
|
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
/* eslint-disable no-console */
|
|
2
|
+
import dotenv from 'dotenv';
|
|
3
|
+
dotenv.config();
|
|
4
|
+
|
|
5
|
+
import { testE2E } from '../../../tests/utils-e2e';
|
|
6
|
+
import { Tokens, Holders } from '../../../tests/constants-e2e';
|
|
7
|
+
import { Network, ContractMethod, SwapSide } from '../../constants';
|
|
8
|
+
import { StaticJsonRpcProvider } from '@ethersproject/providers';
|
|
9
|
+
import { generateConfig } from '../../config';
|
|
10
|
+
|
|
11
|
+
function testForNetwork(
|
|
12
|
+
network: Network,
|
|
13
|
+
dexKey: string,
|
|
14
|
+
tokenASymbol: string,
|
|
15
|
+
tokenBSymbol: string,
|
|
16
|
+
tokenAAmount: string,
|
|
17
|
+
tokenBAmount: string,
|
|
18
|
+
skipBuy: boolean = false, // BUY is not supported for aToken <-> stataToken
|
|
19
|
+
) {
|
|
20
|
+
const provider = new StaticJsonRpcProvider(
|
|
21
|
+
generateConfig(network).privateHttpProvider,
|
|
22
|
+
network,
|
|
23
|
+
);
|
|
24
|
+
const tokens = Tokens[network];
|
|
25
|
+
const holders = Holders[network];
|
|
26
|
+
|
|
27
|
+
const sideToContractMethods = new Map([
|
|
28
|
+
[SwapSide.SELL, [ContractMethod.swapExactAmountIn]],
|
|
29
|
+
[SwapSide.BUY, [ContractMethod.swapExactAmountOut]],
|
|
30
|
+
]);
|
|
31
|
+
|
|
32
|
+
sideToContractMethods.forEach((contractMethods, side) =>
|
|
33
|
+
describe(`${side}`, () => {
|
|
34
|
+
contractMethods.forEach((contractMethod: ContractMethod) => {
|
|
35
|
+
if (contractMethod === ContractMethod.swapExactAmountOut && skipBuy) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
describe(`${contractMethod}`, () => {
|
|
39
|
+
it(`${tokenASymbol} -> ${tokenBSymbol}`, async () => {
|
|
40
|
+
await testE2E(
|
|
41
|
+
tokens[tokenASymbol],
|
|
42
|
+
tokens[tokenBSymbol],
|
|
43
|
+
holders[tokenASymbol],
|
|
44
|
+
side === SwapSide.SELL ? tokenAAmount : tokenBAmount,
|
|
45
|
+
side,
|
|
46
|
+
dexKey,
|
|
47
|
+
contractMethod,
|
|
48
|
+
network,
|
|
49
|
+
provider,
|
|
50
|
+
);
|
|
51
|
+
});
|
|
52
|
+
it(`${tokenBSymbol} -> ${tokenASymbol}`, async () => {
|
|
53
|
+
await testE2E(
|
|
54
|
+
tokens[tokenBSymbol],
|
|
55
|
+
tokens[tokenASymbol],
|
|
56
|
+
holders[tokenBSymbol],
|
|
57
|
+
side === SwapSide.SELL ? tokenBAmount : tokenAAmount,
|
|
58
|
+
side,
|
|
59
|
+
dexKey,
|
|
60
|
+
contractMethod,
|
|
61
|
+
network,
|
|
62
|
+
provider,
|
|
63
|
+
);
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
}),
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
describe('AaveV3Stata E2E', () => {
|
|
72
|
+
const dexKey = 'AaveV3StataV2';
|
|
73
|
+
|
|
74
|
+
describe('Mainnet', () => {
|
|
75
|
+
const network = Network.MAINNET;
|
|
76
|
+
|
|
77
|
+
const pairs: { name: string; amount: string; skipBuy?: boolean }[][] = [
|
|
78
|
+
[
|
|
79
|
+
{
|
|
80
|
+
name: 'USDT',
|
|
81
|
+
amount: '100000',
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: 'waEthUSDT',
|
|
85
|
+
amount: '100000',
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
[
|
|
89
|
+
{
|
|
90
|
+
name: 'aaveUSDT',
|
|
91
|
+
amount: '100000',
|
|
92
|
+
skipBuy: true,
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
name: 'waEthUSDT',
|
|
96
|
+
amount: '100000',
|
|
97
|
+
},
|
|
98
|
+
],
|
|
99
|
+
];
|
|
100
|
+
|
|
101
|
+
pairs.forEach(pair => {
|
|
102
|
+
testForNetwork(
|
|
103
|
+
network,
|
|
104
|
+
dexKey,
|
|
105
|
+
pair[0].name,
|
|
106
|
+
pair[1].name,
|
|
107
|
+
pair[0].amount,
|
|
108
|
+
pair[1].amount,
|
|
109
|
+
pair[0].skipBuy,
|
|
110
|
+
);
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
describe('Gnosis', () => {
|
|
115
|
+
const network = Network.GNOSIS;
|
|
116
|
+
|
|
117
|
+
const pairs: { name: string; amount: string; skipBuy?: boolean }[][] = [
|
|
118
|
+
[
|
|
119
|
+
{
|
|
120
|
+
name: 'waGnowstETH',
|
|
121
|
+
amount: '100000',
|
|
122
|
+
skipBuy: true,
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
name: 'wstETH',
|
|
126
|
+
amount: '100000',
|
|
127
|
+
},
|
|
128
|
+
],
|
|
129
|
+
[
|
|
130
|
+
{
|
|
131
|
+
name: 'waGnoWETH',
|
|
132
|
+
amount: '100000',
|
|
133
|
+
skipBuy: true,
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
name: 'WETH',
|
|
137
|
+
amount: '100000',
|
|
138
|
+
},
|
|
139
|
+
],
|
|
140
|
+
];
|
|
141
|
+
|
|
142
|
+
pairs.forEach(pair => {
|
|
143
|
+
testForNetwork(
|
|
144
|
+
network,
|
|
145
|
+
dexKey,
|
|
146
|
+
pair[0].name,
|
|
147
|
+
pair[1].name,
|
|
148
|
+
pair[0].amount,
|
|
149
|
+
pair[1].amount,
|
|
150
|
+
pair[0].skipBuy,
|
|
151
|
+
);
|
|
152
|
+
});
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
// polygon is not yet live
|
|
156
|
+
describe.skip('Polygon', () => {
|
|
157
|
+
const network = Network.POLYGON;
|
|
158
|
+
|
|
159
|
+
const pairs: { name: string; amount: string; skipBuy?: boolean }[][] = [
|
|
160
|
+
[
|
|
161
|
+
{
|
|
162
|
+
name: 'USDCn',
|
|
163
|
+
amount: '100000',
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
name: 'stataUSDCn',
|
|
167
|
+
amount: '100000',
|
|
168
|
+
},
|
|
169
|
+
],
|
|
170
|
+
[
|
|
171
|
+
{
|
|
172
|
+
name: 'aaveUSDCn',
|
|
173
|
+
amount: '100000',
|
|
174
|
+
skipBuy: true,
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
name: 'stataUSDCn',
|
|
178
|
+
amount: '100000',
|
|
179
|
+
},
|
|
180
|
+
],
|
|
181
|
+
];
|
|
182
|
+
|
|
183
|
+
pairs.forEach(pair => {
|
|
184
|
+
testForNetwork(
|
|
185
|
+
network,
|
|
186
|
+
dexKey,
|
|
187
|
+
pair[0].name,
|
|
188
|
+
pair[1].name,
|
|
189
|
+
pair[0].amount,
|
|
190
|
+
pair[1].amount,
|
|
191
|
+
pair[0].skipBuy,
|
|
192
|
+
);
|
|
193
|
+
});
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
// TODO: No holders yet
|
|
197
|
+
// describe('Avalanche', () => {
|
|
198
|
+
// const network = Network.AVALANCHE;
|
|
199
|
+
|
|
200
|
+
// const pairs: { name: string; amount: string; skipBuy?: boolean }[][] = [
|
|
201
|
+
// [
|
|
202
|
+
// {
|
|
203
|
+
// name: 'USDT',
|
|
204
|
+
// amount: '100000',
|
|
205
|
+
// },
|
|
206
|
+
// {
|
|
207
|
+
// name: 'stataUSDT',
|
|
208
|
+
// amount: '100000',
|
|
209
|
+
// },
|
|
210
|
+
// ],
|
|
211
|
+
// [
|
|
212
|
+
// {
|
|
213
|
+
// name: 'aaveUSDT',
|
|
214
|
+
// amount: '100000',
|
|
215
|
+
// skipBuy: true,
|
|
216
|
+
// },
|
|
217
|
+
// {
|
|
218
|
+
// name: 'stataUSDT',
|
|
219
|
+
// amount: '100000',
|
|
220
|
+
// },
|
|
221
|
+
// ],
|
|
222
|
+
// ];
|
|
223
|
+
|
|
224
|
+
// pairs.forEach(pair => {
|
|
225
|
+
// testForNetwork(
|
|
226
|
+
// network,
|
|
227
|
+
// dexKey,
|
|
228
|
+
// pair[0].name,
|
|
229
|
+
// pair[1].name,
|
|
230
|
+
// pair[0].amount,
|
|
231
|
+
// pair[1].amount,
|
|
232
|
+
// pair[0].skipBuy,
|
|
233
|
+
// );
|
|
234
|
+
// });
|
|
235
|
+
// });
|
|
236
|
+
|
|
237
|
+
describe.skip('Arbitrum', () => {
|
|
238
|
+
const network = Network.ARBITRUM;
|
|
239
|
+
|
|
240
|
+
const pairs: { name: string; amount: string; skipBuy?: boolean }[][] = [
|
|
241
|
+
[
|
|
242
|
+
{
|
|
243
|
+
name: 'USDT',
|
|
244
|
+
amount: '100000',
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
name: 'stataUSDT',
|
|
248
|
+
amount: '100000',
|
|
249
|
+
},
|
|
250
|
+
],
|
|
251
|
+
[
|
|
252
|
+
{
|
|
253
|
+
name: 'aaveUSDT',
|
|
254
|
+
amount: '100000',
|
|
255
|
+
skipBuy: true,
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
name: 'stataUSDT',
|
|
259
|
+
amount: '100000',
|
|
260
|
+
},
|
|
261
|
+
],
|
|
262
|
+
];
|
|
263
|
+
|
|
264
|
+
pairs.forEach(pair => {
|
|
265
|
+
testForNetwork(
|
|
266
|
+
network,
|
|
267
|
+
dexKey,
|
|
268
|
+
pair[0].name,
|
|
269
|
+
pair[1].name,
|
|
270
|
+
pair[0].amount,
|
|
271
|
+
pair[1].amount,
|
|
272
|
+
pair[0].skipBuy,
|
|
273
|
+
);
|
|
274
|
+
});
|
|
275
|
+
});
|
|
276
|
+
|
|
277
|
+
describe.skip('Optimism', () => {
|
|
278
|
+
const network = Network.OPTIMISM;
|
|
279
|
+
|
|
280
|
+
const pairs: { name: string; amount: string; skipBuy?: boolean }[][] = [
|
|
281
|
+
[
|
|
282
|
+
{
|
|
283
|
+
name: 'USDT',
|
|
284
|
+
amount: '100000',
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
name: 'stataUSDT',
|
|
288
|
+
amount: '100000',
|
|
289
|
+
},
|
|
290
|
+
],
|
|
291
|
+
[
|
|
292
|
+
{
|
|
293
|
+
name: 'aaveUSDT',
|
|
294
|
+
amount: '100000',
|
|
295
|
+
skipBuy: true,
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
name: 'stataUSDT',
|
|
299
|
+
amount: '100000',
|
|
300
|
+
},
|
|
301
|
+
],
|
|
302
|
+
];
|
|
303
|
+
|
|
304
|
+
pairs.forEach(pair => {
|
|
305
|
+
testForNetwork(
|
|
306
|
+
network,
|
|
307
|
+
dexKey,
|
|
308
|
+
pair[0].name,
|
|
309
|
+
pair[1].name,
|
|
310
|
+
pair[0].amount,
|
|
311
|
+
pair[1].amount,
|
|
312
|
+
pair[0].skipBuy,
|
|
313
|
+
);
|
|
314
|
+
});
|
|
315
|
+
});
|
|
316
|
+
|
|
317
|
+
describe.skip('Base', () => {
|
|
318
|
+
const network = Network.BASE;
|
|
319
|
+
|
|
320
|
+
const pairs: { name: string; amount: string; skipBuy?: boolean }[][] = [
|
|
321
|
+
[
|
|
322
|
+
{
|
|
323
|
+
name: 'USDC',
|
|
324
|
+
amount: '100000',
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
name: 'stataUSDC',
|
|
328
|
+
amount: '100000',
|
|
329
|
+
},
|
|
330
|
+
],
|
|
331
|
+
[
|
|
332
|
+
{
|
|
333
|
+
name: 'aaveUSDC',
|
|
334
|
+
amount: '100000',
|
|
335
|
+
skipBuy: true,
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
name: 'stataUSDC',
|
|
339
|
+
amount: '100000',
|
|
340
|
+
},
|
|
341
|
+
],
|
|
342
|
+
];
|
|
343
|
+
|
|
344
|
+
pairs.forEach(pair => {
|
|
345
|
+
testForNetwork(
|
|
346
|
+
network,
|
|
347
|
+
dexKey,
|
|
348
|
+
pair[0].name,
|
|
349
|
+
pair[1].name,
|
|
350
|
+
pair[0].amount,
|
|
351
|
+
pair[1].amount,
|
|
352
|
+
pair[0].skipBuy,
|
|
353
|
+
);
|
|
354
|
+
});
|
|
355
|
+
});
|
|
356
|
+
|
|
357
|
+
// TODO: No holders yet
|
|
358
|
+
// describe('Bsc', () => {
|
|
359
|
+
// const network = Network.BSC;
|
|
360
|
+
|
|
361
|
+
// const pairs: { name: string; amount: string; skipBuy?: boolean }[][] = [
|
|
362
|
+
// [
|
|
363
|
+
// {
|
|
364
|
+
// name: 'USDT',
|
|
365
|
+
// amount: '100000',
|
|
366
|
+
// },
|
|
367
|
+
// {
|
|
368
|
+
// name: 'stataUSDT',
|
|
369
|
+
// amount: '100000',
|
|
370
|
+
// },
|
|
371
|
+
// ],
|
|
372
|
+
// [
|
|
373
|
+
// {
|
|
374
|
+
// name: 'aaveUSDT',
|
|
375
|
+
// amount: '100000',
|
|
376
|
+
// skipBuy: true,
|
|
377
|
+
// },
|
|
378
|
+
// {
|
|
379
|
+
// name: 'stataUSDT',
|
|
380
|
+
// amount: '100000',
|
|
381
|
+
// },
|
|
382
|
+
// ],
|
|
383
|
+
// ];
|
|
384
|
+
|
|
385
|
+
// pairs.forEach(pair => {
|
|
386
|
+
// testForNetwork(
|
|
387
|
+
// network,
|
|
388
|
+
// dexKey,
|
|
389
|
+
// pair[0].name,
|
|
390
|
+
// pair[1].name,
|
|
391
|
+
// pair[0].amount,
|
|
392
|
+
// pair[1].amount,
|
|
393
|
+
// pair[0].skipBuy,
|
|
394
|
+
// );
|
|
395
|
+
// });
|
|
396
|
+
// });
|
|
397
|
+
});
|