examples icon indicating copy to clipboard operation
examples copied to clipboard

Can we make "quoting" example compatible with Ethers 6.*?

Open davedavinci opened this issue 1 year ago • 3 comments

I tried to make it work in a dApp using Ethers 6.11 but there's some breaking stuff in the way Ethers 5 vs 6 handle Contract instances methods, therefore await quoterContract.callStatic.quoteExactInputSingle() could not execute under Ethers 6. It would be amazing to have an updated version of this, together with a multi-hop quoting example. Keep up the good work guys.

davedavinci avatar Mar 29 '24 09:03 davedavinci

await quoterContract.quoteExactInputSingle.staticCall()

LoYeeee avatar Apr 27 '24 06:04 LoYeeee

@davedavinci I have an example working with Ethers 6.12.1 https://github.com/jfbloom22/uniswap-examples/tree/chor/quote/v3-sdk/quoting/src

Note: my example is targeting the QuoterV2 contract and currently pointed at Base chain.

FYI I found some updated examples here: https://discord.com/channels/597638925346930701/607978109089611786/948847107744333844

Hope it helps!

If this repo shows signs of being maintained, I will gladly make a PR.

jfbloom22 avatar May 23 '24 21:05 jfbloom22