This demo shows how to use Flashblocks with HyperIndex.
With HyperIndex v3, users can use HyperSync and RPC together to get the benefits of both. HyperSync is used for fast historical syncing, and RPC is used for live indexing at the chain head. This avoids the small delay you usually get when indexing live data only with HyperSync.
The current head lag with HyperSync is only a few milliseconds on all chains.
First, install the dependencies:
pnpm install
Make sure you have the required tools installed, as listed in the prerequisites.
To run the indexer locally, run:
pnpm devHyperIndex keeps track of the latest block. When it reaches that block, the isReady flag becomes true. After that, HyperIndex switches from HyperSync to RPC for live data.