TriportRPC

eth_getLogs

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

Minimum tier: Pro

Tron method guide

Last updated:

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

eth_getLogs parameters
NameTypeRequiredDescription
filterobjectYes

Returns

eth_getLogs return value
FieldType
logsarray

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_getLogs","params":["<filter>"]}'
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_getLogs",
  "params": [
    "<filter>"
  ]
}),
});
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_getLogs","params":["<filter>"]},
)
print(resp.json())

Usage

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

FAQ

What does eth_getLogs do?
Returns EVM event logs matching a filter over an inclusive block range.
How many credits does eth_getLogs cost?
eth_getLogs costs 5 credit(s) per call on Triport by default.
Is eth_getLogs available over WebSocket?
eth_getLogs is an HTTP JSON-RPC method.