Skip to main content

eth_blockNumber

Returns the number of most recent block.

Params

(0)

Result

(Block number)
string
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$

Example

Request

await window.ethereum.request({
"method": "eth_blockNumber",
"params": []
});

Result

"0x2377"

Request

await window.ethereum.request({
"method": "eth_blockNumber",
"params": []
});