Optimism
Optimism
Optimism
Free tier covers personal projects. Pay-as-you-go scales without a card.
eth_getUncleCountByBlockHash returns the number of uncle blocks referenced by the block identified by a given hash. On OP Mainnet — the ETH-gas OP Stack rollup at chain ID 10 (0xa) — that count is always 0x0. A single sequencer builds the chain with no proof-of-work race, so no orphaned sibling blocks are ever folded in as uncles. The method stays available at https://optimism.therpc.io/YOUR_API_KEY for clients that expect the standard Ethereum JSON-RPC surface, but for any valid OP Mainnet block hash it reports zero uncles.
eth_getUncleByBlockHashAndIndex calls; on OP Mainnet it always returns 0x0, so those follow-up calls would all yield null.| # | Name | Type | Required | Description |
|---|---|---|---|---|
| 1 | blockHash | string (hex) | Yes | The hash of the block to count uncles in. |
| Type | Description |
|---|---|
| string (hex) | Hex-encoded uncle count (always "0x0", "0x1", or "0x2" on PoW chains; "0x0" on PoS). |
Try it live in the Optimism playground.
| Code | Message | Cause |
|---|---|---|
-32602 | Invalid params | Block hash is malformed. |
0x0. This method is only meaningful on proof-of-work history, which OP Mainnet has never had, so do not build logic that expects a non-zero count here.null rather than 0x0 — so distinguish "unknown block" (null) from "known block with no uncles" (0x0).Parameters
0x-prefixed 32-byte block hash