alloy
alloy copied to clipboard
[Bug] Unexpected response for `eth_getLogs`
Component
rpc
What version of Alloy are you on?
v0.3.6
Operating System
None
Describe the bug
When we call eth_getLogs
, we specify the blockHash
and set fromBlock
and toBlock
to null, as shown in the following command:
curl --location '${reth-endpoint}' \--header 'Content-Type: application/json' \--data '{"jsonrpc":"2.0","id":1,"method":"eth_getLogs","params":[{"address":null,"blockHash":"0xe903ebc49101d30b28d7256be411f81418bf6809ddbaefc40201b1b97f2e64ee","fromBlock":null,"toBlock":null,"topics":null}]}'
There is an unexpected error.
{"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid params","data":"fromBlock not allowed with blockHash at line 1 column 108"},"id":1}