L0vdL0vd

eth_getUncleCountByBlockHash

Returns the number of uncles in a block, by hash.

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

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

响应示例

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

参数

blockHashstring必填
32-byte block hash.

返回值

string Uncle count, hex.

适用场景

Count uncles in a block identified by hash.

如何解读结果

Hex integer, or null if the block is unknown.

提示

  • Same data as the by-number variant, safe across reorgs.

相关方法