For the complete documentation index, see llms.txt. This page is also available as Markdown.

eth_getLogs - ARC

Example code for the eth_getLogs JSON-RPC method. Complete guide on how to use eth_getLogs JSON-RPC in GetBlock Web3 documentation.

This method returns the logs that match a given filter. Filters specify a block range, address, and indexed topics, allowing efficient retrieval of contract events such as USDC Transfer events or FX engine swap events.

Parameters

Parameter
Type
Required
Description

filterObject

object

Yes

Filter with optional fromBlock, toBlock, address (single or array), topics (array of topic filters)

Request Example

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_getLogs",
    "params": [
        {
            "fromBlock": "0xa7d87",
            "toBlock": "latest",
            "address": "0x4cef52a8f9d4b0c8b8d5f1a2b3c4d5e6f7a8b9c0",
            "topics": [
                "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
            ]
        }
    ],
    "id": "getblock.io"
}'

Response Example

Response Parameters

Field
Type
Description

result

array

Array of log objects matching the filter

result[].address

string

Contract address that emitted the log

result[].topics

array of string

Indexed event topics; topic 0 is typically the event signature hash

result[].data

string

Non-indexed event data (ABI-encoded)

result[].blockNumber

string

Block number containing the log

result[].transactionHash

string

Hash of the transaction that emitted the log

result[].removed

boolean

true if the log was removed due to a reorg (rare on Arc)

Use Cases

  • Indexing USDC and ERC-20 / BEP-20 transfers

  • Tracking Arc FX engine swap events for analytics

  • Building real-time merchant payment notifications

  • Backfilling historical contract activity

  • Compliance monitoring on high-value transfers

Error Handling

Status Code
Error Message
Cause

403

Forbidden

Missing or invalid <ACCESS-TOKEN>

-32602

Invalid params

Request parameters are missing or malformed

-32601

Method not found

The method is not supported by this node

429

Too Many Requests

Rate limit exceeded for your plan

-32005

Limit exceeded

Block range or returned result set exceeds the provider's limit; narrow your filter

SDK Integration

Was this helpful?