eth_blockNumber - Avalanche
eth_blockNumber. Retrieve the latest block number
eth_blockNumber - avalanche [Value: 10CU]
The method is used to get the recent block number
Use cases
- Get the latest block number for syncing
- Verify blockchain progress up to the current block
- Check latest block number for monitoring purposes
Constraints
- Node must be synchronized with the network
- Requires access to a reliable node
- Network latency may affect response time
Unlock Access to 50+ chains
Boost your app's speed and reliability with dRPC - get your access API key
Language
Request
Examples
curl --request POST \
--url https://avalanche.drpc.org \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_blockNumber"
}
'
Response
200
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xfd2fdb"
}
Request params
idinteger
jsonrpcstring
methodstring
Response
200
Returns a list of log objects or an empty list if there have been no updates since the previous query.Response params
object
idinteger
jsonrpcstring
resultarray_of_strings
The latest block number, returned as a hexadecimal string.