-
Notifications
You must be signed in to change notification settings - Fork 4
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
Test wagmi compatibility of chains #99
Comments
I can't think of a reason why Viem (Wagmi) wouldn't work with a given chain, other than if we messed up the configuration here somehow. In my understanding, Viem is just a simple interface between your code and the RPC provider (aka an ethers.js replacement). Wagmi is just the layer on top of Viem that provides some nice React hooks. Currently, the ping providers script does the following for each chain:
In this comment you mentioned testing that the "wallet connection actually works". We could quite easily add an automated .simulateContract() call (same as ethers.js I guess it boils down to what are we really trying to test here. With the current setup we are testing that:
Imo, these are already a pretty good guarantee that the config in this repo is good. |
Mainly two things can go wrong
So in short, we need a good guarantee about that when we integrate a new chain to the Market, it will work. Currently I do the manual QA so it's not scalable, and it also limits the reusability of @api3/chains on other frontends (of ours). This may not be the correct solution but the problem stands, "it should work on this chain" and "it works on this chain" are very different things, the former necessitates QA downstream. |
not sure if this should be a new issue but it would be nice to have a viem export similar to |
ah right, didn't see that |
#84 has the package export chains formatted as objects that wagmi recognizes. However, we don't want to do this for chains on which wagmi doesn't work (for whatever reason). See #85 (comment) for more information.
Ideally, we would have end to end tests somewhere that confirms that wagmi works with the exported object. I'm aware that this would bloat up this repo a lot, but we need it somewhere to avoid replicating in all the other frontend implementations that depend on this.
The text was updated successfully, but these errors were encountered: