TriportRPC

eth_call

POSThttps://triport.io/rpc/tron

Executes 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].

transactionobjectrequired
Call object; to is required and unknown properties are rejected.
tostringrequired
0x-prefixed 20-byte destination address.
fromstringoptional
0x-prefixed 20-byte caller address.
datastringoptional
0x-prefixed, even-length calldata bytes.
gasstringoptional
Gas allowance as an EVM hex quantity.
gasPricestringoptional
Gas price as an EVM hex quantity.
valuestringoptional
Native value as an EVM hex quantity.
blockstringrequired
Must be latest; historical quantities are unsupported.

Response

Response fields

FieldTypeDescription
jsonrpcstringJSON-RPC protocol version.
idnumberCorrelates the response with the request.
resultstringRaw return bytes as 0x-prefixed EVM data.

Errors

See Tron errors for the common envelope.

CodeMeaningWhen it happens
-32602Invalid paramsto is missing, a field is malformed, or block is not latest.
-32601Method not foundThe requested RPC method is not published.
401UnauthorizedThe API key is missing or invalid.
429Rate limitedThe 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 latest is accepted.