Envio
Overview
Envio is the data layer for blockchain apps. It gives Ronin developers the fastest, most flexible way to get real-time and historical onchain data, from a single GraphQL API to raw high-speed access, with managed hosting on Envio Cloud. Envio's HyperIndex natively supports indexing any EVM chain out of the box, so you can index Ronin using your own RPC as the data source. Handlers can be written in TypeScript, JavaScript, or ReScript, with reorg handling, real-time and historical data, and multichain data aggregation. You can deploy and scale your indexer on the fully managed Envio Cloud, or self-host.
Quick Start
You can auto-generate an indexer from any verified contract in a few minutes. To get started, follow these three steps:
- Initialize your indexer
- Write your event handlers
- Run your indexer and query the GraphQL API
1. Initialize your indexer
Envio can bootstrap a full indexer from a verified contract. Run:
pnpx envio init
Follow the prompts to point Envio at your Ronin contract. Envio fetches the ABI, generates the config, schema, and event handler stubs for you.
2. Write your event handlers
Open the generated handler files and add the logic that maps each contract event to the entities defined in your GraphQL schema. Handlers can be written in TypeScript, JavaScript, or ReScript. See the configuration file guide for how to declare your network, contracts, and events, and the RPC data source guide for indexing Ronin via your own RPC endpoint.
3. Run your indexer and query the GraphQL API
Start your indexer locally and query the generated GraphQL API. When you are ready for production, you can deploy to Envio Cloud for managed, zero-downtime hosting, or self-host.