docs(03-deployment): runbooks and deployment status updates
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled

Made-with: Cursor
This commit is contained in:
defiQUG
2026-03-27 18:48:41 -07:00
parent eeef9cce3e
commit dedb55e05c
29 changed files with 166 additions and 78 deletions

View File

@@ -1,5 +1,7 @@
# Add Liquidity to PMM Pools (Chain 138) — Runbook
> Historical note (2026-03-26): this runbook originated during the earlier three-pool PMM phase. Current canonical Chain 138 PMM addresses are `DODOPMMIntegration=0x5BDc62f1ae7D630c37A8B363a1d49845356Ee72d` and `DODOPMMProvider=0x5CAe6Ce155b7f08D3a956F5Dc82fC9945f29B381`.
**Purpose:** Add base/quote liquidity to the three DODO PMM pools on Chain 138 (cUSDT/cUSDC, cUSDT/USDT, cUSDC/USDC).
**Prerequisites:**
@@ -36,9 +38,9 @@ Add or set in `smom-dbis-138/.env`:
```bash
# Pool addresses (from PRE_DEPLOYMENT_CHECKLIST / create-all-pmm-pools-chain138.sh)
POOL_CUSDTCUSDC=0x9fcB06Aa1FD5215DC0E91Fd098aeff4B62fEa5C8
POOL_CUSDTUSDT=0xa3Ee6091696B28e5497b6F491fA1e99047250c59
POOL_CUSDCUSDC=0x90bd9Bf18Daa26Af3e814ea224032d015db58Ea5
POOL_CUSDTCUSDC=0xff8d3b8fDF7B112759F076B69f4271D4209C0849
POOL_CUSDTUSDT=0x6fc60DEDc92a2047062294488539992710b99D71
POOL_CUSDCUSDC=0x9f74Be42725f2Aa072a9E0CdCce0E7203C510263
# Amounts in base units (6 decimals): 1M tokens = 1000000000000
ADD_LIQUIDITY_BASE_AMOUNT=1000000000000

View File

@@ -218,10 +218,10 @@ If configuration files are missing:
## Related Documentation
- [Next Steps](../archive/historical/CHAIN138_NEXT_STEPS.md)
- [DEPLOYMENT_ORDER_OF_OPERATIONS.md](DEPLOYMENT_ORDER_OF_OPERATIONS.md)
- [Missing Containers List](MISSING_CONTAINERS_LIST.md)
- [JWT Authentication Requirements](../04-configuration/CHAIN138_JWT_AUTH_REQUIREMENTS.md)
- [Complete Implementation](../archive/completion/CHAIN138_COMPLETE_IMPLEMENTATION.md)
- [CHAIN138_BESU_CONFIGURATION.md](../06-besu/CHAIN138_BESU_CONFIGURATION.md) · [CONTRACT_NEXT_STEPS_LIST.md](../11-references/CONTRACT_NEXT_STEPS_LIST.md)
---

View File

@@ -179,6 +179,42 @@ Deployer must have `VAULT_DEPLOYER_ROLE` on VaultFactory. Each configured base t
When Uniswap V3, Balancer, or DODO PMM pools exist on Chain 138 / 651940, configure the router and provider so on-chain quotes and swaps work.
**Chain 138 dry-run helper (safe preflight):**
```bash
cd smom-dbis-138
bash scripts/deployment/dry-run-enhanced-swap-router-chain138.sh
```
This helper loads `smom-dbis-138/.env`, verifies the minimum required env (`PRIVATE_KEY`, `RPC_URL_138`), prints the exact token/provider vars the deploy script will use, and shows the sourced non-broadcast `forge script` command for a safe Chain 138 dry-run. It also distinguishes "env preflight passed" from "router would actually be usable after deploy". The updated deploy script now preloads the live 2026-03-26 DODO pair map on Chain 138:
- `cUSDT ↔ cUSDC`
- `cUSDT ↔ USDT`
- `cUSDC ↔ USDC`
- `cUSDT ↔ cXAUC`
- `cUSDC ↔ cXAUC`
- `cEURT ↔ cXAUC`
If provider env vars like `DODOEX_ROUTER`, `DODO_PMM_PROVIDER_ADDRESS`, `UNISWAP_V3_ROUTER`, `BALANCER_VAULT`, `CURVE_3POOL`, or `ONEINCH_ROUTER` are unset, the deploy script uses placeholders and disables those providers after deployment. This keeps the Chain 138 deployment honest: token-to-token DODO pairs are registered immediately, while `swapToStablecoin()` still requires real `WETH -> stable` routes before it is operational.
For current Chain 138, prefer `DODO_PMM_PROVIDER_ADDRESS` when the deployed `DODOPMMProvider` is available. The router now supports that provider as its DODO backend on Chain 138. If neither `DODO_PMM_PROVIDER_ADDRESS` nor `DODOEX_ROUTER` is set, the router can still deploy and register the live pair map, but the DODO provider will be disabled and no DODO execution path will remain enabled.
The dry-run helper also probes the live `DODOPMMProvider` over `RPC_URL_138` for `WETH -> stable` support. This is important because the current public/private PMM set is stable/stable and stable/XAU; `swapToStablecoin()` is still only operational when at least one live `WETH -> stable` route exists.
To run the sourced non-broadcast Forge simulation directly from the helper:
```bash
cd smom-dbis-138
bash scripts/deployment/dry-run-enhanced-swap-router-chain138.sh --run
```
You can increase visibility or the timeout if compilation/simulation is slow:
```bash
cd smom-dbis-138
bash scripts/deployment/dry-run-enhanced-swap-router-chain138.sh --run --timeout-seconds 180 --verbosity -vvv
```
**EnhancedSwapRouter** (set by address with `ROUTING_MANAGER_ROLE`):
| Config | Method | Env (optional) | When |
@@ -199,6 +235,8 @@ cd smom-dbis-138 && source .env
**DODOPMMProvider:** Register existing DODO PMM pools so `getQuote` / `executeSwap` work. Address with `POOL_MANAGER_ROLE` calls `registerPool(tokenIn, tokenOut, pool)`.
The corrected `RegisterDODOPools.s.sol` now reads `DODOPMMIntegration.getAllPools()` and `getPoolConfig(pool)` on-chain, then registers both directions for every discovered pool. That means it covers the current 2026-03-26 public live set and any future c* full-mesh pools already created in the integration. This is required because `DODOPMMProvider` stores routes as `pools[tokenIn][tokenOut]`. If the dry-run helper shows a documented live pair as missing, rerun this script before treating the provider as fully reconciled.
```bash
# After DODO pool is deployed (e.g. cUSDT↔USDT)
cast send "$DODO_PMM_PROVIDER_ADDRESS" "registerPool(address,address,address)" "<CUSDT>" "<USDT>" "<POOL_ADDRESS>" --rpc-url "$RPC_URL_138" --private-key "$PRIVATE_KEY" --gas-price 1000000000

View File

@@ -1,5 +1,7 @@
# Full Deployment Order of Operations
> Historical note (2026-03-26): this run order includes earlier PMM deployment phases. The current canonical Chain 138 PMM stack is `DODOPMMIntegration=0x5BDc62f1ae7D630c37A8B363a1d49845356Ee72d` and `DODOPMMProvider=0x5CAe6Ce155b7f08D3a956F5Dc82fC9945f29B381`. Use [ADDRESS_MATRIX_AND_STATUS.md](../11-references/ADDRESS_MATRIX_AND_STATUS.md) for live addresses.
**Last Updated:** 2026-02-28
**Purpose:** Single canonical sequence for deploying and completing the system: prerequisites → Chain 138 core → PMM/pools → provider → optional → cW* → verification. Use this as the master order; other runbooks give per-step detail.
@@ -42,7 +44,7 @@ Execute in any order where no dependency; all must be satisfied before Phase 1
|---|------|--------|
| 0.1 | **RPC 2101 (Core) writable** | If read-only: `./scripts/maintenance/make-rpc-vmids-writable-via-ssh.sh` then `./scripts/maintenance/health-check-rpc-2101.sh`. See [RPC_2101_READONLY_FIX.md](RPC_2101_READONLY_FIX.md). |
| 0.2 | **Deployer wallet funded (Chain 138)** | ≥ ~0.006 ETH (recommended 12 ETH). Check: `cd smom-dbis-138 && ./scripts/deployment/check-balances-gas-and-deploy.sh`. |
| 0.3 | **Env configured** | `smom-dbis-138/.env` only: `PRIVATE_KEY`, `RPC_URL_138` (Core); for PMM: `DODO_PMM_INTEGRATION_ADDRESS=0x79cdbaFBaA0FdF9F55D26F360F54cddE5c743F7D`. Optional: `GAS_PRICE_138`, `GAS_PRICE`. Run: `cd smom-dbis-138 && ./scripts/deployment/check-env-required.sh`. Or from repo root: `./scripts/deployment/preflight-chain138-deploy.sh`. |
| 0.3 | **Env configured** | `smom-dbis-138/.env` only: `PRIVATE_KEY`, `RPC_URL_138` (Core); for PMM: `DODO_PMM_INTEGRATION_ADDRESS=0x5BDc62f1ae7D630c37A8B363a1d49845356Ee72d`, `DODO_PMM_PROVIDER_ADDRESS=0x5CAe6Ce155b7f08D3a956F5Dc82fC9945f29B381`. Optional: `GAS_PRICE_138`, `GAS_PRICE`. Run: `cd smom-dbis-138 && ./scripts/deployment/check-env-required.sh`. Or from repo root: `./scripts/deployment/preflight-chain138-deploy.sh`. |
| 0.4 | **Gas / cost estimate** | Run cost estimate before deploy: `cd smom-dbis-138 && ./scripts/deployment/calculate-costs-consolidated.sh` (or see [DEPLOYMENT_GAS_COSTS_REALTIME](../11-references/DEPLOYMENT_GAS_COSTS_REALTIME.md)). Chain 138 uses min 1 gwei; script gives estimated total cost. |
| 0.5 | **POOL_MANAGER_ROLE** | Deployer must have POOL_MANAGER_ROLE on DODOPMMIntegration for pool creation and provider registration. |
| 0.6 | **No stuck transactions** | If nonce has pending txs or "Replacement transaction underpriced": run `./scripts/clear-all-transaction-pools.sh` then wait ~60s. Use Core RPC only (no Public fallback). Prefer deploy scripts that check nonce (e.g. `deploy-transaction-mirror-and-pmm-pool-after-txpool-clear.sh`). |

View File

@@ -23,7 +23,7 @@ This deployment uses a **custom frontend** (SolaceScanScout), not the built-in B
- `explorer-monorepo/scripts/fix-nginx-serve-custom-frontend.sh` — nginx config that serves `/var/www/html` for `/` and SPA paths.
- `explorer-monorepo/scripts/fix-nginx-conflicts-vmid5000.sh` — current “conflicts” config: proxies `location /` to :4000 (no static root).
- `explorer-monorepo/scripts/deploy-frontend-to-vmid5000.sh` — deploys frontend files and can apply the custom-frontend nginx config.
- `docs/archive/fixes/BLOCKSCOUT_WEB_INTERFACE_404_FIX.md` — historical 404 investigation.
- This runbook replaces ad-hoc 404 notes; use `explorer-monorepo/scripts/` above for nginx and deploy.
- `explorer-monorepo/docs/BLOCKSCOUT_START_AND_BUILD.md` — Blockscout container/assets; UI in this setup is the custom frontend, not Blockscouts own UI.
---

View File

@@ -175,5 +175,5 @@ See the script for exact steps (stop, vzdump, scp, restore, start, optional dest
- [502_DEEP_DIVE_ROOT_CAUSES_AND_FIXES.md](../00-meta/502_DEEP_DIVE_ROOT_CAUSES_AND_FIXES.md) — LVM thin pool full, 2101/25002505
- [BLOCKSCOUT_FIX_RUNBOOK.md](BLOCKSCOUT_FIX_RUNBOOK.md) — Migrate VM 5000 to thin5 (same-host example)
- [R630_01_02_COMPLETE_INVENTORY.md](../archive/root-cleanup-20260220/R630_01_02_COMPLETE_INVENTORY.md) — VMID list and IPs
- [ALL_VMIDS_ENDPOINTS.md](../04-configuration/ALL_VMIDS_ENDPOINTS.md) · [`config/proxmox-operational-template.json`](../../config/proxmox-operational-template.json) — VMID list and IPs
- Proxmox: [Backup and Restore](https://pve.proxmox.com/pve-docs/chapter-vzdump.html)

View File

@@ -1,5 +1,7 @@
# Next Steps: Full Parity and Deploy All PMM Pools
> Historical note (2026-03-26): this document captures an earlier parity plan. The current canonical Chain 138 PMM stack is `DODOPMMIntegration=0x5BDc62f1ae7D630c37A8B363a1d49845356Ee72d` and `DODOPMMProvider=0x5CAe6Ce155b7f08D3a956F5Dc82fC9945f29B381`, with the desired-state mesh reconciled. Use [ADDRESS_MATRIX_AND_STATUS.md](../11-references/ADDRESS_MATRIX_AND_STATUS.md) and [LIQUIDITY_POOLS_MASTER_MAP.md](../11-references/LIQUIDITY_POOLS_MASTER_MAP.md) for live status.
**Last Updated:** 2026-02-28
**Purpose:** Ordered list of steps to achieve full PMM parity and deploy all DODO PMM pools (Chain 138 first, then multichain).
@@ -9,7 +11,7 @@
| Scope | DODOPMMIntegration | Pools (cUSDT/cUSDC, cUSDT/USDT, cUSDC/USDC) | DODOPMMProvider | Liquidity |
|-------|--------------------|-----------------------------------------------|-----------------|-----------|
| **Chain 138** | Deployed (`0x79cdbaFBaA0FdF9F55D26F360F54cddE5c743F7D`) | Created (addresses in .env / LIQUIDITY_POOLS_MASTER_MAP) | Deployed (`0x8EF6657D2a86c569F6ffc337EE6b4260Bd2e59d0`) | **Zero** (pools empty) |
| **Chain 138** | Deployed (`0x5BDc62f1ae7D630c37A8B363a1d49845356Ee72d`) | Reconciled (addresses in ADDRESS_MATRIX / LIQUIDITY_POOLS_MASTER_MAP) | Deployed (`0x5CAe6Ce155b7f08D3a956F5Dc82fC9945f29B381`) | Public stable and XAU pools funded |
| **L2s (BSC, Polygon, Base, etc.)** | Script exists (`deploy-pmm-all-l2s.sh`) | Not created | Not deployed | N/A |
| **cW* mesh (11 chains)** | Design only | 111 pools in design | Not deployed | N/A |
@@ -28,9 +30,9 @@
2. **Verify or create the three PMM pools**
- Pools (from PRE_DEPLOYMENT_CHECKLIST / .env):
- cUSDT/cUSDC: `0x9fcB06Aa1FD5215DC0E91Fd098aeff4B62fEa5C8`
- cUSDT/USDT: `0xa3Ee6091696B28e5497b6F491fA1e99047250c59`
- cUSDC/USDC: `0x90bd9Bf18Daa26Af3e814ea224032d015db58Ea5`
- cUSDT/cUSDC: `0xff8d3b8fDF7B112759F076B69f4271D4209C0849`
- cUSDT/USDT: `0x6fc60DEDc92a2047062294488539992710b99D71`
- cUSDC/USDC: `0x9f74Be42725f2Aa072a9E0CdCce0E7203C510263`
- If any pool is missing on-chain, create it:
- `forge script script/dex/CreateCUSDTCUSDCPool.s.sol:CreateCUSDTCUSDCPool --rpc-url "$RPC_URL_138" --broadcast --private-key "$PRIVATE_KEY"`
- `forge script script/dex/CreateCUSDTUSDTPool.s.sol:CreateCUSDTUSDTPool --rpc-url "$RPC_URL_138" --broadcast --private-key "$PRIVATE_KEY"`
@@ -42,7 +44,7 @@
- Run: `forge script script/liquidity/RegisterDODOPools.s.sol:RegisterDODOPools --rpc-url "$RPC_URL_138" --broadcast --private-key "$PRIVATE_KEY"`.
4. **Add liquidity to all three pools**
- Approve base/quote tokens to `DODOPMMIntegration` (`0x79cdbaFBaA0FdF9F55D26F360F54cddE5c743F7D`).
- Approve base/quote tokens to `DODOPMMIntegration` (`0x5BDc62f1ae7D630c37A8B363a1d49845356Ee72d`).
- Call `DODOPMMIntegration.addLiquidity(pool, baseAmount, quoteAmount)` for each pool. See [DODO_PMM_INTEGRATION.md](../../smom-dbis-138/docs/integration/DODO_PMM_INTEGRATION.md).
- **Forge script:** `forge script script/dex/AddLiquidityPMMPoolsChain138.s.sol:AddLiquidityPMMPoolsChain138 --rpc-url "$RPC_URL_138" --broadcast --private-key "$PRIVATE_KEY"` with env `ADD_LIQUIDITY_BASE_AMOUNT` and `ADD_LIQUIDITY_QUOTE_AMOUNT` (e.g. `1000000e6`). Or use **full-parity runner:** `./scripts/deployment/run-pmm-full-parity-all-phases.sh` (Phase 1 creates pools in parallel, registers, then adds liquidity when amounts are set).

View File

@@ -2,7 +2,7 @@
**Navigation:** [Home](../01-getting-started/README.md) > [Deployment](README.md) > Operational Runbooks
**Last Updated:** 2026-02-18
**Last Updated:** 2026-03-26
**Document Version:** 1.3
**Status:** Active Documentation
@@ -12,6 +12,8 @@
This document provides a master index of all operational runbooks and procedures for the Sankofa/Phoenix/PanTel Proxmox deployment. For issue-specific troubleshooting (RPC, QBFT, SSH, tunnel, etc.), see **[../09-troubleshooting/README.md](../09-troubleshooting/README.md)** and [TROUBLESHOOTING_FAQ.md](../09-troubleshooting/TROUBLESHOOTING_FAQ.md).
**Proxmox VE hosts, peering, FQDN/NPMplus summary, deployment gates (human + JSON):** [PROXMOX_VE_OPERATIONAL_DEPLOYMENT_TEMPLATE.md](PROXMOX_VE_OPERATIONAL_DEPLOYMENT_TEMPLATE.md).
---
## Quick Reference
@@ -76,6 +78,25 @@ ssh root@HOST "pct start VMID"
- **NPMplus HA failover:** [NPMPLUS_HA_SETUP_GUIDE.md](../04-configuration/NPMPLUS_HA_SETUP_GUIDE.md) - Keepalived/HAProxy; failover to 10234
- **502 runbook:** Check (1) NPMplus (192.168.11.167) up and proxy hosts correct, (2) backend VMID 2201 (RPC) or 5000 (Blockscout) up and reachable, (3) if using Fastly, origin reachability from Fastly to 76.53.10.36; if Option B RPC, tunnel connector (e.g. VMID 102) running. Blockscout 502: [BLOCKSCOUT_FIX_RUNBOOK.md](BLOCKSCOUT_FIX_RUNBOOK.md)
### NPMplus API update and recovery
- **Primary admin URL:** `https://192.168.11.167:81` (VMID `10233` on `r630-01`)
- **If TCP connects but HTTP never returns:** treat CT `10233` as wedged and reboot it from `r630-01` with `pct reboot 10233`, then re-check `:81` for the expected `301` redirect.
- **API updater:** `NPM_URL=https://192.168.11.167:81 bash scripts/nginx-proxy-manager/update-npmplus-proxy-hosts-api.sh`
- **Script behavior:** `curl_npm` and `try_connect` use `-L`, so port `81` redirects do not break `POST /api/tokens` with `400 Payload is undefined`; `IP_NPMPLUS_ETH1` is optional-safe under `set -u`.
- **Large `.env` warning:** if your normal `set -a; source .env` flow fails with `Argument list too long`, avoid exporting the entire file for NPM-only runs. Pull only the needed credentials, for example:
```bash
NPM_EMAIL="$(grep '^NPM_EMAIL=' .env | tail -n1 | cut -d= -f2-)"
NPM_PASSWORD="$(grep '^NPM_PASSWORD=' .env | tail -n1 | cut -d= -f2-)"
NPM_URL=https://192.168.11.167:81 \
NPM_EMAIL="$NPM_EMAIL" \
NPM_PASSWORD="$NPM_PASSWORD" \
bash scripts/nginx-proxy-manager/update-npmplus-proxy-hosts-api.sh
```
- **Verified on 2026-03-26:** after rebooting CT `10233`, `bash scripts/nginx-proxy-manager/update-npmplus-proxy-hosts-api.sh` completed with `39 hosts updated, 0 failed`, including `the-order.sankofa.nexus`, `www.the-order.sankofa.nexus`, and `studio.sankofa.nexus`.
### Cloudflare (DNS and optional Access)
- **[CLOUDFLARE_ZERO_TRUST_GUIDE.md](../04-configuration/cloudflare/CLOUDFLARE_ZERO_TRUST_GUIDE.md)** - Cloudflare setup (DNS retained; Option B tunnel for RPC only)

View File

@@ -45,7 +45,7 @@ This document provides a comprehensive migration plan for migrating DBIS Core se
|------|---------|------------|--------|---------|
| 10100 | dbis-postgres-primary | 192.168.11.100 | ✅ Running | PostgreSQL Primary |
| 10101 | dbis-postgres-replica-1 | 192.168.11.101 | ✅ Running | PostgreSQL Replica |
| 10120 | dbis-redis | 192.168.11.120 | ✅ Running | Redis Cache |
| 10120 | dbis-redis | 192.168.11.125 | ✅ Running | Redis Cache |
| 10130 | dbis-frontend | 192.168.11.130 | ✅ Running | Frontend Admin Console |
| 10150 | dbis-api-primary | 192.168.11.150 | ✅ Running | API Primary |
| 10151 | dbis-api-secondary | 192.168.11.151 | ✅ Running | API Secondary |
@@ -565,7 +565,7 @@ ssh root@192.168.11.11 "pct exec 8610 -- psql -U phoenix -d phoenix -c 'SELECT C
### 6.2 Redis Migration
**Source:** Redis on 192.168.11.120 (VMID 10120)
**Source:** Redis on 192.168.11.125 (VMID 10120)
**Target:** Redis on 10.160.0.22 (VMID 8612)
**Procedure:**

View File

@@ -22,8 +22,8 @@
| Contract | Address (Chain 138) | Role |
|----------|---------------------|------|
| DODOPMMIntegration | `0x79cdbaFBaA0FdF9F55D26F360F54cddE5c743F7D` | `createPool(base, quote, ...)`; `swapExactIn(pool, tokenIn, amountIn, minAmountOut)` for generic routing |
| DODOPMMProvider | `0x8EF6657D2a86c569F6ffc337EE6b4260Bd2e59d0` | `registerPool(tokenIn, tokenOut, pool)`; `executeSwap` uses `swapExactIn` for any registered pool |
| DODOPMMIntegration | `0x5BDc62f1ae7D630c37A8B363a1d49845356Ee72d` | `createPool(base, quote, ...)`; `swapExactIn(pool, tokenIn, amountIn, minAmountOut)` for generic routing |
| DODOPMMProvider | `0x5CAe6Ce155b7f08D3a956F5Dc82fC9945f29B381` | `registerPool(tokenIn, tokenOut, pool)`; `executeSwap` uses `swapExactIn` for any registered pool |
- Deployer (or the account that holds **POOL_MANAGER_ROLE** on the integration and **POOL_MANAGER_ROLE** on the provider) must run pool creation and registration.
- **Generic routing:** `DODOPMMIntegration.swapExactIn` allows any registered pool to be used for swaps; `DODOPMMProvider.executeSwap` routes through it when the pair is not one of the six legacy pairs.
@@ -34,26 +34,24 @@ From repo root (or from `smom-dbis-138/`):
```bash
# Ensure .env has: PRIVATE_KEY, RPC_URL_138, DODO_PMM_INTEGRATION_ADDRESS, DODO_PMM_PROVIDER_ADDRESS
# Desired-state config lives in smom-dbis-138/config/chain138-pmm-pools.json
# Create all c* vs c* pools and register with provider
# (plus optional c* vs official USDT/USDC and c* vs WETH)
# Create or register only the pools missing from the desired-state JSON
./scripts/create-pmm-full-mesh-chain138.sh
# Only c* vs c* (no official USDT/USDC pairs)
MESH_ONLY_C_STAR=1 ./scripts/create-pmm-full-mesh-chain138.sh
# Keep official pairs but disable c* vs WETH
MESH_INCLUDE_WETH=0 ./scripts/create-pmm-full-mesh-chain138.sh
# Keep c* vs WETH but disable official USDT/WETH and USDC/WETH
MESH_INCLUDE_OFFICIAL_WETH=0 ./scripts/create-pmm-full-mesh-chain138.sh
# Preview only (no transactions)
DRY_RUN=1 ./scripts/create-pmm-full-mesh-chain138.sh
# Use a different desired-state file if needed
POOL_CONFIG_JSON=/path/to/chain138-pmm-pools.json ./scripts/create-pmm-full-mesh-chain138.sh
# Inventory desired-state vs on-chain before broadcast
bash scripts/deployment/inventory-chain138-pmm-desired-state.sh
```
- The script uses `DODOPMMIntegration.createPool(base, quote, lpFeeRate, initialPrice, k, isOpenTWAP)` with defaults: `lpFeeRate=3`, `initialPrice=1e18`, `k=0.5e18`, `isOpenTWAP=false`.
- After each pool is created, it calls `DODOPMMProvider.registerPool(base, quote, pool)` so the pool is used for quotes and execution.
- The JSON file is now the source of truth for desired Chain 138 pools, including `c* vs c*`, `c* vs official`, and `* / WETH` groups.
- The sync script uses `DODOPMMIntegration.createPool(base, quote, lpFeeRate, initialPrice, k, isOpenTWAP)` with defaults from the JSON file unless overridden by env.
- It only creates missing pools and only registers missing provider routes, so reruns are idempotent operational syncs rather than repeated “redeploy everything” passes.
### 1.4 Funding the mesh

View File

@@ -1,8 +1,10 @@
# PMM Pools Funding Plan - Chain 138
> Historical note (2026-03-26): this funding plan documents an earlier three-pool PMM phase. The live canonical Chain 138 PMM stack is `DODOPMMIntegration=0x5BDc62f1ae7D630c37A8B363a1d49845356Ee72d` and `DODOPMMProvider=0x5CAe6Ce155b7f08D3a956F5Dc82fC9945f29B381`. Current public funded pool addresses are maintained in [LIQUIDITY_POOLS_MASTER_MAP.md](../11-references/LIQUIDITY_POOLS_MASTER_MAP.md).
**Purpose:** Step-by-step plan to fund the three DODO PMM liquidity pools on Chain 138.
**Deployer:** `0x4A666F96fC8764181194447A7dFdb7d471b301C8`
**Integration:** `DODOPMMIntegration` at `0x79cdbaFBaA0FdF9F55D26F360F54cddE5c743F7D`
**Integration:** `DODOPMMIntegration` at `0x5BDc62f1ae7D630c37A8B363a1d49845356Ee72d`
---
@@ -10,9 +12,9 @@
| Pool | Base token | Quote token | Pool address | Fund when |
|------|------------|-------------|--------------|-----------|
| **1. cUSDT/cUSDC** | cUSDT | cUSDC | `0x9fcB06Aa1FD5215DC0E91Fd098aeff4B62fEa5C8` | Deployer has cUSDT + cUSDC (mintable) |
| **2. cUSDT/USDT** | cUSDT | USDT (official) | `0xa3Ee6091696B28e5497b6F491fA1e99047250c59` | Deployer has cUSDT + official USDT |
| **3. cUSDC/USDC** | cUSDC | USDC (official) | `0x90bd9Bf18Daa26Af3e814ea224032d015db58Ea5` | Deployer has cUSDC + official USDC |
| **1. cUSDT/cUSDC** | cUSDT | cUSDC | `0xff8d3b8fDF7B112759F076B69f4271D4209C0849` | Deployer has cUSDT + cUSDC (mintable) |
| **2. cUSDT/USDT** | cUSDT | USDT (official) | `0x6fc60DEDc92a2047062294488539992710b99D71` | Deployer has cUSDT + official USDT |
| **3. cUSDC/USDC** | cUSDC | USDC (official) | `0x9f74Be42725f2Aa072a9E0CdCce0E7203C510263` | Deployer has cUSDC + official USDC |
- **Pool 1** uses only c* tokens; you can mint both on Chain 138 and fund fully.
- **Pools 2 and 3** need "official" USDT/USDC on 138 (set in DODOPMMIntegration at deploy time). If those are deployer-owned mocks, mint them too; otherwise fund only from existing balance.
@@ -83,8 +85,8 @@ From repo root, with smom-dbis-138/.env sourced:
```bash
cd smom-dbis-138 && source .env
INT=0x79cdbaFBaA0FdF9F55D26F360F54cddE5c743F7D
POOL1=0x9fcB06Aa1FD5215DC0E91Fd098aeff4B62fEa5C8
INT=0x5BDc62f1ae7D630c37A8B363a1d49845356Ee72d
POOL1=0xff8d3b8fDF7B112759F076B69f4271D4209C0849
CUSDT=0x93E66202A11B1772E55407B32B44e5Cd8eda7f22
CUSDC=0xf22258f57794CC8E06237084b353Ab30fFfa640b
RPC="$RPC_URL_138"
@@ -104,7 +106,7 @@ cast send "$INT" "addLiquidity(address,uint256,uint256)" "$POOL1" "$BASE_AMOUNT"
```bash
cd smom-dbis-138 && source .env
export POOL_CUSDTCUSDC=0x9fcB06Aa1FD5215DC0E91Fd098aeff4B62fEa5C8
export POOL_CUSDTCUSDC=0xff8d3b8fDF7B112759F076B69f4271D4209C0849
export ADD_LIQUIDITY_BASE_AMOUNT=1000000000000
export ADD_LIQUIDITY_QUOTE_AMOUNT=1000000000000

View File

@@ -1,6 +1,6 @@
# Pre-Deployment Checklist — DODO PMM, Pools, Provider, Router & APIs
**Last Updated:** 2026-02-28
**Last Updated:** 2026-03-26
**Purpose:** Single source of truth for component status and ordered steps required before deployment (Chain 138).
**See also:** [DEPLOYMENT_ORDER_OF_OPERATIONS.md](DEPLOYMENT_ORDER_OF_OPERATIONS.md) — full deployment order (Phase 06) and remaining recommendations.
@@ -18,9 +18,9 @@
| Component | Status | Address / Notes |
|-----------|--------|-----------------|
| **DODOPMMIntegration** | ✅ Deployed | Chain 138: `0x79cdbaFBaA0FdF9F55D26F360F54cddE5c743F7D` (Mock DVM). |
| **PMM pools (cUSDT/cUSDC, cUSDT/USDT, cUSDC/USDC)** | ✅ Created | cUSDT/cUSDC: `0x9fcB06Aa1FD5215DC0E91Fd098aeff4B62fEa5C8`; cUSDT/USDT: `0xa3Ee6091696B28e5497b6F491fA1e99047250c59`; cUSDC/USDC: `0x90bd9Bf18Daa26Af3e814ea224032d015db58Ea5`. |
| **DODOPMMProvider** | ✅ Deployed | `0x8EF6657D2a86c569F6ffc337EE6b4260Bd2e59d0`; all three pools registered via `script/liquidity/RegisterDODOPools.s.sol`. |
| **DODOPMMIntegration** | ✅ Deployed | Chain 138 canonical corrected stack: `0x5BDc62f1ae7D630c37A8B363a1d49845356Ee72d`. |
| **PMM pools** | ✅ Reconciled | 104 desired-state pools aligned; live funded public pools include cUSDT/cUSDC `0xff8d3b8fDF7B112759F076B69f4271D4209C0849`, cUSDT/USDT `0x6fc60DEDc92a2047062294488539992710b99D71`, cUSDC/USDC `0x9f74Be42725f2Aa072a9E0CdCce0E7203C510263`, cUSDT/cXAUC `0x94316511621430423a2cff0C036902BAB4aA70c2`, cUSDC/cXAUC `0x7867D58567948e5b9908F1057055Ee4440de0851`, cEURT/cXAUC `0x505403093826D494983A93b43Aa0B8601078A44e`. |
| **DODOPMMProvider** | ✅ Deployed | `0x5CAe6Ce155b7f08D3a956F5Dc82fC9945f29B381`; 104/104 desired-state routes aligned. |
| **EnhancedSwapRouter** | ❌ Not deployed | Mainnet-only script today; for Chain 138 deploy when Uniswap/Balancer pools exist; set quoter/poolId. |
| **Token-aggregation API** | ✅ Implemented, runnable | Single-hop quotes; can index DODO once pools exist (set `CHAIN_138_DODO_PMM_INTEGRATION`). |
| **Bridge quote (swap+bridge+swap)** | ✅ Implemented | `POST /api/bridge/quote`; on-chain coordinator optional. |
@@ -42,7 +42,7 @@
- [ ] **Env set in `smom-dbis-138/.env` only**
Required: `PRIVATE_KEY`, `RPC_URL_138` (must be Core RPC, not Public).
For PMM: `DODO_PMM_INTEGRATION_ADDRESS=0x79cdbaFBaA0FdF9F55D26F360F54cddE5c743F7D`.
For PMM: `DODO_PMM_INTEGRATION_ADDRESS=0x5BDc62f1ae7D630c37A8B363a1d49845356Ee72d`, `DODO_PMM_PROVIDER_ADDRESS=0x5CAe6Ce155b7f08D3a956F5Dc82fC9945f29B381`.
Optional: `GAS_PRICE_138` or `GAS_PRICE` (default 1 gwei).
After TransactionMirror deploy: set `TRANSACTION_MIRROR_ADDRESS` from script output.
Verify: `cd smom-dbis-138 && ./scripts/deployment/check-env-required.sh`.
@@ -100,7 +100,7 @@ This deploys TransactionMirror then creates **only** the cUSDT/cUSDC pool. For m
```bash
cd smom-dbis-138
export DODO_PMM_INTEGRATION="${DODO_PMM_INTEGRATION_ADDRESS:-0x79cdbaFBaA0FdF9F55D26F360F54cddE5c743F7D}"
export DODO_PMM_INTEGRATION="${DODO_PMM_INTEGRATION_ADDRESS:-0x5BDc62f1ae7D630c37A8B363a1d49845356Ee72d}"
export RPC_URL_138="${RPC_URL_138:-http://192.168.11.211:8545}"
export GAS_PRICE="${GAS_PRICE_138:-${GAS_PRICE:-1000000000}}"
@@ -149,7 +149,7 @@ Current deploy script is mainnet-only (`block.chainid == 1`). For Chain 138:
### Step 6: Token-aggregation API (DODO indexing)
- Ensure `CHAIN_138_DODO_PMM_INTEGRATION=0x79cdbaFBaA0FdF9F55D26F360F54cddE5c743F7D` (or equivalent) is set where the token-aggregation service runs. Optional: `CHAIN_138_DODO_POOL_MANAGER`, `CHAIN_138_DODO_VENDING_MACHINE` (see token-aggregation `.env.example` and [dex-factories.ts](../../smom-dbis-138/services/token-aggregation/src/config/dex-factories.ts)).
- Ensure `CHAIN_138_DODO_PMM_INTEGRATION=0x5BDc62f1ae7D630c37A8B363a1d49845356Ee72d` (or equivalent) is set where the token-aggregation service runs. Optional: `CHAIN_138_DODO_POOL_MANAGER`, `CHAIN_138_DODO_VENDING_MACHINE` (see token-aggregation `.env.example` and [dex-factories.ts](../../smom-dbis-138/services/token-aggregation/src/config/dex-factories.ts)).
- Once pools exist, the service can index DODO pools from DODOPMMIntegration and expose single-hop quotes.
### Step 7: On-chain verification

View File

@@ -72,7 +72,7 @@
### DBIS Core
- 192.168.11.105-106 (PostgreSQL)
- 192.168.11.120 (Redis)
- 192.168.11.125 (Redis, VMID 10120 dbis-redis)
- 192.168.11.130 (Frontend)
- 192.168.11.155-156 (API)

View File

@@ -1,6 +1,6 @@
# Public sector live deployment checklist (Complete Credential, SMOA, Phoenix)
**Last updated:** 2026-03-23
**Last updated:** 2026-03-26
**Related:** [PUBLIC_SECTOR_TENANCY_MARKETPLACE_AND_DEPLOYMENT_BASELINE.md](../02-architecture/PUBLIC_SECTOR_TENANCY_MARKETPLACE_AND_DEPLOYMENT_BASELINE.md), [COMPLETE_CREDENTIAL_EIDAS_PROGRAM_REPOS.md](../11-references/COMPLETE_CREDENTIAL_EIDAS_PROGRAM_REPOS.md), [DEPLOY_CONFIRM_AND_FULL_E2E_RUNBOOK.md](../00-meta/DEPLOY_CONFIRM_AND_FULL_E2E_RUNBOOK.md), [`config/public-sector-program-manifest.json`](../../config/public-sector-program-manifest.json)
This checklist tracks **proxmox-repo automation** and **sibling repos** (`../complete-credential`, `../smoa`). Rows marked **Done (session)** were executed from an operator host with LAN access unless noted.
@@ -28,6 +28,8 @@ This checklist tracks **proxmox-repo automation** and **sibling repos** (`../com
| `./scripts/verify/run-contract-verification-with-proxy.sh` | Exit 0 |
| `complete-credential` Phase 1 compose + `run-phase1-synthetic.sh` | OK (operator console 8087 = 200) |
| `../smoa`: `./gradlew :app:assembleDebug` | BUILD SUCCESSFUL; APK: `smoa/app/build/outputs/apk/debug/app-debug.apk` |
| `scripts/deployment/sync-sankofa-portal-7801.sh` + NPM alignment | Portal tree synced to CT **7801**, `pnpm install` + `pnpm build`, `sankofa-portal` **active** (`*:3000`). NPM proxy IDs **36**: `sankofa.nexus` / `www`**192.168.11.51:3000**; `phoenix.sankofa.nexus` / `www`**192.168.11.50:4000**. Repeatable deploy: `./scripts/deployment/sync-sankofa-portal-7801.sh` (`--dry-run` first). |
| `validate-config-files.sh` / `run-completable-tasks-from-anywhere.sh` | Exit 0 |
---
@@ -64,9 +66,9 @@ This checklist tracks **proxmox-repo automation** and **sibling repos** (`../com
| B1 | NPMplus proxy + TLS for public FQDNs | **Done (2026-03-26)**`run-wave0-from-lan.sh` / update script applied; spot-check `rpc.tw-core` / `*.tw-core` in NPM if needed |
| B2 | `scripts/verify/backup-npmplus.sh` (live) | **Done (2026-03-26)** — W0-3 as part of `run-all-operator-tasks-from-lan.sh` |
| B3 | `scripts/maintenance/npmplus-verify-port81.sh` | **Done** — script restored; SSH `pct exec 10233` loopback :81 |
| C1 | Phoenix stack VMIDs 78007803 per `SERVICE_DESCRIPTIONS.md` | **7802 Keycloak:** HTTP 200 on `/` inside CT. **7800 API:** deploy/restart `sankofa-api` — expect listener **:4000**. **7801 portal:** deploy latest portal artifact (see 2026-03-23 log) — expect **:3000** |
| C1 | Phoenix stack VMIDs 78007803 per `SERVICE_DESCRIPTIONS.md` | **7802 Keycloak:** HTTP 200 on `/` inside CT. **7800 API:** listener **:4000** (`/health` OK). **7801 portal:** `sankofa-portal` active, Next on **:3000** (sync via `scripts/deployment/sync-sankofa-portal-7801.sh`) |
| C2 | Keycloak realms: admin / tenant / org-unit RBAC | Product + IdP work — not automated here |
| C3 | Phoenix API + portal wired; GraphQL `/graphql`, `/health` | **API:** curl `http://192.168.11.50:4000/health` (and `/graphql` as needed). **Portal:** after **7801** build, curl `http://192.168.11.51:3000/` |
| C3 | Phoenix API + portal wired; GraphQL `/graphql`, `/health` | **API:** `curl -sS http://192.168.11.50:4000/health`. **Portal:** `curl -sS http://192.168.11.51:3000/` (Next HTML). NPM: apex `sankofa` / `phoenix` hosts → **.51:3000** / **.50:4000** (not Blockscout) |
| C4 | Service catalog SKUs + entitlements (billing optional) | Product — see tenancy baseline G2 |
| D1 | SMOA LXC per `smoa/backend/docs/LXC-PROXMOX-CONTAINERS.md` | Deploy on Proxmox |
| D2 | SMOA API behind NPM | After D1 |
@@ -91,6 +93,7 @@ This checklist tracks **proxmox-repo automation** and **sibling repos** (`../com
source scripts/lib/load-project-env.sh && ./scripts/verify/check-contracts-on-chain-138.sh
E2E_ACCEPT_502_INTERNAL=1 ./scripts/verify/verify-end-to-end-routing.sh
./scripts/verify/run-contract-verification-with-proxy.sh
./scripts/deployment/sync-sankofa-portal-7801.sh --dry-run # then run without --dry-run (portal → CT 7801)
./scripts/verify/backup-npmplus.sh --dry-run # then run without --dry-run
```
@@ -112,6 +115,6 @@ cd ../smoa && ./gradlew smoaVerify --no-daemon
## Follow-ups
1. **Phoenix LAN services:** From a host on the same L2 as `192.168.11.5053`, curl `/health` and portal port **3000**; if down, start CTs/VMs on Proxmox and confirm process listeners.
1. **Phoenix LAN services:** Curl `192.168.11.50:4000/health` and `192.168.11.51:3000/`; if portal is down, run `sync-sankofa-portal-7801.sh` or `systemctl status sankofa-portal` on CT **7801**.
2. **Operator full wave:** `./scripts/run-all-operator-tasks-from-lan.sh` only when NPM RPC fix + backup + verify are intentionally desired (mutates NPM).
3. **Production Complete Credential:** Move from laptop Docker to **dedicated LXC** and NPM routes per deployment profile.

View File

@@ -1,5 +1,7 @@
# Recommendations and Fixes Before Deploying Smart Contracts and PMM Pools
> Historical note (2026-03-26): this checklist spans earlier deployment phases and may reference superseded PMM workflows. The current canonical Chain 138 PMM stack is `DODOPMMIntegration=0x5BDc62f1ae7D630c37A8B363a1d49845356Ee72d` and `DODOPMMProvider=0x5CAe6Ce155b7f08D3a956F5Dc82fC9945f29B381`. Use [ADDRESS_MATRIX_AND_STATUS.md](../11-references/ADDRESS_MATRIX_AND_STATUS.md) for live operations.
**Last Updated:** 2026-02-27
**Purpose:** Single checklist of all **recommendations** and **required fixes** to complete before deploying smart contracts and PMM pools on Chain 138 (and related chains). Use this with [DEPLOYMENT_ORDER_OF_OPERATIONS.md](DEPLOYMENT_ORDER_OF_OPERATIONS.md) and [PRE_DEPLOYMENT_CHECKLIST.md](PRE_DEPLOYMENT_CHECKLIST.md).
@@ -18,7 +20,7 @@ These must be satisfied before **any** Chain 138 deployment. Run preflight once;
| **1.1** | **Run preflight** | From repo root: `./scripts/deployment/preflight-chain138-deploy.sh [--cost]`. Verifies: dotenv exists, required env keys, RPC returns chainId 0x8a (138), deployer nonce (warns if stuck). Use `--cost` for gas/cost estimate. |
| **1.2** | **Core RPC = IP:port, not FQDN** | In `smom-dbis-138/.env` set `RPC_URL_138=http://192.168.11.211:8545` (Core RPC, VMID 2101). Do **not** use `https://rpc-core.d-bis.org` for deployment (DNS/tunnel can fail). See [RPC_ENDPOINTS_MASTER](../04-configuration/RPC_ENDPOINTS_MASTER.md), [TODOS_CONSOLIDATED](../00-meta/TODOS_CONSOLIDATED.md) § 0b. |
| **1.3** | **Deployer gas (Chain 138)** | Ensure deployer has ≥ ~0.006 ETH (recommended 12 ETH). Check: `RPC_URL_138=http://192.168.11.211:8545 ./scripts/deployment/check-deployer-balance-chain138-and-funding-plan.sh` or `cd smom-dbis-138 && ./scripts/deployment/check-balances-gas-and-deploy.sh`. |
| **1.4** | **Env from smom-dbis-138/.env only** | All deploy secrets from **`smom-dbis-138/.env`** only. Required: `PRIVATE_KEY`, `RPC_URL_138`. For PMM: `DODO_PMM_INTEGRATION_ADDRESS=0x79cdbaFBaA0FdF9F55D26F360F54cddE5c743F7D`. Optional: `GAS_PRICE_138`, `GAS_PRICE` (default 1 gwei). Verify: `cd smom-dbis-138 && ./scripts/deployment/check-env-required.sh`. |
| **1.4** | **Env from smom-dbis-138/.env only** | All deploy secrets from **`smom-dbis-138/.env`** only. Required: `PRIVATE_KEY`, `RPC_URL_138`. For PMM: `DODO_PMM_INTEGRATION_ADDRESS=0x5BDc62f1ae7D630c37A8B363a1d49845356Ee72d`, `DODO_PMM_PROVIDER_ADDRESS=0x5CAe6Ce155b7f08D3a956F5Dc82fC9945f29B381`. Optional: `GAS_PRICE_138`, `GAS_PRICE` (default 1 gwei). Verify: `cd smom-dbis-138 && ./scripts/deployment/check-env-required.sh`. |
| **1.5** | **No stuck transactions** | If nonce has pending txs or you see "Replacement transaction underpriced": run `./scripts/clear-all-transaction-pools.sh` then wait **~60s** before deploying. Prefer scripts that check nonce (e.g. `deploy-transaction-mirror-and-pmm-pool-after-txpool-clear.sh`). |
| **1.6** | **RPC 2101 (Core) writable** | If Core was read-only: `./scripts/maintenance/make-rpc-vmids-writable-via-ssh.sh` then `./scripts/maintenance/health-check-rpc-2101.sh`. See [RPC_2101_READONLY_FIX.md](RPC_2101_READONLY_FIX.md). |
| **1.7** | **Test all contracts** | Run **before** any deploy: `./scripts/deployment/test-all-contracts-before-deploy.sh`. Use `--dry-run` to print commands; `--no-match "Fork|Mainnet|Integration|e2e"` for unit-only; `--alltra` to include alltra-lifi-settlement. See [DEPLOYMENT_ORDER_OF_OPERATIONS](DEPLOYMENT_ORDER_OF_OPERATIONS.md) § Phase 0.8. |
@@ -71,7 +73,7 @@ If you plan to deploy **additional** tokens or vaults after core + PMM, ensure p
| # | Item | Action |
|---|------|--------|
| 5.1 | **DODOPMMIntegration** | Already deployed: `0x79cdbaFBaA0FdF9F55D26F360F54cddE5c743F7D`. Ensure `DODO_PMM_INTEGRATION_ADDRESS` set in .env. |
| 5.1 | **DODOPMMIntegration** | Already deployed: `0x5BDc62f1ae7D630c37A8B363a1d49845356Ee72d`. Ensure `DODO_PMM_INTEGRATION_ADDRESS` set in .env. |
| 5.2 | **PMM pools (all three)** | cUSDT/cUSDC, cUSDT/USDT, cUSDC/USDC must be **created** (CreateCUSDTCUSDCPool, CreateCUSDTUSDTPool, CreateCUSDCUSDCPool). Use Core RPC only. |
| 5.3 | **DODOPMMProvider** | Deploy via DeployDODOPMMProvider.s.sol; set `DODO_PMM_PROVIDER_ADDRESS` in .env. Register each pool: `provider.registerPool(tokenIn, tokenOut, poolAddress)`. |
| 5.4 | **Liquidity (optional)** | Per pool: approve base/quote to DODOPMMIntegration, then `addLiquidity(pool, baseAmount, quoteAmount)`. See [DODO_PMM_INTEGRATION](../../smom-dbis-138/docs/integration/DODO_PMM_INTEGRATION.md). |

View File

@@ -1,5 +1,7 @@
# Remaining Deployments for Full Network Coverage
> Historical note (2026-03-26): this status tracker includes earlier PMM-address snapshots. The current canonical Chain 138 PMM stack is `DODOPMMIntegration=0x5BDc62f1ae7D630c37A8B363a1d49845356Ee72d` and `DODOPMMProvider=0x5CAe6Ce155b7f08D3a956F5Dc82fC9945f29B381`.
**Last Updated:** 2026-03-04
**Purpose:** Ordered list of remaining deployments to achieve **maximum effective execution across all networks** (13-chain hub model: Chain 138 + 12 edge/alt). Use after [REQUIRED_FIXES_GAPS_AND_DEPLOYMENTS_LIST](../00-meta/REQUIRED_FIXES_GAPS_AND_DEPLOYMENTS_LIST.md) and [DEPLOYMENT_ORDER_OF_OPERATIONS](DEPLOYMENT_ORDER_OF_OPERATIONS.md).
@@ -14,7 +16,7 @@
| Phase | Step | Status | Notes |
|-------|------|--------|-------|
| A | A.1 Mint cUSDT/cUSDC (138) | ✅ Done (2026-03-04) | Minted via `mint-for-liquidity.sh` using `GAS_PRICE_138=500000000000`; cUSDT/cUSDC mints confirmed at blocks 2551250/2551251/2551253/2551254. |
| A | A.2 Add liquidity PMM (138) | ⚠️ Partial (2026-03-04) | `mint-for-liquidity.sh --add-liquidity` executed and added liquidity to cUSDT/cUSDC pool `0x9fcB06Aa1FD5215DC0E91Fd098aeff4B62fEa5C8`; later checks indicate funding state must be re-verified before proceeding. |
| A | A.2 Add liquidity PMM (138) | ⚠️ Historical snapshot (2026-03-04) | Earlier run referenced cUSDT/cUSDC pool `0x9fcB06Aa1FD5215DC0E91Fd098aeff4B62fEa5C8` on a superseded stack; use [LIQUIDITY_POOLS_MASTER_MAP.md](../11-references/LIQUIDITY_POOLS_MASTER_MAP.md) for current live pools. |
| B | B.1 Celo CCIP bridges | ✅ Done | Deployed; 0xD3AD6831aacB5386B8A25BB8D8176a6C8a026f04 (WETH9), 0xa4B9DD039565AeD9641D45b57061f99d9cA6Df08 (WETH10); .env updated; complete-config Celo→138 OK. |
| B | **B.2a Add Cronos (25)** | ⏳ Pending | Fund deployer with ~15 CRO ([acquire-cro-and-wemix-gas.sh](../../scripts/deployment/acquire-cro-and-wemix-gas.sh)); set CRONOS_RPC, CCIP_ROUTER_CRONOS, WETH9_CRONOS, WETH10_CRONOS in .env; run `deploy-bridges-config-ready-chains.sh cronos` then `complete-config-ready-chains.sh`. |
| B | B.2b Wemix CCIP bridges | 📋 Tabled | No route to acquire WEMIX from ETH/BNB/POLY in-repo; tabled until route exists or manual acquisition. Fund ~0.4 WEMIX ([acquire-cro-and-wemix-gas.sh](../../scripts/deployment/acquire-cro-and-wemix-gas.sh)); then `deploy-bridges-config-ready-chains.sh wemix` + complete-config. See [WEMIX_ACQUISITION_TABLED.md](WEMIX_ACQUISITION_TABLED.md). |

View File

@@ -1,5 +1,7 @@
# Required Fixes and Deployments — Status
> Historical note (2026-03-26): this tracker includes earlier PMM-address snapshots. The current canonical Chain 138 PMM stack is `DODOPMMIntegration=0x5BDc62f1ae7D630c37A8B363a1d49845356Ee72d` and `DODOPMMProvider=0x5CAe6Ce155b7f08D3a956F5Dc82fC9945f29B381`.
**Last Updated:** 2026-02-28
## Required fixes
@@ -19,7 +21,7 @@
## On-chain verification (Chain 138)
**Last run (2026-03-01):** `./scripts/verify/check-contracts-on-chain-138.sh` (use Core RPC URL or run from LAN).
**Result:** **59 present, 0 missing** (59 addresses per check-contracts-on-chain-138.sh; list expanded 2026-03-06). TransactionMirror: `0x7131F887DBEEb2e44c1Ed267D2A68b5b83285afc`. DODO cUSDT/cUSDC pool: `0x9fcB06Aa1FD5215DC0E91Fd098aeff4B62fEa5C8` (created). **DeployCompliantFiatTokens** was run 2026-02-27 (10 tokens: cEURC, cEURT, cGBPC, cGBPT, cAUDC, cJPYC, cCHFC, cCADC, cXAUC, cXAUT); see [CHAIN138_TOKEN_ADDRESSES](../11-references/CHAIN138_TOKEN_ADDRESSES.md).
**Result:** **59 present, 0 missing** (59 addresses per check-contracts-on-chain-138.sh; list expanded 2026-03-06). TransactionMirror: `0x7131F887DBEEb2e44c1Ed267D2A68b5b83285afc`. Current canonical DODO cUSDT/cUSDC pool: `0xff8d3b8fDF7B112759F076B69f4271D4209C0849`. **DeployCompliantFiatTokens** was run 2026-02-27 (10 tokens: cEURC, cEURT, cGBPC, cGBPT, cAUDC, cJPYC, cCHFC, cCADC, cXAUC, cXAUT); see [CHAIN138_TOKEN_ADDRESSES](../11-references/CHAIN138_TOKEN_ADDRESSES.md).
---
@@ -28,7 +30,7 @@
| Item | Address | Status |
|------|---------|--------|
| TransactionMirror | `0x7131F887DBEEb2e44c1Ed267D2A68b5b83285afc` | Deployed 2026-02-27. Set `TRANSACTION_MIRROR_ADDRESS` in smom-dbis-138/.env. |
| DODO cUSDT/cUSDC pool | 0x9fcB06Aa1FD5215DC0E91Fd098aeff4B62fEa5C8 | Created (all three PMM pools exist). Add liquidity via [ADD_LIQUIDITY_PMM_CHAIN138_RUNBOOK](ADD_LIQUIDITY_PMM_CHAIN138_RUNBOOK.md). |
| DODO cUSDT/cUSDC pool | 0xff8d3b8fDF7B112759F076B69f4271D4209C0849 | Current canonical public pool on corrected stack. Add liquidity via [ADD_LIQUIDITY_PMM_CHAIN138_RUNBOOK](ADD_LIQUIDITY_PMM_CHAIN138_RUNBOOK.md). |
| Compliant Fiat (10 tokens) | See CHAIN138_TOKEN_ADDRESSES | Deployed via DeployCompliantFiatTokens 2026-02-27. |
---

View File

@@ -1,5 +1,7 @@
# Undeployed Contracts — Pre-Deployment Tasks
> Historical note (2026-03-26): this pre-deployment checklist preserves an earlier PMM bring-up phase. The current canonical Chain 138 PMM stack is `DODOPMMIntegration=0x5BDc62f1ae7D630c37A8B363a1d49845356Ee72d` and `DODOPMMProvider=0x5CAe6Ce155b7f08D3a956F5Dc82fC9945f29B381`.
**Last Updated:** 2026-02-28
**Execution summary (2026-02-27):** On-chain verification **36/38**. Two missing: TransactionMirror (set `TRANSACTION_MIRROR_ADDRESS` in .env from script output) and DODO cUSDT/cUSDC pool (0x9fcB...). **Deploy uses Core RPC only.** Before deploy: if Core was read-only, run `./scripts/maintenance/make-rpc-vmids-writable-via-ssh.sh` then `./scripts/maintenance/health-check-rpc-2101.sh`. See [REQUIRED_FIXES_AND_DEPLOYMENTS_STATUS.md](REQUIRED_FIXES_AND_DEPLOYMENTS_STATUS.md), [RPC_2101_READONLY_FIX.md](RPC_2101_READONLY_FIX.md).
@@ -9,7 +11,7 @@
This checklist covers: **testing** anything not yet deployed, **checking deployer wallet gas**, **using the gas API to estimate deployment costs**, and **dry-running deployments** before live execution.
**Optional env vars (add/set when needed):** In `smom-dbis-138/.env`, if missing, add (public addresses only): `DODO_PMM_INTEGRATION_ADDRESS=0x79cdbaFBaA0FdF9F55D26F360F54cddE5c743F7D`, `QUOTE_TOKEN_ADDRESS=0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2`, `WETH_ADDRESS_138=0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2` so PMM pool script and dry-runs work with .env only. Check: `./scripts/deployment/check-env-required.sh`.
**Optional env vars (add/set when needed):** In `smom-dbis-138/.env`, if missing, add (public addresses only): `DODO_PMM_INTEGRATION_ADDRESS=0x5BDc62f1ae7D630c37A8B363a1d49845356Ee72d`, `DODO_PMM_PROVIDER_ADDRESS=0x5CAe6Ce155b7f08D3a956F5Dc82fC9945f29B381`, `QUOTE_TOKEN_ADDRESS=0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2`, `WETH_ADDRESS_138=0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2` so PMM pool script and dry-runs work with .env only. Check: `./scripts/deployment/check-env-required.sh`.
---

View File

@@ -290,6 +290,6 @@ After successful deployment:
- [Besu Nodes File Reference](../06-besu/BESU_NODES_FILE_REFERENCE.md)
- [Network Bootstrap Guide](../02-architecture/NETWORK_ARCHITECTURE.md) (network bootstrap section)
- [Boot Node Runbook](../archive/NEXT_STEPS_BOOT_VALIDATED_SET.md) (if using boot node)
- [BESU_ALLOWLIST_RUNBOOK.md](../06-besu/BESU_ALLOWLIST_RUNBOOK.md) (permissioned / boot-node adjacency)
- [Besu Allowlist Runbook](../06-besu/BESU_ALLOWLIST_RUNBOOK.md)

View File

@@ -49,6 +49,6 @@ Running `bash scripts/dev-vm/push-all-projects-to-gitea.sh --dry-run` reports **
## References
- [CONTINUE_AND_COMPLETE.md](../archive/00-meta-pruned/CONTINUE_AND_COMPLETE.md) (archived) — Push-all and submodule steps in the main checklist
- [NEXT_STEPS_INDEX.md](../00-meta/NEXT_STEPS_INDEX.md) · [OPERATOR_READY_CHECKLIST.md](../00-meta/OPERATOR_READY_CHECKLIST.md) — push/submodule steps follow your repos `push-to-gitea.sh` / submodule workflow after env is set
- [NEXT_STEPS_ALL.md](../00-meta/NEXT_STEPS_ALL.md) — Quick command index
- Sankofa marketplace: `docs/marketplace/sovereign-stack/`, portal.sankofa.nexus/marketplace

View File

@@ -151,7 +151,7 @@ location / {
- [Missing Containers List](../03-deployment/MISSING_CONTAINERS_LIST.md)
- [ChainID 138 Configuration Guide](../06-besu/CHAIN138_BESU_CONFIGURATION.md)
- [Access Control Model](../archive/fixes/CHAIN138_ACCESS_CONTROL_CORRECTED.md)
- [BESU_ALLOWLIST_RUNBOOK.md](../06-besu/BESU_ALLOWLIST_RUNBOOK.md) — permissioned network access patterns
- [Nginx JWT Auth](RPC_JWT_SETUP_COMPLETE.md) JWT setup and scripts
---

View File

@@ -243,7 +243,7 @@ ssh root@192.168.11.10 "pct exec 3500 -- journalctl -u oracle-publisher -n 50 |
- **Oracle Setup:** `docs/04-configuration/metamask/ORACLE_PRICE_FEED_SETUP.md`
- **Token Aggregation:** `smom-dbis-138/services/token-aggregation/README.md`
- **Oracle Publisher:** `docs/archive/status/ORACLE_PUBLISHER_SERVICE_STATUS.md`
- **Oracle Publisher (VMID 3500):** [ALL_VMIDS_ENDPOINTS.md](ALL_VMIDS_ENDPOINTS.md) (Oracle & Monitoring table)
---

View File

@@ -1,6 +1,6 @@
# Using DEX and Aggregators with ChainID 138 Coins/Tokens — Explainer
**Last Updated:** 2026-02-28
**Last Updated:** 2026-03-26
**Purpose:** Explain how to use DEXs and aggregators with coins/tokens from ChainID 138 (DeFi Oracle Meta Mainnet), and how routing works for swaps and cross-chain flows.
---
@@ -17,7 +17,7 @@
| **WETH10** | `0xf4BB2e28688e89fCcE3c0580D37d36A7672E8A9f` | Alternative WETH; used in CCIP bridge flows |
| **LINK** | `0xb7721dD53A8c629d9f1Ba31a5819AFe250002b03` | CCIP fee token; not typically a DEX pair |
**Official reference tokens (for pool pairs):** USDT at `0x15DF1D5BFDD8Aa4b380445D4e3E9B38d34283619`, USDC per deployment. These are used in **cUSDT/USDT** and **cUSDC/USDC** DODO PMM pools so users can swap between compliant and official stablecoins.
**Official reference tokens (for pool pairs):** USDT at `0x004b63A7B5b0E06f6bB6adb4a5F9f590BF3182D1`, USDC at `0x71D6687F38b93CCad569Fa6352c876eea967201b`. These are used in **cUSDT/USDT** and **cUSDC/USDC** DODO PMM pools so users can swap between compliant and official stablecoins.
When building swap UIs or aggregator integrations, use these addresses for **tokenIn** / **tokenOut** and for resolving symbols (e.g. from token list or `/api/v1/tokens`).
@@ -27,20 +27,22 @@ When building swap UIs or aggregator integrations, use these addresses for **tok
### 2.1 Native DEX: DODO PMM
On Chain 138, the primary DEX layer is **DODO-style PMM** (Proactive Market Maker) via:
On Chain 138, the canonical DEX layer is the corrected **DODO-style PMM** stack via:
- **DODOPMMIntegration** — `0x79cdbaFBaA0FdF9F55D26F360F54cddE5c743F7D`
Creates and manages pools; exposes swap functions and pool state.
- **DODOPMMProvider** — `0x8EF6657D2a86c569F6ffc337EE6b4260Bd2e59d0`
Used by routing/aggregation to get quotes and execute swaps for registered pools.
- **DODOPMMIntegration** — `0x5BDc62f1ae7D630c37A8B363a1d49845356Ee72d`
Corrected canonical integration; manages the full JSON-defined pool inventory.
- **DODOPMMProvider** — `0x5CAe6Ce155b7f08D3a956F5Dc82fC9945f29B381`
Corrected canonical provider; used by routing/aggregation to get quotes and execute swaps for registered pools.
**Pools (created and registered):**
**Core stable pools (canonical corrected-stack addresses):**
| Pair | Pool address | Use case |
|------|--------------|----------|
| cUSDT / cUSDC | `0x9fcB06Aa1FD5215DC0E91Fd098aeff4B62fEa5C8` | Compliant↔compliant stablecoin |
| cUSDT / USDT | `0xa3Ee6091696B28e5497b6F491fA1e99047250c59` | Compliant↔official USDT |
| cUSDC / USDC | `0x90bd9Bf18Daa26Af3e814ea224032d015db58Ea5` | Compliant↔official USDC |
| cUSDT / cUSDC | `0xff8d3b8fDF7B112759F076B69f4271D4209C0849` | Compliant↔compliant stablecoin |
| cUSDT / USDT | `0x6fc60DEDc92a2047062294488539992710b99D71` | Compliant↔official USDT |
| cUSDC / USDC | `0x9f74Be42725f2Aa072a9E0CdCce0E7203C510263` | Compliant↔official USDC |
**Current canonical PMM state:** the corrected stack has a fully reconciled desired-state inventory with `104` existing pools and `104` aligned provider routes, including the broader `c* / c*`, `c* / official`, and `* / WETH` mesh.
**How to swap on-chain (direct):**
@@ -176,7 +178,7 @@ The **explorer-monorepo** backend has a bridge aggregator that uses Li.Fi, Socke
| Use case | Env / config |
|----------|---------------|
| **Token-aggregation indexing DODO on 138** | `CHAIN_138_DODO_PMM_INTEGRATION=0x79cdbaFBaA0FdF9F55D26F360F54cddE5c743F7D` (and RPC, DB). Optional: `CHAIN_138_DODO_POOL_MANAGER`, `CHAIN_138_DODO_VENDING_MACHINE`. |
| **Token-aggregation indexing DODO on 138** | `CHAIN_138_DODO_PMM_INTEGRATION=0x5BDc62f1ae7D630c37A8B363a1d49845356Ee72d` (and RPC, DB). Optional: `CHAIN_138_DODO_POOL_MANAGER`, `CHAIN_138_DODO_VENDING_MACHINE`. |
| **Uniswap on 138 (if deployed)** | `CHAIN_138_UNISWAP_V2_FACTORY`, `CHAIN_138_UNISWAP_V2_ROUTER`, `CHAIN_138_UNISWAP_V2_START_BLOCK` (and V3 equivalents). |
| **Bridge quote (swap+bridge+swap)** | `RPC_URL`, `BRIDGE_REGISTRY_ADDRESS`; optional `ENHANCED_SWAP_ROUTER_ADDRESS`, `DESTINATION_RPC_URL`, `DESTINATION_SWAP_ROUTER_ADDRESS`. |
| **Token list / MetaMask** | Token-aggregation `GET /api/v1/report/token-list?chainId=138` or static list; point MetaMask/dApp to this URL. |

View File

@@ -6,6 +6,8 @@
**Run E2E (public profile recommended):** `./scripts/verify/verify-end-to-end-routing.sh --profile=public` (from LAN with DNS or use `E2E_USE_SYSTEM_RESOLVER=1` and `/etc/hosts` per [E2E_DNS_FROM_LAN_RUNBOOK.md](E2E_DNS_FROM_LAN_RUNBOOK.md)).
**Run E2E (private/admin):** `./scripts/verify/verify-end-to-end-routing.sh --profile=private`.
**What each hostname should present (operator narrative):** [FQDN_EXPECTED_CONTENT.md](FQDN_EXPECTED_CONTENT.md).
**Latest verified public pass:** `2026-03-27` via `bash scripts/verify/verify-end-to-end-routing.sh --profile=public` with report at [verification_report.md](verification-evidence/e2e-verification-20260327_134032/verification_report.md). Result: exit `0`, `DNS passed: 38`, `Failed: 0`, `HTTPS passed: 19`, `Skipped / optional: 1` (after `run-all-operator-tasks-from-lan.sh` NPM sync; `rpc.defi-oracle.io` may log HTTP 405 on the verifier probe but stays non-failing for the profile).
**Latest verified private/admin pass:** `2026-03-27` via `bash scripts/verify/verify-end-to-end-routing.sh --profile=private` with report at [verification_report.md](verification-evidence/e2e-verification-20260327_134137/verification_report.md). Result: exit `0`, `DNS passed: 4`, `Failed: 0`.

View File

@@ -113,7 +113,7 @@ So the **intended wrapped-native (WETH9-equivalent) address** on Chain 138 is **
## 5. EIP-1559 (baseFeePerGas)
- **Yes.** The chain uses EIP-1559; blocks include **baseFeePerGas**.
- Deployment and gas scripts (e.g. in `scripts/archive/consolidated/deploy/`) use `eth_getBlockByNumber("latest", false)` and read `baseFeePerGas` for gas pricing.
- Deployment and gas scripts under `scripts/deployment/` and `smom-dbis-138/scripts/` typically use `eth_getBlockByNumber("latest", false)` and read `baseFeePerGas` for gas pricing.
- Docs state EIP-1559 is supported (e.g. `docs/11-references/DEFI_ORACLE_META_MAINNET_PROJECT_DESCRIPTION.md`, `docs/04-configuration/ADD_CHAIN138_TO_LEDGER_LIVE.md`).
---

View File

@@ -149,7 +149,7 @@ This will at least allow nginx to respond and stop the 502 error.
For full MIM4U deployment, see:
- `scripts/deploy-miracles-in-motion-pve2.sh` - Full deployment script
- `docs/archive/completion/MIRACLES_IN_MOTION_DEPLOYMENT_COMPLETE.md` - Deployment guide
- [MIM4U_FIRST_PARTY_ANALYTICS.md](./MIM4U_FIRST_PARTY_ANALYTICS.md) — related MIM4U ops context
---

View File

@@ -1,6 +1,6 @@
# Phoenix Deploy API — Gitea Integration
**Last Updated:** 2026-02-10
**Last Updated:** 2026-03-23
**Status:** Active Documentation
---
@@ -70,6 +70,14 @@ Create a token at https://gitea.d-bis.org/user/settings/applications with scope
}
```
## Public-sector program manifest (runtime)
The API serves the repo manifest at **`GET /api/v1/public-sector/programs`** (no API key). Source file: [`config/public-sector-program-manifest.json`](../../config/public-sector-program-manifest.json). On systemd install, `install-systemd.sh` copies it next to `server.js`; override with `PUBLIC_SECTOR_MANIFEST_PATH` or `PHOENIX_REPO_ROOT`.
```bash
curl -sS http://127.0.0.1:4001/api/v1/public-sector/programs | jq '.programs[].id'
```
## Next Steps
- Implement full deploy logic (Proxmox SSH, run deploy scripts)

View File

@@ -109,7 +109,7 @@ This disables password SSH and restricts port 8006 to 192.168.11.0/24.
## Quick check before running
See **[CONTINUE_AND_COMPLETE.md](../archive/00-meta-pruned/CONTINUE_AND_COMPLETE.md)** (archived) for run order and quick-check commands.
**Run order:** [NEXT_STEPS_INDEX.md](../00-meta/NEXT_STEPS_INDEX.md) → `./scripts/run-completable-tasks-from-anywhere.sh` then, from LAN, `./scripts/run-all-operator-tasks-from-lan.sh` (see [OPERATOR_READY_CHECKLIST.md](../00-meta/OPERATOR_READY_CHECKLIST.md)).
- **Bridge:** PRIVATE_KEY and LINK (same wallet) in `smom-dbis-138/.env`; dry-run OK.
- **Contracts:** PRIVATE_KEY in `smom-dbis-138/.env`; RPC access to RPC_CORE_1 (192.168.11.211:8545); then deploy and run verification script.

View File

@@ -47,14 +47,14 @@ The script calls the Insight API for **Chain 138** and **651940** (`GET /v1/even
**Events for a contract (e.g. DODO PMM on 138):**
```http
GET https://138.insight.thirdweb.com/v1/events/0x79cdbaFBaA0FdF9F55D26F360F54cddE5c743F7D?limit=10
GET https://138.insight.thirdweb.com/v1/events/0x5BDc62f1ae7D630c37A8B363a1d49845356Ee72d?limit=10
x-client-id: <your-client-id>
```
**Decoded events (if supported):**
```http
GET https://138.insight.thirdweb.com/v1/events/0x79cdbaFBaA0FdF9F55D26F360F54cddE5c743F7D?limit=10&decode=true
GET https://138.insight.thirdweb.com/v1/events/0x5BDc62f1ae7D630c37A8B363a1d49845356Ee72d?limit=10&decode=true
x-client-id: <your-client-id>
```