Uniswap / smart-order-router

GNU General Public License v3.0
406 stars 404 forks source link

Error: Invariant failed: PRICE_BOUNDS in AlphaRouter.route #173

Open awuuuuu opened 1 year ago

awuuuuu commented 1 year ago

I encountered this error when calling AlphaRouter.route on Arbitrum. Can someone shed light on this?

Error msg node:18296) UnhandledPromiseRejectionWarning: Error: Invariant failed: PRICE_BOUNDS at invariant (D:\bot\node_modules\tiny-invariant\dist\tiny-invariant.cjs.js:14:11) at new Pool (D:\bot\node_modules@uniswap\smart-order-router\node_modules@uniswap\v3-sdk\dist\v3-sdk.cjs.development.js:1848:160) at V3PoolProvider.getPools (D:\bot\node_modules@uniswap\smart-order-router\build\main\providers\v3\pool-provider.js:71:26) at processTicksAndRejections (internal/process/task_queues.js:93:5) at async CachingV3PoolProvider.getPools (D:\bot\node_modules@uniswap\smart-order-router\build\main\providers\v3\caching-pool-provider.js:54:34) at async getHighestLiquidityV3USDPool (D:\bot\node_modules@uniswap\smart-order-router\build\main\util\gas-factory-helpers.js:74:26) at async MixedRouteHeuristicGasModelFactory.buildGasModel (D:\bot\node_modules@uniswap\smart-order-router\build\main\routers\alpha-router\gas-models\mixedRoute\mixed-route-heuristic-gas-model.js:42:25) at async Promise.all (index 1) at async AlphaRouter.route (D:\bot\node_modules@uniswap\smart-order-router\build\main\routers\alpha-router\alpha-router.js:332:50)

Chain 42161 'https://arb1.arbitrum.io/rpc'

this.router = new AlphaRouter({ chainId: chainId, provider: new JsonRpcProvider(mainnet) }); ... await this.router.route

tokenIn Token { chainId: 42161, decimals: 6, symbol: undefined, name: undefined, isNative: false, isToken: true, address: '0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8' }

tokenOut Token { chainId: 42161, decimals: 18, symbol: undefined, name: undefined, isNative: false, isToken: true, address: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1' }

Version "@uniswap/sdk-core": "^3.1.0", "@uniswap/smart-order-router": "^2.10.0", "@uniswap/v3-periphery": "1.0.0", "@uniswap/v3-sdk": "3.7.0",

ashaller2017 commented 11 months ago

same