indexing

Design event-driven indexing plans for onchain data using The Graph, Dune, or RPC.

7|Updated Apr 4, 2026
One-click install
npx skills add https://github.com/Zodomo/DrandVerifier --skill indexing-zodomo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: indexing
Source: https://github.com/Zodomo/DrandVerifier/tree/main/.opencode/skills/ethskills/indexing
Command: npx skills add https://github.com/Zodomo/DrandVerifier --skill indexing-zodomo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you stop trying to retrieve historical onchain data by repeatedly calling RPC for past state or scanning blocks for events, which is slow, expensive, and often impossible at scale.

Core Features & Use Cases

  • Event-first contract design: Use Solidity events as a reliable, queryable onchain “API” for indexers and frontends.
  • Pick the right indexing approach: Choose between The Graph (subgraphs), Dune (SQL analytics), provider APIs (Alchemy/QuickNode), or RPC log reads for small windows.
  • Efficient querying patterns: Use indexed event fields, GraphQL querying, and batching/multicall for current-state reads while reserving historical queries for indexers.

Quick Start

Use the indexing skill to design an event-driven indexing plan for your contract by selecting which events to emit and whether to use The Graph, Dune, provider APIs, or direct RPC log reads based on expected query volume.

Frequently Asked Questions about indexing

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

FAQPage Schema
What is the best way to retrieve historical blockchain event logs without scanning every block?

Retrieving historical blockchain event logs efficiently requires using dedicated indexing systems like The Graph or Dune Analytics rather than brute-force block scanning. This approach uses an event-first contract strategy, querying indexed Solidity event fields to bypass slow and expensive archive RPC calls.

How do I design Solidity events for efficient querying by indexers and frontends?

Designing Solidity events for querying requires an event-first contract strategy where you mark specific event parameters as indexed. These indexed topics act as a queryable onchain API, allowing systems like The Graph to filter and retrieve historical event logs rapidly without scanning past contract state.

When should I use The Graph versus Dune Analytics for blockchain data indexing?

Use The Graph for dApp backends, activity feeds, and GraphQL querying needing low latency, while Dune Analytics suits SQL-based dashboards and broader analytics. Your choice between The Graph, Dune, provider APIs, or direct RPC log reads depends on expected query volume and scale constraints.

Do I need an archive RPC node to fetch historical onchain data for my dApp dashboard?

You do not need an archive RPC node to fetch historical onchain data for dashboards. By using an event-first indexing approach with The Graph or Dune Analytics, you retrieve historical event logs directly, avoiding the high costs and latency of repeated archive RPC state calls.

Can I use direct RPC log reads for blockchain indexing at scale?

Direct RPC log reads work for blockchain indexing within small block windows, but become slow and expensive at scale. For high query volume, you should transition to dedicated indexing systems like The Graph subgraphs or provider APIs to handle historical event queries and pagination efficiently.