Skip to main content

eth_getUncleCountByBlockNumber

Returns the number of uncles in a block by number.

Parameters
NameTypeDescription
BlockNumberHexString<Number>| "latest" | "earliest" | "pending"Hexadecimal block number, or the string "latest", "earliest" or "pending".
Return Type

HexString<Number> | null - Number of uncles in the block or null if not found.

Example
TypeScript
await provider.request({
method: "eth_getUncleCountByBlockNumber",
params: ["0x5bad55"],
});
// "0x1"