eth_call
POST
https://triport.io/rpc/tronExecutes a read-only call against the current Tron EVM state.
Tron mainnettron:rpcfree+; tron_read_rpc: 15 / 20 / 100 / 250 RPS (free / basic / pro / business; default, unmeasured)
eth_call executes EVM bytecode without creating or broadcasting a
transaction. It returns the raw ABI-encoded output as 0x-prefixed EVM data.
Decode that data with the ABI of the function being called.
This is the JSON-RPC route for current contract reads such as token view
functions. The second parameter must be latest; historical block quantities
are not supported. The native wallet alternative is
triggerconstantcontract, whose request
uses hex-41 addresses and an explicit function selector.
Parameters
JSON-RPC params is [transaction, block].
transactionobjectrequiredCall object;
to is required and unknown properties are rejected.tostringrequired0x-prefixed 20-byte destination address.fromstringoptional0x-prefixed 20-byte caller address.datastringoptional0x-prefixed, even-length calldata bytes.gasstringoptionalGas allowance as an EVM hex quantity.
gasPricestringoptionalGas price as an EVM hex quantity.
valuestringoptionalNative value as an EVM hex quantity.
blockstringrequiredMust be
latest; historical quantities are unsupported.Response
Response fields
| Field | Type | Description |
|---|---|---|
jsonrpc | string | JSON-RPC protocol version. |
id | number | Correlates the response with the request. |
result | string | Raw return bytes as 0x-prefixed EVM data. |
Errors
See Tron errors for the common envelope.
| Code | Meaning | When it happens |
|---|---|---|
-32602 | Invalid params | to is missing, a field is malformed, or block is not latest. |
-32601 | Method not found | The requested RPC method is not published. |
401 | Unauthorized | The API key is missing or invalid. |
429 | Rate limited | The tron_read_rpc budget is exceeded. |
Examples
const transaction = { to: "0xa614f803b6fd780986a42c78ec9c7f77e6ded13c", data: "0x18160ddd" };
const response = await fetch("https://triport.io/rpc/tron", {
method: "POST",
headers: { "x-token": process.env.TRIPORT_API_KEY, "Content-Type": "application/json" },
body: JSON.stringify({ jsonrpc: "2.0", id: 1, method: "eth_call", params: [transaction, "latest"] }),
});
const { result: returnData } = await response.json();Notes
- A successful JSON-RPC response can contain ABI-encoded application-level output; decode it with the target contract ABI.
- This method is read-only and does not broadcast transactions.
- Historical EVM state is unavailable; only
latestis accepted.