Skip to main content

eth_getBlockByNumber

Ethereum API

Returns information about a block by number.

Params

(2)

1. Block (required)

(one of)
string
Match pattern:
^0x([1-9a-f]+[0-9a-f]*|0)$

2. Hydrated transactions (required)

boolean

Result

(Block information)
(one of)
null

Params

Block

Hydrated transactions


Request

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