What problem does it solve?
Indexing time-series data, periodic snapshots, or block-level aggregations requires processing blocks directly rather than contract events, and configuring per-chain block ranges and strides correctly is error-prone.
Core Features & Use Cases
- Block Handler Registration: Uses the
indexer.onBlock API to process every block or every Nth block without a contract address or config.yaml entry.
- Per-Chain Filtering: The
where predicate supports block number ranges (_gte, _lte) and stride (_every) per chain, with a TypeScript exhaustiveness check via switch on chain.id.
- Multi-Ecosystem Support: Covers Fuel (
block.height filters) and SVM (indexer.onSlot with slot filters) variants.
- Use Case: Build a block snapshot entity that records every 100th block on Ethereum mainnet starting at block 18000000 and every 50th block on Base, storing results via the handler context entity API.
Quick Start
Add a block handler to my Envio indexer that snapshots every 100th block on Ethereum mainnet starting from block 18000000.