indexer-wildcard

Configures wildcard indexing of contract events across all addresses on a chain.

546|55|Updated May 24, 2024
One-click install
npx skills add https://github.com/enviodev/hyperindex --skill indexer-wildcard
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: indexer-wildcard
Source: https://github.com/enviodev/hyperindex/tree/main/packages/cli/templates/static/shared/.claude/skills/indexer-wildcard
Command: npx skills add https://github.com/enviodev/hyperindex --skill indexer-wildcard

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Indexing every instance of a contract type (e.g., all ERC-20 tokens) normally requires knowing each contract address upfront. This Skill shows how to index all events matching an event signature across every address on a chain using HyperIndex wildcard indexing.

Core Features & Use Cases

  • Address-free configuration: Omit the contract address in the YAML config so the indexer matches all events with that signature chain-wide.
  • Wildcard handlers: Pass wildcard: true to indexer.onEvent and use event.srcAddress to identify which contract emitted each event.
  • Volume reduction with filters: Combine wildcard indexing with where filters (object, array, function, or addresses forms) to cut down high event volume.
  • Use Case: Track all ERC-20 Transfer events on Ethereum mainnet, or index only mint events by filtering transfers where from is the zero address.

Quick Start

Ask the AI to set up a HyperIndex config and handler that indexes all ERC-20 Transfer events across every contract address on a chain using wildcard indexing.

Frequently Asked Questions about indexer-wildcard

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

FAQPage Schema
How do I index all ERC-20 Transfer events on a chain?

Use wildcard indexing in HyperIndex: define the ERC20 contract and Transfer event in your YAML config without an address, then pass wildcard: true to indexer.onEvent. The indexer captures every matching Transfer event across all contract addresses on the chain.

How do I know which contract emitted a wildcard event?

Use event.srcAddress inside your handler. When wildcard indexing is enabled, srcAddress contains the actual contract address that emitted the event, letting you store or filter per-token data.

How can I reduce event volume when wildcard indexing?

Add a where filter to the indexer.onEvent options. Filters support object, array, function, and addresses forms, for example filtering transfers where the from parameter equals the zero address to index only mints.

When should I use wildcard indexing instead of listing contract addresses?

Use wildcard indexing when you need every instance of a contract type and cannot know addresses upfront, such as all ERC-20 tokens. If you only track a fixed set of known contracts, listing addresses explicitly avoids the high event volume wildcards produce.