eth_getBlockByHash

Retrieves a block by its hash.

Example

import { getRpcClient, eth_getBlockByHash } from "thirdweb/rpc";
const rpcRequest = getRpcClient({ client, chain });
const block = await eth_getBlockByHash(rpcRequest, {
blockHash: "0x...",
includeTransactions: true,
});

Parameters

Returns

A promise that resolves to the retrieved block.