indexer-traces

Query transaction call traces via HyperSync and RPC fallback methods.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires envio.

What problem does it solve?

Blockchain developers often need call trace data (internal transactions, delegatecalls, gas usage) for indexing, but the Envio Indexer does not yet expose a handler-level trace API like onTrace. This Skill explains how to access trace data despite that gap.

Core Features & Use Cases

  • HyperSync Trace Queries: Filter traces by from/to addresses, contract address, callType (call, delegatecall, staticcall), trace type, and function sighash at the data layer.
  • RPC Workaround: Use the Envio Effect API with createEffect to fetch trace data from an RPC endpoint via trace_block, with built-in caching.
  • Use Case: You are building an indexer that needs to track internal contract calls for a DeFi protocol. Use this Skill to query traces through HyperSync filters or fetch them per block with a cached RPC effect.

Quick Start

Ask the assistant to show how to fetch call traces for a specific block using the Envio Effect API and an RPC endpoint.

Frequently Asked Questions about indexer-traces

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

FAQPage Schema
How do I index transaction traces with Envio HyperIndex?

Envio Indexer has no handler-level trace API like onTrace yet. Query traces directly through HyperSync at the data layer, or use the Effect API with createEffect to call trace_block on an RPC endpoint with caching enabled.

What trace filters does HyperSync support?

HyperSync supports filtering traces by from and to addresses, contract address, callType (call, delegatecall, staticcall), trace type (call, create, suicide, reward), and function sighash.

Does Envio support an onTrace handler for indexing?

No, the Envio Indexer does not currently expose a handler-level trace API. Trace data is only accessible through HyperSync queries at the data layer or via RPC calls using the Effect API.

How to fetch trace_block data with caching in an indexer?

Use createEffect from the envio package with a schema-validated input, set cache to true, and send a JSON-RPC trace_block request to your RPC endpoint. Cached effects avoid repeated RPC calls for the same block.

What trace fields are available from HyperSync?

Available fields include From, To, CallType, Gas, Input, Value, GasUsed, Output, Subtraces, TraceAddress, TransactionHash, BlockNumber, and Error, covering most trace analysis needs.