You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When issuing single-parameter json-rpc requests to endpoints like eth_getBalance, it seems they are not serialized correctly to still send an array of params in JSON, failing with the following error: ErrorPayload { code: -32600, message: "Invalid json-rpc request", data: None }
The workaround is to make Params be a Vec<_>, but this should not be necessary.
The text was updated successfully, but these errors were encountered:
JSON-RPC2.0 spec is that params may be of arbitrary structure. the odd list encoding is ethereum-specific, and applies kinda unevenly across endpoints. Adding list-wrapping logic to the Request type would also cause some issues with Request<Box<RawValue>> I think?
This should probably be solved by adding a GetBalanceParams struct similar to this
Component
json-rpc
What version of Alloy are you on?
latest
Operating System
macOS (Apple Silicon)
Describe the bug
When issuing single-parameter json-rpc requests to endpoints like
eth_getBalance
, it seems they are not serialized correctly to still send an array of params in JSON, failing with the following error:ErrorPayload { code: -32600, message: "Invalid json-rpc request", data: None }
The workaround is to make
Params
be aVec<_>
, but this should not be necessary.The text was updated successfully, but these errors were encountered: