@paraswap/dex-lib 3.11.0-bebop.3 → 3.11.1-algebra.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/.vscode/launch.json +53 -0
- package/.vscode/settings.json +2 -0
- package/.vscode/tasks.json +15 -0
- package/build/abi/uniswap-v3/AlienBaseV3Router.abi.json +52 -0
- package/build/abi/{angle-transmuter/ChainlinkAccessControlledOffchainAggregator.json → wombat/pool.json} +637 -594
- package/build/config.js +0 -1
- package/build/config.js.map +1 -1
- package/build/dex/aave-v1/aave-v1.js +1 -0
- package/build/dex/aave-v1/aave-v1.js.map +1 -1
- package/build/dex/aave-v2/tokens-avalanche.json +44 -0
- package/build/dex/aave-v2/tokens-mainnet.json +188 -0
- package/build/dex/aave-v2/tokens-polygon.json +44 -0
- package/build/dex/algebra/algebra-pool-v1_1.js +5 -5
- package/build/dex/algebra/algebra-pool-v1_1.js.map +1 -1
- package/build/dex/algebra/lib/AlgebraMath.js +1 -4
- package/build/dex/algebra/lib/AlgebraMath.js.map +1 -1
- package/build/dex/bProtocol.d.ts +18 -0
- package/build/dex/bProtocol.js +39 -0
- package/build/dex/bProtocol.js.map +1 -0
- package/build/dex/balancer-v3/abi/balancerBatchRouter.d.ts +729 -0
- package/build/dex/balancer-v3/abi/balancerBatchRouter.js +732 -0
- package/build/dex/balancer-v3/abi/balancerBatchRouter.js.map +1 -0
- package/build/dex/balancer-v3/abi/balancerRouter.d.ts +1406 -0
- package/build/dex/balancer-v3/abi/balancerRouter.js +1175 -0
- package/build/dex/balancer-v3/abi/balancerRouter.js.map +1 -0
- package/build/dex/balancer-v3/abi/vaultExtension.V3.d.ts +2081 -0
- package/build/dex/balancer-v3/abi/vaultExtension.V3.js +1851 -0
- package/build/dex/balancer-v3/abi/vaultExtension.V3.js.map +1 -0
- package/build/dex/balancer-v3/balancer-v3-pool.d.ts +76 -0
- package/build/dex/balancer-v3/balancer-v3-pool.js +383 -0
- package/build/dex/balancer-v3/balancer-v3-pool.js.map +1 -0
- package/build/dex/balancer-v3/balancer-v3.d.ts +57 -0
- package/build/dex/balancer-v3/balancer-v3.js +373 -0
- package/build/dex/balancer-v3/balancer-v3.js.map +1 -0
- package/build/dex/balancer-v3/config.d.ts +8 -0
- package/build/dex/balancer-v3/config.js +24 -0
- package/build/dex/balancer-v3/config.js.map +1 -0
- package/build/dex/balancer-v3/getOnChainState.d.ts +10 -0
- package/build/dex/balancer-v3/getOnChainState.js +158 -0
- package/build/dex/balancer-v3/getOnChainState.js.map +1 -0
- package/build/dex/balancer-v3/getPoolsApi.d.ts +2 -0
- package/build/dex/balancer-v3/getPoolsApi.js +81 -0
- package/build/dex/balancer-v3/getPoolsApi.js.map +1 -0
- package/build/dex/balancer-v3/getTopPoolsApi.d.ts +13 -0
- package/build/dex/balancer-v3/getTopPoolsApi.js +62 -0
- package/build/dex/balancer-v3/getTopPoolsApi.js.map +1 -0
- package/build/dex/balancer-v3/types.d.ts +63 -0
- package/build/dex/balancer-v3/types.js +3 -0
- package/build/dex/balancer-v3/types.js.map +1 -0
- package/build/dex/bancor.d.ts +26 -0
- package/build/dex/bancor.js +58 -0
- package/build/dex/bancor.js.map +1 -0
- package/build/dex/bebop/bebop.js +1 -1
- package/build/dex/bebop/bebop.js.map +1 -1
- package/build/dex/bebop/config.js +0 -5
- package/build/dex/bebop/config.js.map +1 -1
- package/build/dex/bebop/rate-fetcher.d.ts +1 -3
- package/build/dex/bebop/rate-fetcher.js +2 -42
- package/build/dex/bebop/rate-fetcher.js.map +1 -1
- package/build/dex/bebop/validators.d.ts +0 -2
- package/build/dex/bebop/validators.js +1 -9
- package/build/dex/bebop/validators.js.map +1 -1
- package/build/dex/compound.d.ts +18 -0
- package/build/dex/compound.js +46 -0
- package/build/dex/compound.js.map +1 -0
- package/build/dex/curve-v2.d.ts +58 -0
- package/build/dex/curve-v2.js +180 -0
- package/build/dex/curve-v2.js.map +1 -0
- package/build/dex/dodo-v1.d.ts +33 -0
- package/build/dex/dodo-v1.js +63 -0
- package/build/dex/dodo-v1.js.map +1 -0
- package/build/dex/fluid-dex/fluid-dex-pool.d.ts +47 -0
- package/build/dex/fluid-dex/fluid-dex-pool.js +119 -0
- package/build/dex/fluid-dex/fluid-dex-pool.js.map +1 -0
- package/build/dex/fluid-dex/fluid-dex.js +1 -1
- package/build/dex/fluid-dex/fluid-dex.js.map +1 -1
- package/build/dex/inception/inception-event-pool.d.ts +4 -4
- package/build/dex/inception/inception-event-pool.js +7 -9
- package/build/dex/inception/inception-event-pool.js.map +1 -1
- package/build/dex/inception/inception.d.ts +6 -6
- package/build/dex/inception/inception.js +16 -40
- package/build/dex/inception/inception.js.map +1 -1
- package/build/dex/inception/utils.d.ts +1 -0
- package/build/dex/inception/utils.js +22 -1
- package/build/dex/inception/utils.js.map +1 -1
- package/build/dex/lido.d.ts +19 -0
- package/build/dex/lido.js +42 -0
- package/build/dex/lido.js.map +1 -0
- package/build/dex/maker-psm/scripts/gem.abi.json +136 -0
- package/build/dex/maker-psm/scripts/validate-state.d.ts +0 -0
- package/build/dex/maker-psm/scripts/validate-state.js +185 -0
- package/build/dex/maker-psm/scripts/validate-state.js.map +1 -0
- package/build/dex/maker-psm/scripts/vat.abi.json +243 -0
- package/build/dex/onebit.d.ts +25 -0
- package/build/dex/onebit.js +42 -0
- package/build/dex/onebit.js.map +1 -0
- package/build/dex/platypus/platypus.js +17 -3
- package/build/dex/platypus/platypus.js.map +1 -1
- package/build/dex/smoothy.d.ts +26 -0
- package/build/dex/smoothy.js +48 -0
- package/build/dex/smoothy.js.map +1 -0
- package/build/dex/solidly-v3/scripts/check-event-pool-event.d.ts +1 -0
- package/build/dex/solidly-v3/scripts/check-event-pool-event.js +53 -0
- package/build/dex/solidly-v3/scripts/check-event-pool-event.js.map +1 -0
- package/build/dex/stable-pool.d.ts +28 -0
- package/build/dex/stable-pool.js +55 -0
- package/build/dex/stable-pool.js.map +1 -0
- package/build/dex/swaap-v1/swaap-v1.js +4 -0
- package/build/dex/swaap-v1/swaap-v1.js.map +1 -1
- package/build/dex/trader-joe-v2.1/trader-joe-v2.1-new.d.ts +7 -0
- package/build/dex/trader-joe-v2.1/trader-joe-v2.1-new.js +20 -0
- package/build/dex/trader-joe-v2.1/trader-joe-v2.1-new.js.map +1 -0
- package/build/dex/trader-joe-v2.1.d.ts +43 -0
- package/build/dex/trader-joe-v2.1.js +79 -0
- package/build/dex/trader-joe-v2.1.js.map +1 -0
- package/build/dex/uniswap-v3/forks/alien-base-v3/alien-base-v3.d.ts +17 -0
- package/build/dex/uniswap-v3/forks/alien-base-v3/alien-base-v3.js +64 -0
- package/build/dex/uniswap-v3/forks/alien-base-v3/alien-base-v3.js.map +1 -0
- package/build/dex/uniswap-v3/forks/alien-v3/alien-v3.d.ts +17 -0
- package/build/dex/uniswap-v3/forks/alien-v3/alien-v3.js +79 -0
- package/build/dex/uniswap-v3/forks/alien-v3/alien-v3.js.map +1 -0
- package/build/dex/uniswap-v3/uniswap-v3-pricing.d.ts +4 -0
- package/build/dex/uniswap-v3/uniswap-v3-pricing.js +43 -0
- package/build/dex/uniswap-v3/uniswap-v3-pricing.js.map +1 -0
- package/build/dex/uniswap-v3/uniswap-v3-worker.d.ts +1 -0
- package/build/dex/uniswap-v3/uniswap-v3-worker.js +10 -0
- package/build/dex/uniswap-v3/uniswap-v3-worker.js.map +1 -0
- package/build/lib/fetcher/wsFetcher.d.ts +3 -7
- package/build/lib/fetcher/wsFetcher.js +51 -64
- package/build/lib/fetcher/wsFetcher.js.map +1 -1
- package/package.json +2 -4
- package/src/config.ts +0 -1
- package/src/dex/algebra/algebra-pool-v1_1.ts +5 -5
- package/src/dex/algebra/lib/AlgebraMath.ts +1 -5
- package/src/dex/algebra/scripts/validate-state.test.ts +384 -0
- package/src/dex/bebop/bebop-e2e.test.ts +0 -21
- package/src/dex/bebop/bebop.ts +1 -1
- package/src/dex/bebop/config.ts +0 -5
- package/src/dex/bebop/rate-fetcher.ts +6 -51
- package/src/dex/bebop/validators.ts +0 -10
- package/src/dex/fluid-dex/fluid-dex.ts +0 -1
- package/src/lib/fetcher/wsFetcher.ts +66 -79
- package/build/abi/Aave_GSM.json +0 -751
- package/build/abi/Balancer.json +0 -257
- package/build/abi/BalancerV2.json +0 -1179
- package/build/abi/RamsesV2Pool.abi.json +0 -1554
- package/build/abi/RamsesV2Quoter.abi.json +0 -274
- package/build/abi/USDM.json +0 -807
- package/build/abi/UniswapV2Router.json +0 -397
- package/build/abi/angle-transmuter/ChainlinkEACAggregatorProxy.json +0 -509
- package/build/abi/cables/CablesMainnetRFQ.json +0 -1083
- package/build/abi/curve-v1/CurveBUSDv2.abi.json +0 -1356
- package/build/abi/curve-v1/CurveTokenV1.json +0 -305
- package/build/abi/curve-v1/CurveTokenV2.json +0 -318
- package/build/abi/curve-v1/CurveV1StableNg.json +0 -1452
- package/build/abi/curve-v1/CurveV2Swap.json +0 -700
- package/build/abi/curve-v1/FactoryCryptoRegistry.json +0 -316
- package/build/abi/curve-v1/FactoryRegistry.json +0 -508
- package/build/abi/curve-v1/StableSwapAave.json +0 -1152
- package/build/abi/curve-v1/StableSwapBUSD.json +0 -814
- package/build/abi/curve-v1/StableSwapCompound.json +0 -814
- package/build/abi/curve-v1/StableSwapIDLE.json +0 -1253
- package/build/abi/curve-v1/StableSwapPax.json +0 -865
- package/build/abi/curve-v1/StableSwapSnow.json +0 -900
- package/build/abi/curve-v1/StableSwapUSDN.json +0 -1004
- package/build/abi/curve-v1/StableSwapUSDT.json +0 -814
- package/build/abi/curve-v1/StableSwapY.json +0 -814
- package/build/abi/inception/inception-ineth.json +0 -609
- package/build/abi/kyberdmm/kyber-storage.abi.json +0 -824
- package/build/abi/kyberdmm.abi.json +0 -1148
- package/build/abi/maverick-v2/MaverickV2Quoter.json +0 -278
- package/build/abi/nerve/nerve-metapool.json +0 -790
- package/build/abi/uniswap-v3/UniswapV3Quoter.abi.json +0 -193
- package/build/abi/velodrome-slipstream/VelodromeSlipstreamQuoterV2.abi.json +0 -267
- package/build/dex/balancer-v1/balancer-pools.json +0 -33333
- package/build/dex/bebop/bebop.json +0 -72
- package/build/dex/bebop/websocket-fetcher.d.ts +0 -35
- package/build/dex/bebop/websocket-fetcher.js +0 -87
- package/build/dex/bebop/websocket-fetcher.js.map +0 -1
- package/build/dex/cables/cables.d.ts +0 -57
- package/build/dex/cables/cables.js +0 -471
- package/build/dex/cables/cables.js.map +0 -1
- package/build/dex/cables/config.d.ts +0 -4
- package/build/dex/cables/config.js +0 -15
- package/build/dex/cables/config.js.map +0 -1
- package/build/dex/cables/constants.d.ts +0 -19
- package/build/dex/cables/constants.js +0 -26
- package/build/dex/cables/constants.js.map +0 -1
- package/build/dex/cables/rate-fetcher.d.ts +0 -34
- package/build/dex/cables/rate-fetcher.js +0 -106
- package/build/dex/cables/rate-fetcher.js.map +0 -1
- package/build/dex/cables/types.d.ts +0 -106
- package/build/dex/cables/types.js +0 -12
- package/build/dex/cables/types.js.map +0 -1
- package/build/dex/cables/validators.d.ts +0 -5
- package/build/dex/cables/validators.js +0 -49
- package/build/dex/cables/validators.js.map +0 -1
- package/build/dex/idle-dao/idle-dao-pool.d.ts +0 -56
- package/build/dex/idle-dao/idle-dao-pool.js +0 -176
- package/build/dex/idle-dao/idle-dao-pool.js.map +0 -1
- package/build/dex/idle-dao/idle-dao-pooling-pool.d.ts +0 -16
- package/build/dex/idle-dao/idle-dao-pooling-pool.js +0 -57
- package/build/dex/idle-dao/idle-dao-pooling-pool.js.map +0 -1
- package/build/dex/idle-dao/scripts.d.ts +0 -9
- package/build/dex/idle-dao/scripts.js +0 -552
- package/build/dex/idle-dao/scripts.js.map +0 -1
- package/build/dex/inception/inception-native.d.ts +0 -43
- package/build/dex/inception/inception-native.js +0 -131
- package/build/dex/inception/inception-native.js.map +0 -1
- package/build/dex/inception/inception-pool.d.ts +0 -18
- package/build/dex/inception/inception-pool.js +0 -32
- package/build/dex/inception/inception-pool.js.map +0 -1
- package/build/dex/inception/inception-price-feed.d.ts +0 -19
- package/build/dex/inception/inception-price-feed.js +0 -51
- package/build/dex/inception/inception-price-feed.js.map +0 -1
- package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-balancerv1-curvev1-eth-usdc-gusd.json +0 -16
- package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-balancerv1-sushiv3-wbtc-eth-sushi.json +0 -16
- package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-curvev1-eth-usdc-gusd.json +0 -16
- package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-curvev1-gusd-usdc-eth.json +0 -16
- package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-dai-usdc-eth.json +0 -16
- package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-eth-usdc-dai.json +0 -16
- package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-usdc-eth-wbtc.json +0 -16
- package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-usdt-usdc-dai.json +0 -16
- package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-balancerv1-eth-usdc.json +0 -9
- package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-balancerv1-usdc-eth.json +0 -9
- package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-balancerv1-usdc-wbtc.json +0 -9
- package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-curvev1-eth-steth.json +0 -9
- package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-curvev1-steth-eth.json +0 -9
- package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-curvev1-usdc-usdt.json +0 -9
- package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-univ3-eth-usdc.json +0 -9
- package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-univ3-usdc-eth.json +0 -9
- package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-univ3-usdc-usdt.json +0 -9
- package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-balancerv1-sushiv3-wbtc-eth-sushi.json +0 -12
- package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-curvev1-eth-usdc-gusd.json +0 -7
- package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-curvev1-gusd-usdc-eth.json +0 -7
- package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-dai-usdc-eth.json +0 -7
- package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-eth-usdc-dai.json +0 -7
- package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-usdc-eth-wbtc.json +0 -12
- package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-simpleSwap-univ3-eth-usdc.json +0 -7
- package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-simpleSwap-univ3-usdc-eth.json +0 -7
- package/build/executor/fixtures/executor01/routes/price-route-multiswap-balancerv1-curvev1-eth-usdc-gusd.json +0 -78
- package/build/executor/fixtures/executor01/routes/price-route-multiswap-balancerv1-sushiv3-wbtc-eth-sushi.json +0 -81
- package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-curvev1-eth-usdc-gusd.json +0 -78
- package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-curvev1-gusd-usdc-eth.json +0 -78
- package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-dai-usdc-eth.json +0 -81
- package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-eth-usdc-dai.json +0 -81
- package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-usdc-eth-wbtc.json +0 -81
- package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-usdt-usdc-dai.json +0 -81
- package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-balancerv1-eth-usdc.json +0 -64
- package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-balancerv1-usdc-eth.json +0 -85
- package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-balancerv1-usdc-wbtc.json +0 -64
- package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-curvev1-eth-steth.json +0 -52
- package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-curvev1-steth-eth.json +0 -52
- package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-curvev1-usdc-usdt.json +0 -52
- package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-univ3-eth-usdc.json +0 -55
- package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-univ3-usdc-eth.json +0 -55
- package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-univ3-usdc-usdt.json +0 -55
- package/build/executor/fixtures/executor02/exchange-params/price-route-multiSwap-balancerv1-sushiv3-univ3-bal-eth-sushi.json +0 -23
- package/build/executor/fixtures/executor02/exchange-params/price-route-multiSwap-maverickv1-sushiv3-univ3-eth-usdc-mav.json +0 -37
- package/build/executor/fixtures/executor02/exchange-params/price-route-multiSwap-univ3-sushiv3-sushi-eth-wbtc.json +0 -23
- package/build/executor/fixtures/executor02/exchange-params/price-route-multiSwap-univ3-sushiv3-wbtc-eth-sushi.json +0 -23
- package/build/executor/fixtures/executor02/exchange-params/price-route-multiswap-curvev1-univ3-dai-usdc-eth.json +0 -51
- package/build/executor/fixtures/executor02/exchange-params/price-route-multiswap-univ3-usdt-dai-eth.json +0 -58
- package/build/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-sushiv3-balancerv1-eth-usdc.json +0 -23
- package/build/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-sushiv3-balancerv1-usdc-eth.json +0 -23
- package/build/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-sushiv3-univ3-eth-sushi.json +0 -9
- package/build/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-sushiv3-univ3-sushi-eth.json +0 -16
- package/build/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-univ3-curvev1-usdt-dai.json +0 -23
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiSwap-balancerv1-sushiv3-univ3-bal-eth-sushi.json +0 -12
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiSwap-maverickv1-sushiv3-univ3-eth-usdc-mav.json +0 -7
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiSwap-univ3-sushiv3-sushi-eth-wbtc.json +0 -12
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiSwap-univ3-sushiv3-wbtc-eth-sushi.json +0 -12
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiswap-curvev1-univ3-dai-usdc-eth.json +0 -7
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiswap-univ3-usdt-dai-eth.json +0 -7
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-simpleSwap-sushiv3-balancerv1-eth-usdc.json +0 -7
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-simpleSwap-sushiv3-balancerv1-usdc-eth.json +0 -7
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-simpleSwap-sushiv3-univ3-eth-sushi.json +0 -7
- package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-simpleSwap-sushiv3-univ3-sushi-eth.json +0 -7
- package/build/executor/fixtures/executor02/routes/price-route-multiSwap-balancerv1-sushiv3-univ3-bal-eth-sushi.json +0 -130
- package/build/executor/fixtures/executor02/routes/price-route-multiSwap-maverickv1-sushiv3-univ3-eth-usdc-mav.json +0 -136
- package/build/executor/fixtures/executor02/routes/price-route-multiSwap-univ3-sushiv3-sushi-eth-wbtc.json +0 -100
- package/build/executor/fixtures/executor02/routes/price-route-multiSwap-univ3-sushiv3-wbtc-eth-sushi.json +0 -100
- package/build/executor/fixtures/executor02/routes/price-route-multiswap-curvev1-univ3-dai-usdc-eth.json +0 -166
- package/build/executor/fixtures/executor02/routes/price-route-multiswap-univ3-usdt-dai-eth.json +0 -190
- package/build/executor/fixtures/executor02/routes/price-route-simpleSwap-sushiv3-balancerv1-eth-usdc.json +0 -114
- package/build/executor/fixtures/executor02/routes/price-route-simpleSwap-sushiv3-balancerv1-usdc-eth.json +0 -114
- package/build/executor/fixtures/executor02/routes/price-route-simpleSwap-sushiv3-univ3-eth-sushi.json +0 -55
- package/build/executor/fixtures/executor02/routes/price-route-simpleSwap-sushiv3-univ3-sushi-eth.json +0 -73
- package/build/executor/fixtures/executor02/routes/price-route-simpleSwap-univ3-curvev1-usdt-dai.json +0 -82
- package/src/dex/bebop/bebop.json +0 -72
- package/src/dex/bebop/bebop.proto +0 -15
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"options": {
|
|
3
|
-
"syntax": "proto3"
|
|
4
|
-
},
|
|
5
|
-
"nested": {
|
|
6
|
-
"bebop": {
|
|
7
|
-
"nested": {
|
|
8
|
-
"PriceUpdate": {
|
|
9
|
-
"oneofs": {
|
|
10
|
-
"_base": {
|
|
11
|
-
"oneof": ["base"]
|
|
12
|
-
},
|
|
13
|
-
"_quote": {
|
|
14
|
-
"oneof": ["quote"]
|
|
15
|
-
},
|
|
16
|
-
"_lastUpdateTs": {
|
|
17
|
-
"oneof": ["lastUpdateTs"]
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
"fields": {
|
|
21
|
-
"base": {
|
|
22
|
-
"type": "bytes",
|
|
23
|
-
"id": 1,
|
|
24
|
-
"options": {
|
|
25
|
-
"proto3_optional": true
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
"quote": {
|
|
29
|
-
"type": "bytes",
|
|
30
|
-
"id": 2,
|
|
31
|
-
"options": {
|
|
32
|
-
"proto3_optional": true
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
"lastUpdateTs": {
|
|
36
|
-
"type": "uint64",
|
|
37
|
-
"id": 3,
|
|
38
|
-
"options": {
|
|
39
|
-
"proto3_optional": true
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
"bids": {
|
|
43
|
-
"rule": "repeated",
|
|
44
|
-
"type": "float",
|
|
45
|
-
"id": 4,
|
|
46
|
-
"options": {
|
|
47
|
-
"packed": true
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
"asks": {
|
|
51
|
-
"rule": "repeated",
|
|
52
|
-
"type": "float",
|
|
53
|
-
"id": 5,
|
|
54
|
-
"options": {
|
|
55
|
-
"packed": true
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
"BebopPricingUpdate": {
|
|
61
|
-
"fields": {
|
|
62
|
-
"pairs": {
|
|
63
|
-
"rule": "repeated",
|
|
64
|
-
"type": "PriceUpdate",
|
|
65
|
-
"id": 1
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { Logger } from 'log4js';
|
|
2
|
-
import { RequestConfig, Response } from '../../dex-helper/irequest-wrapper';
|
|
3
|
-
export declare class SkippingRequest {
|
|
4
|
-
message: string;
|
|
5
|
-
constructor(message?: string);
|
|
6
|
-
}
|
|
7
|
-
export declare type RequestInfo<T> = {
|
|
8
|
-
requestFunc?: (options: RequestConfig) => Promise<Response<T> | SkippingRequest>;
|
|
9
|
-
requestOptions: RequestConfig;
|
|
10
|
-
caster: (data: unknown) => T;
|
|
11
|
-
authenticate?: (options: RequestConfig) => RequestConfig;
|
|
12
|
-
excludedFieldsCaching?: string[];
|
|
13
|
-
};
|
|
14
|
-
export declare type RequestInfoWithHandler<T> = {
|
|
15
|
-
info: RequestInfo<T>;
|
|
16
|
-
handler: (data: T) => void;
|
|
17
|
-
};
|
|
18
|
-
export declare class WebSocketFetcher<T> {
|
|
19
|
-
private logger;
|
|
20
|
-
private requests;
|
|
21
|
-
lastFetchSucceeded: boolean;
|
|
22
|
-
private stop;
|
|
23
|
-
private ws;
|
|
24
|
-
private connection;
|
|
25
|
-
constructor(requestsInfo: RequestInfoWithHandler<T>, logger: Logger);
|
|
26
|
-
private connected;
|
|
27
|
-
private connectFailed;
|
|
28
|
-
private onClose;
|
|
29
|
-
private onError;
|
|
30
|
-
private onMessage;
|
|
31
|
-
private connect;
|
|
32
|
-
startPolling(): void;
|
|
33
|
-
stopPolling(): void;
|
|
34
|
-
isPolling(): boolean;
|
|
35
|
-
}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WebSocketFetcher = exports.SkippingRequest = void 0;
|
|
4
|
-
const websocket_1 = require("websocket");
|
|
5
|
-
class SkippingRequest {
|
|
6
|
-
constructor(message = '') {
|
|
7
|
-
this.message = message;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
exports.SkippingRequest = SkippingRequest;
|
|
11
|
-
class WebSocketFetcher {
|
|
12
|
-
constructor(requestsInfo, logger) {
|
|
13
|
-
this.logger = logger;
|
|
14
|
-
this.lastFetchSucceeded = false;
|
|
15
|
-
this.stop = true;
|
|
16
|
-
this.ws = new websocket_1.client();
|
|
17
|
-
this.connection = null;
|
|
18
|
-
this.requests = requestsInfo;
|
|
19
|
-
this.ws.on('connect', this.connected.bind(this));
|
|
20
|
-
this.ws.on('connectFailed', this.connectFailed.bind(this));
|
|
21
|
-
}
|
|
22
|
-
connected(connection) {
|
|
23
|
-
this.connection = connection;
|
|
24
|
-
this.logger.info(`Connected to ${this.requests.info.requestOptions.url}`);
|
|
25
|
-
this.connection.on('error', this.onError.bind(this));
|
|
26
|
-
this.connection.on('close', this.onClose.bind(this));
|
|
27
|
-
this.connection.on('message', this.onMessage.bind(this));
|
|
28
|
-
}
|
|
29
|
-
connectFailed(error) {
|
|
30
|
-
this.logger.error(`Connect Error: ${error.toString()}`);
|
|
31
|
-
}
|
|
32
|
-
onClose() {
|
|
33
|
-
this.logger.info(`Connection closed`);
|
|
34
|
-
}
|
|
35
|
-
onError(error) {
|
|
36
|
-
this.logger.error(`Connection Error: ${error.toString()}`);
|
|
37
|
-
}
|
|
38
|
-
onMessage(message) {
|
|
39
|
-
if (message.type === 'utf8') {
|
|
40
|
-
const response = JSON.parse(message.utf8Data);
|
|
41
|
-
const reqInfo = this.requests;
|
|
42
|
-
const info = reqInfo.info;
|
|
43
|
-
const options = reqInfo.info.requestOptions;
|
|
44
|
-
this.logger.debug(`(${options.url}) received new data`);
|
|
45
|
-
try {
|
|
46
|
-
const parsedData = info.caster(response);
|
|
47
|
-
reqInfo.handler(parsedData);
|
|
48
|
-
}
|
|
49
|
-
catch (e) {
|
|
50
|
-
this.logger.info(e);
|
|
51
|
-
this.logger.info(`(${options.url}) received incorrect data ${JSON.stringify(response).replace(/(?:\r\n|\r|\n)/g, ' ')}`, e);
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
connect() {
|
|
57
|
-
const authorization = this.requests.info.requestOptions.headers.authorization;
|
|
58
|
-
const name = this.requests.info.requestOptions.headers.name;
|
|
59
|
-
if (typeof authorization !== 'string') {
|
|
60
|
-
throw new Error('Authorization header is not a string');
|
|
61
|
-
}
|
|
62
|
-
if (typeof name !== 'string') {
|
|
63
|
-
throw new Error('Name header is not a string');
|
|
64
|
-
}
|
|
65
|
-
this.ws.connect(this.requests.info.requestOptions.url, undefined, undefined, {
|
|
66
|
-
Authorization: authorization,
|
|
67
|
-
name: name,
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
startPolling() {
|
|
71
|
-
this.stop = false;
|
|
72
|
-
this.connect();
|
|
73
|
-
this.logger.info(`Connection started for ${this.requests.info.requestOptions.url}`);
|
|
74
|
-
}
|
|
75
|
-
stopPolling() {
|
|
76
|
-
if (this.connection) {
|
|
77
|
-
this.connection.close();
|
|
78
|
-
}
|
|
79
|
-
this.stop = true;
|
|
80
|
-
this.logger.info(`Connection stopped for ${this.requests.info.requestOptions.url}`);
|
|
81
|
-
}
|
|
82
|
-
isPolling() {
|
|
83
|
-
return !this.stop;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
exports.WebSocketFetcher = WebSocketFetcher;
|
|
87
|
-
//# sourceMappingURL=websocket-fetcher.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"websocket-fetcher.js","sourceRoot":"","sources":["../../../src/dex/bebop/websocket-fetcher.ts"],"names":[],"mappings":";;;AAEA,yCAGmB;AAEnB,MAAa,eAAe;IAC1B,YAAmB,UAAU,EAAE;QAAZ,YAAO,GAAP,OAAO,CAAK;IAAG,CAAC;CACpC;AAFD,0CAEC;AAiBD,MAAa,gBAAgB;IAO3B,YAAY,YAAuC,EAAU,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QALpE,uBAAkB,GAAY,KAAK,CAAC;QACnC,SAAI,GAAY,IAAI,CAAC;QACrB,OAAE,GAAoB,IAAI,kBAAe,EAAE,CAAC;QAC5C,eAAU,GAA+B,IAAI,CAAC;QAGpD,IAAI,CAAC,QAAQ,GAAG,YAAY,CAAC;QAC7B,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QACjD,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,eAAe,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7D,CAAC;IAEO,SAAS,CAAC,UAA+B;QAC/C,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,EAAE,CAAC,CAAC;QAC1E,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QACrD,IAAI,CAAC,UAAU,CAAC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Ac,CAAC,GAAG,EAAE,CAClE,CAAC;IACJ,CAAC;IAED,SAAS;QACP,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;IACpB,CAAC;CACF;AAnGD,4CAmGC"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { Address, NumberAsString, OptimalSwapExchange, SwapSide } from '@paraswap/core';
|
|
2
|
-
import { AsyncOrSync } from 'ts-essentials';
|
|
3
|
-
import { Network } from '../../constants';
|
|
4
|
-
import { IDexHelper } from '../../dex-helper';
|
|
5
|
-
import { AdapterExchangeParam, DexExchangeParam, ExchangePrices, ExchangeTxInfo, Logger, PoolLiquidity, PoolPrices, PreprocessTransactionOptions, Token, TransferFeeParams } from '../../types';
|
|
6
|
-
import { IDex } from '../idex';
|
|
7
|
-
import { SimpleExchange } from '../simple-exchange';
|
|
8
|
-
import { CablesData } from './types';
|
|
9
|
-
import { Interface } from 'ethers/lib/utils';
|
|
10
|
-
export declare class Cables extends SimpleExchange implements IDex<any> {
|
|
11
|
-
readonly network: Network;
|
|
12
|
-
readonly dexKey: string;
|
|
13
|
-
readonly dexHelper: IDexHelper;
|
|
14
|
-
readonly mainnetRFQAddress: string;
|
|
15
|
-
protected rfqInterface: Interface;
|
|
16
|
-
static dexKeysWithNetwork: {
|
|
17
|
-
key: string;
|
|
18
|
-
networks: Network[];
|
|
19
|
-
}[];
|
|
20
|
-
private rateFetcher;
|
|
21
|
-
logger: Logger;
|
|
22
|
-
private tokensMap;
|
|
23
|
-
constructor(network: Network, dexKey: string, dexHelper: IDexHelper, mainnetRFQAddress?: string, rfqInterface?: Interface);
|
|
24
|
-
hasConstantPriceLargeAmounts: boolean;
|
|
25
|
-
needsSequentialPreprocessing?: boolean | undefined;
|
|
26
|
-
preProcessTransaction?(optimalSwapExchange: OptimalSwapExchange<CablesData>, srcToken: Token, destToken: Token, side: SwapSide, options: PreprocessTransactionOptions): Promise<[OptimalSwapExchange<CablesData>, ExchangeTxInfo]>;
|
|
27
|
-
getDexParam(srcToken: Address, destToken: Address, srcAmount: NumberAsString, destAmount: NumberAsString, recipient: Address, data: CablesData, side: SwapSide): DexExchangeParam;
|
|
28
|
-
getAdapterParam(srcToken: string, destToken: string, srcAmount: string, destAmount: string, data: CablesData, side: SwapSide): AdapterExchangeParam;
|
|
29
|
-
normalizeToken(token: Token): Token;
|
|
30
|
-
normalizeTokenAddress(address: Address): Address;
|
|
31
|
-
getTokenFromAddress(address: Address): Token;
|
|
32
|
-
/**
|
|
33
|
-
* POOLS
|
|
34
|
-
*/
|
|
35
|
-
getPoolIdentifier(srcAddress: Address, destAddress: Address, mm?: string): string;
|
|
36
|
-
getPoolIdentifiers(srcToken: Token, destToken: Token, side: SwapSide, blockNumber: number): Promise<string[]>;
|
|
37
|
-
getPricesVolume(srcToken: Token, destToken: Token, amounts: bigint[], side: SwapSide, blockNumber: number, limitPools?: string[], transferFees?: TransferFeeParams, isFirstSwap?: boolean): Promise<ExchangePrices<CablesData> | null>;
|
|
38
|
-
getCalldataGasCost(poolPrices: PoolPrices<CablesData>): number | number[];
|
|
39
|
-
initializePricing(blockNumber: number): Promise<void>;
|
|
40
|
-
getAdapters(side: SwapSide): {
|
|
41
|
-
name: string;
|
|
42
|
-
index: number;
|
|
43
|
-
}[] | null;
|
|
44
|
-
releaseResources?(): AsyncOrSync<void>;
|
|
45
|
-
normalizeAddress(address: string): string;
|
|
46
|
-
getTopPoolsForToken(tokenAddress: Address, limit: number): Promise<PoolLiquidity[]>;
|
|
47
|
-
/**
|
|
48
|
-
* CACHED UTILS
|
|
49
|
-
*/
|
|
50
|
-
getCachedTokens(): Promise<any>;
|
|
51
|
-
getCachedPairs(): Promise<any>;
|
|
52
|
-
getCachedPrices(): Promise<any>;
|
|
53
|
-
getCachedTokensAddr(): Promise<any>;
|
|
54
|
-
getPairString(baseToken: Token, quoteToken: Token): string;
|
|
55
|
-
private findKeyByAddress;
|
|
56
|
-
getPairData(srcToken: Token, destToken: Token): Promise<any>;
|
|
57
|
-
}
|