Envio
Envio HyperIndex is an indexing framework for real-time and historical blockchain data. You define the contracts and events to index, write handlers that turn those events into entities, and query the result through a GraphQL API.
HyperIndex supports Linea Mainnet (chain ID 59144) through HyperSync. It can also index other EVM networks by using an RPC data source.
Handlers are written in TypeScript (the default) or ReScript. You can run an indexer locally, self-host it, or deploy it to Envio Cloud, Envio's managed hosting.
Envio HyperSync
HyperSync is Envio's data retrieval layer, used
as an alternative to JSON-RPC.
It's available on Linea Mainnet at https://linea.hypersync.xyz.
HyperIndex uses HyperSync as its default data source, so you don't need to configure RPC URLs or handle rate limits. HyperSync is also available as a standalone API through the Python, Rust, Node.js, and Go clients. HyperSync requires an API token.
Other features
- Generate an indexer from a verified contract address or a local ABI file
- Index several chains into one database with multichain indexing
- Index contracts created by factory contracts with dynamic contracts
- Test handler logic without syncing the chain with the testing framework
Get started
You need Node.js 22 or newer, and Docker Desktop to run the indexer locally. We recommend pnpm.
Run the following command and follow the prompts:
pnpx envio init
Select Evm as the blockchain ecosystem, then choose how to start:
? Choose an initialization option
> From Address - Lookup ABI from block explorer
From ABI File - Use your own ABI file
Template: ERC20
Template: Greeter
Feature: External Calls
Feature: Factory Contract
[↑↓ to move, enter to select, type to filter]
With From Address, select linea and enter the contract address.
The CLI fetches the ABI from a block explorer and lets you choose which events to index.
At the end, it asks you to add an Envio API token to the project's .env file.
You can also run contract import without prompts:
pnpx envio init contract-import explorer -b linea -c <CONTRACT_ADDRESS> --single-contract --all-events -n my-indexer -d my-indexer
The command generates the configuration (config.yaml), GraphQL schema (schema.graphql), and
event handlers (src/handlers/).
To start the indexer locally, make sure Docker is running and run pnpm dev from the project
folder.
See running the indexer locally and the
HyperIndex quickstart.