Optimism
Optimism
Optimism
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
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.| # | Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|---|
| 1 | blockHash | string (hex) | Sim | The hash of the block to count uncles in. |
| Tipo | Descrição |
|---|---|
| string (hex) | Hex-encoded uncle count (always "0x0", "0x1", or "0x2" on PoW chains; "0x0" on PoS). |
Try it live in the Optimism playground.
| Código | Mensagem | Causa |
|---|---|---|
-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).Parâmetros
0x-prefixed 32-byte block hash