-
Notifications
You must be signed in to change notification settings - Fork 48
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
Wagmi compatibility hooks #86
Comments
Hey @borgbob, this is great. It'd be amazing if you can indeed go ahead an open this as a PR (+ a very simple test) and I'll be more than happy to review and merge 🙏 |
@borgbob I followed your steps, however So far this is what I came up with, not sure if this works so please don't quote me:
Someone let me know what is the correct way to fix this. |
@mubarakone the return value of What I did in aas-frontend was create EAS in the submit handler after checking the signer was not undefined, here's how it looks like: https://github.com/avax-attestations/aas-frontend/blob/main/pages/schema/create.tsx#L77-L87 |
@mubarakone if you are using an account abstraction, can you check if it correctly implements |
Hi
I started working on an alternative frontend which uses this SDK with wagmi/viem. The frontend is part of Avalanche deployment of EAS which is being led by @cryptofish7: https://github.com/avax-attestations/aas-frontend
In the docs I found a link to a gist with some hooks which wrapped wagmi/viem clients in ethers compatible signer/provider, but the code was outdated (it was targeting ethers v5) so I had to adapt it. Here's the updated code which works with ethers v6:
If you want, I can create a PR that adds these hooks to a new module (wagmi-compat.ts) so that this functionality is more easily available to SDK users. The module would not be referenced by other modules in this package and users would have to import it directly with something like:
I would also add
viem
,wagmi
andreact
as peer dependencies.The text was updated successfully, but these errors were encountered: