Logs & events75 CUFree key required

eth_getLogs on XLayer

Returns event logs matching an address/topic filter over a block range — the core method for indexers, subgraphs, and event listeners. The heaviest read method; available on the free tier with an API key (not on the public endpoint).

Cost scales with block range × matching logs, so always set tight address + topics filters and keep ranges small. Most providers cap the span (commonly ~100k blocks or ~10k logs) — paginate when you hit the cap. This weight is why it's key-gated.

XLayer endpoint (keyed — free)

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

Method

eth_getLogs

Cost

75 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

[{ fromBlock, toBlock, address, topics[] }]

cURL

curl https://rpc.nodeflare.app/xlayer/v1/YOUR_KEY \
  -X POST \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"fromBlock": "latest", "toBlock": "latest"}],"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_getLogs', [{"fromBlock": "latest", "toBlock": "latest"}]);

Try it live

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

eth_getLogs on XLayer — FAQ

How do I call eth_getLogs on XLayer?

POST a JSON-RPC 2.0 request with "method": "eth_getLogs" 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_getLogs cost on the free tier?

eth_getLogs is weighted at 75 compute units per call. The free tier includes 2,000,000 CU/month, so that is roughly 26,666 eth_getLogs calls per month — no credit card.

Is eth_getLogs available on the public XLayer endpoint?

No. eth_getLogs 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_getLogs, eth_getLogs, trace_* and debug_*.

Anything XLayer-specific to know when using eth_getLogs?

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

Call eth_getLogs 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 →