Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supporting Viem #156

Open
StKostyantin opened this issue May 10, 2023 · 5 comments
Open

Supporting Viem #156

StKostyantin opened this issue May 10, 2023 · 5 comments

Comments

@StKostyantin
Copy link

Viem library shows better results than ether. It has test coverage, smaller size, clearer errors, and much more. More and more projects will switch to this library.
It would be nice to add support for it so that the curve sdk can be used with Viem.

@ZiggStardust
Copy link

+1 for this

@Macket
Copy link
Contributor

Macket commented Aug 1, 2023

Oh, I don't think we will ever switch to another lib. Too much pain. Also we use ethcall which works only with ethers.

@ZiggStardust
Copy link

ZiggStardust commented Aug 1, 2023

it's still possible to use with Viem @StKostyantin, i've got it implemented on the frontend using wagmi and viem if you want details it's just about making sure you grab the provider from the connected account, you have to make sure connector is defined etc and then setup curve.init like so:

const { connector } = useAccount()

const provider = await connector?.options?.getProvider();

await curve.init("Web3", { externalProvider: provider, ... 

(simple version)

@jxom
Copy link

jxom commented Aug 1, 2023

Also we use ethcall which works only with ethers.

fwiw, viem has ethcall‘s functionality already built-in.

happy to answer any questions if it is ever of interest to switch to viem!

@hammeiam
Copy link

+1 on this, viem is excellent and the whole industry is moving that way. As jxom pointed out, viem's automatic call bundling is really convenient!

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

No branches or pull requests

5 participants