eth_getFilterLogs

Retrieves all past logs for a filter

Request
Examples
curl --request POST \
     --url https://rpc.xone.org \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "id": 1,
  "jsonrpc": "2.0",
  "params": [
    "0x1"
  ],
  "method": "eth_getFilterLogs"
}
'
Response
200 OK
{
  "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
    }
  ]
}

Request params

NameTypeDescription
idintegerRequest identifier
jsonrpcstringJSON-RPC version
methodstringAPI method name
Parametersarray of strings 
filterIDstringThe ID of the filter for which to retrieve all past logs.

Response

200
An array containing all logs that match the filter criteria, providing historical data relevant to the filter’s configuration.
NameTypeDescription
Parametersobject 
idinteger
jsonrpcstring
resultarray_of_objectsArray of log objects, or an empty array if nothing has changed since last poll.