feat: restore operator WIP — PMM JSON sync entrypoint, dotenv RPC trim + secrets, pool env alignment

- Resolve stash: merge load_deployment_env path with secure-secrets and CR/LF RPC strip
- create-pmm-full-mesh-chain138.sh delegates to sync-chain138-pmm-pools-from-json.sh
- env.additions.example: canonical PMM pool defaults (cUSDT/USDT per crosscheck)
- Include Chain138 scripts, official mirror deploy scaffolding, and prior staged changes

Made-with: Cursor
This commit is contained in:
defiQUG
2026-03-27 19:02:30 -07:00
parent c6e7bad15e
commit 2a4753eb2d
200 changed files with 5987 additions and 913 deletions

View File

@@ -157,7 +157,9 @@ forge script script/dex/DeployPrivatePoolRegistryAndPools.s.sol:DeployPrivatePoo
### PMM (Chain 138) completion checklist
1. Set **DODO_VENDING_MACHINE_ADDRESS** in `.env` to the DODO DVM factory address on Chain 138. **Chain 138 is not in DODOs official list** — see [DVM_DEPLOYMENT_CHECK.md](DVM_DEPLOYMENT_CHECK.md). Deploy the factory yourself from [DODOEX](https://github.com/DODOEX) or use an existing deployment if available.
2. Set **OFFICIAL_USDT_ADDRESS** and **OFFICIAL_USDC_ADDRESS** to the official or wrapped USDT/USDC token addresses on Chain 138 (already in .env as reference; replace with Chain 138 addresses if different).
2. Set **OFFICIAL_USDT_ADDRESS** and **OFFICIAL_USDC_ADDRESS** to the live Chain 138 quote-side mirror stables:
- `OFFICIAL_USDT_ADDRESS=0x004b63A7B5b0E06f6bB6adb4a5F9f590BF3182D1`
- `OFFICIAL_USDC_ADDRESS=0x71D6687F38b93CCad569Fa6352c876eea967201b`
3. Run: `bash scripts/deployment/deploy-all-mainnets-with-mapper-oracle-pmm.sh pmm` to deploy DODOPMMIntegration.
4. Set **DODOPMM_INTEGRATION_ADDRESS** (or DODO_PMM_INTEGRATION) in .env from the deploy output, then create pools:
- cUSDT/USDT and cUSDC/USDC: call `createCUSDTUSDTPool` and `createCUSDCUSDCPool` on the integration (see `docs/integration/DODO_PMM_INTEGRATION.md`).

View File

@@ -1,5 +1,7 @@
# Deployed Smart Contracts — Cross-Network Overview
> Historical note (2026-03-26): this overview includes superseded PMM stack references from earlier deployment phases. The current canonical Chain 138 PMM stack is `DODOPMMIntegration=0x5BDc62f1ae7D630c37A8B363a1d49845356Ee72d` and `DODOPMMProvider=0x5CAe6Ce155b7f08D3a956F5Dc82fC9945f29B381`.
**Last updated:** 2026-02-20
**Source:** `smom-dbis-138/.env` and deployment runbooks.
@@ -63,7 +65,7 @@ flowchart TB
| | CCIP Router | `0x42DAb7b888Dd382bD5Adcf9E038dBF1fD03b4817` | CCIP router (on 138) |
| | CCIPTxReporter | `0x3F88b662F04d9B1413BA8d65bFC229e830D7d077` | Report txs to mainnet logger |
| **PMM** | Mock DVM Factory | `0xB16c3D48A111714B1795E58341FeFDd643Ab01ab` | Create mock pools |
| | DODOPMMIntegration | `0x79cdbaFBaA0FdF9F55D26F360F54cddE5c743F7D` | cUSDT/cUSDC pools |
| | DODOPMMIntegration | `0x5BDc62f1ae7D630c37A8B363a1d49845356Ee72d` | Canonical corrected PMM integration |
| **Core eMoney** | Compliance Registry, Token Factory, Bridge Vault, Debt Registry, Policy Manager, Token Impl | (see .env) | Core system |
| **Channels** | Payment Channel Manager, Address Mapper, Mirror Manager | (see .env) | State channels |
| **Oracle** | Oracle Aggregator, Oracle Proxy | (see .env) | Price feeds |

View File

@@ -1,5 +1,7 @@
# Next Steps Completion Summary
> Historical note (2026-03-26): this completion summary preserves an earlier PMM deployment phase. The current canonical Chain 138 PMM stack is `DODOPMMIntegration=0x5BDc62f1ae7D630c37A8B363a1d49845356Ee72d` and `DODOPMMProvider=0x5CAe6Ce155b7f08D3a956F5Dc82fC9945f29B381`.
**Date:** 2026-02-20
This document summarizes what was completed in the "next steps" pass and what remains for the operator.
@@ -19,7 +21,7 @@ This document summarizes what was completed in the "next steps" pass and what re
| **Verify script** | Optional checks (CCIPTxReporter, genesis) are warnings; log_* fallbacks; safe unset-var handling. |
| **Hardhat / Forge** | @emoney/interfaces replaced with relative imports; Hardhat viaIR for 0.8.22; Forge build available. |
| **Docs** | WARNINGS_AND_OPTIONAL_TASKS.md, DVM_DEPLOYMENT_CHECK.md, ALL_MAINNETS_DEPLOYMENT_RUNBOOK (PMM step → DVM doc), TODO_TASK_LIST_MASTER §10b updated. |
| **PMM (Chain 138)** | Mock DVM: deployed `MockDVMFactory` at `0xB16c3D48A111714B1795E58341FeFDd643Ab01ab` and `DODOPMMIntegration` at `0x79cdbaFBaA0FdF9F55D26F360F54cddE5c743F7D`. `DODO_VENDING_MACHINE_ADDRESS` and `DODO_PMM_INTEGRATION` set in .env. `run-pmm-and-pools.sh` fixed (no longer rejects valid 0x… addresses). Pools are mock (see DVM_DEPLOYMENT_CHECK.md option 0). |
| **PMM (Chain 138)** | Earlier Mock DVM phase completed; current canonical PMM integration is `0x5BDc62f1ae7D630c37A8B363a1d49845356Ee72d` and supersedes the initial stack. `DODO_VENDING_MACHINE_ADDRESS` and `DODO_PMM_INTEGRATION` were set in .env during the first deployment phase. |
---

View File

@@ -43,7 +43,7 @@ Complete these **before** running the three operator task scripts.
- DODO does not list Chain 138; use your own deployment or an existing DVM if available.
- **.env:** Set:
- `DODO_VENDING_MACHINE_ADDRESS` — DVM factory on Chain 138.
- `OFFICIAL_USDT_ADDRESS`, `OFFICIAL_USDC_ADDRESS` — official or wrapped USDT/USDC on Chain 138 (already have placeholders).
- `OFFICIAL_USDT_ADDRESS=0x004b63A7B5b0E06f6bB6adb4a5F9f590BF3182D1`, `OFFICIAL_USDC_ADDRESS=0x71D6687F38b93CCad569Fa6352c876eea967201b` — live Chain 138 quote-side mirror stables for PMM pools.
- `COMPLIANT_USDT_ADDRESS`, `COMPLIANT_USDC_ADDRESS` — already set.
- **Script:** `scripts/deployment/run-pmm-and-pools.sh`.