# eth_getLogs - Etherlink RPC Method

Returns an array of all logs matching a given filter object on Etherlink.

## When to Use This Method

Read one Pyth event using its contract address, both captured topics, and exact block 4,162,675. This is not a Transfer event.

## Block-range limits

The verified request queries one historical block. These probes do not establish the maximum supported range.

## Best Practices

Keep the recorded block height and address together when reproducing a historical example. Preserve RPC errors instead of replacing them with empty results.

## Request Parameters

- `filter` (`Object, required`): Filter with fromBlock, toBlock, address, and topics. Keep the recorded values together.

## Request Example

```json
{
  "jsonrpc": "2.0",
  "id": 5,
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": "0x3f8473",
      "toBlock": "0x3f8473",
      "address": "0x2880ab155794e7179c9ee2e38200202908c17b43",
      "topics": [
        "0xd06a6b7f4918494b3719217d1802786c1f5112a6c1d88fe2cfec00b4584f6aec",
        "0xe62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43"
      ]
    }
  ]
}
```

## Response Fields

This method returns no documented fields.

## Successful Response

```json
{
  "jsonrpc": "2.0",
  "result": [
    {
      "address": "0x2880ab155794e7179c9ee2e38200202908c17b43",
      "topics": [
        "0xd06a6b7f4918494b3719217d1802786c1f5112a6c1d88fe2cfec00b4584f6aec",
        "0xe62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43"
      ],
      "data": "0x00000000000000000000000000000000000000000000000000000000672c90e9000000000000000000000000000000000000000000000000000006ce3a4ea33600000000000000000000000000000000000000000000000000000000b7e490b1",
      "blockNumber": "0x3f8473",
      "transactionHash": "0xb693a7ef2ccb8893f990d8ec912070ddd2466755e1be8bee558db2ae5920bd66",
      "transactionIndex": "0x0",
      "blockHash": "0x553b9c9688501f47ce83084a18120cbacef819f98d7681ad0cbbb4812a90fae9",
      "logIndex": "0x0",
      "removed": false
    }
  ],
  "id": 5
}
```

## Code Examples

```bash
curl -X POST "https://api-etherlink-mainnet.n.dwellir.com/YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  --data-raw '{"jsonrpc":"2.0","id":5,"method":"eth_getLogs","params":[{"fromBlock":"0x3f8473","toBlock":"0x3f8473","address":"0x2880ab155794e7179c9ee2e38200202908c17b43","topics":["0xd06a6b7f4918494b3719217d1802786c1f5112a6c1d88fe2cfec00b4584f6aec","0xe62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43"]}]}'
```
