Links

eth_getUncleCountByBlockHash

Returns the number of uncles in a block from a block matching the given block hash.

Parameters

Params - a string array containing (required):
  • DATA(hex string, required), 32 Bytes - hash of a block.

Returns

QUANTITY(hex string) - integer of the number of uncles in this block.

Example

Request

curl
TypeScript
curl https://api.blockvision.org/v1/<api key> \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getUncleCountByBlockHash",
"params": [
"0xa62623c868ed8493cc2bfde4ee04392a54b09c5a5cb722cbe70c8a2830753f2f"
],
"id": 42
}'
import { BlockVisionProvider, BvNetwork } from 'blockvision.js'
// Optional parameters, but default to eth-mainnet and default api-key.
const bv = new BlockVisionProvider(BvNetwork.POL_MAINNET)
// Access BlockVision Enhanced API requests
bv.getUncleCount("0xa62623c868ed8493cc2bfde4ee04392a54b09c5a5cb722cbe70c8a2830753f2f").then(console.log)

Result

{
"id": 42,
"jsonrpc": "2.0",
"result": "0x1"
}