Open s-pcode opened 1 year ago
It could be because you are using ethers 6.0, which doesn't appear to be supported as I have found
Not working, any update @lukese @s-pcode @felipebrahm @justindomingue @cmcewen
hey @kundannetsetDemo, use ethers 5.7 and I moved onto using the universal router sdk for swapping on Uniswap which is more efficient. You can find a guide here.
Still I using "ethers": "^5.7.2", but not working @s-pcode
This error does not occur every-time but happens frequently sometime.
Error: call revert exception [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ] (method="token0()", data="0x", errorArgs=null, errorName=null, errorSignature=null, reason=null, code=CALL_EXCEPTION, version=abi/5.7.0)
I have gone through the github example mentioned here and mostly I guess the issue comes when fetching the poolInfo as mentioned below:
const [token0, token1, fee, tickSpacing, liquidity, slot0] = await Promise.all([ poolContract.token0(), poolContract.token1(), poolContract.fee(), poolContract.tickSpacing(), poolContract.liquidity(), poolContract.slot0(), ]);
But I'm not sure why the error comes with selected pool pairs only. The same pool pair is available to to swap on app.uniswap.org without any issues. Please help me figure this out. The pool pair used to test was weth and matic on polygon chain.