eth_getFilterLogs - Ethereum

eth_getFilterLogs. Polling method for a filter, which returns an array of logs which occurred since last poll

eth_getFilterLogs - ethereum [Value: 60CU]
Returns an array of all logs matching filter with given id, can compute the same results with an eth_getLogs call.
Use cases

Use cases

  • Retrieve historical logs for a specific filter
  • Analyze past events from a created filter
  • Audit contract interactions using filter logs
Constraints

Constraints

  • Requires valid filter ID for log retrieval
  • Node must support historical log queries
  • Accurate filter ID essential for correct log data
Get started
Unlock Access to 50+ chains
Boost your app's speed and reliability with dRPC - get your access API key

Language

Request
Examples
curl --request POST \
     --url https://eth.drpc.org \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "id": 1,
  "jsonrpc": "2.0",
  "params": [
    "0x1"
  ],
  "method": "eth_getFilterLogs"
}
'
Copy
Response
200
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "address": "0x79c912fef520be002c2b6e57ec4324e260f38e50",
      "topics": [
        "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
        "0x000000000000000000000000b94cb72c9b6282b78107a7c8a5eb74de08177935",
        "0x0000000000000000000000009c12939390052919af3155f41bf4160fd3666a6f"
      ],
      "data": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
      "blockNumber": "0x45cb8ed",
      "transactionHash": "0xa850e378548efda5217e6853fd56cded533d1a61377838abc4ddcc2b13d0acde",
      "transactionIndex": "0x0",
      "blockHash": "0x60d83df96893805e81eca600a67570cea16481dee40d5e9b210eac215352b714",
      "logIndex": "0x0",
      "removed": false
    }
  ]
}
Copy

Request params

idinteger
jsonrpcstring
methodstring
Parametersarray of strings
array of strings
filterIDstring
The filter id.

Response

200

Response params

object
idinteger
jsonrpcstring
resultarray_of_objects
Array of log objects, or an empty array if nothing has changed since last poll.
object
blockHashstring
32 Bytes - hash of the block where this log was in. null when its pending. null when its pending log
blockNumberstring
The block number where this log was in. null when its pending. null when its pending log.
transactionIndexstring
Integer of the transactions index position log was created from. null when its pending log.
addressstring
20 Bytes - address from which this log originated.
logIndexstring
Integer of the log index position in the block. null when its pending log.
datastring
Contains one or more 32 Bytes non-indexed arguments of the log.
removedboolean
true when the log was removed, due to a chain reorganization. false if its a valid log.
topicsarray_of_strings
Array of zero to four 32 Bytes DATA of indexed log arguments. In solidity: The first topic is the hash of the signature of the event (e.g. Deposit(address,bytes32,uint256)), except you declare the event with the anonymous specifier.
transactionHashstring
Hash of the transactions this log was created from. null when its pending log.