Skip to main content

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 and toBlock: 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. If blockHash is present in the filter criteria, then neither fromBlock nor toBlock 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

Body

    id integer
    jsonrpc string
    method string

    params

    object[]

  • Array [

  • blockHash string
    address string
  • ]

Responses

Successful response

Schema

    jsonrpc string
    id integer
    result object[]
Loading...