-
-
Notifications
You must be signed in to change notification settings - Fork 962
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
Client doesn't work correctly with anvil #2450
Comments
Hello @poolpitako. Please provide a minimal reproduction using StackBlitz, TypeScript Playground (for type issues), or a separate minimal GitHub repository. Minimal reproductions are required as they save us a lot of time reproducing your config/environment and issue, and allow us to help you faster. Once a minimal reproduction is added, a team member will confirm it works, then re-open the issue. |
@jxom Ticket contains information on how to reproduce. |
The second snippet you provided is an invalid JSON-RPC request (ie. missing |
@jxom are you testing against an anvil node? |
yes. the entire viem test suite is ran against a local anvil node. please post a minimal reproduction with minimal dependencies (not even docker). |
@jxom perfect. I found my issue. I was running on a terminal with an old node version.
When I saw the Sorry for the time wasted. |
This issue has been locked since it has been closed for more than 14 days. If you found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest Viem version. If you have any questions or comments you can create a new discussion thread. |
Check existing issues
Viem Version
2.16.4
Current Behavior
Calling
client.getBlockNumber()
orclient.getChainId()
doesn't work correctly with anvil.Expected Behavior
viem should work correctly with anvil.
Steps To Reproduce
Start an anvil fork
Run the following code:
You will notice that using a random node it works but it fails when using anvil.
Link to Minimal Reproducible Example
No response
Anything else?
Working
Not working
The text was updated successfully, but these errors were encountered: