indexing

Select indexing strategies for querying historical Ethereum event data.

1|Updated Jan 24, 2026
One-click install
npx skills add https://github.com/tawf-labs/zkt-hackathon --skill indexing-tawf-labs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: indexing
Source: https://github.com/tawf-labs/zkt-hackathon/tree/main/.agents/skills/ethskills/indexing
Command: npx skills add https://github.com/tawf-labs/zkt-hackathon --skill indexing-tawf-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It solves the problem of slow, expensive, and unreliable attempts to read historical onchain data by repeatedly calling RPC or looping through blocks, which often leads to timeouts and missing results.

Core Features & Use Cases

  • Event-first design guidance: Teaches how to emit Solidity events as the primary “API” for offchain consumers like frontends and indexers.
  • Indexing strategy selection: Explains when to use direct log reads, The Graph subgraphs, Dune SQL, provider indexing APIs, and real-time WebSocket watches.
  • Practical implementation patterns: Covers how to design event topics for filtering and how to structure a subgraph schema and mappings for historical queries, including sample queries and deployment workflow.

Use case: You’re building a zakat or donation dashboard that needs a donor’s complete donation history and receipts; you want accurate historical results without scanning millions of blocks.

Quick Start

Ask the indexing skill how to retrieve and query historical event data for a specific contract and which indexing approach to use for your required time range and query types.

Frequently Asked Questions about indexing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query historical Ethereum event logs without scanning blocks via RPC?

To query historical Ethereum event logs without block scanning, use indexing approaches like The Graph subgraphs or Dune SQL. These indexers retrieve onchain activity efficiently by leveraging event-first contract design and indexed topics for fast filtering.

What is the best way to retrieve a user's complete onchain transaction history for a dashboard?

The best way to retrieve complete onchain transaction history for dashboards is querying an indexer like a The Graph subgraph. By indexing Solidity events as the primary API, you get accurate historical results without risking RPC timeouts over millions of blocks.

How does The Graph subgraph schema design work for historical onchain queries?

The Graph subgraph schema design for historical queries involves structuring entities around emitted Solidity events and writing mappings to process indexed topics. This event-first design allows offchain consumers to filter and retrieve specific onchain activity accurately.

When should I use Dune SQL instead of direct log reads for Ethereum analytics?

You should use Dune SQL instead of direct log reads when you need complex analytical queries across large historical datasets. Direct log reads are better for targeted, real-time monitoring, while Dune provides SQL flexibility for broader dApp analytics without custom subgraph deployment.

Do I need to use indexed topics in Solidity events for The Graph subgraphs?

Yes, you need to use indexed topics in Solidity events for The Graph subgraphs to enable efficient filtering. Event-first design treats emitted events as the primary API for offchain indexers, and indexed topics are essential for satisfying historical-query performance constraints.

Why does fetching historical onchain data via RPC lead to timeouts and missing results?

Fetching historical onchain data via RPC leads to timeouts because looping through blocks to find events is slow and expensive. Replacing this with an indexing strategy like The Graph subgraphs or provider indexing APIs retrieves the same event data reliably without block scanning.