Skip to main content

eth_getFilterChanges

Overview

Polling method for a filter, which returns an array of logs that occurred since the last poll. The filter must be created by calling either 'eth_newFilter' or 'eth_newBlockFilter'.

Request

curl --request POST \
--url https://ethereum-mainnet-geth-archive.node.coinapi.io \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'X-CoinAPI-Key: 73034021-THIS-IS-SAMPLE-KEY' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"params": [
"0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
"latest"
],
"method": "eth_getCode"
}'

Request Parameters

  • 'filter ID': A string denoting the filter ID.

Response

{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32000,
"message": "filter not found"
}
}
  • log object array: An array of log objects, or an empty array if nothing has changed since the last poll.
  • For filters created with 'eth_newBlockFilter', the return values are block hashes (32 bytes), e.g. '["0x3454645634534..."]'.
  • For filters created with 'eth_newFilter', the logs are objects with the following parameters:
  • address: 20 bytes. Address from which this log originated.
  • blockHash: 32 bytes. The hash of the block where this log was in. 'Null' when it is a pending log.
  • blockNumber: The block number where this log was in. 'Null' when it is a pending log.
  • data: DATA. Contains the non-indexed arguments of the log.
  • logIndex: A hexadecimal of the log index position in the block. 'Null' when it is a pending log.
  • removed: 'true' when the log was removed, due to a chain reorganization. 'false' if it is a valid log.
  • topics: Array of DATA. An array of 0 to 4 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 when you declared the event with the anonymous specifier.
  • transactionHash: 32 bytes. A hash of the transactions from which this log was created. 'Null' when it is a pending log.
  • transactionIndex: A hexadecimal of the transactions index position from which this log was created. 'Null' when it is a pending log.