β οΈ Important: This repository contains the extension code that gets merged into Scaffold-ETH 2 projects. This codebase is not useful on its own - it's only what gets integrated when you create a new Scaffold-ETH project with this extension.
To create a new Scaffold-ETH 2 project with this Envio extension:
npx create-eth@latest -e enviodev/scaffold-eth-2-extensionThis will create a complete Scaffold-ETH 2 project with the Envio indexer extension already integrated.
This extension adds automatic Envio indexer generation to your Scaffold-ETH 2 project, allowing you to index all your deployed smart contracts and query their data through a GraphQL API.
- π Generates boilerplate Envio indexer from your deployed Scaffold-ETH contracts
- π Status dashboard with links to Envio metrics and database
- π One-click regeneration to update the indexer when you deploy new contracts
- π― Automatic event detection from your contract ABIs
- π GraphQL API for querying your indexed blockchain data
Note: These commands are for the Envio indexer within the Scaffold-ETH project and must be run from the
packages/enviofolder.
cd packages/envio
yarn run update # Generate indexer from deployed contracts
yarn codegen # Generate TypeScript types
yarn dev # Start indexer in development mode
yarn start # Start indexer in production mode
yarn test # Run indexer tests- Node.js v22 or newer (required, v24 recommended)
- Docker (for running the indexer)
- Yarn (for Scaffold-ETH and the Envio indexer)
- Deploy your contracts:
yarn deploy - Generate the indexer:
cd packages/envio && yarn run update && yarn codegen - Start the indexer:
yarn dev - Access the dashboard at
http://localhost:3000/envio
Via Frontend: Go to the envio page (http://localhost:3000/envio) and click the "Generate" button.
Via Command Line: cd packages/envio && yarn run update && yarn codegen
For more information about Envio, visit the official documentation.