Closed tadad closed 1 month ago
We already do this https://github.com/wevm/viem/blob/main/src/utils/rpc/http.ts#L92.
Please provide a minimal reproducible example of the issue you are facing and I will reopen the issue.
Hello @tadad.
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.
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.18.2
Current Behavior
when you call
getChainId
it formats the rpc request aswhich is incorrect and causes issues with most rpc providers I'm aware of
Expected Behavior
should succeed by adding
jsonrpc: '2.0'
to the requestSteps To Reproduce
I'm running this against
alchemyplatform/rundler
and it's failingLink to Minimal Reproducible Example
No response
Anything else?
No response