Pre-alphaWork in progress
Skip to content

eth_newBlockFilter ​

Installs a filter on the node that reports new blocks, and returns its ID. Poll it with eth_getFilterChanges for the hashes of blocks added since the last poll.

Ethereum specification · All supported methods

Parameters ​

No parameters. Send an empty params array.

Return value ​

The new filter’s ID as a hexadecimal quantity.

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_newBlockFilter","params":[]}'

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

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x2"
}

Unstoppable Infrastructure.