Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Uniswap V3 error while fetching quote #173

Open
s-pcode opened this issue May 9, 2023 · 4 comments
Open

Uniswap V3 error while fetching quote #173

s-pcode opened this issue May 9, 2023 · 4 comments

Comments

@s-pcode
Copy link

s-pcode commented May 9, 2023

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.

@lukese
Copy link

lukese commented Jun 9, 2023

It could be because you are using ethers 6.0, which doesn't appear to be supported as I have found

@Kundannetset
Copy link

Not working, any update @lukese @s-pcode @felipebrahm @justindomingue @cmcewen

@s-pcode
Copy link
Author

s-pcode commented Apr 16, 2024

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.

@Kundannetset
Copy link

Still I using "ethers": "^5.7.2", but not working @s-pcode

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants