TriportRPC

eth_blockNumber

Tron / https://triport.io/rpc/tron

Minimum tier: Free

Tron method guide

Last updated:

eth_blockNumber returns the number of the latest block visible to the selected Tron JSON-RPC node. The result uses the EVM quantity format: a 0x-prefixed hexadecimal string with no unnecessary leading zeroes.

Use this method to establish a current head before requesting blocks or bounded log ranges. It reports a height, not a complete block; use eth_getBlockByNumber when block data is required.

Parameters

This method takes no parameters.

Returns

eth_blockNumber return value
FieldType
blockNumberQuantity

Examples

curl https://triport.io/rpc/tron \
  -X POST -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <api-key>' \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'
const res = await fetch("https://triport.io/rpc/tron", {
  method: "POST",
  headers: { "Content-Type": "application/json", Authorization: "Bearer <api-key>" },
  body: JSON.stringify({
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_blockNumber",
  "params": []
}),
});
const data = await res.json();
import requests
resp = requests.post(
    "https://triport.io/rpc/tron",
    headers={"Authorization": "Bearer <api-key>"},
    json={"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]},
)
print(resp.json())

Usage

  1. Transport: HTTP (JSON-RPC).
  2. Chain: Tron.
  3. Clusters: mainnet.
  4. Credit cost: 1 per call.

FAQ

What does eth_blockNumber do?
Returns the latest Tron block number as an EVM hexadecimal quantity.
How many credits does eth_blockNumber cost?
eth_blockNumber costs 1 credit(s) per call on Triport by default.
Is eth_blockNumber available over WebSocket?
eth_blockNumber is an HTTP JSON-RPC method.