indexing-blocks

Process every Nth block to generate time-series snapshots and block-level aggregates.

2|3|Updated Mar 4, 2026
One-click install
npx skills add https://github.com/moose-code/polymarket-indexer --skill indexing-blocks-moose-code
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: indexing-blocks
Source: https://github.com/moose-code/polymarket-indexer/tree/main/.claude/skills/indexing-blocks
Command: npx skills add https://github.com/moose-code/polymarket-indexer --skill indexing-blocks-moose-code

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Processes every block (or every Nth block) to generate time-series snapshots and block-level aggregates for analytics.

Core Features & Use Cases

  • OnBlock handler integration from generated to capture block context
  • Interval-based processing to sample blocks (e.g., every 100 blocks)
  • No contract addresses or config.yaml entries required for activation
  • Stores results in BlockSnapshot for downstream analytics

Quick Start

Register an onBlock handler named BlockTracker for chain 1 with interval 100, saving block metadata to BlockSnapshot.

Frequently Asked Questions about indexing-blocks

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

FAQPage Schema
How do I track every block for time-series analytics on EVM chains?

Tracking every block for time-series analytics involves registering an onBlock handler to capture block context and storing results in BlockSnapshot. You can process each block or sample intervals without needing contract addresses or separate config entries.

Can I sample blocks at intervals instead of processing every single block?

Yes, you can sample blocks at intervals by configuring an interval parameter. Setting an interval of 100 processes every 100th block, reducing overhead while still generating time-series snapshots and block-level aggregates for your indexing workflow.

Do I need contract addresses to start block-by-block indexing?

No, you do not need contract addresses or a separate config entry to start block-by-block indexing. The onBlock handler activates by registering for a specific chain and stores results directly in BlockSnapshot without contract address dependencies.

What is the best way to generate block-level aggregates for historical trends?

Generating block-level aggregates for historical trends is best done using an onBlock handler with interval-based processing. This captures block context at regular intervals, storing metadata in BlockSnapshot to build time-series datasets for historical analysis.

What are the limitations of using interval-based block sampling for on-chain data?

A key limitation of interval-based block sampling is that processing every Nth block skips interim data, meaning highly granular per-block event tracking is lost. It suits trend analysis but misses fine-grained state changes between sampled intervals.