API Reference

eth_newBlockFilter - Linea

Creates a filter in the node, to notify when a new block arrives.

To check if the state has changed, call eth_getFilterChanges.

Parameters

none

Returns

QUANTITY - A filter id.

Example

Request

curl --location 'https://linea-mainnet.unifra.io/v1/{your-api-key}' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc": "2.0",
    "method": "eth_newFilter",
    "params": [
        {
            "fromBlock": "0x1",
            "toBlock": "latest",
            "address": "0x176211869cA2b568f2A7D4EE941E073a821EE1ff",
            "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
            ]
        }
    ],
    "id": 0
}'

Result

{
    "jsonrpc": "2.0",
    "id": 0,
    "result": "0xc3ef921a3340d904fa64a7cc550f0de"
}
Language
Click Try It! to start a request and see the response here!