[Supanode](https://supanode.xyz/)[Learn](https://supanode.xyz/learn)Debug an empty EVM event-log query

# Debug an empty EVM event-log query

Use a known receipt to test the chain, block range, emitting contract and indexed topics.

**On this page**[Start with a known event](https://supanode.xyz/learn/eth-getlogs-empty-result#start-with-a-known-event)[Remove filters before adding them](https://supanode.xyz/learn/eth-getlogs-empty-result#remove-filters-before-adding-them)[Check the filter semantics](https://supanode.xyz/learn/eth-getlogs-empty-result#check-the-filter-semantics)[Scale a working query](https://supanode.xyz/learn/eth-getlogs-empty-result#scale-a-working-query)[Sources](https://supanode.xyz/learn/eth-getlogs-empty-result#sources)

## Start with a known event

A valid `eth_getLogs` query can return an empty array. Find one transaction receipt containing the event you expected, and treat that receipt as a test fixture. The address and topics in the actual log are more reliable than an address copied from a contract implementation page.

## Remove filters before adding them

```
{"jsonrpc":"2.0","id":1,"method":"eth_getLogs","params":[{"fromBlock":"0x100","toBlock":"0x100","address":"CONTRACT_ADDRESS"}]}
```

Use the real block containing your fixture. Begin with the emitting address and an explicit one-block window. Once the event appears, add topic constraints one position at a time. Do not use this placeholder address as a production request.

## Check the filter semantics

1.  Verify eth\_chainId on the same endpoint. Identical addresses on different chains refer to independent state.
2.  Use the log-emitting address. A proxy executing implementation code can emit logs under the proxy address.
3.  Calculate topic zero from the canonical event signature, including complete types. Anonymous events follow different topic layout rules.
4.  Only indexed arguments are topics. Non-indexed arguments must be decoded from the data field after retrieval.

## Scale a working query

After the fixture passes, widen the block range in bounded windows and checkpoint the last completed range. Distinguish a genuine empty result from an HTTP timeout, JSON-RPC error or provider range restriction. Those failures need retries or smaller requests; treating them as zero events silently creates gaps in your index.

## Sources

-   [Ethereum JSON-RPC](https://ethereum.org/en/developers/docs/apis/json-rpc/)
-   [EIP-20](https://eips.ethereum.org/EIPS/eip-20)
-   [Solidity event ABI](https://docs.soliditylang.org/en/latest/abi-spec.html#events)

## Continue reading

[Robinhood RPC and WebSocket](https://supanode.xyz/blog/robinhood-chain-rpc-websocket)[Robinhood methods](https://supanode.xyz/docs/robinhood/rpc/whats-available)[Learn library](https://supanode.xyz/learn)

---
Source: https://supanode.xyz/learn/eth-getlogs-empty-result
