eth_blockNumber

Retrieves the current block number from the Ethereum blockchain.

Example

import { getRpcClient, eth_blockNumber } from "thirdweb/rpc";
const rpcRequest = getRpcClient({ client, chain });
const blockNumber = await eth_blockNumber(rpcRequest);

Parameters

Returns

A promise that resolves to the current block number as a bigint.