Skip to content

Commit d3e0d54

Browse files
committed
docs: rewrite README + indexer README — remove all legacy content
- Remove references to single-chain deployments, per-chain deploy branches, old endpoint URLs, stale network table (Monad blocked) - Both READMEs now reflect: multichain-first, mento Envio project, static endpoint, simplified pnpm commands - Remove outdated env var table (CELO_MAINNET_HOSTED, MONAD_MAINNET_HOSTED) - Root README: updated architecture diagram, deployment section, key files table - indexer README: rewritten around multichain config, correct entity list, removed stale Celo-only contract address tables
1 parent 63e9988 commit d3e0d54

File tree

2 files changed

+133
-240
lines changed

2 files changed

+133
-240
lines changed

README.md

Lines changed: 58 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,44 @@
11
# Mento Monitoring Monorepo
22

3-
Real-time monitoring infrastructure for Mento v3 on-chain pools — an [Envio HyperIndex](https://docs.envio.dev/) indexer paired with a Next.js 16 + Plotly.js dashboard.
3+
Real-time monitoring infrastructure for Mento v3 on-chain pools — a multichain [Envio HyperIndex](https://docs.envio.dev/) indexer paired with a Next.js 16 + Plotly.js dashboard.
44

55
**Live dashboard:** [monitoring.mento.org](https://monitoring.mento.org)
66

77
## Packages
88

9-
| Package | Description |
10-
| ----------------------------------- | ------------------------------------------------------------------------------ |
11-
| [`indexer-envio`](./indexer-envio/) | Envio HyperIndex indexer for Celo + Monad (FPMM pools + VirtualPools) |
12-
| [`ui-dashboard`](./ui-dashboard/) | Next.js 16 + Plotly.js monitoring dashboard with multi-chain network switching |
13-
| [`shared-config`](./shared-config/) | Shared deployment config (chain ID → treb namespace mappings) |
9+
| Package | Description |
10+
| ----------------------------------- | ------------------------------------------------------------------- |
11+
| [`indexer-envio`](./indexer-envio/) | Envio HyperIndex indexer Celo + Monad multichain |
12+
| [`ui-dashboard`](./ui-dashboard/) | Next.js 16 + Plotly.js dashboard with multi-chain network switching |
13+
| [`shared-config`](./shared-config/) | Shared deployment config (chain ID → treb namespace mappings) |
1414

1515
## Architecture
1616

1717
```text
18-
┌─────────────────┐ ┌──────────────────┐ ┌────────────────┐
19-
│ Celo Chain │────▶│ Envio HyperIndex │────▶│ Hasura │
20-
│ (RPC / GRPC) │ │ (Hosted) │ │ (GraphQL API) │
21-
└─────────────────┘ └──────────────────┘ └───────┬────────┘
22-
23-
┌──────▼──────┐
24-
│ Next.js │
25-
│ Dashboard │
26-
│ (Vercel) │
27-
└─────────────┘
18+
┌──────────────────────┐ ┌──────────────────┐ ┌────────────────┐
19+
│ Celo + Monad Chains │────▶│ Envio HyperIndex │────▶│ Hasura │
20+
│ (HyperSync / RPC) │ │ (Hosted, mento) │ │ (GraphQL API) │
21+
└──────────────────────┘ └──────────────────┘ └───────┬────────┘
22+
23+
┌──────▼──────┐
24+
│ Next.js │
25+
│ Dashboard │
26+
│ (Vercel) │
27+
└─────────────┘
2828
```
2929

30-
The indexer runs on Envio's hosted free tier. Each deploy produces a new GraphQL endpoint hash. The dashboard reads from this endpoint via Hasura's GraphQL API.
30+
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.
31+
32+
**Static production endpoint:** `https://indexer.hyperindex.xyz/2f3dd15/v1/graphql`
3133

3234
## Networks
3335

34-
| Network | Chain ID | Status |
35-
| ------------- | -------- | ----------------------------- |
36-
| Celo Mainnet | 42220 | ✅ Live |
37-
| Celo Sepolia | 44787 | ✅ Live |
38-
| Monad Mainnet || ⏳ Blocked on contract deploy |
36+
| Network | Chain ID | Status |
37+
| ------------- | -------- | ------- |
38+
| Celo Mainnet | 42220 | ✅ Live |
39+
| Monad Mainnet | 143 | ✅ Live |
40+
| Celo Sepolia | 11142220 | ✅ Live |
41+
| Monad Testnet | 10143 | ✅ Live |
3942

4043
## Getting Started
4144

@@ -70,132 +73,74 @@ pnpm indexer:monad-testnet:codegen && pnpm indexer:monad-testnet:dev
7073
pnpm dashboard:dev
7174
```
7275

73-
The dashboard connects to Hasura (local or hosted) to display real-time pool data.
74-
7576
## Environment Variables
7677

7778
### Indexer
7879

7980
Create `indexer-envio/.env` from `indexer-envio/.env.example`:
8081

81-
| Variable | Description | Default |
82-
| ------------------- | ---------------------------- | ---------- |
83-
| `ENVIO_API_TOKEN` | Envio platform API token ||
84-
| `ENVIO_RPC_URL` | Celo RPC endpoint ||
85-
| `ENVIO_START_BLOCK` | Block to start indexing from | `60664513` |
82+
| Variable | Description |
83+
| ------------------------- | ------------------------------------- |
84+
| `ENVIO_RPC_URL_42220` | Celo Mainnet RPC endpoint |
85+
| `ENVIO_RPC_URL_143` | Monad Mainnet RPC endpoint |
86+
| `ENVIO_START_BLOCK_CELO` | Celo start block (default: 60664500) |
87+
| `ENVIO_START_BLOCK_MONAD` | Monad start block (default: 60730000) |
8688

8789
### Dashboard
8890

89-
The dashboard supports multiple network targets via `_<NETWORK>` suffix env vars:
90-
91-
| Variable | Description |
92-
| --------------------------------------------- | ------------------------------------------------ |
93-
| `NEXT_PUBLIC_HASURA_URL_CELO_MAINNET_HOSTED` | Hasura/GraphQL endpoint — Celo Mainnet (hosted) |
94-
| `NEXT_PUBLIC_HASURA_URL_MONAD_MAINNET_HOSTED` | Hasura/GraphQL endpoint — Monad Mainnet (hosted) |
95-
| `NEXT_PUBLIC_HASURA_URL_MONAD_TESTNET_HOSTED` | Hasura/GraphQL endpoint — Monad Testnet (hosted) |
96-
| `NEXT_PUBLIC_HASURA_URL_CELO_SEPOLIA_HOSTED` | Hasura/GraphQL endpoint — Celo Sepolia (hosted) |
97-
| `NEXT_PUBLIC_HASURA_URL_CELO_MAINNET` | Hasura endpoint — Celo Mainnet (local) |
98-
| `NEXT_PUBLIC_HASURA_URL_CELO_SEPOLIA` | Hasura endpoint — Celo Sepolia (local) |
99-
| `NEXT_PUBLIC_EXPLORER_URL_CELO_MAINNET` | Block explorer — Celo Mainnet |
100-
| `NEXT_PUBLIC_EXPLORER_URL_CELO_SEPOLIA` | Block explorer — Celo Sepolia |
101-
| `UPSTASH_REDIS_REST_URL` | Address labels storage (Upstash Redis) |
102-
| `UPSTASH_REDIS_REST_TOKEN` | Address labels Redis auth token |
103-
| `BLOB_READ_WRITE_TOKEN` | Vercel Blob token for daily label backups |
104-
105-
Production env vars are managed by Terraform — do not edit them in the Vercel dashboard. See [`terraform/`](./terraform/) and [`docs/deployment.md`](./docs/deployment.md).
91+
| Variable | Description |
92+
| -------------------------------------------- | ------------------------------------------------- |
93+
| `NEXT_PUBLIC_HASURA_URL_MULTICHAIN_HOSTED` | Shared multichain GraphQL endpoint (Celo + Monad) |
94+
| `NEXT_PUBLIC_HASURA_URL_CELO_SEPOLIA_HOSTED` | Celo Sepolia hosted endpoint |
95+
| `UPSTASH_REDIS_REST_URL` | Address labels storage (Upstash Redis) |
96+
| `UPSTASH_REDIS_REST_TOKEN` | Address labels Redis auth token |
97+
| `BLOB_READ_WRITE_TOKEN` | Vercel Blob token for daily label backups |
10698

107-
## Contract Addresses
108-
109-
Contract addresses and ABIs are sourced from the published [`@mento-protocol/contracts`](https://www.npmjs.com/package/@mento-protocol/contracts) npm package — no vendored JSON files. The active treb deployment namespace per chain is declared in [`shared-config/deployment-namespaces.json`](./shared-config/deployment-namespaces.json):
110-
111-
```json
112-
{
113-
"42220": "mainnet",
114-
"11142220": "testnet-v2-rc5"
115-
}
116-
```
117-
118-
**To promote a new treb deployment** (e.g. after a new `mento-deployments-v2` release):
119-
120-
1. Publish a new `@mento-protocol/contracts` version from `mento-deployments-v2`
121-
2. Update the package version in `indexer-envio/package.json` and `ui-dashboard/package.json`
122-
3. Update the namespace string(s) in `shared-config/deployment-namespaces.json`
123-
4. Run `pnpm install`
99+
Production env vars are managed by Terraform. See [`terraform/`](./terraform/).
124100

125101
## Deployment
126102

127103
### Indexer → Envio Hosted
128104

129-
Each network has a dedicated deploy branch Envio watches:
130-
131-
| Network | Deploy Branch |
132-
| ------------- | ---------------------- |
133-
| Celo Mainnet | `deploy/celo-mainnet` |
134-
| Celo Sepolia | `deploy/celo-sepolia` |
135-
| Monad Mainnet | `deploy/monad-mainnet` |
136-
| Monad Testnet | `deploy/monad-testnet` |
137-
138-
Push to trigger a redeploy:
105+
Push to the `envio` branch to trigger a hosted reindex:
139106

140107
```bash
141-
pnpm deploy:indexer celo-mainnet
142-
# or run without args to be prompted:
143108
pnpm deploy:indexer
144-
# or push directly:
145-
git push origin main:deploy/celo-mainnet
146109
```
147110

148-
> ⚠️ **Celo Sepolia endpoint changes on each Envio redeploy.** After redeploying the Celo Sepolia indexer, update `hasura_url_celo_sepolia_hosted` in `terraform/terraform.tfvars` and run `pnpm infra:apply`.
111+
The `mento` project on [Envio Cloud](https://envio.dev/app/mento-protocol/mento) watches this branch.
149112

150113
### Dashboard → Vercel
151114

152-
Vercel's native Git integration watches `main` — every push that touches `ui-dashboard/` auto-deploys the dashboard to [monitoring.mento.org](https://monitoring.mento.org).
115+
Every push to `main` that touches `ui-dashboard/` auto-deploys to [monitoring.mento.org](https://monitoring.mento.org).
153116

154-
All infrastructure (Vercel project, env vars, Upstash Redis, custom domain) is managed by Terraform:
117+
Infrastructure (Vercel project, env vars, Upstash Redis) is managed by Terraform:
155118

156119
```bash
157120
pnpm infra:plan # preview changes
158121
pnpm infra:apply # apply changes
159122
```
160123

161-
See [`docs/deployment.md`](./docs/deployment.md) for the full setup guide and troubleshooting.
162-
163-
## CI
164-
165-
GitHub Actions runs on every PR:
124+
## Contract Addresses
166125

167-
- ESLint 10 (no `eslint-config-next` — uses `@eslint/js` + `typescript-eslint` + `@eslint-react`)
168-
- Vitest (105 tests)
169-
- TypeScript typecheck
170-
- Codecov coverage reporting
126+
Sourced from the published [`@mento-protocol/contracts`](https://www.npmjs.com/package/@mento-protocol/contracts) npm package. The active treb deployment namespace per chain is declared in [`shared-config/deployment-namespaces.json`](./shared-config/deployment-namespaces.json).
171127

172128
## Key Files
173129

174-
| What | Where |
175-
| ------------------------------ | -------------------------------------------- |
176-
| **Deployment namespace map** | `shared-config/deployment-namespaces.json` |
177-
| Indexer schema | `indexer-envio/schema.graphql` |
178-
| Event handlers | `indexer-envio/src/EventHandlers.ts` |
179-
| Contract address resolution | `indexer-envio/src/contractAddresses.ts` |
180-
| Celo mainnet config | `indexer-envio/config.celo.mainnet.yaml` |
181-
| Celo Sepolia config | `indexer-envio/config.celo.sepolia.yaml` |
182-
| Monad mainnet/testnet configs | `indexer-envio/config.monad.*.yaml` |
183-
| Dashboard app | `ui-dashboard/src/app/` |
184-
| Address book page | `ui-dashboard/src/app/address-book/page.tsx` |
185-
| Address labels API | `ui-dashboard/src/app/api/address-labels/` |
186-
| Address labels storage | `ui-dashboard/src/lib/address-labels.ts` |
187-
| Network defs + contract labels | `ui-dashboard/src/lib/networks.ts` |
188-
| GraphQL queries | `ui-dashboard/src/lib/queries.ts` |
189-
| Pool type helper | `ui-dashboard/src/lib/tokens.ts` |
190-
| Terraform infrastructure | `terraform/` |
191-
| Deployment guide | `docs/deployment.md` |
192-
| Technical spec | `SPEC.md` |
193-
| Roadmap | `docs/ROADMAP.md` |
130+
| What | Where |
131+
| ------------------------- | ---------------------------------------------- |
132+
| Indexer schema | `indexer-envio/schema.graphql` |
133+
| Event handlers | `indexer-envio/src/EventHandlers.ts` |
134+
| Pool ID helpers | `indexer-envio/src/helpers.ts` |
135+
| Multichain config | `indexer-envio/config.multichain.mainnet.yaml` |
136+
| Indexer status + endpoint | `indexer-envio/STATUS.md` |
137+
| Dashboard app | `ui-dashboard/src/app/` |
138+
| Network defs | `ui-dashboard/src/lib/networks.ts` |
139+
| GraphQL queries | `ui-dashboard/src/lib/queries.ts` |
140+
| Terraform infrastructure | `terraform/` |
194141

195142
## Documentation
196143

197-
- [`SPEC.md`](./SPEC.md) — Full technical specification
198-
- [`docs/ROADMAP.md`](./docs/ROADMAP.md) — Current state + upcoming work
199-
- [`docs/BACKLOG.md`](./docs/BACKLOG.md) — Detailed task backlog
200-
- [`docs/deployment.md`](./docs/deployment.md) — Deployment guide
201144
- [`indexer-envio/README.md`](./indexer-envio/README.md) — Indexer reference
145+
- [`indexer-envio/STATUS.md`](./indexer-envio/STATUS.md) — Current sync state + endpoint
146+
- [`docs/deployment.md`](./docs/deployment.md) — Full deployment guide

0 commit comments

Comments
 (0)