@paraswap/dex-lib 2.45.0 → 3.0.0
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/.github/workflows/release-package.yml +32 -0
- package/.vscode/launch.json +72 -0
- package/.vscode/settings.json +2 -0
- package/.vscode/tasks.json +15 -0
- package/build/abi/AugustusV6.abi.json +1454 -0
- package/build/abi/augustus-v6/ABI.json +1075 -0
- package/build/config.d.ts +1 -0
- package/build/config.js +53 -1
- package/build/config.js.map +1 -1
- package/build/constants.d.ts +6 -0
- package/build/constants.js +9 -2
- package/build/constants.js.map +1 -1
- package/build/dex/aave-v1/aave-v1.d.ts +2 -1
- package/build/dex/aave-v1/aave-v1.js +22 -0
- package/build/dex/aave-v1/aave-v1.js.map +1 -1
- package/build/dex/aave-v2/aave-v2.d.ts +2 -1
- package/build/dex/aave-v2/aave-v2.js +80 -0
- package/build/dex/aave-v2/aave-v2.js.map +1 -1
- package/build/dex/aave-v3/aave-v3.d.ts +3 -1
- package/build/dex/aave-v3/aave-v3.js +39 -0
- package/build/dex/aave-v3/aave-v3.js.map +1 -1
- package/build/dex/algebra/algebra.d.ts +2 -1
- package/build/dex/algebra/algebra.js +52 -1
- package/build/dex/algebra/algebra.js.map +1 -1
- package/build/dex/algebra/scripts/validate-state-v1-1.d.ts +1 -0
- package/build/dex/algebra/scripts/validate-state-v1-1.js +206 -0
- package/build/dex/algebra/scripts/validate-state-v1-1.js.map +1 -0
- package/build/dex/augustus-approvals-helper.d.ts +22 -0
- package/build/dex/augustus-approvals-helper.js +110 -0
- package/build/dex/augustus-approvals-helper.js.map +1 -0
- package/build/dex/augustus-approvals.d.ts +24 -0
- package/build/dex/augustus-approvals.js +106 -0
- package/build/dex/augustus-approvals.js.map +1 -0
- package/build/dex/bProtocol/bProtocol.d.ts +15 -0
- package/build/dex/bProtocol/bProtocol.js +51 -0
- package/build/dex/bProtocol/bProtocol.js.map +1 -0
- package/build/dex/bProtocol/types.d.ts +11 -0
- package/build/dex/bProtocol/types.js +8 -0
- package/build/dex/bProtocol/types.js.map +1 -0
- package/build/dex/bProtocol.d.ts +2 -1
- package/build/dex/bProtocol.js +15 -0
- package/build/dex/bProtocol.js.map +1 -1
- package/build/dex/balancer-v1/balancer-v1.d.ts +5 -3
- package/build/dex/balancer-v1/balancer-v1.js +72 -3
- package/build/dex/balancer-v1/balancer-v1.js.map +1 -1
- package/build/dex/balancer-v2/balancer-v2.d.ts +16 -4
- package/build/dex/balancer-v2/balancer-v2.js +154 -7
- package/build/dex/balancer-v2/balancer-v2.js.map +1 -1
- package/build/dex/balancer-v2/constants.d.ts +4 -0
- package/build/dex/balancer-v2/constants.js +6 -1
- package/build/dex/balancer-v2/constants.js.map +1 -1
- package/build/dex/balancer-v2/types.d.ts +11 -0
- package/build/dex/bancor/bancor.d.ts +15 -0
- package/build/dex/bancor/bancor.js +69 -0
- package/build/dex/bancor/bancor.js.map +1 -0
- package/build/dex/bancor/config.d.ts +6 -0
- package/build/dex/bancor/config.js +11 -0
- package/build/dex/bancor/config.js.map +1 -0
- package/build/dex/bancor/types.d.ts +16 -0
- package/build/dex/bancor/types.js +8 -0
- package/build/dex/bancor/types.js.map +1 -0
- package/build/dex/bancor.d.ts +2 -1
- package/build/dex/bancor.js +19 -0
- package/build/dex/bancor.js.map +1 -1
- package/build/dex/camelot/camelot.d.ts +3 -1
- package/build/dex/camelot/camelot.js +31 -0
- package/build/dex/camelot/camelot.js.map +1 -1
- package/build/dex/camelot/scripts/validate-state.d.ts +1 -0
- package/build/dex/camelot/scripts/validate-state.js +84 -0
- package/build/dex/camelot/scripts/validate-state.js.map +1 -0
- package/build/dex/compound/compound.d.ts +15 -0
- package/build/dex/compound/compound.js +54 -0
- package/build/dex/compound/compound.js.map +1 -0
- package/build/dex/compound/types.d.ts +8 -0
- package/build/dex/compound/types.js +9 -0
- package/build/dex/compound/types.js.map +1 -0
- package/build/dex/compound.d.ts +2 -1
- package/build/dex/compound.js +12 -0
- package/build/dex/compound.js.map +1 -1
- package/build/dex/curve-v1/constants.d.ts +1 -0
- package/build/dex/curve-v1/constants.js +2 -1
- package/build/dex/curve-v1/constants.js.map +1 -1
- package/build/dex/curve-v1/curve-v1.d.ts +10 -3
- package/build/dex/curve-v1/curve-v1.js +57 -7
- package/build/dex/curve-v1/curve-v1.js.map +1 -1
- package/build/dex/curve-v1/packer.d.ts +2 -0
- package/build/dex/curve-v1/packer.js +18 -0
- package/build/dex/curve-v1/packer.js.map +1 -0
- package/build/dex/curve-v1/types.d.ts +16 -0
- package/build/dex/curve-v1-factory/curve-v1-factory.d.ts +2 -1
- package/build/dex/curve-v1-factory/curve-v1-factory.js +19 -7
- package/build/dex/curve-v1-factory/curve-v1-factory.js.map +1 -1
- package/build/dex/curve-v1-factory/state-polling-pools/polling-manager.js +3 -1
- package/build/dex/curve-v1-factory/state-polling-pools/polling-manager.js.map +1 -1
- package/build/dex/curve-v2/constants.d.ts +1 -0
- package/build/dex/curve-v2/constants.js +5 -0
- package/build/dex/curve-v2/constants.js.map +1 -0
- package/build/dex/curve-v2/curve-v2.d.ts +61 -0
- package/build/dex/curve-v2/curve-v2.js +245 -0
- package/build/dex/curve-v2/curve-v2.js.map +1 -0
- package/build/dex/curve-v2/types.d.ts +24 -0
- package/build/dex/curve-v2/types.js +10 -0
- package/build/dex/curve-v2/types.js.map +1 -0
- package/build/dex/dexalot/dexalot.d.ts +2 -1
- package/build/dex/dexalot/dexalot.js +25 -0
- package/build/dex/dexalot/dexalot.js.map +1 -1
- package/build/dex/dodo-v1/config.d.ts +7 -0
- package/build/dex/dodo-v1/config.js +16 -0
- package/build/dex/dodo-v1/config.js.map +1 -0
- package/build/dex/dodo-v1/dodo-v1.d.ts +16 -0
- package/build/dex/dodo-v1/dodo-v1.js +71 -0
- package/build/dex/dodo-v1/dodo-v1.js.map +1 -0
- package/build/dex/dodo-v1/types.d.ts +22 -0
- package/build/dex/dodo-v1/types.js +8 -0
- package/build/dex/dodo-v1/types.js.map +1 -0
- package/build/dex/dodo-v1.d.ts +2 -1
- package/build/dex/dodo-v1.js +20 -0
- package/build/dex/dodo-v1.js.map +1 -1
- package/build/dex/dodo-v2.d.ts +2 -1
- package/build/dex/dodo-v2.js +54 -0
- package/build/dex/dodo-v2.js.map +1 -1
- package/build/dex/generic-rfq/e2e-test-config.js +50 -6
- package/build/dex/generic-rfq/e2e-test-config.js.map +1 -1
- package/build/dex/generic-rfq/fetch-mm-api.js +2 -2
- package/build/dex/generic-rfq/fetch-mm-api.js.map +1 -1
- package/build/dex/generic-rfq/generic-rfq.d.ts +10 -3
- package/build/dex/generic-rfq/generic-rfq.js +68 -10
- package/build/dex/generic-rfq/generic-rfq.js.map +1 -1
- package/build/dex/generic-rfq/rate-fetcher.js +2 -2
- package/build/dex/generic-rfq/rate-fetcher.js.map +1 -1
- package/build/dex/generic-rfq/test-v6/constants.d.ts +1 -0
- package/build/dex/generic-rfq/test-v6/constants.js +5 -0
- package/build/dex/generic-rfq/test-v6/constants.js.map +1 -0
- package/build/dex/generic-rfq/test-v6/get-config.d.ts +1 -0
- package/build/dex/generic-rfq/test-v6/get-config.js +63 -0
- package/build/dex/generic-rfq/test-v6/get-config.js.map +1 -0
- package/build/dex/generic-rfq/test-v6/types.d.ts +14 -0
- package/build/dex/generic-rfq/test-v6/types.js +3 -0
- package/build/dex/generic-rfq/test-v6/types.js.map +1 -0
- package/build/dex/generic-rfq/tokens.json +570 -0
- package/build/dex/generic-rfq/types.d.ts +14 -2
- package/build/dex/generic-rfq/types.js.map +1 -1
- package/build/dex/generic-rfq/utils.d.ts +1 -1
- package/build/dex/generic-rfq/utils.js +4 -7
- package/build/dex/generic-rfq/utils.js.map +1 -1
- package/build/dex/generic-rfq/validators.d.ts +1 -0
- package/build/dex/generic-rfq/validators.js +9 -12
- package/build/dex/generic-rfq/validators.js.map +1 -1
- package/build/dex/gmx/gmx.d.ts +2 -1
- package/build/dex/gmx/gmx.js +15 -0
- package/build/dex/gmx/gmx.js.map +1 -1
- package/build/dex/hashflow/hashflow.d.ts +2 -1
- package/build/dex/hashflow/hashflow.js +31 -1
- package/build/dex/hashflow/hashflow.js.map +1 -1
- package/build/dex/idex.d.ts +7 -1
- package/build/dex/index.d.ts +2 -0
- package/build/dex/index.js +23 -10
- package/build/dex/index.js.map +1 -1
- package/build/dex/jarvis-v6/jarvis-v6.d.ts +2 -1
- package/build/dex/jarvis-v6/jarvis-v6.js +24 -0
- package/build/dex/jarvis-v6/jarvis-v6.js.map +1 -1
- package/build/dex/jarvis.d.ts +2 -1
- package/build/dex/jarvis.js +50 -0
- package/build/dex/jarvis.js.map +1 -1
- package/build/dex/kyberdmm/kyberdmm.d.ts +2 -1
- package/build/dex/kyberdmm/kyberdmm.js +20 -0
- package/build/dex/kyberdmm/kyberdmm.js.map +1 -1
- package/build/dex/lido/config.d.ts +1 -0
- package/build/dex/lido/config.js +8 -0
- package/build/dex/lido/config.js.map +1 -0
- package/build/dex/lido/lido.d.ts +16 -0
- package/build/dex/lido/lido.js +46 -0
- package/build/dex/lido/lido.js.map +1 -0
- package/build/dex/lido/types.d.ts +4 -0
- package/build/dex/lido/types.js +8 -0
- package/build/dex/lido/types.js.map +1 -0
- package/build/dex/lido.d.ts +2 -1
- package/build/dex/lido.js +9 -0
- package/build/dex/lido.js.map +1 -1
- package/build/dex/maker-psm/maker-psm.d.ts +2 -1
- package/build/dex/maker-psm/maker-psm.js +27 -0
- package/build/dex/maker-psm/maker-psm.js.map +1 -1
- package/build/dex/maverick-v1/maverick-v1.d.ts +3 -1
- package/build/dex/maverick-v1/maverick-v1.js +35 -0
- package/build/dex/maverick-v1/maverick-v1.js.map +1 -1
- package/build/dex/nerve/nerve.d.ts +2 -1
- package/build/dex/nerve/nerve.js +19 -0
- package/build/dex/nerve/nerve.js.map +1 -1
- package/build/dex/onebit/onebit.d.ts +16 -0
- package/build/dex/onebit/onebit.js +56 -0
- package/build/dex/onebit/onebit.js.map +1 -0
- package/build/dex/onebit/types.d.ts +14 -0
- package/build/dex/onebit/types.js +8 -0
- package/build/dex/onebit/types.js.map +1 -0
- package/build/dex/onebit.d.ts +2 -1
- package/build/dex/onebit.js +17 -0
- package/build/dex/onebit.js.map +1 -1
- package/build/dex/pancakeswap-v3/pancakeswap-v3.d.ts +2 -1
- package/build/dex/pancakeswap-v3/pancakeswap-v3.js +30 -0
- package/build/dex/pancakeswap-v3/pancakeswap-v3.js.map +1 -1
- package/build/dex/paraswap-limit-orders/paraswap-limit-orders.d.ts +2 -1
- package/build/dex/paraswap-limit-orders/paraswap-limit-orders.js +15 -0
- package/build/dex/paraswap-limit-orders/paraswap-limit-orders.js.map +1 -1
- package/build/dex/paraswap-limit-orders/types.d.ts +1 -0
- package/build/dex/platypus/platypus.d.ts +2 -1
- package/build/dex/platypus/platypus.js +31 -0
- package/build/dex/platypus/platypus.js.map +1 -1
- package/build/dex/polygon-migrator/polygon-migrator.d.ts +2 -1
- package/build/dex/polygon-migrator/polygon-migrator.js +11 -0
- package/build/dex/polygon-migrator/polygon-migrator.js.map +1 -1
- package/build/dex/quick-perps/quick-perps.d.ts +2 -1
- package/build/dex/quick-perps/quick-perps.js +15 -0
- package/build/dex/quick-perps/quick-perps.js.map +1 -1
- package/build/dex/simple-exchange.d.ts +2 -5
- package/build/dex/simple-exchange.js +4 -32
- package/build/dex/simple-exchange.js.map +1 -1
- package/build/dex/smoothy/smoothy.d.ts +16 -0
- package/build/dex/smoothy/smoothy.js +58 -0
- package/build/dex/smoothy/smoothy.js.map +1 -0
- package/build/dex/smoothy/types.d.ts +15 -0
- package/build/dex/smoothy/types.js +8 -0
- package/build/dex/smoothy/types.js.map +1 -0
- package/build/dex/smoothy.d.ts +2 -1
- package/build/dex/smoothy.js +13 -0
- package/build/dex/smoothy.js.map +1 -1
- package/build/dex/solidly/solidly.d.ts +2 -1
- package/build/dex/solidly/solidly.js +30 -0
- package/build/dex/solidly/solidly.js.map +1 -1
- package/build/dex/solidly-v3/contract-math/Tick.js.map +1 -1
- package/build/dex/solidly-v3/contract-math/uniswap-v3-math.js +4 -4
- package/build/dex/solidly-v3/contract-math/uniswap-v3-math.js.map +1 -1
- package/build/dex/solidly-v3/solidly-v3.d.ts +2 -3
- package/build/dex/solidly-v3/solidly-v3.js +25 -37
- package/build/dex/solidly-v3/solidly-v3.js.map +1 -1
- package/build/dex/stable-pool/stable-pool.d.ts +16 -0
- package/build/dex/stable-pool/stable-pool.js +78 -0
- package/build/dex/stable-pool/stable-pool.js.map +1 -0
- package/build/dex/stable-pool/types.d.ts +17 -0
- package/build/dex/stable-pool/types.js +8 -0
- package/build/dex/stable-pool/types.js.map +1 -0
- package/build/dex/stable-pool.d.ts +2 -1
- package/build/dex/stable-pool.js +19 -0
- package/build/dex/stable-pool.js.map +1 -1
- package/build/dex/swaap-v1/swaap-v1.d.ts +2 -1
- package/build/dex/swaap-v1/swaap-v1.js +10 -0
- package/build/dex/swaap-v1/swaap-v1.js.map +1 -1
- package/build/dex/swaap-v2/rate-fetcher.d.ts +1 -1
- package/build/dex/swaap-v2/rate-fetcher.js +4 -4
- package/build/dex/swaap-v2/rate-fetcher.js.map +1 -1
- package/build/dex/swaap-v2/swaap-v2.d.ts +3 -1
- package/build/dex/swaap-v2/swaap-v2.js +17 -1
- package/build/dex/swaap-v2/swaap-v2.js.map +1 -1
- package/build/dex/swaap-v2/validators.d.ts +1 -0
- package/build/dex/swaap-v2/validators.js +9 -12
- package/build/dex/swaap-v2/validators.js.map +1 -1
- package/build/dex/swell/swell.d.ts +2 -1
- package/build/dex/swell/swell.js +12 -2
- package/build/dex/swell/swell.js.map +1 -1
- package/build/dex/synthetix/synthetix.d.ts +2 -1
- package/build/dex/synthetix/synthetix.js +24 -0
- package/build/dex/synthetix/synthetix.js.map +1 -1
- package/build/dex/trader-joe-v2.1/config.d.ts +4 -0
- package/build/dex/trader-joe-v2.1/config.js +11 -0
- package/build/dex/trader-joe-v2.1/config.js.map +1 -0
- package/build/dex/trader-joe-v2.1/trader-joe-v2.1.d.ts +19 -0
- package/build/dex/trader-joe-v2.1/trader-joe-v2.1.js +98 -0
- package/build/dex/trader-joe-v2.1/trader-joe-v2.1.js.map +1 -0
- package/build/dex/trader-joe-v2.1/types.d.ts +31 -0
- package/build/dex/trader-joe-v2.1/types.js +9 -0
- package/build/dex/trader-joe-v2.1/types.js.map +1 -0
- package/build/dex/trader-joe-v2.1.d.ts +2 -1
- package/build/dex/trader-joe-v2.1.js +28 -0
- package/build/dex/trader-joe-v2.1.js.map +1 -1
- package/build/dex/uniswap-v2/config.js +36 -0
- package/build/dex/uniswap-v2/config.js.map +1 -1
- package/build/dex/uniswap-v2/constants.js +7 -6
- package/build/dex/uniswap-v2/constants.js.map +1 -1
- package/build/dex/uniswap-v2/dfyn.d.ts +4 -2
- package/build/dex/uniswap-v2/dfyn.js +13 -0
- package/build/dex/uniswap-v2/dfyn.js.map +1 -1
- package/build/dex/uniswap-v2/types.d.ts +19 -0
- package/build/dex/uniswap-v2/types.js +6 -1
- package/build/dex/uniswap-v2/types.js.map +1 -1
- package/build/dex/uniswap-v2/uniswap-v2-optimizer.d.ts +2 -0
- package/build/dex/uniswap-v2/uniswap-v2-optimizer.js +75 -0
- package/build/dex/uniswap-v2/uniswap-v2-optimizer.js.map +1 -0
- package/build/dex/uniswap-v2/uniswap-v2.d.ts +15 -4
- package/build/dex/uniswap-v2/uniswap-v2.js +124 -1
- package/build/dex/uniswap-v2/uniswap-v2.js.map +1 -1
- package/build/dex/uniswap-v3/constants.d.ts +4 -0
- package/build/dex/uniswap-v3/constants.js +6 -1
- package/build/dex/uniswap-v3/constants.js.map +1 -1
- package/build/dex/uniswap-v3/types.d.ts +15 -0
- package/build/dex/uniswap-v3/types.js.map +1 -1
- package/build/dex/uniswap-v3/uniswap-v3.d.ts +13 -4
- package/build/dex/uniswap-v3/uniswap-v3.js +130 -27
- package/build/dex/uniswap-v3/uniswap-v3.js.map +1 -1
- package/build/dex/uniswap-v3.d.ts +2 -1
- package/build/dex/uniswap-v3.js +28 -0
- package/build/dex/uniswap-v3.js.map +1 -1
- package/build/dex/weth/weth.d.ts +3 -1
- package/build/dex/weth/weth.js +17 -2
- package/build/dex/weth/weth.js.map +1 -1
- package/build/dex/wombat/wombat.d.ts +3 -2
- package/build/dex/wombat/wombat.js +20 -0
- package/build/dex/wombat/wombat.js.map +1 -1
- package/build/dex/woo-fi-v2/woo-fi-v2.d.ts +2 -1
- package/build/dex/woo-fi-v2/woo-fi-v2.js +27 -0
- package/build/dex/woo-fi-v2/woo-fi-v2.js.map +1 -1
- package/build/dex/wsteth/wsteth.d.ts +2 -1
- package/build/dex/wsteth/wsteth.js +9 -0
- package/build/dex/wsteth/wsteth.js.map +1 -1
- package/build/dex/zerox/config.d.ts +2 -0
- package/build/dex/zerox/config.js +33 -0
- package/build/dex/zerox/config.js.map +1 -0
- package/build/dex/zerox/index.d.ts +3 -25
- package/build/dex/zerox/index.js +49 -42
- package/build/dex/zerox/index.js.map +1 -1
- package/build/dex/zerox/types.d.ts +29 -0
- package/build/dex/zerox/types.js +8 -1
- package/build/dex/zerox/types.js.map +1 -1
- package/build/dex-helper/dummy-dex-helper.d.ts +2 -0
- package/build/dex-helper/dummy-dex-helper.js +20 -1
- package/build/dex-helper/dummy-dex-helper.js.map +1 -1
- package/build/dex-helper/icache.d.ts +2 -0
- package/build/dex-helper/idex-helper.d.ts +2 -0
- package/build/executor/Executor01BytecodeBuilder.d.ts +53 -0
- package/build/executor/Executor01BytecodeBuilder.js +253 -0
- package/build/executor/Executor01BytecodeBuilder.js.map +1 -0
- package/build/executor/Executor02BytecodeBuilder.d.ts +77 -0
- package/build/executor/Executor02BytecodeBuilder.js +717 -0
- package/build/executor/Executor02BytecodeBuilder.js.map +1 -0
- package/build/executor/Executor03BytecodeBuilder.d.ts +41 -0
- package/build/executor/Executor03BytecodeBuilder.js +226 -0
- package/build/executor/Executor03BytecodeBuilder.js.map +1 -0
- package/build/executor/ExecutorBytecodeBuilder.d.ts +42 -0
- package/build/executor/ExecutorBytecodeBuilder.js +150 -0
- package/build/executor/ExecutorBytecodeBuilder.js.map +1 -0
- package/build/executor/ExecutorDetector.d.ts +16 -0
- package/build/executor/ExecutorDetector.js +93 -0
- package/build/executor/ExecutorDetector.js.map +1 -0
- package/build/executor/IExecutorBytecodeBuilder.d.ts +6 -0
- package/build/executor/IExecutorBytecodeBuilder.js +3 -0
- package/build/executor/IExecutorBytecodeBuilder.js.map +1 -0
- package/build/executor/constants.d.ts +18 -0
- package/build/executor/constants.js +49 -0
- package/build/executor/constants.js.map +1 -0
- package/build/executor/tests/utils-e2e-v6.d.ts +8 -0
- package/build/executor/tests/utils-e2e-v6.js +175 -0
- package/build/executor/tests/utils-e2e-v6.js.map +1 -0
- package/build/executor/types.d.ts +37 -0
- package/build/executor/types.js +46 -0
- package/build/executor/types.js.map +1 -0
- package/build/generic-swap-transaction-builder.d.ts +56 -0
- package/build/generic-swap-transaction-builder.js +306 -0
- package/build/generic-swap-transaction-builder.js.map +1 -0
- package/build/implementations/local-paraswap-sdk.d.ts +15 -9
- package/build/implementations/local-paraswap-sdk.js +43 -27
- package/build/implementations/local-paraswap-sdk.js.map +1 -1
- package/build/index.d.ts +1 -0
- package/build/index.js +3 -1
- package/build/index.js.map +1 -1
- package/build/lib/curve/encoder.d.ts +5 -0
- package/build/lib/curve/encoder.js +13 -0
- package/build/lib/curve/encoder.js.map +1 -0
- package/build/transaction-builder.d.ts +13 -1
- package/build/transaction-builder.js +17 -0
- package/build/transaction-builder.js.map +1 -1
- package/build/types.d.ts +34 -1
- package/jest.config.js +1 -1
- package/package.json +2 -2
- package/src/abi/augustus-v6/ABI.json +1075 -0
- package/src/config.ts +59 -3
- package/src/constants.ts +10 -1
- package/src/dex/aave-v1/aave-v1-e2e.test.ts +4 -8
- package/src/dex/aave-v1/aave-v1.ts +44 -0
- package/src/dex/aave-v2/aave-v2-e2e.test.ts +8 -5
- package/src/dex/aave-v2/aave-v2.ts +104 -0
- package/src/dex/aave-v3/aave-v3-e2e.test.ts +7 -5
- package/src/dex/aave-v3/aave-v3.ts +63 -0
- package/src/dex/algebra/algebra-e2e.test.ts +42 -72
- package/src/dex/algebra/algebra.ts +70 -3
- package/src/dex/augustus-approvals.ts +175 -0
- package/src/dex/bProtocol/bProtocol-e2e.test.ts +93 -0
- package/src/dex/{bProtocol.ts → bProtocol/bProtocol.ts} +40 -14
- package/src/dex/bProtocol/types.ts +13 -0
- package/src/dex/balancer-v1/balancer-v1-e2e.test.ts +7 -5
- package/src/dex/balancer-v1/balancer-v1.ts +116 -14
- package/src/dex/balancer-v2/balancer-v2-e2e.test.ts +303 -267
- package/src/dex/balancer-v2/balancer-v2.ts +295 -15
- package/src/dex/balancer-v2/constants.ts +5 -0
- package/src/dex/balancer-v2/types.ts +13 -0
- package/src/dex/bancor/bancor-e2e.test.ts +91 -0
- package/src/dex/{bancor.ts → bancor/bancor.ts} +46 -33
- package/src/dex/bancor/config.ts +9 -0
- package/src/dex/bancor/types.ts +19 -0
- package/src/dex/camelot/camelot-e2e.test.ts +72 -4
- package/src/dex/camelot/camelot.ts +50 -0
- package/src/dex/compound/compound-e2e.test.ts +91 -0
- package/src/dex/{compound.ts → compound/compound.ts} +39 -17
- package/src/dex/compound/types.ts +10 -0
- package/src/dex/curve-v1/constants.ts +1 -0
- package/src/dex/curve-v1/curve-v1-e2e.test.ts +124 -64
- package/src/dex/curve-v1/curve-v1.ts +108 -9
- package/src/dex/curve-v1/packer.ts +17 -0
- package/src/dex/curve-v1/types.ts +18 -0
- package/src/dex/curve-v1-factory/curve-v1-factory-e2e.test.ts +9 -8
- package/src/dex/curve-v1-factory/curve-v1-factory.ts +37 -7
- package/src/dex/curve-v1-factory/state-polling-pools/polling-manager.ts +3 -3
- package/src/dex/curve-v2/constants.ts +1 -0
- package/src/dex/curve-v2/curve-v2-e2e.test.ts +104 -0
- package/src/dex/{curve-v2.ts → curve-v2/curve-v2.ts} +143 -23
- package/src/dex/curve-v2/types.ts +27 -0
- package/src/dex/dexalot/dexalot-e2e.test.ts +8 -6
- package/src/dex/dexalot/dexalot.ts +46 -0
- package/src/dex/dodo-v1/config.ts +15 -0
- package/src/dex/dodo-v1/dodo-v1-e2e.test.ts +101 -0
- package/src/dex/{dodo-v1.ts → dodo-v1/dodo-v1.ts} +52 -48
- package/src/dex/dodo-v1/types.ts +25 -0
- package/src/dex/dodo-v2.ts +80 -1
- package/src/dex/generic-rfq/e2e-test-config.ts +50 -6
- package/src/dex/generic-rfq/fetch-mm-api.ts +2 -4
- package/src/dex/generic-rfq/generic-rfq-e2e.test.ts +3 -3
- package/src/dex/generic-rfq/generic-rfq.ts +128 -11
- package/src/dex/generic-rfq/rate-fetcher.ts +2 -3
- package/src/dex/generic-rfq/types.ts +19 -2
- package/src/dex/generic-rfq/utils.ts +3 -9
- package/src/dex/generic-rfq/validators.ts +12 -15
- package/src/dex/gmx/gmx-e2e.test.ts +11 -8
- package/src/dex/gmx/gmx.ts +27 -0
- package/src/dex/hashflow/hashflow-e2e.test.ts +7 -5
- package/src/dex/hashflow/hashflow.ts +48 -1
- package/src/dex/idex.ts +34 -0
- package/src/dex/index.ts +27 -10
- package/src/dex/jarvis-v6/jarvis-v6-e2e.test.ts +5 -4
- package/src/dex/jarvis-v6/jarvis-v6.ts +37 -0
- package/src/dex/jarvis.ts +68 -1
- package/src/dex/kyberdmm/kyberdmm-e2e.test.ts +8 -5
- package/src/dex/kyberdmm/kyberdmm.ts +36 -0
- package/src/dex/lido/config.ts +5 -0
- package/src/dex/lido/lido-e2e.test.ts +71 -0
- package/src/dex/{lido.ts → lido/lido.ts} +34 -16
- package/src/dex/lido/types.ts +5 -0
- package/src/dex/maker-psm/maker-psm-e2e.test.ts +37 -7
- package/src/dex/maker-psm/maker-psm.ts +52 -0
- package/src/dex/maverick-v1/maverick-v1-e2e.test.ts +108 -0
- package/src/dex/maverick-v1/maverick-v1.ts +51 -0
- package/src/dex/nerve/nerve-e2e.test.ts +114 -57
- package/src/dex/nerve/nerve.ts +36 -0
- package/src/dex/{onebit.ts → onebit/onebit.ts} +43 -21
- package/src/dex/onebit/types.ts +17 -0
- package/src/dex/pancakeswap-v3/pancakeswap-v3-e2e.test.ts +19 -5
- package/src/dex/pancakeswap-v3/pancakeswap-v3.ts +46 -0
- package/src/dex/paraswap-limit-orders/paraswap-limit-orders.ts +34 -0
- package/src/dex/paraswap-limit-orders/types.ts +1 -0
- package/src/dex/platypus/platypus-e2e.test.ts +5 -4
- package/src/dex/platypus/platypus.ts +43 -0
- package/src/dex/polygon-migrator/polygon-migrator-e2e.test.ts +7 -5
- package/src/dex/polygon-migrator/polygon-migrator.ts +26 -0
- package/src/dex/quick-perps/quick-perps-e2e.test.ts +4 -3
- package/src/dex/quick-perps/quick-perps.ts +28 -0
- package/src/dex/quickswap/quickswap-e2e.test.ts +7 -5
- package/src/dex/simple-exchange.ts +16 -60
- package/src/dex/smoothy/smoothy-e2e.test.ts +81 -0
- package/src/dex/{smoothy.ts → smoothy/smoothy.ts} +34 -24
- package/src/dex/smoothy/types.ts +18 -0
- package/src/dex/solidly/solidly-e2e.test.ts +122 -0
- package/src/dex/solidly/solidly.ts +49 -0
- package/src/dex/solidly-v3/contract-math/Tick.ts +1 -4
- package/src/dex/solidly-v3/contract-math/uniswap-v3-math.ts +6 -14
- package/src/dex/solidly-v3/solidly-v3-e2e.test.ts +7 -5
- package/src/dex/solidly-v3/solidly-v3-events.test.ts +9 -7
- package/src/dex/solidly-v3/solidly-v3.ts +40 -52
- package/src/dex/{stable-pool.ts → stable-pool/stable-pool.ts} +45 -32
- package/src/dex/stable-pool/stablepool-e2e.test.ts +73 -0
- package/src/dex/stable-pool/types.ts +20 -0
- package/src/dex/swaap-v1/swaap-v1-e2e.test.ts +7 -5
- package/src/dex/swaap-v1/swaap-v1.ts +32 -0
- package/src/dex/swaap-v2/rate-fetcher.ts +6 -4
- package/src/dex/swaap-v2/swaap-v2-e2e.test.ts +7 -5
- package/src/dex/swaap-v2/swaap-v2.ts +39 -2
- package/src/dex/swaap-v2/validators.ts +12 -15
- package/src/dex/swell/swell-e2e.test.ts +4 -3
- package/src/dex/swell/swell.ts +27 -2
- package/src/dex/synthetix/synthetix-e2e.test.ts +5 -4
- package/src/dex/synthetix/synthetix.ts +38 -0
- package/src/dex/trader-joe-v2.1/config.ts +9 -0
- package/src/dex/trader-joe-v2.1/trader-joe-v2.1-e2e.test.ts +101 -0
- package/src/dex/{trader-joe-v2.1.ts → trader-joe-v2.1/trader-joe-v2.1.ts} +63 -48
- package/src/dex/trader-joe-v2.1/types.ts +38 -0
- package/src/dex/uniswap-v2/config.ts +42 -0
- package/src/dex/uniswap-v2/constants.ts +8 -6
- package/src/dex/uniswap-v2/dfyn.ts +44 -3
- package/src/dex/uniswap-v2/types.ts +22 -0
- package/src/dex/uniswap-v2/uniswap-v2-e2e-avalanche.test.ts +16 -13
- package/src/dex/uniswap-v2/uniswap-v2-e2e-bsc.test.ts +33 -17
- package/src/dex/uniswap-v2/uniswap-v2-e2e-mainnet.test.ts +424 -5
- package/src/dex/uniswap-v2/uniswap-v2-e2e-polygon.test.ts +145 -46
- package/src/dex/uniswap-v2/uniswap-v2-optimizer.ts +114 -0
- package/src/dex/uniswap-v2/uniswap-v2.ts +206 -2
- package/src/dex/uniswap-v3/constants.ts +5 -0
- package/src/dex/uniswap-v3/types.ts +17 -0
- package/src/dex/uniswap-v3/uniswap-v3-e2e.test.ts +460 -402
- package/src/dex/uniswap-v3/uniswap-v3.ts +217 -43
- package/src/dex/uniswap-v3.ts +52 -1
- package/src/dex/weth/weth-e2e.test.ts +69 -38
- package/src/dex/weth/weth.ts +29 -5
- package/src/dex/wombat/wombat-e2e.test.ts +5 -4
- package/src/dex/wombat/wombat.ts +32 -1
- package/src/dex/woo-fi-v2/woo-fi-v2-e2e.test.ts +5 -4
- package/src/dex/woo-fi-v2/woo-fi-v2.ts +42 -0
- package/src/dex/wsteth/wsteth-e2e.test.ts +4 -3
- package/src/dex/wsteth/wsteth.ts +24 -0
- package/src/dex/zerox/config.ts +31 -0
- package/src/dex/zerox/index.ts +63 -67
- package/src/dex/zerox/types.ts +34 -0
- package/src/dex/zerox/zerox-e2e.test.ts +110 -0
- package/src/dex-helper/dummy-dex-helper.ts +28 -1
- package/src/dex-helper/icache.ts +4 -0
- package/src/dex-helper/idex-helper.ts +2 -0
- package/src/executor/Executor01BytecodeBuilder.ts +433 -0
- package/src/executor/Executor02BytecodeBuilder.ts +1329 -0
- package/src/executor/Executor03BytecodeBuilder.ts +419 -0
- package/src/executor/ExecutorBytecodeBuilder.ts +350 -0
- package/src/executor/ExecutorDetector.ts +117 -0
- package/src/executor/__snapshots__/executor01-bytecode-builder-snapshot.test.ts.snap +35 -0
- package/src/executor/__snapshots__/executor02-bytecode-builder-snapshot.test.ts.snap +23 -0
- package/src/executor/constants.ts +59 -0
- package/src/executor/executor01-bytecode-builder-e2e.test.ts +1439 -0
- package/src/executor/executor01-bytecode-builder-snapshot.test.ts +271 -0
- package/src/executor/executor02-bytecode-builder-e2e.test.ts +1489 -0
- package/src/executor/executor02-bytecode-builder-snapshot.test.ts +188 -0
- package/src/executor/fixtures/executor01/exchange-params/price-route-multiswap-balancerv1-curvev1-eth-usdc-gusd.json +16 -0
- package/src/executor/fixtures/executor01/exchange-params/price-route-multiswap-balancerv1-sushiv3-wbtc-eth-sushi.json +16 -0
- package/src/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-curvev1-eth-usdc-gusd.json +16 -0
- package/src/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-curvev1-gusd-usdc-eth.json +16 -0
- package/src/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-dai-usdc-eth.json +16 -0
- package/src/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-eth-usdc-dai.json +16 -0
- package/src/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-usdc-eth-wbtc.json +16 -0
- package/src/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-usdt-usdc-dai.json +16 -0
- package/src/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-balancerv1-eth-usdc.json +9 -0
- package/src/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-balancerv1-usdc-eth.json +9 -0
- package/src/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-balancerv1-usdc-wbtc.json +9 -0
- package/src/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-curvev1-eth-steth.json +9 -0
- package/src/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-curvev1-steth-eth.json +9 -0
- package/src/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-curvev1-usdc-usdt.json +9 -0
- package/src/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-univ3-eth-usdc.json +9 -0
- package/src/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-univ3-usdc-eth.json +9 -0
- package/src/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-univ3-usdc-usdt.json +9 -0
- package/src/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-balancerv1-sushiv3-wbtc-eth-sushi.json +12 -0
- package/src/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-curvev1-eth-usdc-gusd.json +7 -0
- package/src/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-curvev1-gusd-usdc-eth.json +7 -0
- package/src/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-dai-usdc-eth.json +7 -0
- package/src/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-eth-usdc-dai.json +7 -0
- package/src/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-usdc-eth-wbtc.json +12 -0
- package/src/executor/fixtures/executor01/maybe-weth-calldata/price-route-simpleSwap-univ3-eth-usdc.json +7 -0
- package/src/executor/fixtures/executor01/maybe-weth-calldata/price-route-simpleSwap-univ3-usdc-eth.json +7 -0
- package/src/executor/fixtures/executor01/routes/price-route-multiswap-balancerv1-curvev1-eth-usdc-gusd.json +78 -0
- package/src/executor/fixtures/executor01/routes/price-route-multiswap-balancerv1-sushiv3-wbtc-eth-sushi.json +81 -0
- package/src/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-curvev1-eth-usdc-gusd.json +78 -0
- package/src/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-curvev1-gusd-usdc-eth.json +78 -0
- package/src/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-dai-usdc-eth.json +81 -0
- package/src/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-eth-usdc-dai.json +81 -0
- package/src/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-usdc-eth-wbtc.json +81 -0
- package/src/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-usdt-usdc-dai.json +81 -0
- package/src/executor/fixtures/executor01/routes/price-route-simpleSwap-balancerv1-eth-usdc.json +64 -0
- package/src/executor/fixtures/executor01/routes/price-route-simpleSwap-balancerv1-usdc-eth.json +85 -0
- package/src/executor/fixtures/executor01/routes/price-route-simpleSwap-balancerv1-usdc-wbtc.json +64 -0
- package/src/executor/fixtures/executor01/routes/price-route-simpleSwap-curvev1-eth-steth.json +52 -0
- package/src/executor/fixtures/executor01/routes/price-route-simpleSwap-curvev1-steth-eth.json +52 -0
- package/src/executor/fixtures/executor01/routes/price-route-simpleSwap-curvev1-usdc-usdt.json +52 -0
- package/src/executor/fixtures/executor01/routes/price-route-simpleSwap-univ3-eth-usdc.json +55 -0
- package/src/executor/fixtures/executor01/routes/price-route-simpleSwap-univ3-usdc-eth.json +55 -0
- package/src/executor/fixtures/executor01/routes/price-route-simpleSwap-univ3-usdc-usdt.json +55 -0
- package/src/executor/fixtures/executor02/exchange-params/price-route-multiSwap-balancerv1-sushiv3-univ3-bal-eth-sushi.json +23 -0
- package/src/executor/fixtures/executor02/exchange-params/price-route-multiSwap-maverickv1-sushiv3-univ3-eth-usdc-mav.json +37 -0
- package/src/executor/fixtures/executor02/exchange-params/price-route-multiSwap-univ3-sushiv3-sushi-eth-wbtc.json +23 -0
- package/src/executor/fixtures/executor02/exchange-params/price-route-multiSwap-univ3-sushiv3-wbtc-eth-sushi.json +23 -0
- package/src/executor/fixtures/executor02/exchange-params/price-route-multiswap-curvev1-univ3-dai-usdc-eth.json +51 -0
- package/src/executor/fixtures/executor02/exchange-params/price-route-multiswap-univ3-usdt-dai-eth.json +58 -0
- package/src/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-sushiv3-balancerv1-eth-usdc.json +23 -0
- package/src/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-sushiv3-balancerv1-usdc-eth.json +23 -0
- package/src/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-sushiv3-univ3-eth-sushi.json +9 -0
- package/src/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-sushiv3-univ3-sushi-eth.json +16 -0
- package/src/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-univ3-curvev1-usdt-dai.json +23 -0
- package/src/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiSwap-balancerv1-sushiv3-univ3-bal-eth-sushi.json +12 -0
- package/src/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiSwap-maverickv1-sushiv3-univ3-eth-usdc-mav.json +7 -0
- package/src/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiSwap-univ3-sushiv3-sushi-eth-wbtc.json +12 -0
- package/src/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiSwap-univ3-sushiv3-wbtc-eth-sushi.json +12 -0
- package/src/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiswap-curvev1-univ3-dai-usdc-eth.json +7 -0
- package/src/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiswap-univ3-usdt-dai-eth.json +7 -0
- package/src/executor/fixtures/executor02/maybe-weth-calldata/price-route-simpleSwap-sushiv3-balancerv1-eth-usdc.json +7 -0
- package/src/executor/fixtures/executor02/maybe-weth-calldata/price-route-simpleSwap-sushiv3-balancerv1-usdc-eth.json +7 -0
- package/src/executor/fixtures/executor02/maybe-weth-calldata/price-route-simpleSwap-sushiv3-univ3-eth-sushi.json +7 -0
- package/src/executor/fixtures/executor02/maybe-weth-calldata/price-route-simpleSwap-sushiv3-univ3-sushi-eth.json +7 -0
- package/src/executor/fixtures/executor02/routes/price-route-multiSwap-balancerv1-sushiv3-univ3-bal-eth-sushi.json +130 -0
- package/src/executor/fixtures/executor02/routes/price-route-multiSwap-maverickv1-sushiv3-univ3-eth-usdc-mav.json +136 -0
- package/src/executor/fixtures/executor02/routes/price-route-multiSwap-univ3-sushiv3-sushi-eth-wbtc.json +100 -0
- package/src/executor/fixtures/executor02/routes/price-route-multiSwap-univ3-sushiv3-wbtc-eth-sushi.json +100 -0
- package/src/executor/fixtures/executor02/routes/price-route-multiswap-curvev1-univ3-dai-usdc-eth.json +166 -0
- package/src/executor/fixtures/executor02/routes/price-route-multiswap-univ3-usdt-dai-eth.json +190 -0
- package/src/executor/fixtures/executor02/routes/price-route-simpleSwap-sushiv3-balancerv1-eth-usdc.json +114 -0
- package/src/executor/fixtures/executor02/routes/price-route-simpleSwap-sushiv3-balancerv1-usdc-eth.json +114 -0
- package/src/executor/fixtures/executor02/routes/price-route-simpleSwap-sushiv3-univ3-eth-sushi.json +55 -0
- package/src/executor/fixtures/executor02/routes/price-route-simpleSwap-sushiv3-univ3-sushi-eth.json +73 -0
- package/src/executor/fixtures/executor02/routes/price-route-simpleSwap-univ3-curvev1-usdt-dai.json +82 -0
- package/src/executor/types.ts +41 -0
- package/src/generic-swap-transaction-builder.ts +679 -0
- package/src/implementations/local-paraswap-sdk.ts +70 -29
- package/src/index.ts +1 -0
- package/src/lib/curve/encoder.ts +19 -0
- package/src/transaction-builder.ts +45 -1
- package/src/types.ts +35 -1
- package/tests/augustus-approvals.test.ts +628 -0
- package/tests/constants-e2e.ts +167 -35
- package/tests/debug-price-route.json +68 -0
- package/tests/debug-price-route.test.ts +55 -0
- package/tests/tenderly-simulation.ts +54 -5
- package/tests/utils-e2e.ts +347 -53
- package/tests/v6/executors.test.ts +110 -0
- package/tests/v6/price-routes/arbitrum/sell-0.1-ETH-USDC.json +104 -0
- package/tests/v6/price-routes/arbitrum/sell-1_000-ETH-DAI.json +294 -0
- package/tests/v6/price-routes/arbitrum/sell-1_000-WETH-wstETH.json +121 -0
- package/tests/v6/price-routes/arbitrum/sell-1_000_000-ARB-DAI.json +270 -0
- package/tests/v6/price-routes/arbitrum/sell-1_000_000-ARB-ETH.json +326 -0
- package/tests/v6/price-routes/arbitrum/sell-1_000_000-DAI-ARB.json +434 -0
- package/tests/v6/price-routes/arbitrum/sell-250_000-LINK-USDC.json +182 -0
- package/tests/v6/price-routes/arbitrum/sell-3_000-BAL-UNI.json +154 -0
- package/tests/v6/price-routes/avalanche/sell-100_000-WAVAX-USDC.json +315 -0
- package/tests/v6/price-routes/avalanche/sell-40-BTC-AVAX.json +207 -0
- package/tests/v6/price-routes/fantom/test.json +161 -0
- package/tests/v6/price-routes/mainnet/buy-3200-ETH-DAI.json +228 -0
- package/tests/v6/price-routes/mainnet/buy-usdc.json +233 -0
- package/tests/v6/price-routes/mainnet/executor-01.json +93 -0
- package/tests/v6/price-routes/mainnet/executor01-test copy.json +88 -0
- package/tests/v6/price-routes/mainnet/executor01-test.json +88 -0
- package/tests/v6/price-routes/mainnet/sell-1-USDC-USDT.json +78 -0
- package/tests/v6/price-routes/mainnet/sell-1-WBTC-BAL.json +158 -0
- package/tests/v6/price-routes/mainnet/sell-100-tBTC-WBTC.json +100 -0
- package/tests/v6/price-routes/mainnet/sell-1000-eth-dai.json +340 -0
- package/tests/v6/price-routes/mainnet/sell-1000-wbtc-eth-uniswapv3-balancerv2.json +162 -0
- package/tests/v6/price-routes/mainnet/sell-100_000-USDC-USDT-2-univ2-pools.json +86 -0
- package/tests/v6/price-routes/mainnet/sell-10_000-ETH-USDC-balancer.json +383 -0
- package/tests/v6/price-routes/mainnet/sell-10_000-ETH-stETH.json +168 -0
- package/tests/v6/price-routes/mainnet/sell-10_000-USDC-USDT-BalancerV2.json +68 -0
- package/tests/v6/price-routes/mainnet/sell-10_000-eth-usdc-uniswapv3-balancerv2.json +348 -0
- package/tests/v6/price-routes/mainnet/sell-1_000-stETH-ETH.json +100 -0
- package/tests/v6/price-routes/mainnet/sell-50-eth-usdc.json +153 -0
- package/tests/v6/price-routes/polygon/sell-100-WBTC-MATIC-1.json +571 -0
- package/tests/v6/price-routes/polygon/sell-100-WBTC-MATIC.json +559 -0
- package/tests/v6/price-routes/polygon/sell-1_000_000-DAI-MATIC-2.json +447 -0
- package/tests/v6/price-routes/polygon/sell-1_000_000-DAI-MATIC-3.json +472 -0
- package/tests/v6/price-routes/polygon/sell-1_000_000-DAI-MATIC.json +628 -0
- package/tests/v6/price-routes/polygon/test.json +109 -0
- package/tests/v6/utils-e2e-v6.ts +177 -0
- package/build/abi/algebra/AlgebraPool.abi.json +0 -727
- package/build/abi/uniswap-v3/UniswapV3Quoter.abi.json +0 -193
- package/build/abi/wombat/pool.json +0 -1289
- package/build/dex/algebra/algebra-pool.d.ts +0 -46
- package/build/dex/algebra/algebra-pool.js +0 -336
- package/build/dex/algebra/algebra-pool.js.map +0 -1
- package/build/dex/quickswap/camelot-v3.d.ts +0 -6
- package/build/dex/quickswap/camelot-v3.js +0 -19
- package/build/dex/quickswap/camelot-v3.js.map +0 -1
- package/build/dex/quickswap/zyberswap-v3.d.ts +0 -6
- package/build/dex/quickswap/zyberswap-v3.js +0 -19
- package/build/dex/quickswap/zyberswap-v3.js.map +0 -1
- package/build/dex/uniswap-v2/rebase-tokens.json +0 -7
|
@@ -11,6 +11,7 @@ import { ContractMethod, Network, SwapSide } from '../../constants';
|
|
|
11
11
|
import { StaticJsonRpcProvider } from '@ethersproject/providers';
|
|
12
12
|
|
|
13
13
|
import { generateConfig } from '../../config';
|
|
14
|
+
import { DirectMethodsV6 } from './constants';
|
|
14
15
|
|
|
15
16
|
jest.setTimeout(50 * 1000);
|
|
16
17
|
|
|
@@ -36,18 +37,27 @@ function testForNetwork(
|
|
|
36
37
|
[
|
|
37
38
|
SwapSide.SELL,
|
|
38
39
|
[
|
|
39
|
-
ContractMethod.simpleSwap,
|
|
40
|
-
ContractMethod.multiSwap,
|
|
41
|
-
ContractMethod.megaSwap,
|
|
40
|
+
// ContractMethod.simpleSwap,
|
|
41
|
+
// ContractMethod.multiSwap,
|
|
42
|
+
// ContractMethod.megaSwap,
|
|
43
|
+
ContractMethod.swapExactAmountIn,
|
|
44
|
+
],
|
|
45
|
+
],
|
|
46
|
+
[
|
|
47
|
+
SwapSide.BUY,
|
|
48
|
+
[
|
|
49
|
+
// ContractMethod.simpleBuy,
|
|
50
|
+
// ContractMethod.buy,
|
|
51
|
+
// DirectMethodsV6.directBuy,
|
|
52
|
+
ContractMethod.swapExactAmountOut,
|
|
42
53
|
],
|
|
43
54
|
],
|
|
44
|
-
[SwapSide.BUY, [ContractMethod.simpleBuy, ContractMethod.buy]],
|
|
45
55
|
]);
|
|
46
56
|
|
|
47
57
|
describe(`${network}`, () => {
|
|
48
58
|
sideToContractMethods.forEach((contractMethods, side) =>
|
|
49
59
|
describe(`${side}`, () => {
|
|
50
|
-
contractMethods.forEach((contractMethod:
|
|
60
|
+
contractMethods.forEach((contractMethod: string) => {
|
|
51
61
|
describe(`${contractMethod}`, () => {
|
|
52
62
|
it(`${nativeTokenSymbol} -> ${tokenASymbol}`, async () => {
|
|
53
63
|
await testE2E(
|
|
@@ -57,7 +67,7 @@ function testForNetwork(
|
|
|
57
67
|
side === SwapSide.SELL ? nativeTokenAmount : tokenAAmount,
|
|
58
68
|
side,
|
|
59
69
|
dexKey,
|
|
60
|
-
contractMethod,
|
|
70
|
+
contractMethod as any,
|
|
61
71
|
network,
|
|
62
72
|
provider,
|
|
63
73
|
undefined,
|
|
@@ -74,7 +84,7 @@ function testForNetwork(
|
|
|
74
84
|
side === SwapSide.SELL ? tokenAAmount : nativeTokenAmount,
|
|
75
85
|
side,
|
|
76
86
|
dexKey,
|
|
77
|
-
contractMethod,
|
|
87
|
+
contractMethod as any,
|
|
78
88
|
network,
|
|
79
89
|
provider,
|
|
80
90
|
undefined,
|
|
@@ -91,7 +101,7 @@ function testForNetwork(
|
|
|
91
101
|
side === SwapSide.SELL ? tokenAAmount : tokenBAmount,
|
|
92
102
|
side,
|
|
93
103
|
dexKey,
|
|
94
|
-
contractMethod,
|
|
104
|
+
contractMethod as any,
|
|
95
105
|
network,
|
|
96
106
|
provider,
|
|
97
107
|
undefined,
|
|
@@ -209,7 +219,7 @@ describe('BalancerV2 E2E', () => {
|
|
|
209
219
|
|
|
210
220
|
sideToContractMethods.forEach((contractMethods, side) =>
|
|
211
221
|
describe(`${side}`, () => {
|
|
212
|
-
contractMethods.forEach((contractMethod:
|
|
222
|
+
contractMethods.forEach((contractMethod: string) => {
|
|
213
223
|
pairs.forEach(pair => {
|
|
214
224
|
describe(`${contractMethod}`, () => {
|
|
215
225
|
it(`${pair[0].name} -> ${pair[1].name}`, async () => {
|
|
@@ -222,7 +232,7 @@ describe('BalancerV2 E2E', () => {
|
|
|
222
232
|
: pair[0].buyAmount,
|
|
223
233
|
side,
|
|
224
234
|
dexKey,
|
|
225
|
-
contractMethod,
|
|
235
|
+
contractMethod as any,
|
|
226
236
|
network,
|
|
227
237
|
provider,
|
|
228
238
|
);
|
|
@@ -237,7 +247,7 @@ describe('BalancerV2 E2E', () => {
|
|
|
237
247
|
: pair[1].buyAmount,
|
|
238
248
|
side,
|
|
239
249
|
dexKey,
|
|
240
|
-
contractMethod,
|
|
250
|
+
contractMethod as any,
|
|
241
251
|
network,
|
|
242
252
|
provider,
|
|
243
253
|
);
|
|
@@ -644,7 +654,7 @@ describe('BalancerV2 E2E', () => {
|
|
|
644
654
|
*/
|
|
645
655
|
});
|
|
646
656
|
|
|
647
|
-
describe('BalancerV2
|
|
657
|
+
describe('BalancerV2 Polygon_V6', () => {
|
|
648
658
|
const dexKey = 'BalancerV2';
|
|
649
659
|
const network = Network.POLYGON;
|
|
650
660
|
const tokens = Tokens[Network.POLYGON];
|
|
@@ -658,18 +668,22 @@ describe('BalancerV2 E2E', () => {
|
|
|
658
668
|
[
|
|
659
669
|
SwapSide.SELL,
|
|
660
670
|
[
|
|
661
|
-
ContractMethod.simpleSwap,
|
|
662
|
-
ContractMethod.multiSwap,
|
|
663
|
-
ContractMethod.megaSwap,
|
|
664
|
-
ContractMethod.directBalancerV2GivenInSwap,
|
|
671
|
+
// ContractMethod.simpleSwap,
|
|
672
|
+
// ContractMethod.multiSwap,
|
|
673
|
+
// ContractMethod.megaSwap,
|
|
674
|
+
// ContractMethod.directBalancerV2GivenInSwap,
|
|
675
|
+
ContractMethod.swapExactAmountIn,
|
|
676
|
+
ContractMethod.swapExactAmountInOnBalancerV2,
|
|
665
677
|
],
|
|
666
678
|
],
|
|
667
679
|
[
|
|
668
680
|
SwapSide.BUY,
|
|
669
681
|
[
|
|
670
|
-
ContractMethod.directBalancerV2GivenOutSwap,
|
|
671
|
-
ContractMethod.simpleBuy,
|
|
672
|
-
ContractMethod.buy,
|
|
682
|
+
// ContractMethod.directBalancerV2GivenOutSwap,
|
|
683
|
+
// ContractMethod.simpleBuy,
|
|
684
|
+
// ContractMethod.buy,
|
|
685
|
+
ContractMethod.swapExactAmountOut,
|
|
686
|
+
ContractMethod.swapExactAmountOutOnBalancerV2,
|
|
673
687
|
],
|
|
674
688
|
],
|
|
675
689
|
]);
|
|
@@ -1314,256 +1328,278 @@ describe('BalancerV2 E2E', () => {
|
|
|
1314
1328
|
);
|
|
1315
1329
|
});
|
|
1316
1330
|
|
|
1317
|
-
describe('
|
|
1318
|
-
const dexKey = '
|
|
1319
|
-
const network = Network.
|
|
1320
|
-
|
|
1321
|
-
const
|
|
1322
|
-
const
|
|
1323
|
-
|
|
1331
|
+
describe('BalancerV2_MAINNET', () => {
|
|
1332
|
+
const dexKey = 'BalancerV2';
|
|
1333
|
+
const network = Network.MAINNET;
|
|
1334
|
+
|
|
1335
|
+
const tokenASymbol: string = 'USDC';
|
|
1336
|
+
const tokenBSymbol: string = 'USDT';
|
|
1337
|
+
|
|
1338
|
+
const tokenAAmount: string = '11110010';
|
|
1339
|
+
const tokenBAmount: string = '21000000';
|
|
1340
|
+
const nativeTokenAmount = '1000000000000000000';
|
|
1341
|
+
|
|
1342
|
+
testForNetwork(
|
|
1324
1343
|
network,
|
|
1344
|
+
dexKey,
|
|
1345
|
+
tokenASymbol,
|
|
1346
|
+
tokenBSymbol,
|
|
1347
|
+
tokenAAmount,
|
|
1348
|
+
tokenBAmount,
|
|
1349
|
+
nativeTokenAmount,
|
|
1325
1350
|
);
|
|
1326
|
-
|
|
1327
|
-
const BBAUSDMAI_OP = '0x1f131ec1175f023ee1534b16fa8ab237c00e2381';
|
|
1328
|
-
const LIDO_SHUFFLE = '0xde45f101250f2ca1c0f8adfc172576d10c12072d';
|
|
1329
|
-
const YELLOW_SUBMARINE = '0x981fb05b738e981ac532a99e77170ecb4bc27aef';
|
|
1351
|
+
});
|
|
1330
1352
|
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
});
|
|
1345
|
-
it('TOKEN -> ETH', async () => {
|
|
1346
|
-
await testE2E(
|
|
1347
|
-
tokens['USDC'],
|
|
1348
|
-
tokens['ETH'],
|
|
1349
|
-
holders['USDC'],
|
|
1350
|
-
'2000000000',
|
|
1351
|
-
SwapSide.SELL,
|
|
1352
|
-
dexKey,
|
|
1353
|
-
ContractMethod.simpleSwap,
|
|
1354
|
-
network,
|
|
1355
|
-
provider,
|
|
1356
|
-
);
|
|
1357
|
-
});
|
|
1358
|
-
it('TOKEN -> TOKEN', async () => {
|
|
1359
|
-
await testE2E(
|
|
1360
|
-
tokens['USDC'],
|
|
1361
|
-
tokens['WETH'],
|
|
1362
|
-
holders['USDC'],
|
|
1363
|
-
'20000000',
|
|
1364
|
-
SwapSide.SELL,
|
|
1365
|
-
dexKey,
|
|
1366
|
-
ContractMethod.simpleSwap,
|
|
1367
|
-
network,
|
|
1368
|
-
provider,
|
|
1369
|
-
);
|
|
1370
|
-
});
|
|
1371
|
-
it('USDC -> DAI using bbaUSD', async () => {
|
|
1372
|
-
await testE2E(
|
|
1373
|
-
tokens['USDC'],
|
|
1374
|
-
tokens['DAI'],
|
|
1375
|
-
holders['USDC'],
|
|
1376
|
-
'20000000',
|
|
1377
|
-
SwapSide.SELL,
|
|
1378
|
-
dexKey,
|
|
1379
|
-
ContractMethod.simpleSwap,
|
|
1380
|
-
network,
|
|
1381
|
-
provider,
|
|
1382
|
-
[`${dexKey}_${BBAUSD_OP}`],
|
|
1383
|
-
);
|
|
1384
|
-
});
|
|
1385
|
-
it('DAI -> USDT using bbaUSD', async () => {
|
|
1386
|
-
await testE2E(
|
|
1387
|
-
tokens['DAI'],
|
|
1388
|
-
tokens['USDT'],
|
|
1389
|
-
holders['DAI'],
|
|
1390
|
-
'1000000000000000000',
|
|
1391
|
-
SwapSide.SELL,
|
|
1392
|
-
dexKey,
|
|
1393
|
-
ContractMethod.simpleSwap,
|
|
1394
|
-
network,
|
|
1395
|
-
provider,
|
|
1396
|
-
[`${dexKey}_${BBAUSD_OP}`],
|
|
1397
|
-
);
|
|
1398
|
-
});
|
|
1399
|
-
it('USDC -> MAI through bbaUSD-MAI', async () => {
|
|
1400
|
-
await testE2E(
|
|
1401
|
-
tokens['USDC'],
|
|
1402
|
-
tokens['MAI'],
|
|
1403
|
-
holders['USDC'],
|
|
1404
|
-
'20000000',
|
|
1405
|
-
SwapSide.SELL,
|
|
1406
|
-
dexKey,
|
|
1407
|
-
ContractMethod.simpleSwap,
|
|
1408
|
-
network,
|
|
1409
|
-
provider,
|
|
1410
|
-
[`${dexKey}_${BBAUSDMAI_OP}`],
|
|
1411
|
-
);
|
|
1412
|
-
});
|
|
1413
|
-
it('wstETH -> WETH through composable stable', async () => {
|
|
1414
|
-
await testE2E(
|
|
1415
|
-
tokens['wstETH'],
|
|
1416
|
-
tokens['WETH'],
|
|
1417
|
-
holders['wstETH'],
|
|
1418
|
-
'10000000000000000',
|
|
1419
|
-
SwapSide.SELL,
|
|
1420
|
-
dexKey,
|
|
1421
|
-
ContractMethod.simpleSwap,
|
|
1422
|
-
network,
|
|
1423
|
-
provider,
|
|
1424
|
-
[`${dexKey}_${LIDO_SHUFFLE}`],
|
|
1425
|
-
);
|
|
1426
|
-
});
|
|
1427
|
-
it('wstETH -> ETH through composable stable', async () => {
|
|
1428
|
-
await testE2E(
|
|
1429
|
-
tokens['wstETH'],
|
|
1430
|
-
tokens['ETH'],
|
|
1431
|
-
holders['wstETH'],
|
|
1432
|
-
'10000000000000000',
|
|
1433
|
-
SwapSide.SELL,
|
|
1434
|
-
dexKey,
|
|
1435
|
-
ContractMethod.simpleSwap,
|
|
1436
|
-
network,
|
|
1437
|
-
provider,
|
|
1438
|
-
[`${dexKey}_${LIDO_SHUFFLE}`],
|
|
1439
|
-
);
|
|
1440
|
-
});
|
|
1441
|
-
it('ETH -> wstETH through composable stable', async () => {
|
|
1442
|
-
await testE2E(
|
|
1443
|
-
tokens['ETH'],
|
|
1444
|
-
tokens['wstETH'],
|
|
1445
|
-
holders['ETH'],
|
|
1446
|
-
'10000000000000000',
|
|
1447
|
-
SwapSide.SELL,
|
|
1448
|
-
dexKey,
|
|
1449
|
-
ContractMethod.simpleSwap,
|
|
1450
|
-
network,
|
|
1451
|
-
provider,
|
|
1452
|
-
[`${dexKey}_${LIDO_SHUFFLE}`],
|
|
1453
|
-
);
|
|
1454
|
-
});
|
|
1455
|
-
it('wstETH -> WBTC through boosted weighted', async () => {
|
|
1456
|
-
await testE2E(
|
|
1457
|
-
tokens['wstETH'],
|
|
1458
|
-
tokens['WBTC'],
|
|
1459
|
-
holders['wstETH'],
|
|
1460
|
-
'25000000000000000', //1e18
|
|
1461
|
-
SwapSide.SELL,
|
|
1462
|
-
dexKey,
|
|
1463
|
-
ContractMethod.simpleSwap,
|
|
1464
|
-
network,
|
|
1465
|
-
provider,
|
|
1466
|
-
[`${dexKey}_${YELLOW_SUBMARINE}`],
|
|
1467
|
-
);
|
|
1468
|
-
});
|
|
1469
|
-
it('USDC -> WBTC through boosted weighted', async () => {
|
|
1470
|
-
await testE2E(
|
|
1471
|
-
tokens['USDC'],
|
|
1472
|
-
tokens['WBTC'],
|
|
1473
|
-
holders['USDC'],
|
|
1474
|
-
'1000000', //1e6
|
|
1475
|
-
SwapSide.SELL,
|
|
1476
|
-
dexKey,
|
|
1477
|
-
ContractMethod.simpleSwap,
|
|
1478
|
-
network,
|
|
1479
|
-
provider,
|
|
1480
|
-
[`${dexKey}_${YELLOW_SUBMARINE}`],
|
|
1481
|
-
);
|
|
1482
|
-
});
|
|
1483
|
-
it('wstETH -> USDC through boosted weighted', async () => {
|
|
1484
|
-
await testE2E(
|
|
1485
|
-
tokens['wstETH'],
|
|
1486
|
-
tokens['USDC'],
|
|
1487
|
-
holders['wstETH'],
|
|
1488
|
-
'1000000000000000000', //1e18
|
|
1489
|
-
SwapSide.SELL,
|
|
1490
|
-
dexKey,
|
|
1491
|
-
ContractMethod.simpleSwap,
|
|
1492
|
-
network,
|
|
1493
|
-
provider,
|
|
1494
|
-
[`${dexKey}_${YELLOW_SUBMARINE}`],
|
|
1495
|
-
);
|
|
1496
|
-
});
|
|
1497
|
-
});
|
|
1353
|
+
// describe('BeetsFi OPTIMISM', () => {
|
|
1354
|
+
// const dexKey = 'BeetsFi';
|
|
1355
|
+
// const network = Network.OPTIMISM;
|
|
1356
|
+
// const tokens = Tokens[network];
|
|
1357
|
+
// const holders = Holders[network];
|
|
1358
|
+
// const provider = new StaticJsonRpcProvider(
|
|
1359
|
+
// generateConfig(network).privateHttpProvider,
|
|
1360
|
+
// network,
|
|
1361
|
+
// );
|
|
1362
|
+
// const BBAUSD_OP = '0x6222ae1d2a9f6894da50aa25cb7b303497f9bebd';
|
|
1363
|
+
// const BBAUSDMAI_OP = '0x1f131ec1175f023ee1534b16fa8ab237c00e2381';
|
|
1364
|
+
// const LIDO_SHUFFLE = '0xde45f101250f2ca1c0f8adfc172576d10c12072d';
|
|
1365
|
+
// const YELLOW_SUBMARINE = '0x981fb05b738e981ac532a99e77170ecb4bc27aef';
|
|
1498
1366
|
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1367
|
+
// describe('Simpleswap', () => {
|
|
1368
|
+
// it('ETH -> TOKEN', async () => {
|
|
1369
|
+
// await testE2E(
|
|
1370
|
+
// tokens['ETH'],
|
|
1371
|
+
// tokens['USDC'],
|
|
1372
|
+
// holders['ETH'],
|
|
1373
|
+
// '7000000000000000000',
|
|
1374
|
+
// SwapSide.SELL,
|
|
1375
|
+
// dexKey,
|
|
1376
|
+
// ContractMethod.simpleSwap,
|
|
1377
|
+
// network,
|
|
1378
|
+
// provider,
|
|
1379
|
+
// );
|
|
1380
|
+
// });
|
|
1381
|
+
// it('TOKEN -> ETH', async () => {
|
|
1382
|
+
// await testE2E(
|
|
1383
|
+
// tokens['USDC'],
|
|
1384
|
+
// tokens['ETH'],
|
|
1385
|
+
// holders['USDC'],
|
|
1386
|
+
// '2000000000',
|
|
1387
|
+
// SwapSide.SELL,
|
|
1388
|
+
// dexKey,
|
|
1389
|
+
// ContractMethod.simpleSwap,
|
|
1390
|
+
// network,
|
|
1391
|
+
// provider,
|
|
1392
|
+
// );
|
|
1393
|
+
// });
|
|
1394
|
+
// it('TOKEN -> TOKEN', async () => {
|
|
1395
|
+
// await testE2E(
|
|
1396
|
+
// tokens['USDC'],
|
|
1397
|
+
// tokens['WETH'],
|
|
1398
|
+
// holders['USDC'],
|
|
1399
|
+
// '20000000',
|
|
1400
|
+
// SwapSide.SELL,
|
|
1401
|
+
// dexKey,
|
|
1402
|
+
// ContractMethod.simpleSwap,
|
|
1403
|
+
// network,
|
|
1404
|
+
// provider,
|
|
1405
|
+
// );
|
|
1406
|
+
// });
|
|
1407
|
+
// it('USDC -> DAI using bbaUSD', async () => {
|
|
1408
|
+
// await testE2E(
|
|
1409
|
+
// tokens['USDC'],
|
|
1410
|
+
// tokens['DAI'],
|
|
1411
|
+
// holders['USDC'],
|
|
1412
|
+
// '20000000',
|
|
1413
|
+
// SwapSide.SELL,
|
|
1414
|
+
// dexKey,
|
|
1415
|
+
// ContractMethod.simpleSwap,
|
|
1416
|
+
// network,
|
|
1417
|
+
// provider,
|
|
1418
|
+
// [`${dexKey}_${BBAUSD_OP}`],
|
|
1419
|
+
// );
|
|
1420
|
+
// });
|
|
1421
|
+
// it('DAI -> USDT using bbaUSD', async () => {
|
|
1422
|
+
// await testE2E(
|
|
1423
|
+
// tokens['DAI'],
|
|
1424
|
+
// tokens['USDT'],
|
|
1425
|
+
// holders['DAI'],
|
|
1426
|
+
// '1000000000000000000',
|
|
1427
|
+
// SwapSide.SELL,
|
|
1428
|
+
// dexKey,
|
|
1429
|
+
// ContractMethod.simpleSwap,
|
|
1430
|
+
// network,
|
|
1431
|
+
// provider,
|
|
1432
|
+
// [`${dexKey}_${BBAUSD_OP}`],
|
|
1433
|
+
// );
|
|
1434
|
+
// });
|
|
1435
|
+
// it('USDC -> MAI through bbaUSD-MAI', async () => {
|
|
1436
|
+
// await testE2E(
|
|
1437
|
+
// tokens['USDC'],
|
|
1438
|
+
// tokens['MAI'],
|
|
1439
|
+
// holders['USDC'],
|
|
1440
|
+
// '20000000',
|
|
1441
|
+
// SwapSide.SELL,
|
|
1442
|
+
// dexKey,
|
|
1443
|
+
// ContractMethod.simpleSwap,
|
|
1444
|
+
// network,
|
|
1445
|
+
// provider,
|
|
1446
|
+
// [`${dexKey}_${BBAUSDMAI_OP}`],
|
|
1447
|
+
// );
|
|
1448
|
+
// });
|
|
1449
|
+
// it('wstETH -> WETH through composable stable', async () => {
|
|
1450
|
+
// await testE2E(
|
|
1451
|
+
// tokens['wstETH'],
|
|
1452
|
+
// tokens['WETH'],
|
|
1453
|
+
// holders['wstETH'],
|
|
1454
|
+
// '10000000000000000',
|
|
1455
|
+
// SwapSide.SELL,
|
|
1456
|
+
// dexKey,
|
|
1457
|
+
// ContractMethod.simpleSwap,
|
|
1458
|
+
// network,
|
|
1459
|
+
// provider,
|
|
1460
|
+
// [`${dexKey}_${LIDO_SHUFFLE}`],
|
|
1461
|
+
// );
|
|
1462
|
+
// });
|
|
1463
|
+
// it('wstETH -> ETH through composable stable', async () => {
|
|
1464
|
+
// await testE2E(
|
|
1465
|
+
// tokens['wstETH'],
|
|
1466
|
+
// tokens['ETH'],
|
|
1467
|
+
// holders['wstETH'],
|
|
1468
|
+
// '10000000000000000',
|
|
1469
|
+
// SwapSide.SELL,
|
|
1470
|
+
// dexKey,
|
|
1471
|
+
// ContractMethod.simpleSwap,
|
|
1472
|
+
// network,
|
|
1473
|
+
// provider,
|
|
1474
|
+
// [`${dexKey}_${LIDO_SHUFFLE}`],
|
|
1475
|
+
// );
|
|
1476
|
+
// });
|
|
1477
|
+
// it('ETH -> wstETH through composable stable', async () => {
|
|
1478
|
+
// await testE2E(
|
|
1479
|
+
// tokens['ETH'],
|
|
1480
|
+
// tokens['wstETH'],
|
|
1481
|
+
// holders['ETH'],
|
|
1482
|
+
// '10000000000000000',
|
|
1483
|
+
// SwapSide.SELL,
|
|
1484
|
+
// dexKey,
|
|
1485
|
+
// ContractMethod.simpleSwap,
|
|
1486
|
+
// network,
|
|
1487
|
+
// provider,
|
|
1488
|
+
// [`${dexKey}_${LIDO_SHUFFLE}`],
|
|
1489
|
+
// );
|
|
1490
|
+
// });
|
|
1491
|
+
// it('wstETH -> WBTC through boosted weighted', async () => {
|
|
1492
|
+
// await testE2E(
|
|
1493
|
+
// tokens['wstETH'],
|
|
1494
|
+
// tokens['WBTC'],
|
|
1495
|
+
// holders['wstETH'],
|
|
1496
|
+
// '25000000000000000', //1e18
|
|
1497
|
+
// SwapSide.SELL,
|
|
1498
|
+
// dexKey,
|
|
1499
|
+
// ContractMethod.simpleSwap,
|
|
1500
|
+
// network,
|
|
1501
|
+
// provider,
|
|
1502
|
+
// [`${dexKey}_${YELLOW_SUBMARINE}`],
|
|
1503
|
+
// );
|
|
1504
|
+
// });
|
|
1505
|
+
// it('USDC -> WBTC through boosted weighted', async () => {
|
|
1506
|
+
// await testE2E(
|
|
1507
|
+
// tokens['USDC'],
|
|
1508
|
+
// tokens['WBTC'],
|
|
1509
|
+
// holders['USDC'],
|
|
1510
|
+
// '1000000', //1e6
|
|
1511
|
+
// SwapSide.SELL,
|
|
1512
|
+
// dexKey,
|
|
1513
|
+
// ContractMethod.simpleSwap,
|
|
1514
|
+
// network,
|
|
1515
|
+
// provider,
|
|
1516
|
+
// [`${dexKey}_${YELLOW_SUBMARINE}`],
|
|
1517
|
+
// );
|
|
1518
|
+
// });
|
|
1519
|
+
// it('wstETH -> USDC through boosted weighted', async () => {
|
|
1520
|
+
// await testE2E(
|
|
1521
|
+
// tokens['wstETH'],
|
|
1522
|
+
// tokens['USDC'],
|
|
1523
|
+
// holders['wstETH'],
|
|
1524
|
+
// '1000000000000000000', //1e18
|
|
1525
|
+
// SwapSide.SELL,
|
|
1526
|
+
// dexKey,
|
|
1527
|
+
// ContractMethod.simpleSwap,
|
|
1528
|
+
// network,
|
|
1529
|
+
// provider,
|
|
1530
|
+
// [`${dexKey}_${YELLOW_SUBMARINE}`],
|
|
1531
|
+
// );
|
|
1532
|
+
// });
|
|
1533
|
+
// });
|
|
1534
|
+
|
|
1535
|
+
// describe('Multiswap', () => {
|
|
1536
|
+
// it('ETH -> TOKEN', async () => {
|
|
1537
|
+
// await testE2E(
|
|
1538
|
+
// tokens['ETH'],
|
|
1539
|
+
// tokens['USDC'],
|
|
1540
|
+
// holders['ETH'],
|
|
1541
|
+
// '7000000000000000000',
|
|
1542
|
+
// SwapSide.SELL,
|
|
1543
|
+
// dexKey,
|
|
1544
|
+
// ContractMethod.multiSwap,
|
|
1545
|
+
// network,
|
|
1546
|
+
// provider,
|
|
1547
|
+
// );
|
|
1548
|
+
// });
|
|
1549
|
+
// it('TOKEN -> ETH', async () => {
|
|
1550
|
+
// await testE2E(
|
|
1551
|
+
// tokens['USDC'],
|
|
1552
|
+
// tokens['ETH'],
|
|
1553
|
+
// holders['USDC'],
|
|
1554
|
+
// '2000000000',
|
|
1555
|
+
// SwapSide.SELL,
|
|
1556
|
+
// dexKey,
|
|
1557
|
+
// ContractMethod.multiSwap,
|
|
1558
|
+
// network,
|
|
1559
|
+
// provider,
|
|
1560
|
+
// );
|
|
1561
|
+
// });
|
|
1562
|
+
// it('TOKEN -> TOKEN', async () => {
|
|
1563
|
+
// await testE2E(
|
|
1564
|
+
// tokens['USDC'],
|
|
1565
|
+
// tokens['WETH'],
|
|
1566
|
+
// holders['USDC'],
|
|
1567
|
+
// '20000000',
|
|
1568
|
+
// SwapSide.SELL,
|
|
1569
|
+
// dexKey,
|
|
1570
|
+
// ContractMethod.multiSwap,
|
|
1571
|
+
// network,
|
|
1572
|
+
// provider,
|
|
1573
|
+
// );
|
|
1574
|
+
// });
|
|
1575
|
+
// it('USDC -> DAI using bbaUSD', async () => {
|
|
1576
|
+
// await testE2E(
|
|
1577
|
+
// tokens['USDC'],
|
|
1578
|
+
// tokens['DAI'],
|
|
1579
|
+
// holders['USDC'],
|
|
1580
|
+
// '20000000',
|
|
1581
|
+
// SwapSide.SELL,
|
|
1582
|
+
// dexKey,
|
|
1583
|
+
// ContractMethod.multiSwap,
|
|
1584
|
+
// network,
|
|
1585
|
+
// provider,
|
|
1586
|
+
// [`${dexKey}_${BBAUSD_OP}`],
|
|
1587
|
+
// );
|
|
1588
|
+
// });
|
|
1589
|
+
// it('wstETH -> USDC through boosted weighted', async () => {
|
|
1590
|
+
// await testE2E(
|
|
1591
|
+
// tokens['wstETH'],
|
|
1592
|
+
// tokens['USDC'],
|
|
1593
|
+
// holders['wstETH'],
|
|
1594
|
+
// '1000000000000000000', //1e18
|
|
1595
|
+
// SwapSide.SELL,
|
|
1596
|
+
// dexKey,
|
|
1597
|
+
// ContractMethod.multiSwap,
|
|
1598
|
+
// network,
|
|
1599
|
+
// provider,
|
|
1600
|
+
// [`${dexKey}_${YELLOW_SUBMARINE}`],
|
|
1601
|
+
// );
|
|
1602
|
+
// });
|
|
1603
|
+
// });
|
|
1604
|
+
// });
|
|
1569
1605
|
});
|