Pre-alphaWork in progress
Skip to content

eth_getFilterChanges ​

Polls a filter and returns what it has matched since the previous poll.

Ethereum specification · All supported methods

Parameters ​

Parameters are positional, in the order below.

ParameterTypeRequiredDescription
Filter IDHexadecimal quantityYesThe ID returned when the filter was created.

Return value ​

An array whose contents depend on the filter: log objects for a log filter, block hashes for a block filter, and transaction hashes for a pending transaction filter. An empty array means nothing new since the last poll.

Example ​

Replace <gateway-url> with your gateway base URL and <service-url> with the chain’s service path, such as service/ethereum.

sh
curl -X POST "<gateway-url>/<service-url>" \
  -H "Content-Type: application/json" \
  --data '{"jsonrpc":"2.0","id":1,"method":"eth_getFilterChanges","params":["0x1"]}'

Illustrative response; values depend on the selected network and request:

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
      "topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", "0x000000000000000000000000c94770007dda54cf92009bff0de90c06f603a09f", "0x000000000000000000000000d46e8dd67c5d32be8058bb8eb970870f07244567"],
      "data": "0x00000000000000000000000000000000000000000000000000000000000f4240",
      "blockNumber": "0x16b3e4a",
      "blockHash": "0x9b8f2b8c5e3a4d1f6e7c8b9a0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e",
      "transactionHash": "0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b",
      "transactionIndex": "0x2",
      "logIndex": "0x5",
      "removed": false
    }
  ]
}

Unstoppable Infrastructure.