eth_blockNumber

Returns the number of most recent block.

This method will use 10 Compute Units.


Reference: Here

Parameters

None

Returns

INTEGER - Value of the current block number the client is on

// Result
{
  "id":83,
  "jsonrpc": "2.0",
  "result": "0x4b7" // 1207
}
curl https://mainnet.optimism.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":0}'

Last updated