Skip to content

mento-protocol/monitoring-monorepo

Repository files navigation

Mento Monitoring Monorepo

Real-time monitoring infrastructure for Mento v3 on-chain pools — a multichain Envio HyperIndex indexer paired with a Next.js 16 + Plotly.js dashboard.

Live dashboard: monitoring.mento.org

Packages

Package Description
indexer-envio Envio HyperIndex indexer — Celo + Monad multichain
ui-dashboard Next.js 16 + Plotly.js dashboard with multi-chain network switching
shared-config Shared deployment config (chain ID → treb namespace mappings)

Architecture

┌──────────────────────┐     ┌──────────────────┐     ┌────────────────┐
│  Celo + Monad Chains │────▶│  Envio HyperIndex │────▶│  Hasura        │
│  (HyperSync / RPC)   │     │  (Hosted, mento)  │     │  (GraphQL API) │
└──────────────────────┘     └──────────────────┘     └───────┬────────┘
                                                               │
                                                        ┌──────▼──────┐
                                                        │  Next.js    │
                                                        │  Dashboard  │
                                                        │  (Vercel)   │
                                                        └─────────────┘

Both Celo Mainnet (42220) and Monad Mainnet (143) are served from a single Envio project (mento) using config.multichain.mainnet.yaml. Pool IDs are namespaced as {chainId}-{address} to prevent cross-chain collisions.

Static production endpoint: https://indexer.hyperindex.xyz/2f3dd15/v1/graphql

Networks

Network Chain ID Status
Celo Mainnet 42220 ✅ Live
Monad Mainnet 143 ✅ Live
Celo Sepolia 11142220 ✅ Live
Monad Testnet 10143 ✅ Live

Getting Started

Prerequisites

  • Node.js 22 LTS
  • pnpm 10.x
  • Docker (for local indexer dev — runs Postgres + Hasura)

Install

pnpm install

Run the Indexer (local)

# Multichain (Celo + Monad mainnet) — default
pnpm indexer:codegen && pnpm indexer:dev

# Celo Sepolia (testnet)
pnpm indexer:celo-sepolia:codegen && pnpm indexer:celo-sepolia:dev

# Monad Testnet
pnpm indexer:monad-testnet:codegen && pnpm indexer:monad-testnet:dev

Run the Dashboard

pnpm dashboard:dev

Environment Variables

Indexer

Create indexer-envio/.env from indexer-envio/.env.example:

Variable Description
ENVIO_RPC_URL_42220 Celo Mainnet RPC endpoint
ENVIO_RPC_URL_143 Monad Mainnet RPC endpoint
ENVIO_START_BLOCK_CELO Celo start block (default: 60664500)
ENVIO_START_BLOCK_MONAD Monad start block (default: 60730000)

Dashboard

Variable Description
NEXT_PUBLIC_HASURA_URL_MULTICHAIN_HOSTED Shared multichain GraphQL endpoint (Celo + Monad)
NEXT_PUBLIC_HASURA_URL_CELO_SEPOLIA_HOSTED Celo Sepolia hosted endpoint
UPSTASH_REDIS_REST_URL Address labels storage (Upstash Redis)
UPSTASH_REDIS_REST_TOKEN Address labels Redis auth token
BLOB_READ_WRITE_TOKEN Vercel Blob token for daily label backups

Production env vars are managed by Terraform. See terraform/.

Deployment

Indexer → Envio Hosted

Push to the envio branch to trigger a hosted reindex:

pnpm deploy:indexer

The mento project on Envio Cloud watches this branch.

Dashboard → Vercel

Every push to main that touches ui-dashboard/ auto-deploys to monitoring.mento.org.

Infrastructure (Vercel project, env vars, Upstash Redis) is managed by Terraform:

pnpm infra:plan    # preview changes
pnpm infra:apply   # apply changes

Contract Addresses

Sourced from the published @mento-protocol/contracts npm package. The active treb deployment namespace per chain is declared in shared-config/deployment-namespaces.json.

Key Files

What Where
Indexer schema indexer-envio/schema.graphql
Event handlers indexer-envio/src/EventHandlers.ts
Pool ID helpers indexer-envio/src/helpers.ts
Multichain config indexer-envio/config.multichain.mainnet.yaml
Indexer status + endpoint indexer-envio/STATUS.md
Dashboard app ui-dashboard/src/app/
Network defs ui-dashboard/src/lib/networks.ts
GraphQL queries ui-dashboard/src/lib/queries.ts
Terraform infrastructure terraform/

Documentation

Releases

No releases published

Packages

 
 
 

Contributors