@paraswap/dex-lib 4.1.16 → 4.1.17-arena
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/.eslintrc.js +8 -0
- package/build/abi/Aave_GSM.json +751 -0
- package/build/abi/Balancer.json +257 -0
- package/build/abi/BalancerV2.json +1179 -0
- package/build/abi/RamsesV2Pool.abi.json +1554 -0
- package/build/abi/RamsesV2Quoter.abi.json +274 -0
- package/build/abi/USDM.json +807 -0
- package/build/abi/UniswapV2Router.json +397 -0
- package/build/abi/{wombat/pool.json → angle-transmuter/ChainlinkAccessControlledOffchainAggregator.json} +594 -637
- package/build/abi/angle-transmuter/ChainlinkEACAggregatorProxy.json +509 -0
- package/build/abi/curve-v1/CurveBUSDv2.abi.json +1356 -0
- package/build/abi/curve-v1/CurveTokenV1.json +305 -0
- package/build/abi/curve-v1/CurveTokenV2.json +318 -0
- package/build/abi/curve-v1/CurveV1StableNg.json +1452 -0
- package/build/abi/curve-v1/CurveV2Swap.json +700 -0
- package/build/abi/curve-v1/FactoryCryptoRegistry.json +316 -0
- package/build/abi/curve-v1/FactoryRegistry.json +508 -0
- package/build/abi/curve-v1/StableSwapAave.json +1152 -0
- package/build/abi/curve-v1/StableSwapBUSD.json +814 -0
- package/build/abi/curve-v1/StableSwapCompound.json +814 -0
- package/build/abi/curve-v1/StableSwapIDLE.json +1253 -0
- package/build/abi/curve-v1/StableSwapPax.json +865 -0
- package/build/abi/curve-v1/StableSwapSnow.json +900 -0
- package/build/abi/curve-v1/StableSwapUSDN.json +1004 -0
- package/build/abi/curve-v1/StableSwapUSDT.json +814 -0
- package/build/abi/curve-v1/StableSwapY.json +814 -0
- package/build/abi/inception/inception-ineth.json +609 -0
- package/build/abi/kyberdmm/kyber-storage.abi.json +824 -0
- package/build/abi/kyberdmm.abi.json +1148 -0
- package/build/abi/maverick-v2/MaverickV2Quoter.json +278 -0
- package/build/abi/nerve/nerve-metapool.json +790 -0
- package/build/abi/uniswap-v3/UniswapV3Quoter.abi.json +193 -0
- package/build/abi/velodrome-slipstream/VelodromeSlipstreamQuoterV2.abi.json +267 -0
- package/build/dex/aave-v1/aave-v1.js +0 -1
- package/build/dex/aave-v1/aave-v1.js.map +1 -1
- package/build/dex/balancer-v1/balancer-pools.json +33333 -0
- package/build/dex/bebop/websocket-fetcher.d.ts +35 -0
- package/build/dex/bebop/websocket-fetcher.js +87 -0
- package/build/dex/bebop/websocket-fetcher.js.map +1 -0
- package/build/dex/idle-dao/idle-dao-pool.d.ts +56 -0
- package/build/dex/idle-dao/idle-dao-pool.js +176 -0
- package/build/dex/idle-dao/idle-dao-pool.js.map +1 -0
- package/build/dex/idle-dao/idle-dao-pooling-pool.d.ts +16 -0
- package/build/dex/idle-dao/idle-dao-pooling-pool.js +57 -0
- package/build/dex/idle-dao/idle-dao-pooling-pool.js.map +1 -0
- package/build/dex/idle-dao/scripts.d.ts +9 -0
- package/build/dex/idle-dao/scripts.js +552 -0
- package/build/dex/idle-dao/scripts.js.map +1 -0
- package/build/dex/inception/inception-event-pool.d.ts +4 -4
- package/build/dex/inception/inception-event-pool.js +9 -7
- package/build/dex/inception/inception-event-pool.js.map +1 -1
- package/build/dex/inception/inception-native.d.ts +43 -0
- package/build/dex/inception/inception-native.js +131 -0
- package/build/dex/inception/inception-native.js.map +1 -0
- package/build/dex/inception/inception-pool.d.ts +18 -0
- package/build/dex/inception/inception-pool.js +32 -0
- package/build/dex/inception/inception-pool.js.map +1 -0
- package/build/dex/inception/inception-price-feed.d.ts +19 -0
- package/build/dex/inception/inception-price-feed.js +51 -0
- package/build/dex/inception/inception-price-feed.js.map +1 -0
- package/build/dex/inception/inception.d.ts +6 -6
- package/build/dex/inception/inception.js +40 -16
- package/build/dex/inception/inception.js.map +1 -1
- package/build/dex/inception/utils.d.ts +0 -1
- package/build/dex/inception/utils.js +1 -22
- package/build/dex/inception/utils.js.map +1 -1
- package/build/dex/platypus/platypus.js +3 -17
- package/build/dex/platypus/platypus.js.map +1 -1
- package/build/dex/swaap-v1/swaap-v1.js +0 -4
- package/build/dex/swaap-v1/swaap-v1.js.map +1 -1
- package/build/dex/uniswap-v2/config.js +8 -0
- package/build/dex/uniswap-v2/config.js.map +1 -1
- package/build/dex/uniswap-v3/config.js +2 -1
- package/build/dex/uniswap-v3/config.js.map +1 -1
- package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-balancerv1-curvev1-eth-usdc-gusd.json +16 -0
- package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-balancerv1-sushiv3-wbtc-eth-sushi.json +16 -0
- package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-curvev1-eth-usdc-gusd.json +16 -0
- package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-curvev1-gusd-usdc-eth.json +16 -0
- package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-dai-usdc-eth.json +16 -0
- package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-eth-usdc-dai.json +16 -0
- package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-usdc-eth-wbtc.json +16 -0
- package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-usdt-usdc-dai.json +16 -0
- package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-balancerv1-eth-usdc.json +9 -0
- package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-balancerv1-usdc-eth.json +9 -0
- package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-balancerv1-usdc-wbtc.json +9 -0
- package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-curvev1-eth-steth.json +9 -0
- package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-curvev1-steth-eth.json +9 -0
- package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-curvev1-usdc-usdt.json +9 -0
- package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-univ3-eth-usdc.json +9 -0
- package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-univ3-usdc-eth.json +9 -0
- package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-univ3-usdc-usdt.json +9 -0
- package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-balancerv1-sushiv3-wbtc-eth-sushi.json +12 -0
- package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-curvev1-eth-usdc-gusd.json +7 -0
- package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-curvev1-gusd-usdc-eth.json +7 -0
- package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-dai-usdc-eth.json +7 -0
- package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-eth-usdc-dai.json +7 -0
- package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-usdc-eth-wbtc.json +12 -0
- package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-simpleSwap-univ3-eth-usdc.json +7 -0
- package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-simpleSwap-univ3-usdc-eth.json +7 -0
- package/build/executor/fixtures/executor01/routes/price-route-multiswap-balancerv1-curvev1-eth-usdc-gusd.json +78 -0
- package/build/executor/fixtures/executor01/routes/price-route-multiswap-balancerv1-sushiv3-wbtc-eth-sushi.json +81 -0
- package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-curvev1-eth-usdc-gusd.json +78 -0
- package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-curvev1-gusd-usdc-eth.json +78 -0
- package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-dai-usdc-eth.json +81 -0
- package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-eth-usdc-dai.json +81 -0
- package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-usdc-eth-wbtc.json +81 -0
- package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-usdt-usdc-dai.json +81 -0
- package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-balancerv1-eth-usdc.json +64 -0
- package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-balancerv1-usdc-eth.json +85 -0
- package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-balancerv1-usdc-wbtc.json +64 -0
- package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-curvev1-eth-steth.json +52 -0
- package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-curvev1-steth-eth.json +52 -0
- package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-curvev1-usdc-usdt.json +52 -0
- package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-univ3-eth-usdc.json +55 -0
- package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-univ3-usdc-eth.json +55 -0
- package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-univ3-usdc-usdt.json +55 -0
- package/build/executor/fixtures/executor02/exchange-params/price-route-multiSwap-balancerv1-sushiv3-univ3-bal-eth-sushi.json +23 -0
- package/build/executor/fixtures/executor02/exchange-params/price-route-multiSwap-maverickv1-sushiv3-univ3-eth-usdc-mav.json +37 -0
- package/build/executor/fixtures/executor02/exchange-params/price-route-multiSwap-univ3-sushiv3-sushi-eth-wbtc.json +23 -0
- package/build/executor/fixtures/executor02/exchange-params/price-route-multiSwap-univ3-sushiv3-wbtc-eth-sushi.json +23 -0
- package/build/executor/fixtures/executor02/exchange-params/price-route-multiswap-curvev1-univ3-dai-usdc-eth.json +51 -0
- package/build/executor/fixtures/executor02/exchange-params/price-route-multiswap-univ3-usdt-dai-eth.json +58 -0
- package/build/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-sushiv3-balancerv1-eth-usdc.json +23 -0
- package/build/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-sushiv3-balancerv1-usdc-eth.json +23 -0
- package/build/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-sushiv3-univ3-eth-sushi.json +9 -0
- package/build/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-sushiv3-univ3-sushi-eth.json +16 -0
- package/build/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-univ3-curvev1-usdt-dai.json +23 -0
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiSwap-balancerv1-sushiv3-univ3-bal-eth-sushi.json +12 -0
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiSwap-maverickv1-sushiv3-univ3-eth-usdc-mav.json +7 -0
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiSwap-univ3-sushiv3-sushi-eth-wbtc.json +12 -0
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiSwap-univ3-sushiv3-wbtc-eth-sushi.json +12 -0
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiswap-curvev1-univ3-dai-usdc-eth.json +7 -0
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiswap-univ3-usdt-dai-eth.json +7 -0
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-simpleSwap-sushiv3-balancerv1-eth-usdc.json +7 -0
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-simpleSwap-sushiv3-balancerv1-usdc-eth.json +7 -0
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-simpleSwap-sushiv3-univ3-eth-sushi.json +7 -0
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-simpleSwap-sushiv3-univ3-sushi-eth.json +7 -0
- package/build/executor/fixtures/executor02/routes/price-route-multiSwap-balancerv1-sushiv3-univ3-bal-eth-sushi.json +130 -0
- package/build/executor/fixtures/executor02/routes/price-route-multiSwap-maverickv1-sushiv3-univ3-eth-usdc-mav.json +136 -0
- package/build/executor/fixtures/executor02/routes/price-route-multiSwap-univ3-sushiv3-sushi-eth-wbtc.json +100 -0
- package/build/executor/fixtures/executor02/routes/price-route-multiSwap-univ3-sushiv3-wbtc-eth-sushi.json +100 -0
- package/build/executor/fixtures/executor02/routes/price-route-multiswap-curvev1-univ3-dai-usdc-eth.json +166 -0
- package/build/executor/fixtures/executor02/routes/price-route-multiswap-univ3-usdt-dai-eth.json +190 -0
- package/build/executor/fixtures/executor02/routes/price-route-simpleSwap-sushiv3-balancerv1-eth-usdc.json +114 -0
- package/build/executor/fixtures/executor02/routes/price-route-simpleSwap-sushiv3-balancerv1-usdc-eth.json +114 -0
- package/build/executor/fixtures/executor02/routes/price-route-simpleSwap-sushiv3-univ3-eth-sushi.json +55 -0
- package/build/executor/fixtures/executor02/routes/price-route-simpleSwap-sushiv3-univ3-sushi-eth.json +73 -0
- package/build/executor/fixtures/executor02/routes/price-route-simpleSwap-univ3-curvev1-usdt-dai.json +82 -0
- package/package.json +1 -1
- package/src/dex/generic-rfq/example-api.test.ts +12 -1
- package/src/dex/generic-rfq/generic-rfq-e2e.test.ts +5 -47
- package/src/dex/generic-rfq/generic-rfq-local-e2e.test.ts +8 -22
- package/src/dex/uniswap-v2/config.ts +9 -0
- package/src/dex/uniswap-v2/uniswap-v2-e2e-avalanche.test.ts +105 -1
- package/src/dex/uniswap-v3/config.ts +2 -1
- package/tests/constants-e2e.ts +7 -53
- package/tests/{tenderly-simulation-new.test.ts → tenderly-simulation.test.ts} +2 -2
- package/tests/tenderly-simulation.ts +650 -241
- package/tests/token-storage-slots.json +166 -0
- package/tests/utils-e2e.ts +198 -712
- package/tests/v6/utils-e2e-v6.ts +60 -134
- package/.vscode/launch.json +0 -53
- package/.vscode/settings.json +0 -2
- package/.vscode/tasks.json +0 -15
- package/build/abi/uniswap-v3/AlienBaseV3Router.abi.json +0 -52
- package/build/abi/uniswap-v4/quoter.abi.json +0 -461
- package/build/abi/uniswap-v4/router.abi.json +0 -230
- package/build/abi/usual-m-smart-m/usualM.abi.json +0 -483
- package/build/dex/aave-v2/tokens-avalanche.json +0 -44
- package/build/dex/aave-v2/tokens-mainnet.json +0 -188
- package/build/dex/aave-v2/tokens-polygon.json +0 -44
- package/build/dex/bProtocol.d.ts +0 -18
- package/build/dex/bProtocol.js +0 -39
- package/build/dex/bProtocol.js.map +0 -1
- package/build/dex/balancer-v3/abi/balancerBatchRouter.d.ts +0 -729
- package/build/dex/balancer-v3/abi/balancerBatchRouter.js +0 -732
- package/build/dex/balancer-v3/abi/balancerBatchRouter.js.map +0 -1
- package/build/dex/balancer-v3/abi/balancerRouter.d.ts +0 -1406
- package/build/dex/balancer-v3/abi/balancerRouter.js +0 -1175
- package/build/dex/balancer-v3/abi/balancerRouter.js.map +0 -1
- package/build/dex/balancer-v3/abi/vaultExtension.V3.d.ts +0 -2081
- package/build/dex/balancer-v3/abi/vaultExtension.V3.js +0 -1851
- package/build/dex/balancer-v3/abi/vaultExtension.V3.js.map +0 -1
- package/build/dex/balancer-v3/balancer-v3-sepolia-pools.d.ts +0 -34
- package/build/dex/balancer-v3/balancer-v3-sepolia-pools.js +0 -406
- package/build/dex/balancer-v3/balancer-v3-sepolia-pools.js.map +0 -1
- package/build/dex/bancor.d.ts +0 -26
- package/build/dex/bancor.js +0 -58
- package/build/dex/bancor.js.map +0 -1
- package/build/dex/compound.d.ts +0 -18
- package/build/dex/compound.js +0 -46
- package/build/dex/compound.js.map +0 -1
- package/build/dex/curve-v2.d.ts +0 -58
- package/build/dex/curve-v2.js +0 -180
- package/build/dex/curve-v2.js.map +0 -1
- package/build/dex/dodo-v1.d.ts +0 -33
- package/build/dex/dodo-v1.js +0 -63
- package/build/dex/dodo-v1.js.map +0 -1
- package/build/dex/erc4626/scripts/validate-state.d.ts +0 -0
- package/build/dex/erc4626/scripts/validate-state.js +0 -146
- package/build/dex/erc4626/scripts/validate-state.js.map +0 -1
- package/build/dex/lido.d.ts +0 -19
- package/build/dex/lido.js +0 -42
- package/build/dex/lido.js.map +0 -1
- package/build/dex/maker-psm/scripts/gem.abi.json +0 -136
- package/build/dex/maker-psm/scripts/validate-state.d.ts +0 -0
- package/build/dex/maker-psm/scripts/validate-state.js +0 -185
- package/build/dex/maker-psm/scripts/validate-state.js.map +0 -1
- package/build/dex/maker-psm/scripts/vat.abi.json +0 -243
- package/build/dex/onebit.d.ts +0 -25
- package/build/dex/onebit.js +0 -42
- package/build/dex/onebit.js.map +0 -1
- package/build/dex/smoothy.d.ts +0 -26
- package/build/dex/smoothy.js +0 -48
- package/build/dex/smoothy.js.map +0 -1
- package/build/dex/solidly-v3/scripts/check-event-pool-event.d.ts +0 -1
- package/build/dex/solidly-v3/scripts/check-event-pool-event.js +0 -53
- package/build/dex/solidly-v3/scripts/check-event-pool-event.js.map +0 -1
- package/build/dex/stable-pool.d.ts +0 -28
- package/build/dex/stable-pool.js +0 -55
- package/build/dex/stable-pool.js.map +0 -1
- package/build/dex/trader-joe-v2.1/trader-joe-v2.1-new.d.ts +0 -7
- package/build/dex/trader-joe-v2.1/trader-joe-v2.1-new.js +0 -20
- package/build/dex/trader-joe-v2.1/trader-joe-v2.1-new.js.map +0 -1
- package/build/dex/trader-joe-v2.1.d.ts +0 -43
- package/build/dex/trader-joe-v2.1.js +0 -79
- package/build/dex/trader-joe-v2.1.js.map +0 -1
- package/build/dex/uniswap-v3/forks/alien-base-v3/alien-base-v3.d.ts +0 -17
- package/build/dex/uniswap-v3/forks/alien-base-v3/alien-base-v3.js +0 -64
- package/build/dex/uniswap-v3/forks/alien-base-v3/alien-base-v3.js.map +0 -1
- package/build/dex/uniswap-v3/forks/alien-v3/alien-v3.d.ts +0 -17
- package/build/dex/uniswap-v3/forks/alien-v3/alien-v3.js +0 -79
- package/build/dex/uniswap-v3/forks/alien-v3/alien-v3.js.map +0 -1
- package/build/dex/uniswap-v3/uniswap-v3-pricing.d.ts +0 -4
- package/build/dex/uniswap-v3/uniswap-v3-pricing.js +0 -43
- package/build/dex/uniswap-v3/uniswap-v3-pricing.js.map +0 -1
- package/build/dex/uniswap-v3/uniswap-v3-worker.d.ts +0 -1
- package/build/dex/uniswap-v3/uniswap-v3-worker.js +0 -10
- package/build/dex/uniswap-v3/uniswap-v3-worker.js.map +0 -1
- package/build/dex/uniswap-v4/config.d.ts +0 -3
- package/build/dex/uniswap-v4/config.js +0 -15
- package/build/dex/uniswap-v4/config.js.map +0 -1
- package/build/dex/uniswap-v4/encoder.d.ts +0 -16
- package/build/dex/uniswap-v4/encoder.js +0 -94
- package/build/dex/uniswap-v4/encoder.js.map +0 -1
- package/build/dex/uniswap-v4/types.d.ts +0 -30
- package/build/dex/uniswap-v4/types.js +0 -3
- package/build/dex/uniswap-v4/types.js.map +0 -1
- package/build/dex/uniswap-v4/uniswap-v4.d.ts +0 -38
- package/build/dex/uniswap-v4/uniswap-v4.js +0 -187
- package/build/dex/uniswap-v4/uniswap-v4.js.map +0 -1
- package/build/dex/usual/usual-m-smart-m.d.ts +0 -17
- package/build/dex/usual/usual-m-smart-m.js +0 -50
- package/build/dex/usual/usual-m-smart-m.js.map +0 -1
- package/build/dex/usual-m-smart-m/config.d.ts +0 -3
- package/build/dex/usual-m-smart-m/config.js +0 -13
- package/build/dex/usual-m-smart-m/config.js.map +0 -1
- package/build/dex/usual-m-smart-m/types.d.ts +0 -7
- package/build/dex/usual-m-smart-m/types.js +0 -3
- package/build/dex/usual-m-smart-m/types.js.map +0 -1
- package/build/dex/usual-m-smart-m/usual-m-smart-m.d.ts +0 -35
- package/build/dex/usual-m-smart-m/usual-m-smart-m.js +0 -161
- package/build/dex/usual-m-smart-m/usual-m-smart-m.js.map +0 -1
- package/build/dex/usual-m-usd0/config.d.ts +0 -3
- package/build/dex/usual-m-usd0/config.js +0 -14
- package/build/dex/usual-m-usd0/config.js.map +0 -1
- package/build/dex/usual-m-usd0/types.d.ts +0 -8
- package/build/dex/usual-m-usd0/types.js +0 -3
- package/build/dex/usual-m-usd0/types.js.map +0 -1
- package/build/dex/usual-m-usd0/usual-m-usd0.d.ts +0 -35
- package/build/dex/usual-m-usd0/usual-m-usd0.js +0 -159
- package/build/dex/usual-m-usd0/usual-m-usd0.js.map +0 -1
- package/tests/augustus-approvals.test.ts +0 -628
- package/tests/smart-tokens.ts +0 -112
- package/tests/tenderly-simulation-new.ts +0 -698
- package/tests/v6/executors.test.ts +0 -110
- package/tests/v6/price-routes/arbitrum/sell-0.1-ETH-USDC.json +0 -104
- package/tests/v6/price-routes/arbitrum/sell-1_000-ETH-DAI.json +0 -294
- package/tests/v6/price-routes/arbitrum/sell-1_000-WETH-wstETH.json +0 -121
- package/tests/v6/price-routes/arbitrum/sell-1_000_000-ARB-DAI.json +0 -270
- package/tests/v6/price-routes/arbitrum/sell-1_000_000-ARB-ETH.json +0 -326
- package/tests/v6/price-routes/arbitrum/sell-1_000_000-DAI-ARB.json +0 -434
- package/tests/v6/price-routes/arbitrum/sell-250_000-LINK-USDC.json +0 -182
- package/tests/v6/price-routes/arbitrum/sell-3_000-BAL-UNI.json +0 -154
- package/tests/v6/price-routes/avalanche/sell-100_000-WAVAX-USDC.json +0 -315
- package/tests/v6/price-routes/avalanche/sell-40-BTC-AVAX.json +0 -207
- package/tests/v6/price-routes/mainnet/buy-3200-ETH-DAI.json +0 -228
- package/tests/v6/price-routes/mainnet/sell-1-USDC-USDT.json +0 -78
- package/tests/v6/price-routes/mainnet/sell-1-WBTC-BAL.json +0 -158
- package/tests/v6/price-routes/mainnet/sell-100-tBTC-WBTC.json +0 -100
- package/tests/v6/price-routes/mainnet/sell-1000-eth-dai.json +0 -340
- package/tests/v6/price-routes/mainnet/sell-1000-wbtc-eth-uniswapv3-balancerv2.json +0 -162
- package/tests/v6/price-routes/mainnet/sell-100_000-USDC-USDT-2-univ2-pools.json +0 -86
- package/tests/v6/price-routes/mainnet/sell-10_000-ETH-USDC-balancer.json +0 -383
- package/tests/v6/price-routes/mainnet/sell-10_000-ETH-stETH.json +0 -168
- package/tests/v6/price-routes/mainnet/sell-10_000-USDC-USDT-BalancerV2.json +0 -68
- package/tests/v6/price-routes/mainnet/sell-10_000-eth-usdc-uniswapv3-balancerv2.json +0 -348
- package/tests/v6/price-routes/mainnet/sell-1_000-stETH-ETH.json +0 -100
- package/tests/v6/price-routes/mainnet/sell-50-eth-usdc.json +0 -153
- package/tests/v6/price-routes/polygon/sell-100-WBTC-MATIC-1.json +0 -571
- package/tests/v6/price-routes/polygon/sell-100-WBTC-MATIC.json +0 -559
- package/tests/v6/price-routes/polygon/sell-1_000_000-DAI-MATIC-2.json +0 -447
- package/tests/v6/price-routes/polygon/sell-1_000_000-DAI-MATIC-3.json +0 -472
- package/tests/v6/price-routes/polygon/sell-1_000_000-DAI-MATIC.json +0 -628
|
@@ -90,6 +90,9 @@ const blacklist = {
|
|
|
90
90
|
export const startTestServer = (account: ethers.Wallet) => {
|
|
91
91
|
const app = express();
|
|
92
92
|
|
|
93
|
+
// to overcome isEmpty(pairs) check on handleRatesResponse in rate-fetcher
|
|
94
|
+
let pairsReturned = false;
|
|
95
|
+
|
|
93
96
|
/**
|
|
94
97
|
* Use JSON Body parser...
|
|
95
98
|
*/
|
|
@@ -100,10 +103,15 @@ export const startTestServer = (account: ethers.Wallet) => {
|
|
|
100
103
|
});
|
|
101
104
|
|
|
102
105
|
app.get('/pairs', (req, res) => {
|
|
106
|
+
pairsReturned = true;
|
|
103
107
|
return res.status(200).json(pairs);
|
|
104
108
|
});
|
|
105
109
|
|
|
106
|
-
app.get('/prices', (req, res) => {
|
|
110
|
+
app.get('/prices', async (req, res) => {
|
|
111
|
+
if (!pairsReturned) {
|
|
112
|
+
// sleep for 1 second
|
|
113
|
+
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
114
|
+
}
|
|
107
115
|
return res.status(200).json(prices);
|
|
108
116
|
});
|
|
109
117
|
|
|
@@ -202,6 +210,9 @@ export const startTestServer = (account: ethers.Wallet) => {
|
|
|
202
210
|
order,
|
|
203
211
|
);
|
|
204
212
|
|
|
213
|
+
// to prevent overwriting taker to augustus v5
|
|
214
|
+
signableOrderData.data.taker = payload.takerAddress;
|
|
215
|
+
|
|
205
216
|
const signature = await paraSwapLimitOrderSDK.signLimitOrder(
|
|
206
217
|
signableOrderData,
|
|
207
218
|
);
|
|
@@ -1,27 +1,16 @@
|
|
|
1
1
|
import dotenv from 'dotenv';
|
|
2
2
|
dotenv.config();
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
import { Network, ContractMethod, SwapSide, MAX_UINT } from '../../constants';
|
|
4
|
+
import { Network, ContractMethod, SwapSide } from '../../constants';
|
|
6
5
|
import { generateConfig } from '../../config';
|
|
7
6
|
import { newTestE2E, getEnv } from '../../../tests/utils-e2e';
|
|
8
7
|
import {
|
|
9
|
-
SmartTokens,
|
|
10
8
|
GENERIC_ADDR1,
|
|
9
|
+
GENERIC_ADDR2,
|
|
11
10
|
Tokens,
|
|
12
11
|
} from '../../../tests/constants-e2e';
|
|
13
12
|
import { RFQConfig } from './types';
|
|
14
13
|
import { testConfig } from './e2e-test-config';
|
|
15
|
-
import { SmartToken } from '../../../tests/smart-tokens';
|
|
16
|
-
import { Token } from '../../types';
|
|
17
|
-
|
|
18
|
-
const PK_KEY = process.env.TEST_PK_KEY;
|
|
19
|
-
|
|
20
|
-
if (!PK_KEY) {
|
|
21
|
-
throw new Error('Missing TEST_PK_KEY');
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const testAccount = new ethers.Wallet(PK_KEY!);
|
|
25
14
|
|
|
26
15
|
jest.setTimeout(1000 * 60 * 3);
|
|
27
16
|
|
|
@@ -93,45 +82,14 @@ describe(`GenericRFQ ${dexKey} E2E`, () => {
|
|
|
93
82
|
for (const [_network, testCases] of Object.entries(testConfig)) {
|
|
94
83
|
const network = parseInt(_network, 10);
|
|
95
84
|
const tokens = Tokens[network];
|
|
96
|
-
const smartTokens = SmartTokens[network];
|
|
97
85
|
const config = generateConfig(network);
|
|
98
86
|
|
|
99
87
|
config.rfqConfigs[dexKey] = buildConfigForGenericRFQ();
|
|
100
88
|
describe(`${Network[network]}`, () => {
|
|
101
89
|
for (const testCase of testCases) {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
if (SKIP_TENDERLY) {
|
|
105
|
-
srcToken = tokens[testCase.srcToken];
|
|
106
|
-
destToken = tokens[testCase.destToken];
|
|
107
|
-
} else {
|
|
108
|
-
if (!smartTokens.hasOwnProperty(testCase.srcToken)) {
|
|
109
|
-
throw new Error(
|
|
110
|
-
`Please add "addBalance" and "addAllowance" functions for ${testCase.srcToken} on ${Network[network]} (in constants-e2e.ts).`,
|
|
111
|
-
);
|
|
112
|
-
}
|
|
113
|
-
if (!smartTokens.hasOwnProperty(testCase.destToken)) {
|
|
114
|
-
throw new Error(
|
|
115
|
-
`Please add "addBalance" and "addAllowance" functions for ${testCase.destToken} on ${Network[network]} (in constants-e2e.ts).`,
|
|
116
|
-
);
|
|
117
|
-
}
|
|
118
|
-
srcToken = new SmartToken(tokens[testCase.srcToken]);
|
|
119
|
-
destToken = new SmartToken(tokens[testCase.destToken]);
|
|
120
|
-
|
|
121
|
-
srcToken.addBalance(testAccount.address, MAX_UINT);
|
|
122
|
-
srcToken.addAllowance(
|
|
123
|
-
testAccount.address,
|
|
124
|
-
config.augustusRFQAddress,
|
|
125
|
-
MAX_UINT,
|
|
126
|
-
);
|
|
90
|
+
const srcToken = tokens[testCase.srcToken];
|
|
91
|
+
const destToken = tokens[testCase.destToken];
|
|
127
92
|
|
|
128
|
-
destToken.addBalance(testAccount.address, MAX_UINT);
|
|
129
|
-
destToken.addAllowance(
|
|
130
|
-
testAccount.address,
|
|
131
|
-
config.augustusRFQAddress,
|
|
132
|
-
MAX_UINT,
|
|
133
|
-
);
|
|
134
|
-
}
|
|
135
93
|
const contractMethod =
|
|
136
94
|
testCase.swapSide === SwapSide.BUY
|
|
137
95
|
? ContractMethod.swapOnAugustusRFQTryBatchFill
|
|
@@ -143,7 +101,7 @@ describe(`GenericRFQ ${dexKey} E2E`, () => {
|
|
|
143
101
|
srcToken,
|
|
144
102
|
destToken,
|
|
145
103
|
senderAddress: GENERIC_ADDR1,
|
|
146
|
-
thirdPartyAddress:
|
|
104
|
+
thirdPartyAddress: GENERIC_ADDR2,
|
|
147
105
|
_amount: testCase.amount,
|
|
148
106
|
swapSide: testCase.swapSide as SwapSide,
|
|
149
107
|
dexKeys: [dexKey],
|
|
@@ -5,7 +5,7 @@ import { ethers } from 'ethers';
|
|
|
5
5
|
import { Network, ContractMethod, SwapSide, MAX_UINT } from '../../constants';
|
|
6
6
|
import { generateConfig } from '../../config';
|
|
7
7
|
import { newTestE2E } from '../../../tests/utils-e2e';
|
|
8
|
-
import {
|
|
8
|
+
import { GENERIC_ADDR1, Tokens } from '../../../tests/constants-e2e';
|
|
9
9
|
import { startTestServer } from './example-api.test';
|
|
10
10
|
|
|
11
11
|
const PK_KEY = process.env.TEST_PK_KEY;
|
|
@@ -26,30 +26,16 @@ describe('GenericRFQ E2E Mainnet', () => {
|
|
|
26
26
|
});
|
|
27
27
|
|
|
28
28
|
const network = Network.MAINNET;
|
|
29
|
-
const
|
|
29
|
+
const tokens = Tokens[network];
|
|
30
30
|
|
|
31
|
-
const srcToken =
|
|
32
|
-
const destToken =
|
|
31
|
+
const srcToken = tokens.WETH;
|
|
32
|
+
const destToken = tokens.DAI;
|
|
33
33
|
|
|
34
34
|
const config = generateConfig(network);
|
|
35
35
|
|
|
36
36
|
describe('GenericRFQ', () => {
|
|
37
37
|
const dexKey = 'DummyParaSwapPool';
|
|
38
38
|
|
|
39
|
-
srcToken.addBalance(testAccount.address, MAX_UINT);
|
|
40
|
-
srcToken.addAllowance(
|
|
41
|
-
testAccount.address,
|
|
42
|
-
config.augustusRFQAddress,
|
|
43
|
-
MAX_UINT,
|
|
44
|
-
);
|
|
45
|
-
|
|
46
|
-
destToken.addBalance(testAccount.address, MAX_UINT);
|
|
47
|
-
destToken.addAllowance(
|
|
48
|
-
testAccount.address,
|
|
49
|
-
config.augustusRFQAddress,
|
|
50
|
-
MAX_UINT,
|
|
51
|
-
);
|
|
52
|
-
|
|
53
39
|
describe('Simpleswap', () => {
|
|
54
40
|
it('SELL WETH -> DAI', async () => {
|
|
55
41
|
await newTestE2E({
|
|
@@ -60,7 +46,7 @@ describe('GenericRFQ E2E Mainnet', () => {
|
|
|
60
46
|
thirdPartyAddress: testAccount.address,
|
|
61
47
|
_amount: '1000000000000000000',
|
|
62
48
|
swapSide: SwapSide.SELL,
|
|
63
|
-
|
|
49
|
+
dexKeys: dexKey,
|
|
64
50
|
contractMethod: ContractMethod.simpleSwap,
|
|
65
51
|
network: network,
|
|
66
52
|
});
|
|
@@ -75,7 +61,7 @@ describe('GenericRFQ E2E Mainnet', () => {
|
|
|
75
61
|
thirdPartyAddress: testAccount.address,
|
|
76
62
|
_amount: '1000000000000000000',
|
|
77
63
|
swapSide: SwapSide.SELL,
|
|
78
|
-
|
|
64
|
+
dexKeys: dexKey,
|
|
79
65
|
contractMethod: ContractMethod.simpleSwap,
|
|
80
66
|
network: network,
|
|
81
67
|
});
|
|
@@ -90,7 +76,7 @@ describe('GenericRFQ E2E Mainnet', () => {
|
|
|
90
76
|
thirdPartyAddress: testAccount.address,
|
|
91
77
|
_amount: '1000000000000000000',
|
|
92
78
|
swapSide: SwapSide.BUY,
|
|
93
|
-
|
|
79
|
+
dexKeys: dexKey,
|
|
94
80
|
contractMethod: ContractMethod.simpleBuy,
|
|
95
81
|
network: network,
|
|
96
82
|
});
|
|
@@ -105,7 +91,7 @@ describe('GenericRFQ E2E Mainnet', () => {
|
|
|
105
91
|
thirdPartyAddress: testAccount.address,
|
|
106
92
|
_amount: '1000000000000000000',
|
|
107
93
|
swapSide: SwapSide.BUY,
|
|
108
|
-
|
|
94
|
+
dexKeys: dexKey,
|
|
109
95
|
contractMethod: ContractMethod.simpleBuy,
|
|
110
96
|
network: network,
|
|
111
97
|
});
|
|
@@ -337,6 +337,15 @@ export const UniswapV2Config: DexConfigMap<DexParams> = {
|
|
|
337
337
|
feeCode: 30,
|
|
338
338
|
},
|
|
339
339
|
},
|
|
340
|
+
ArenaDex: {
|
|
341
|
+
[Network.AVALANCHE]: {
|
|
342
|
+
factoryAddress: '0x231DF4D421f1F9e0AAe9bA3634a87EBC87A09c39',
|
|
343
|
+
initCode:
|
|
344
|
+
'0x5eae27f407e5d417db3b2c176a2221883934aa8eecf365f8795afb69ee0b23d1',
|
|
345
|
+
poolGasCost: 120 * 1000,
|
|
346
|
+
feeCode: 30,
|
|
347
|
+
},
|
|
348
|
+
},
|
|
340
349
|
PancakeSwap: {
|
|
341
350
|
[Network.BSC]: {
|
|
342
351
|
factoryAddress: '0xBCfCcbde45cE874adCB698cC183deBcF17952812',
|
|
@@ -2,11 +2,101 @@ import dotenv from 'dotenv';
|
|
|
2
2
|
dotenv.config();
|
|
3
3
|
|
|
4
4
|
import { testE2E } from '../../../tests/utils-e2e';
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
Tokens,
|
|
7
|
+
Holders,
|
|
8
|
+
NativeTokenSymbols,
|
|
9
|
+
} from '../../../tests/constants-e2e';
|
|
6
10
|
import { Network, ContractMethod, SwapSide } from '../../constants';
|
|
7
11
|
import { StaticJsonRpcProvider } from '@ethersproject/providers';
|
|
8
12
|
import { generateConfig } from '../../config';
|
|
9
13
|
|
|
14
|
+
function testForNetwork(
|
|
15
|
+
network: Network,
|
|
16
|
+
dexKey: string,
|
|
17
|
+
tokenASymbol: string,
|
|
18
|
+
tokenBSymbol: string,
|
|
19
|
+
tokenAAmount: string,
|
|
20
|
+
tokenBAmount: string,
|
|
21
|
+
nativeTokenAmount: string,
|
|
22
|
+
) {
|
|
23
|
+
const provider = new StaticJsonRpcProvider(
|
|
24
|
+
generateConfig(network).privateHttpProvider,
|
|
25
|
+
network,
|
|
26
|
+
);
|
|
27
|
+
const tokens = Tokens[network];
|
|
28
|
+
const holders = Holders[network];
|
|
29
|
+
const nativeTokenSymbol = NativeTokenSymbols[network];
|
|
30
|
+
|
|
31
|
+
const sideToContractMethods = new Map([
|
|
32
|
+
[SwapSide.SELL, [ContractMethod.swapExactAmountIn]],
|
|
33
|
+
[SwapSide.BUY, [ContractMethod.swapExactAmountOut]],
|
|
34
|
+
]);
|
|
35
|
+
|
|
36
|
+
describe(`${network}`, () => {
|
|
37
|
+
sideToContractMethods.forEach((contractMethods, side) =>
|
|
38
|
+
describe(`${side}`, () => {
|
|
39
|
+
contractMethods.forEach((contractMethod: ContractMethod) => {
|
|
40
|
+
describe(`${contractMethod}`, () => {
|
|
41
|
+
it(`${nativeTokenSymbol} -> ${tokenASymbol}`, async () => {
|
|
42
|
+
await testE2E(
|
|
43
|
+
tokens[nativeTokenSymbol],
|
|
44
|
+
tokens[tokenASymbol],
|
|
45
|
+
holders[nativeTokenSymbol],
|
|
46
|
+
side === SwapSide.SELL ? nativeTokenAmount : tokenAAmount,
|
|
47
|
+
side,
|
|
48
|
+
dexKey,
|
|
49
|
+
contractMethod,
|
|
50
|
+
network,
|
|
51
|
+
provider,
|
|
52
|
+
);
|
|
53
|
+
});
|
|
54
|
+
it(`${tokenASymbol} -> ${nativeTokenSymbol}`, async () => {
|
|
55
|
+
await testE2E(
|
|
56
|
+
tokens[tokenASymbol],
|
|
57
|
+
tokens[nativeTokenSymbol],
|
|
58
|
+
holders[tokenASymbol],
|
|
59
|
+
side === SwapSide.SELL ? tokenAAmount : nativeTokenAmount,
|
|
60
|
+
side,
|
|
61
|
+
dexKey,
|
|
62
|
+
contractMethod,
|
|
63
|
+
network,
|
|
64
|
+
provider,
|
|
65
|
+
);
|
|
66
|
+
});
|
|
67
|
+
it(`${tokenASymbol} -> ${tokenBSymbol}`, async () => {
|
|
68
|
+
await testE2E(
|
|
69
|
+
tokens[tokenASymbol],
|
|
70
|
+
tokens[tokenBSymbol],
|
|
71
|
+
holders[tokenASymbol],
|
|
72
|
+
side === SwapSide.SELL ? tokenAAmount : tokenBAmount,
|
|
73
|
+
side,
|
|
74
|
+
dexKey,
|
|
75
|
+
contractMethod,
|
|
76
|
+
network,
|
|
77
|
+
provider,
|
|
78
|
+
);
|
|
79
|
+
});
|
|
80
|
+
it(`${tokenBSymbol} -> ${tokenASymbol}`, async () => {
|
|
81
|
+
await testE2E(
|
|
82
|
+
tokens[tokenBSymbol],
|
|
83
|
+
tokens[tokenASymbol],
|
|
84
|
+
holders[tokenBSymbol],
|
|
85
|
+
side === SwapSide.SELL ? tokenBAmount : tokenAAmount,
|
|
86
|
+
side,
|
|
87
|
+
dexKey,
|
|
88
|
+
contractMethod,
|
|
89
|
+
network,
|
|
90
|
+
provider,
|
|
91
|
+
);
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
}),
|
|
96
|
+
);
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
|
|
10
100
|
describe('UniswapV2 E2E Avalanche', () => {
|
|
11
101
|
const network = Network.AVALANCHE;
|
|
12
102
|
const tokens = Tokens[network];
|
|
@@ -196,6 +286,20 @@ describe('UniswapV2 E2E Avalanche', () => {
|
|
|
196
286
|
});
|
|
197
287
|
});
|
|
198
288
|
|
|
289
|
+
describe('ArenaDex', () => {
|
|
290
|
+
const dexKey = 'ArenaDex';
|
|
291
|
+
|
|
292
|
+
testForNetwork(
|
|
293
|
+
network,
|
|
294
|
+
dexKey,
|
|
295
|
+
'ARENA',
|
|
296
|
+
'WAVAX',
|
|
297
|
+
'10000000',
|
|
298
|
+
'10000000',
|
|
299
|
+
'10000000',
|
|
300
|
+
);
|
|
301
|
+
});
|
|
302
|
+
|
|
199
303
|
describe('TraderJoe', () => {
|
|
200
304
|
const dexKey = 'TraderJoe';
|
|
201
305
|
describe('TraderJoe: Fail: (Joe: K)', () => {
|
|
@@ -390,9 +390,10 @@ export const UniswapV3Config: DexConfigMap<DexParams> = {
|
|
|
390
390
|
quoter: '0x254cF9E1E6e233aa1AC962CB9B05b2cfeAaE15b0',
|
|
391
391
|
router: '0x1b2b6cE813b99b840Fe632c63bcA5394938Ef01e',
|
|
392
392
|
supportedFees: SUPPORTED_FEES,
|
|
393
|
-
tickSpacings: [1n, 50n, 100n, 200n, 2000n],
|
|
393
|
+
tickSpacings: [1n, 10n, 50n, 100n, 200n, 2000n],
|
|
394
394
|
tickSpacingsToFees: {
|
|
395
395
|
'1': 100n,
|
|
396
|
+
'10': 500n,
|
|
396
397
|
'50': 500n,
|
|
397
398
|
'100': 500n,
|
|
398
399
|
'200': 3000n,
|
package/tests/constants-e2e.ts
CHANGED
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
SmartTokenParams,
|
|
3
|
-
balanceOfFn,
|
|
4
|
-
allowanceFn,
|
|
5
|
-
SmartToken,
|
|
6
|
-
balancesFn,
|
|
7
|
-
allowedFn,
|
|
8
|
-
_balancesFn,
|
|
9
|
-
_allowancesFn,
|
|
10
|
-
balanceAndBlacklistStatesFn,
|
|
11
|
-
} from '../tests/smart-tokens';
|
|
12
|
-
import { Address } from '../src/types';
|
|
1
|
+
import { Address, Token } from '../src/types';
|
|
13
2
|
import { ETHER_ADDRESS, Network } from '../src/constants';
|
|
14
3
|
|
|
15
4
|
export const GIFTER_ADDRESS = '0xb22fC4eC94D555A5049593ca4552c810Fb8a6d00';
|
|
@@ -17,7 +6,7 @@ export const GENERIC_ADDR1 = '0xbe9317f6711e2da074fe1f168fd9c402bc0a9d1b';
|
|
|
17
6
|
export const GENERIC_ADDR2 = '0x230a1ac45690b9ae1176389434610b9526d2f21b';
|
|
18
7
|
|
|
19
8
|
export const Tokens: {
|
|
20
|
-
[network: number]: { [symbol: string]:
|
|
9
|
+
[network: number]: { [symbol: string]: Token };
|
|
21
10
|
} = {
|
|
22
11
|
[Network.MAINNET]: {
|
|
23
12
|
sUSDS: {
|
|
@@ -132,8 +121,6 @@ export const Tokens: {
|
|
|
132
121
|
address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
|
|
133
122
|
decimals: 6,
|
|
134
123
|
symbol: 'USDC',
|
|
135
|
-
addBalance: balanceAndBlacklistStatesFn,
|
|
136
|
-
addAllowance: allowedFn,
|
|
137
124
|
},
|
|
138
125
|
INST: {
|
|
139
126
|
address: '0x6f40d4A6237C257fff2dB00FA0510DeEECd303eb',
|
|
@@ -166,8 +153,6 @@ export const Tokens: {
|
|
|
166
153
|
WBTC: {
|
|
167
154
|
address: '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599',
|
|
168
155
|
decimals: 8,
|
|
169
|
-
addBalance: balancesFn,
|
|
170
|
-
addAllowance: allowedFn,
|
|
171
156
|
},
|
|
172
157
|
sBTC: {
|
|
173
158
|
address: '0xfe18be6b3bd88a2d2a7f928d00292e7a9963cfc6',
|
|
@@ -184,8 +169,6 @@ export const Tokens: {
|
|
|
184
169
|
USDT: {
|
|
185
170
|
address: '0xdac17f958d2ee523a2206206994597c13d831ec7',
|
|
186
171
|
decimals: 6,
|
|
187
|
-
addBalance: balancesFn,
|
|
188
|
-
addAllowance: allowedFn,
|
|
189
172
|
},
|
|
190
173
|
STETH: {
|
|
191
174
|
address: '0xae7ab96520de3a18e5e111b5eaab095312d7fe84',
|
|
@@ -214,8 +197,6 @@ export const Tokens: {
|
|
|
214
197
|
WETH: {
|
|
215
198
|
address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
|
|
216
199
|
decimals: 18,
|
|
217
|
-
addBalance: balanceOfFn,
|
|
218
|
-
addAllowance: allowanceFn,
|
|
219
200
|
},
|
|
220
201
|
PSP: {
|
|
221
202
|
address: '0xcafe001067cdef266afb7eb5a286dcfd277f3de5',
|
|
@@ -232,8 +213,6 @@ export const Tokens: {
|
|
|
232
213
|
DAI: {
|
|
233
214
|
address: '0x6b175474e89094c44da98b954eedeac495271d0f',
|
|
234
215
|
decimals: 18,
|
|
235
|
-
addBalance: balanceOfFn,
|
|
236
|
-
addAllowance: allowanceFn,
|
|
237
216
|
},
|
|
238
217
|
MLN: {
|
|
239
218
|
address: '0xec67005c4e498ec7f55e092bd1d35cbc47c91892',
|
|
@@ -617,8 +596,6 @@ export const Tokens: {
|
|
|
617
596
|
USDCe: {
|
|
618
597
|
address: '0x2791bca1f2de4661ed88a30c99a7a9449aa84174',
|
|
619
598
|
decimals: 6,
|
|
620
|
-
addBalance: _balancesFn,
|
|
621
|
-
addAllowance: _allowancesFn,
|
|
622
599
|
},
|
|
623
600
|
MLN: {
|
|
624
601
|
address: '0xa9f37d84c856fda3812ad0519dad44fa0a3fe207',
|
|
@@ -677,8 +654,6 @@ export const Tokens: {
|
|
|
677
654
|
WMATIC: {
|
|
678
655
|
address: '0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270',
|
|
679
656
|
decimals: 18,
|
|
680
|
-
addBalance: balanceOfFn,
|
|
681
|
-
addAllowance: allowanceFn,
|
|
682
657
|
},
|
|
683
658
|
AMWMATIC: {
|
|
684
659
|
address: '0x8dF3aad3a84da6b69A4DA8aeC3eA40d9091B2Ac4',
|
|
@@ -1060,8 +1035,6 @@ export const Tokens: {
|
|
|
1060
1035
|
USDT: {
|
|
1061
1036
|
address: '0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7',
|
|
1062
1037
|
decimals: 6,
|
|
1063
|
-
addAllowance: _allowancesFn,
|
|
1064
|
-
addBalance: balanceOfFn,
|
|
1065
1038
|
},
|
|
1066
1039
|
POPS: {
|
|
1067
1040
|
address: '0x240248628B7B6850352764C5dFa50D1592A033A8',
|
|
@@ -1070,8 +1043,6 @@ export const Tokens: {
|
|
|
1070
1043
|
WAVAX: {
|
|
1071
1044
|
address: '0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7',
|
|
1072
1045
|
decimals: 18,
|
|
1073
|
-
addAllowance: allowanceFn,
|
|
1074
|
-
addBalance: balanceOfFn,
|
|
1075
1046
|
},
|
|
1076
1047
|
sAVAX: {
|
|
1077
1048
|
address: '0x2b2C81e08f1Af8835a78Bb2A90AE924ACE0eA4bE',
|
|
@@ -1206,6 +1177,10 @@ export const Tokens: {
|
|
|
1206
1177
|
address: '0x6ab707aca953edaefbc4fd23ba73294241490620',
|
|
1207
1178
|
decimals: 6,
|
|
1208
1179
|
},
|
|
1180
|
+
ARENA: {
|
|
1181
|
+
address: '0xB8d7710f7d8349A506b75dD184F05777c82dAd0C',
|
|
1182
|
+
decimals: 18,
|
|
1183
|
+
},
|
|
1209
1184
|
TRYB: {
|
|
1210
1185
|
address: '0x564a341df6c126f90cf3ecb92120fd7190acb401',
|
|
1211
1186
|
decimals: 6,
|
|
@@ -1231,8 +1206,6 @@ export const Tokens: {
|
|
|
1231
1206
|
WETH: {
|
|
1232
1207
|
address: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1',
|
|
1233
1208
|
decimals: 18,
|
|
1234
|
-
addBalance: _balancesFn,
|
|
1235
|
-
addAllowance: _allowancesFn,
|
|
1236
1209
|
},
|
|
1237
1210
|
waArbWETH: {
|
|
1238
1211
|
address: '0x4ce13a79f45c1be00bdabd38b764ac28c082704e',
|
|
@@ -1247,8 +1220,6 @@ export const Tokens: {
|
|
|
1247
1220
|
address: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831',
|
|
1248
1221
|
decimals: 6,
|
|
1249
1222
|
symbol: 'USDC',
|
|
1250
|
-
addBalance: balanceAndBlacklistStatesFn,
|
|
1251
|
-
addAllowance: allowedFn,
|
|
1252
1223
|
},
|
|
1253
1224
|
SUSHI: {
|
|
1254
1225
|
address: '0xd4d42F0b6DEF4CE0383636770eF773390d85c61A',
|
|
@@ -1269,8 +1240,6 @@ export const Tokens: {
|
|
|
1269
1240
|
USDT: {
|
|
1270
1241
|
address: '0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9',
|
|
1271
1242
|
decimals: 6,
|
|
1272
|
-
addBalance: _balancesFn,
|
|
1273
|
-
addAllowance: _allowancesFn,
|
|
1274
1243
|
},
|
|
1275
1244
|
waArbUSDT: {
|
|
1276
1245
|
address: '0xa6D12574eFB239FC1D2099732bd8b5dC6306897F',
|
|
@@ -1415,8 +1384,6 @@ export const Tokens: {
|
|
|
1415
1384
|
WETH: {
|
|
1416
1385
|
address: '0x4200000000000000000000000000000000000006',
|
|
1417
1386
|
decimals: 18,
|
|
1418
|
-
addBalance: balanceOfFn,
|
|
1419
|
-
addAllowance: allowanceFn,
|
|
1420
1387
|
},
|
|
1421
1388
|
ETH: { address: ETHER_ADDRESS, decimals: 18 },
|
|
1422
1389
|
USDCe: {
|
|
@@ -2069,6 +2036,7 @@ export const Holders: {
|
|
|
2069
2036
|
PHAR: '0x654296D56532f62B7d91d335791d3c364a9385b5',
|
|
2070
2037
|
stataUSDT: '', // no holders yet
|
|
2071
2038
|
aaveUSDT: '0xB2d3ad6e99D2A043EF77e3812461Ad2D4Ae3da8B',
|
|
2039
|
+
ARENA: '0xEBf747761b6942adaBAA58A594BA24931AfA0a3F',
|
|
2072
2040
|
TRYB: '0x7137FdccfB6Ee406771E8F5c1B466e4d3074dd45',
|
|
2073
2041
|
},
|
|
2074
2042
|
[Network.ARBITRUM]: {
|
|
@@ -2226,20 +2194,6 @@ export const Holders: {
|
|
|
2226
2194
|
},
|
|
2227
2195
|
};
|
|
2228
2196
|
|
|
2229
|
-
export const SmartTokens = Object.keys(Tokens).reduce((acc, _network) => {
|
|
2230
|
-
const network = parseInt(_network, 10);
|
|
2231
|
-
acc[+network] = Object.keys(Tokens[network]).reduce((_acc, tokenName) => {
|
|
2232
|
-
const token: SmartTokenParams = Tokens[network][tokenName]!;
|
|
2233
|
-
|
|
2234
|
-
if (token.addAllowance && token.addBalance) {
|
|
2235
|
-
_acc[tokenName] = new SmartToken(token);
|
|
2236
|
-
}
|
|
2237
|
-
|
|
2238
|
-
return _acc;
|
|
2239
|
-
}, {} as Record<string, SmartToken>);
|
|
2240
|
-
return acc;
|
|
2241
|
-
}, {} as Record<number, Record<string, SmartToken>>);
|
|
2242
|
-
|
|
2243
2197
|
export const NativeTokenSymbols: { [network: number]: string } = {
|
|
2244
2198
|
[Network.MAINNET]: 'ETH',
|
|
2245
2199
|
[Network.POLYGON]: 'MATIC',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ethers } from 'ethers';
|
|
2
|
-
import {
|
|
2
|
+
import { TenderlySimulator } from './tenderly-simulation';
|
|
3
3
|
|
|
4
4
|
describe('Tenderly', () => {
|
|
5
|
-
const tenderly =
|
|
5
|
+
const tenderly = TenderlySimulator.getInstance();
|
|
6
6
|
const USDC = '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48';
|
|
7
7
|
const USDT = '0xdac17f958d2ee523a2206206994597c13d831ec7';
|
|
8
8
|
const account = '0x89f53c184ed91cd333fdec0eceeddcaea0cc28cf';
|