Skip to main content
Version: v2

Getting Started

Installation

Prerequisites

The following are the prerequisite packages required for Envio:

  1. Node.js (use v18 or newer)
  2. pnpm (use v8 or newer)
  3. Docker Desktop

Docker is required specifically for running the Envio indexer locally.

Install Envio

You can install Envio by running the command below:

npm i -g envio

Command to see available CLI commands for Envio.

envio --help

Indexer Initalization

Once you have completed the installation step, you can initialize your own indexer via the following options:

Quickstart

Generate an indexer quickly based on one or more smart contract/s deployed on a blockchain.

More information on the Quickstart can be found here.

Templates

Select either the ERC20, Greeter, or Blank template following the envio init command.

More information on the Greeter template can be found here.

Examples

Clone one of the example indexers that have been built using Envio. Reference indexers can be found via the Explorer, Tutorials, or in our Github.

Please take note of the difference in version of Envio which the indexer was built on and the latest version on npm. There may be some adjustments required to the indexer to be compatible with the latest version of Envio.

Indexer Configuration

Indexers generated using the Quickstart, templates or examples will work without any further configuration.

Users can further configure their indexers to perform custom logic, and the process is done via modifying the 3 files below:

(* depending on the language chosen for indexer)

Run the Indexer

Run locally

Users can run the indexer locally without deploying, using Docker and Hasura.

More information on running the indexer locally can be found here.

Deploy to Hosted Service

Once the indexer has been configured, you can easily deploy your indexer to Envio's hosted service and start querying your endpoint.

More information on the hosted service can be found here.