Standard Ethereum JSON-RPC API
eth_newFilter
Creates a log filter and returns a filter ID. Use the ID with
eth_getFilterChanges to poll for new logs, or
eth_getFilterLogs to read all matching logs at once.
Filter polling on the public endpoint
Filter IDs are server-side state, scoped to the node that created them. On a load-balanced public
endpoint like rpc.linea.build, a follow-up eth_getFilterChanges or eth_getFilterLogs request
may land on a different backend that has no record of the filter and silently return an empty
result. For reliable event consumption in production, use eth_getLogs with explicit
block ranges, or a private RPC endpoint with sticky sessions.
Parameters​
filter: [required] Filter object (same shape aseth_getLogs):fromBlock: [optional] Hexadecimal block number, orlatest,earliest. The default islatest.toBlock: [optional] Hexadecimal block number, orlatest,earliest. The default islatest.address: [optional] Contract address or array of addresses.topics: [optional] Array of 32-byte topic values. Each position can be a single value, an array of values (OR), ornull(wildcard).
Returns​
A filter ID (hexadecimal string).
Example​
Request​
curl https://rpc.linea.build \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_newFilter",
"params": [
{
"address": "0x176211869ca2b568f2a7d4ee941e073a821ee1ff",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
]
}
],
"id": 1
}'
Response​
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x10ff687202f305efab..."
}