eth_blockNumber
The eth_blockNumber method returns the number of the most recent block on the Optimism blockchain. This is one of the most fundamental and frequently used RPC methods, providing the current height of the blockchain.
This method is essential for synchronization checks, polling for new blocks, and determining the current state of the network. Developers use it to track blockchain progress, implement block confirmations, detect chain reorganizations, and ensure their applications are synchronized with the latest network state. The lightweight nature of this call makes it ideal for frequent polling without significant overhead.
Parameters
This method does not require any parameters.
Return Object
field | type | description |
|---|---|---|
result | string | The current block number encoded as a hexadecimal string. This represents the height of the blockchain, indicating the total number of blocks from the genesis block to the most recently mined block. |
Request Example
Request
Response Example
Response