eth_blockNumber
Returns the number of most recent block.
Ethereum specification · All supported methods
Parameters
No parameters. Send an empty params array.
Return value
Direct’s reference block number as a hexadecimal quantity.
Example
Replace <gateway-url> with your gateway base URL and <service-url> with the chain’s service path, such as service/ethereum.
sh
curl -X POST "<gateway-url>/<service-url>" \
-H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'Illustrative response; values depend on the selected network and request:
json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x2377"
}Direct behavior
Returns Direct’s current reference block number. It is answered by the gateway’s reference-block logic rather than used as a test of upstream traffic. See Keeping data consistent.