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.

Связанные методы