L0vdL0vd

eth_getUncleCountByBlockNumber

Returns the number of uncles in a block, by number. Always 0 after the Merge.

归档 · 可查询任意历史区块

curl https://eth.l0vdinfra.com/YOUR_KEY \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"jsonrpc":"2.0","id":1,"method":"eth_getUncleCountByBlockNumber","params":["0xb71b80"]}'

响应示例

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x1"
}
参数与您的端点

参数

blockstring必填
Block number in hex (e.g. "0x1208a5f") or a tag: "latest", "safe", "finalized", "earliest" or "pending". L0vd endpoints run archive nodes, so any historical block works.

返回值

string Uncle count, hex.

适用场景

Count uncle (ommer) blocks included by a pre-Merge Ethereum block, for mining-era analytics.

如何解读结果

Hex integer. Always 0x0 for blocks after the Merge (September 2022).

提示

  • Relevant only to historical Proof of Work data.

相关方法