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.

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