{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "eth_blockNumber",
  "params": []
}
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": "0x4b7"
}
Defined in the Ethereum JSON-RPC Specification
Returns the number of most recent block.

Parameters

This method does not accept any parameters.

Returns

result
string
A hexadecimal string representing the integer of the current block number the client is on.
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "eth_blockNumber",
  "params": []
}
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": "0x4b7"
}

Error Handling

CodeMessageDescription
4100Requested method not supportedThe method is not supported by the wallet
The result is the block number in hexadecimal format. Convert to decimal to get the actual block number.