TriportRPC

eth_chainId

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

Minimum tier: Free

Tron method guide

Last updated:

eth_chainId identifies the EVM-compatible Tron mainnet represented by this endpoint. The value is encoded as an EVM hex quantity and is suitable for network checks in EVM tooling.

Use it to reject an incorrectly configured endpoint before reading state. It is the hexadecimal form of the same numeric identifier returned as a decimal string by net_version.

Parameters

This method takes no parameters.

Returns

eth_chainId return value
FieldType
chainIdQuantity

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_chainId","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_chainId",
  "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_chainId","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_chainId do?
Returns the Tron EVM mainnet chain identifier as a hexadecimal quantity.
How many credits does eth_chainId cost?
eth_chainId costs 1 credit(s) per call on Triport by default.
Is eth_chainId available over WebSocket?
eth_chainId is an HTTP JSON-RPC method.