Indexer
Audience: Engineers working on
packages/indexeror consuming Envio artifacts. Related docs: Monorepo Structure, packages/indexer/README.md Networks: Arbitrum One (42161), Celo (42220), Base Sepolia (84532). Deployment data:packages/contracts/deployments/*.json. Updated Novemberβ―2024. External references: Review the Envio documentation when modifying handlers, and align GraphQL schemas with the official Envio guidance.
Blockchain event indexer exposing Green Goods data via GraphQL.
Quick Reference
Path: packages/indexer/ Port: http://localhost:8080 Password: testing (local) Stack: Envio HyperIndex + PostgreSQL
Commands:
bun --filter indexer dev # Start indexer (checks Docker)
bun --filter indexer stop # Stop indexer
bun --filter indexer reset # Reset completely
bun --filter indexer codegen # Regenerate after schema changesWhat It Indexes
Events:
Garden creation (
GardenCreated)Action registration (
ActionRegistered)Work submissions (via EAS attestations)
Work approvals (via EAS attestations)
Member changes (
GardenerAdded,OperatorAdded)
Entities:
Gardens
Actions
Work
WorkApproval
Attestations
GraphQL API
Public Endpoint: https://indexer.hyperindex.xyz/0bf0e0f/v1/graphql
Query Example:
Subscription Example:
Architecture
Files:
config.yaml: Networks and contractsschema.graphql: Entity definitionssrc/EventHandlers.ts: Event processing logicabis/: Contract ABIs
Development
Schema Changes:
Edit
schema.graphqlRun
bun codegenRun
bun run setup-generatedRestart:
bun dev
Docker Management:
Conventions
Entity IDs
Composite format: chainId-identifier
Always Include chainId
Complete Documentation
π Full details: packages/indexer/README.md
Key Files:
Envio conventions:
.cursor/rules/envio-conventions.mdcDevelopment workflow:
.cursor/rules/indexer-workflow.mdc
Last updated