Docs

eth_getBlockByNumber

Retrieves a block by its number or tag from the Ethereum blockchain.

Example

import { getRpcClient, eth_getBlockByNumber } from "thirdweb/rpc";
const rpcRequest = getRpcClient({ client, chain });
const block = await eth_getBlockByNumber(rpcRequest, {
blockNumber: 123456,
includeTransactions: true,
});

Parameters

Returns

A promise that resolves to the requested block.