TriportRPC

eth_getLogs

POSThttps://triport.io/rpc/tron

Returns EVM event logs matching a filter over an inclusive block range.

Tron mainnettron:rpcfree+; tron_read_rpc_heavy: 2 / 5 / 20 / 80 RPS (free / basic / pro / business; default, unmeasured)

eth_getLogs searches EVM event logs using an address, topics, a block hash, or an inclusive fromBlock/toBlock range. The result is an array; an empty array is a successful query with no matching logs.

One request may span at most 100 blocks. Split larger scans into adjacent, non-overlapping windows before sending them. Tron has no WebSocket log or mempool surface here. TRC20 event-oriented REST access belongs to the separate wallet/REST layer rather than adding another JSON-RPC method.

Parameters

JSON-RPC params is [filter].

filterobjectrequired
Log-selection object; unknown properties are rejected.
addressstring or string[]optional
One or more 0x-prefixed 20-byte EVM addresses.
blockHashstringoptional
A 32-byte 0x-prefixed hash.
fromBlockstringoptional
Inclusive starting block as an EVM hex quantity.
toBlockstringoptional
Inclusive ending block as an EVM hex quantity.
topicsarrayoptional
Each position is null, one 32-byte topic, or an array of topics.

Response

Response fields

FieldTypeDescription
jsonrpcstringJSON-RPC protocol version.
idnumberCorrelates the response with the request.
resultarrayMatching log objects; empty when nothing matches.

Log-object fields are not listed because the OpenRPC schema permits implementation-defined properties and the captured response contains no log object from which to document fields.

Errors

See Tron errors for the shared envelope.

CodeMeaningWhen it happens
-32602Invalid paramsThe filter is malformed or the requested range exceeds 100 blocks.
-32601Method not foundThe method is outside the published catalog.
401UnauthorizedThe API key is missing or invalid.
429Rate limitedThe tron_read_rpc_heavy budget is exceeded.

Examples

const filter = { fromBlock: "0x51e5e80", toBlock: "0x51e5e80" };
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_getLogs", params: [filter] }),
});
const { result: logs } = await response.json();

Notes

  • The maximum inclusive range is 100 blocks; page larger scans client-side.
  • fromBlock and toBlock are hex quantities in this contract.
  • No WebSocket or mempool subscription is available for Tron.