eth_getLogs
POST/
Returns an array of all logs matching a given filter object. For details, see eth_getLogs.
Parameters:
object
: the transaction filter object that contains the following parameters:fromBlock
andtoBlock
: block numbers or the strings 'latest', 'earliest', 'pending'. The maximum allowed block range is 500 and log responses cannot exceed 10 MB or 10,000 logs. IfblockHash
is present in the filter criteria, then neitherfromBlock
nortoBlock
are allowed.address
: the contract address or a list of addresses which the logs should originate from.topics
: an array of data which must be present in the logs.blockHash
: optional, restricts the logs returned to the single block referenced in the 32-byte hash
Returns:
result
: an array of logs.
note
For "pending" blocks, the API forwards requests to RPC nodes, and returns back to clients the responses received from the RPC nodes.
Example:
"params": [
{
"blockHash": "0x1677a2e21a890075524a5bda614213cf8765062b98374a1c42fd0f220f066b0e",
"address": "0x80ea8489ae1f3f389af94bc3b95e461a6c19dd20"
}
]
Request
Query Parameters
apikey stringrequired
Your API key
- application/json
Body
Array [
]
id integer
jsonrpc string
method string
params
object[]
blockHash string
address string
Responses
- 200
Successful response
- application/json
- Schema
- Example (from schema)
Schema
jsonrpc string
id integer
result object[]
{
"jsonrpc": "2.0",
"id": 1,
"result": []
}
Loading...
Was this helpful?
Happy React is loading...