Marketplace has launched, further enabling blockchain developers! Learn more

Contents

eth_blockNumber RPC method

The eth_blockNumber EVM method is only supported on the Avalanche C-Chain.

Parameters:

  1. None

Returns:

  1. Result - Integer value of latest block number encoded as a hexadecimal.

Code Examples:

To use the eth_blockNumber EVM method on the Avalanche C-Chain, ensure that the end of your URL includes ext/bc/C/rpc.

curl http://sample-endpoint-name.network.quiknode.pro/token-goes-here/ \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"method":"eth_blockNumber","params":[],"id":1,"jsonrpc":"2.0"}'
Ready to get started? Create a free account