> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.chainstack.com/feedback

```json
{
  "path": "/reference/hyperliquid-evm-eth-get-logs",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# eth_getLogs | Hyperliquid EVM

> Returns event logs that match specified filter criteria.

<Info>
  This method is available on Chainstack. Not all Hyperliquid methods are available on Chainstack, as the open-source node implementation does not support them yet — see [Hyperliquid methods](/docs/hyperliquid-methods) for the full availability breakdown.
</Info>

The `eth_getLogs` JSON-RPC method returns event logs that match specified filter criteria. This method is essential for retrieving smart contract events, monitoring contract activity, and building event-driven applications on the blockchain.

<Check>
  **Get your own node endpoint today**

  [Start for free](https://console.chainstack.com/) and get your app to production levels immediately. No credit card required.

  You can sign up with your GitHub, X, Google, or Microsoft account.
</Check>

## Parameters

The method takes one parameter: a filter object that specifies the criteria for log retrieval.

### Filter object

* `address` (string or array, optional) — Contract address(es) to filter logs from
* `fromBlock` (string, optional) — Starting block number in hexadecimal (default: `"latest"`)
* `toBlock` (string, optional) — Ending block number in hexadecimal (default: `"latest"`)
* `topics` (array, optional) — Array of topic filters for event matching
* `blockhash` (string, optional) — Block hash to filter logs from (alternative to block range)

### Parameter details

**Address filtering:**

* Single address: `"0x1234..."`
* Multiple addresses: `["0x1234...", "0x5678..."]`
* Omit to get logs from all contracts

**Block range:**

* `fromBlock` and `toBlock` define the range
* Use `"latest"`, `"earliest"`, `"pending"`, or hex block numbers
* Maximum range is 50 blocks on Hyperliquid

**Topic filtering:**

* Array of up to 4 topic filters (indexed event parameters) - Hyperliquid limitation
* Each topic can be `null` (any value), string (exact match), or array (multiple options)
* Topics correspond to event signature and indexed parameters

## Response

The method returns an array of log objects matching the filter criteria.

### Response structure

**Log object:**

* `address` — Contract address that emitted the log
* `topics` — Array of indexed event parameters (including event signature)
* `data` — Non-indexed event parameters as hexadecimal string
* `blockNumber` — Block number containing the log
* `blockHash` — Hash of the block containing the log
* `transactionHash` — Hash of the transaction that generated the log
* `transactionIndex` — Index of the transaction in the block
* `logIndex` — Index of the log in the transaction
* `removed` — Boolean indicating if log was removed due to chain reorganization

### Event decoding

**Topic structure:**

* `topics[0]` — Event signature hash (keccak256 of event signature)
* `topics[1-3]` — Indexed event parameters (if any)
* `data` — Non-indexed parameters (ABI-encoded)

**Event signature:**

```javascript theme={"system"}
// Example: Transfer(address indexed from, address indexed to, uint256 value)
// topics[0] = keccak256("Transfer(address,address,uint256)")
// topics[1] = from address (indexed)
// topics[2] = to address (indexed)  
// data = value (non-indexed)
```

## Event filtering

### Address filtering

**Single contract:**

```json theme={"system"}
{
  "address": "0x5555555555555555555555555555555555555555",
  "fromBlock": "0x9d0c37",
  "toBlock": "0x9d0c42"
}
```

**Multiple contracts:**

```json theme={"system"}
{
  "address": ["0x1111...", "0x2222...", "0x3333..."],
  "fromBlock": "0x9d0c37",
  "toBlock": "0x9d0c42"
}
```

### Topic filtering

**Specific event:**

```json theme={"system"}
{
  "topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"]
}
```

**Event with indexed parameters:**

```json theme={"system"}
{
  "topics": [
    "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
    "0x000000000000000000000000fc1286eeddf81d6955edad5c8d99b8aa32f3d2aa",
    null
  ]
}
```

**Multiple event options:**

```json theme={"system"}
{
  "topics": [
    ["0xevent1hash", "0xevent2hash"],
    null,
    "0xspecificvalue"
  ]
}
```

## Hyperliquid-specific limitations

### Block range constraint

**50-block limit:**

* Maximum query range is 50 blocks on Hyperliquid
* Use chunking for larger ranges
* Process blocks in batches to respect this limit
* Plan queries accordingly for historical analysis

### Topic filtering

**4-topic maximum:**

* Up to 4 topic filters are supported
* Each topic can be null, string, or array of strings
* Topics\[0] is typically the event signature hash
* Topics\[1-3] are indexed event parameters

## Filter examples

### Token transfers

**All transfers:**

```json theme={"system"}
{
  "address": "0x5555555555555555555555555555555555555555",
  "topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"],
  "fromBlock": "0x9d0c37",
  "toBlock": "0x9d0c42"
}
```

**Transfers from specific address:**

```json theme={"system"}
{
  "topics": [
    "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
    "0x000000000000000000000000fc1286eeddf81d6955edad5c8d99b8aa32f3d2aa"
  ]
}
```

### Multiple event types

**Transfers and approvals:**

```json theme={"system"}
{
  "topics": [
    [
      "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
      "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925"
    ]
  ]
}
```

## Example request

This an example call with wrapped HYPE (wHYPE) on the Hyperliquid mainnet deployed at [0x5555555555555555555555555555555555555555](https://hyperevmscan.io/token/0x5555555555555555555555555555555555555555).

```shell Shell theme={"system"}
curl -X POST \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"address":"0x5555555555555555555555555555555555555555","fromBlock":"0x9d0c37","toBlock":"0x9d0c42"}],"id":1}' \
  https://hyperliquid-mainnet.core.chainstack.com/4f8d8f4040bdacd1577bff8058438274/evm
```

## Use cases

The `eth_getLogs` method is essential for applications that need to:

* **Event monitoring**: Monitor smart contract events within 50-block ranges
* **DeFi analytics**: Track token transfers, swaps, and protocol events
* **Transaction analysis**: Analyze contract interactions and state changes
* **Audit systems**: Track contract activity for compliance and security
* **Portfolio tracking**: Monitor user transactions and balance changes
* **Market analysis**: Analyze trading activity and market events
* **Notification systems**: Generate alerts based on specific events
* **Data indexing**: Build event databases with chunked processing
* **Development tools**: Debug and test smart contract event emissions
* **Integration services**: Provide event data to external systems

<Note>
  On Hyperliquid, `eth_getLogs` supports up to 4 topics and a maximum query range of 50 blocks. For larger ranges, use chunking to process blocks in batches of 50 or fewer.
</Note>


## OpenAPI

````yaml /openapi/hyperliquid_node_api/evm_eth_get_logs.json post /evm
openapi: 3.0.0
info:
  title: Hyperliquid EVM API - eth_getLogs
  version: 1.0.0
servers:
  - url: >-
      https://hyperliquid-mainnet.core.chainstack.com/4f8d8f4040bdacd1577bff8058438274
security: []
paths:
  /evm:
    post:
      summary: eth_getLogs
      description: Returns event logs that match specified filter criteria.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - method
                - params
                - id
              properties:
                jsonrpc:
                  type: string
                  enum:
                    - '2.0'
                  default: '2.0'
                  description: JSON-RPC version
                method:
                  type: string
                  enum:
                    - eth_getLogs
                  default: eth_getLogs
                  description: The RPC method name
                params:
                  type: array
                  description: 'Parameters: [filterObject]'
                  default:
                    - address: '0x5555555555555555555555555555555555555555'
                      fromBlock: '0x9d0c37'
                      toBlock: '0x9d0c42'
                id:
                  type: integer
                  default: 1
                  description: Request identifier
            example:
              jsonrpc: '2.0'
              method: eth_getLogs
              params:
                - address: '0x5555555555555555555555555555555555555555'
                  fromBlock: '0x9d0c37'
                  toBlock: '0x9d0c42'
              id: 1
      responses:
        '200':
          description: Successful response with matching event logs
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    description: JSON-RPC version
                  id:
                    type: integer
                    description: Request identifier
                  result:
                    type: array
                    description: Array of log objects matching the filter criteria
                    items:
                      type: object
                      properties:
                        address:
                          type: string
                          description: Contract address that emitted the log
                        topics:
                          type: array
                          items:
                            type: string
                          description: Array of indexed event parameters
                        data:
                          type: string
                          description: Non-indexed event parameters as hexadecimal string
                        blockNumber:
                          type: string
                          description: Block number containing the log
                        blockHash:
                          type: string
                          description: Hash of the block containing the log
                        transactionHash:
                          type: string
                          description: Hash of the transaction that generated the log
                        transactionIndex:
                          type: string
                          description: Index of the transaction in the block
                        logIndex:
                          type: string
                          description: Index of the log in the transaction
                        removed:
                          type: boolean
                          description: >-
                            Whether the log was removed due to chain
                            reorganization
              example:
                jsonrpc: '2.0'
                id: 1
                result:
                  - address: '0x5555555555555555555555555555555555555555'
                    topics:
                      - >-
                        0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef
                      - >-
                        0x000000000000000000000000fc1286eeddf81d6955edad5c8d99b8aa32f3d2aa
                      - >-
                        0x0000000000000000000000005555555555555555555555555555555555555555
                    data: >-
                      0x0000000000000000000000000000000000000000000000000de0b6b3a7640000
                    blockNumber: '0x9d0c37'
                    blockHash: >-
                      0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
                    transactionHash: >-
                      0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890
                    transactionIndex: '0x0'
                    logIndex: '0x0'
                    removed: false

````