What problem does it solve?
Deploying a blockchain indexer across multiple chains introduces entity ID collisions, ambiguous data scoping, and chain-specific configuration complexity that can silently corrupt indexed data.
Core Features & Use Cases
- Per-Chain Data Mode: Enable
disable_default_cross_chain to give entities composite (id, chainId) primary keys, with per-chain effect caches, history, and reorg rollback.
- Entity ID Namespacing: Prefix entity IDs with
event.chainId to prevent collisions when rows are shared across chains, and mark shared entities with the @crossChain directive.
- Chain-Specific Logic: Use the
context.chain runtime API (context.chain.id, context.chain.isRealtime) plus YAML config with global contract definitions and per-chain addresses.
- Use Case: Index USDC Transfer events on both Ethereum mainnet and Polygon with chain-specific contract addresses, keeping each chain's token balances as independent rows.
Quick Start
Set up my Envio indexer to track ERC20 Transfer events on Ethereum and Polygon with per-chain entity storage and chain-specific contract addresses.