Logs & events10 CUFree key required

eth_newBlockFilter on XLayer

Creates a filter that reports new block hashes as they arrive, polled via eth_getFilterChanges. Stateful; needs a free API key.

A lightweight way to learn of new blocks by polling for hashes — but like all filters it's node-local and expires when idle. For head tracking, polling eth_blockNumber or a WebSocket newHeads subscription is usually simpler and more robust.

XLayer endpoint (keyed — free)

https://rpc.nodeflare.app/xlayer/v1/YOUR_KEY

Method

eth_newBlockFilter

Cost

10 CU

Chain ID

196

Block time

~1 s

Finality

soft ~1 s · hard on validity proof to L1

Logs & events on XLayer

Moderate activity concentrated around DEX and bridge contracts. Standard filtering practice applies; each eth_getLogs call costs 75 CU.

Parameters

None.

cURL

curl https://rpc.nodeflare.app/xlayer/v1/YOUR_KEY \
  -X POST \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","method":"eth_newBlockFilter","params":[],"id":1}'

ethers.js

import { ethers } from 'ethers';

const provider = new ethers.JsonRpcProvider(
  'https://rpc.nodeflare.app/xlayer/v1/YOUR_KEY'
);

const result = await provider.send('eth_newBlockFilter', []);

Try it live

Runs the example above against the public XLayer endpoint — straight from your browser.

eth_newBlockFilter on XLayer — FAQ

How do I call eth_newBlockFilter on XLayer?

POST a JSON-RPC 2.0 request with "method": "eth_newBlockFilter" to NodeFlare's XLayer endpoint at https://rpc.nodeflare.app/xlayer/v1/YOUR_KEY. This method requires a free API key — it is not available on the public endpoint.

What does eth_newBlockFilter cost on the free tier?

eth_newBlockFilter is weighted at 10 compute units per call. The free tier includes 2,000,000 CU/month, so that is roughly 200,000 eth_newBlockFilter calls per month — no credit card.

Is eth_newBlockFilter available on the public XLayer endpoint?

No. eth_newBlockFilter is a heavy method and requires a free API key. The public no-key endpoint serves standard read methods; create a free key to unlock eth_newBlockFilter, eth_getLogs, trace_* and debug_*.

Anything XLayer-specific to know when using eth_newBlockFilter?

Moderate activity concentrated around DEX and bridge contracts. Standard filtering practice applies; each eth_getLogs call costs 75 CU.

Call eth_newBlockFilter on XLayer with a free key

2,000,000 compute units/month, heavy methods unlocked, every chain included. No credit card.

Get your free API key →