eth_blockNumber
Request
Set GETBLOCK_ENDPOINT to the complete URL of your Ethereum endpoint. The method takes an empty parameter list.
bashcurl --fail-with-body "$GETBLOCK_ENDPOINT" \
-H 'Content-Type: application/json' \
--data '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'Response
json{"jsonrpc":"2.0","id":1,"result":"0x1449641"}The result is a hexadecimal block number. Its value changes as the chain advances. Convert it to base ten before comparing it with a decimal height from a block explorer.