Files
proxmox/docs/dbis-rail/IMPLEMENTATION_COORDINATION_WITH_TRANSCRIPT_540AE663.md

150 lines
10 KiB
Markdown
Raw Permalink Normal View History

# Implementation Coordination with Transcript 540ae663
**Purpose:** Coordinate all implementations with the work completed in agent transcript **540ae663** (PMM/DEX routing, tokens, GRU registration, cW* deployment, Chain 138 deployments, and related scripts/docs). Use this document so that:
- Implementations do not duplicate or conflict with what was already done.
- The same scripts, env vars, addresses, and flows are used where applicable.
- The [DBIS Rail and Project Completion Master](DBIS_RAIL_AND_PROJECT_COMPLETION_MASTER_V1.md) task list reflects completed vs remaining work.
**Transcript reference:** `agent-transcripts/540ae663-7cb4-44f3-bc48-4a1d3ea44d54` (PMM/DEX, tokens, GRU, cW*, deployments).
---
## 1. What Was Completed in Transcript 540ae663
### 1.1 PMM / DEX (Chain 138)
| Item | Status | Notes |
|------|--------|------|
| DODOPMMIntegration | Deployed | Mock DVM at `0x79cdbaFBaA0FdF9F55D26F360F54cddE5c743F7D` |
| Three PMM pools | Created | cUSDT/cUSDC, cUSDT/USDT, cUSDC/USDC (addresses in LIQUIDITY_POOLS_MASTER_MAP) |
| DODOPMMProvider | Deployed | `0x8EF6657D2a86c569F6ffc337EE6b4260Bd2e59d0`; pools registered |
| TransactionMirror | Deployed | Multiple deploys in transcript; use address from CONTRACT_ADDRESSES_REFERENCE / .env |
| Add-liquidity runbook | Added | [ADD_LIQUIDITY_PMM_CHAIN138_RUNBOOK](../03-deployment/ADD_LIQUIDITY_PMM_CHAIN138_RUNBOOK.md) |
| MCP allowlist-138 | Added | `ai-mcp-pmm-controller/config/allowlist-138.json` |
| PMM_DEX_ROUTING_STATUS | Updated | docs/11-references/PMM_DEX_ROUTING_STATUS.md |
### 1.2 Tokens and Categories
| Item | Status | Notes |
|------|--------|------|
| TOKEN_CATEGORIES_CANONICAL | Created | Categories 14 (Canonical 138, ALL Mainnet, cW*, D-WIN W); cCADT/cCADC, ACADT naming |
| DeployCompliantFiatTokens (Chain 138) | Run | 10 tokens: cEURC, cEURT, cGBPC, cGBPT, cAUDC, cJPYC, cCHFC, cCADC, cXAUC, cXAUT |
| CHAIN138_TOKEN_ADDRESSES | Updated | All 15 compliant fiat tokens |
| canonical-tokens.ts (token-aggregation) | Updated | FALLBACK_ADDRESSES for all 10 new compliant tokens |
| ENV_EXAMPLE_CONTENT | Updated | Compliant token block, CREATE2_FACTORY, cW* and 651940 |
| TOKEN_CONTRACT_DEPLOYMENTS_REMAINING | Created | docs/11-references/TOKEN_CONTRACT_DEPLOYMENTS_REMAINING.md |
| TOKENS_AND_NETWORKS_MINTABLE_TO_DEPLOYER | Created | docs/11-references/TOKENS_AND_NETWORKS_MINTABLE_TO_DEPLOYER.md |
| TOKENS_DEPLOYER_DEPLOYED_ON_OTHER_CHAINS | Created | docs/11-references/TOKENS_DEPLOYER_DEPLOYED_ON_OTHER_CHAINS.md |
### 1.3 GRU Registration and Registry
| Item | Status | Notes |
|------|--------|------|
| UniversalAssetRegistry upgrade | Done | New implementation with `registerGRUCompliantAsset`; phased + deterministic proxies upgraded |
| REGISTRAR_ROLE | Granted | To deployer on both registry proxies |
| RegisterGRUCompliantTokens | Run | All 12 c* registered as GRU (cUSDT, cUSDC, cEURC, cEURT, cGBPC, cGBPT, cAUDC, cJPYC, cCHFC, cCADC, cXAUC, cXAUT) |
| set-dotenv-c-tokens-and-register-gru.sh | Created | Sets c* and token vars in .env, then runs RegisterGRUCompliantTokens |
| EXPLORER_TOKENS_GRU_POLICY | Created | docs/04-configuration/EXPLORER_TOKENS_GRU_POLICY.md; c* on explorer must be GRU |
| Token lists (dbis-138, DUAL_CHAIN) | Updated | cEURC added; all listed c* are GRU-registered |
### 1.4 c* → cW* Mapping and cW* Deployment
| Item | Status | Notes |
|------|--------|------|
| cToCwSymbolMapping | Added | config/token-mapping-multichain.json (c* → cW* symbol map) |
| Compliant_*_cW entries | Added | 138→chain pairs; addressTo updated when cW* deployed |
| C_TO_CW_MAPPER_MAPPING.md | Created | docs/04-configuration/C_TO_CW_MAPPER_MAPPING.md |
| CompliantWrappedToken.sol | Created | MINTER_ROLE, BURNER_ROLE; burnFrom added for bridge |
| DeployCWTokens.s.sol | Created | cWUSDT, cWUSDC per chain |
| CW_BRIDGE_* in .env | Set | Default + per-chain (Mainnet, Cronos, BSC, Polygon, Gnosis, Avalanche, Base, Arbitrum, Optimism) from deployed bridge suite |
| CW_BRIDGE_TASK_LIST | Created | docs/00-meta/CW_BRIDGE_TASK_LIST.md |
| CW_BRIDGE_APPROACH.md | Created | docs/07-ccip/CW_BRIDGE_APPROACH.md (Option 2: dedicated cW* receiver) |
| CW_DEPLOY_AND_WIRE_RUNBOOK.md | Created | docs/07-ccip/CW_DEPLOY_AND_WIRE_RUNBOOK.md |
| run-cw-remaining-steps.sh | Created | --deploy, --update-mapping, --verify |
| cWUSDT/cWUSDC deployed | Done | 9 chains (Mainnet, Cronos, BSC, Polygon, Gnosis, Avalanche, Base, Arbitrum, Optimism); .env and token-mapping updated |
| CW_TOKENS_AND_NETWORKS.md | Created/updated | docs/11-references/CW_TOKENS_AND_NETWORKS.md |
### 1.5 Scripts and Pre-Deploy Flow
| Item | Status | Notes |
|------|--------|------|
| Core RPC | Documented | Use IP:port `http://192.168.11.211:8545` for deploy (RPC_ENDPOINTS_MASTER) |
| run-before-deploy-checks.sh | Created | Preflight, env, forge build, test, config validation, optional --on-chain |
| test-all-contracts-before-deploy.sh | Updated | --skip-build, --no-match, --alltra |
| deploy-transaction-mirror-and-pmm-pool-after-txpool-clear.sh | Updated | --skip-mirror, treat "pool exists" as success |
| run-all-next-steps-chain138.sh | Created | Preflight → mirror+pool → register c* as GRU → verify |
| RECOMMENDATIONS_AND_FIXES_BEFORE_DEPLOY.md | Created | docs/03-deployment/RECOMMENDATIONS_AND_FIXES_BEFORE_DEPLOY.md |
| deploy-tokens-and-weth-all-chains-skip-canonical.sh | Updated | --deploy-c, --deploy-cw, 651940 validation |
| run-lint-test-build-deploy.sh | Created | smom-dbis-138/scripts/run-lint-test-build-deploy.sh |
### 1.6 Other (Multi-Chain, Lint, Docs)
| Item | Status | Notes |
|------|--------|------|
| DeployCompliantFiatTokensForChain.s.sol | Created | c* on any chain (cUSDT, cUSDC, optional others) |
| RegisterGRUCompliantTokens.s.sol | Exists | Run after c* deploy; needs REGISTRAR_ROLE |
| UpgradeUniversalAssetRegistry.s.sol | Created | script/deploy/UpgradeUniversalAssetRegistry.s.sol |
| Forge lint fixes | Applied | mixedCase, named imports, unused imports, ERC20 transfer checks, NatSpec, shadowing |
| GRU integration (PoolManager, facet) | Done | registerGRUCompliantAsset, GRUAssetRegistryFacet, GRUCompliantTokensRegistryTest |
---
## 2. Mapping to Completion Master Tasks
When implementing from [DBIS_RAIL_AND_PROJECT_COMPLETION_MASTER_V1.md](DBIS_RAIL_AND_PROJECT_COMPLETION_MASTER_V1.md), use this mapping. **Done** = completed in transcript 540ae663. **Partial** = partly done; finish per Master. **Open** = not done in transcript.
### C. Project deployment — Required
| Task | Status | Coordination note |
|------|--------|-------------------|
| C1 | Partial | Preflight, env, test-all-contracts, run-before-deploy-checks exist; ensure RPC 2101 writable, POOL_MANAGER_ROLE per runbook. |
| C2 | Done | TransactionMirror deployed; all three PMM pools created; c* registered as GRU; set-dotenv script and RegisterGRUCompliantTokens run. |
| C3 | Done | DODOPMMProvider deployed and pools registered; token-aggregation env; MCP allowlist-138; add-liquidity runbook. |
| C4 | Partial | check-contracts-on-chain-138.sh used; confirm 59/59 (or current count per check-contracts-on-chain-138.sh) after any new deploy. |
| C5 | Partial | Blockscout verification run in transcript; update CONTRACT_ADDRESSES_REFERENCE and LIQUIDITY_POOLS_MASTER_MAP as needed. |
| C6 | Open | Reconcile Multicall vs Oracle Aggregator at documented address. |
### D. Project deployment — Optional
| Task | Status | Coordination note |
|------|--------|-------------------|
| D1 | Open | EnhancedSwapRouter not deployed; deploy when Uniswap/Balancer on 138. |
| D2 | Open | Trustless stack (InboxETH, BondManager, etc.) not deployed. |
| D3 | Open | CCIP other chains per DEPLOYMENT_ORDER. |
| D4 | Open | LINK relay support per runbook. |
| D5 | Partial | cWUSDT/cWUSDC deployed on 9 chains; runbook and mapping in place; other cW* (cWEURC, etc.) and edge pools per pool-matrix still optional. |
| D6D7 | Open | R1R24 and full recommendations list. |
### Token deployment (TODOS_CONSOLIDATED T1T7)
| Task | Status | Coordination note |
|------|--------|-------------------|
| T1 DeployCompliantFiatTokens | Done | 10 tokens deployed on 138; optional cCADT in script (commented). |
| T2 Optional cCADT | Partial | Uncomment in script and re-run when needed. |
| T3T7 | Open / Partial | cAUSDT, ACADT, cW* (cWUSDT/cWUSDC done; others mapping only), D-WIN W on 138/651940, vault ac*/vdc*/sdc* per TOKEN_CONTRACT_DEPLOYMENTS_REMAINING. |
### DBIS Rail (A, B)
All DBIS Rail tasks (A1A9, B1B7) remain **open** in the transcript: no DBIS Rail contracts (RootRegistry, ParticipantRegistry, SignerRegistry, SettlementRouter, GRU_MintController) were implemented; owner mint on c* not locked to router. Implement per Completion Master and [Audit Readiness Results](DBIS_RAIL_AUDIT_READINESS_RESULTS_V1.md).
---
## 3. How to Use This for New Work
1. **Before changing deployment or token flow:** Check §1 for whats already done; use the same scripts and env (Core RPC IP:port, run-all-next-steps-chain138.sh, set-dotenv-c-tokens-and-register-gru.sh, run-cw-remaining-steps.sh).
2. **Before adding a new “completion” task:** Check §2; if marked Done or Partial, update the Completion Master or this doc when you finish the remainder.
3. **When implementing DBIS Rail (A/B):** Follow the Completion Master and Spec/Rulebook/Threat Model; ensure new rail contracts and mint path do not conflict with existing GRU registration or c* usage (e.g. UniversalAssetRegistry, RegisterGRUCompliantTokens, explorer GRU policy).
4. **Addresses and .env:** Use CONTRACT_ADDRESSES_REFERENCE, CHAIN138_TOKEN_ADDRESSES, and smom-dbis-138/.env as populated by the transcripts scripts; do not overwrite with placeholders.
---
## 4. Document Control
| Field | Value |
|-------|-------|
| Title | Implementation Coordination with Transcript 540ae663 |
| Version | 1 |
| Status | Active |
| Related | [DBIS_RAIL_AND_PROJECT_COMPLETION_MASTER_V1.md](DBIS_RAIL_AND_PROJECT_COMPLETION_MASTER_V1.md), [DBIS_RAIL_AUDIT_READINESS_RESULTS_V1.md](DBIS_RAIL_AUDIT_READINESS_RESULTS_V1.md), [DEPLOYMENT_ORDER_OF_OPERATIONS](../03-deployment/DEPLOYMENT_ORDER_OF_OPERATIONS.md) |