eth_getFilterChanges - Mantle

Example code for the eth_getFilterChanges JSON-RPC method. Complete guide on how to use eth_getFilterChanges JSON-RPC in GetBlock Web3 documentation.

This method polls for filter changes. Returns an array of logs that occurred since last poll for log filters, or an array of block hashes for block filters.

Parameters

Parameter
Type
Description

filterId

string

The filter ID returned by eth_newFilter or eth_newBlockFilter

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_getFilterChanges",
    "params": ["0x1a2b3c4d5e6f"],
    "id": "getblock.io"
}'

Response

{
    "jsonrpc": "2.0",
    "id": "getblock.io",
    "result": []
}

Response Parameters

Field
Type
Description

result

array

Array of log objects or block hashes since last poll

Use Case

The eth_getFilterChanges method is essential for:

  • Polling for new events

  • Block monitoring via HTTP

  • Event-driven applications

  • Backend services without WebSocket

  • Incremental log retrieval

Error Handling

Status Code
Error Message
Cause

403

Forbidden

Missing or invalid ACCESS-TOKEN

-32000

Filter not found

Invalid or expired filter ID

Errors and causes

Web3 Integration

Last updated

Was this helpful?