- 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
427 lines
24 KiB
Markdown
427 lines
24 KiB
Markdown
# 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.
|
||
|
||
**Script conventions:** Deployment scripts use **tags** (CLI args) for one-off values instead of .env placeholders, support **interactive** prompts when run without args, and are **callable** from other scripts (e.g. `run-all-four-gaps.sh g4 --eth 1`). See `scripts/lib/deployment/README.md`.
|
||
|
||
**Env vars for Chain 138 and Mainnet:** `.env` includes mainnet aliases (`BOND_MANAGER`, `CHALLENGE_MANAGER`, `LIQUIDITY_POOL`, `INBOX_ETH`, `SWAP_ROUTER`, `BRIDGE_SWAP_COORDINATOR`) for scripts that expect unsuffixed names (e.g. `InitializeBridgeSystem.s.sol`, `FundMainnetLP.s.sol`). Chain 138 explicit names: `CHAIN_138_CCIP_ROUTER`, `CHAIN_138_DODO_PMM_INTEGRATION`, `CHAIN_138_DODO_VENDING_MACHINE`; optional `CHAIN138_SELECTOR` (from CCIP Router `getChainSelector()` on 138). See `.env.example` for all contract vars.
|
||
|
||
This document maps all deployed contracts by network, what each enables, requirements, and live-test status.
|
||
|
||
---
|
||
|
||
## 1. Network map (high level)
|
||
|
||
```mermaid
|
||
flowchart TB
|
||
subgraph CHAIN138["Chain 138 (primary)"]
|
||
UAR[Universal Asset Registry]
|
||
GC[Governance Controller]
|
||
UCB[Universal CCIP Bridge]
|
||
BO[Bridge Orchestrator]
|
||
CCIP9_138[CCIPWETH9 Bridge]
|
||
CCIP10_138[CCIPWETH10 Bridge]
|
||
ROUTER_138[CCIP Router]
|
||
LOGGER_R[CCIPTxReporter]
|
||
PMM[DODO PMM Integration]
|
||
CORE[Compliance, Token Factory, Vault, Oracle, etc.]
|
||
end
|
||
|
||
subgraph MAINNET["Ethereum Mainnet"]
|
||
CCIP9_ETH[CCIPWETH9 Bridge]
|
||
CCIP10_ETH[CCIPWETH10 Bridge]
|
||
CCL[CCIPLogger]
|
||
TRUST[BondManager, LP, Inbox, SwapRouter]
|
||
end
|
||
|
||
subgraph L2_OTHER["BSC, Polygon, Base, Optimism, Arbitrum, Avalanche, Cronos, Gnosis"]
|
||
CCIP9_OTH[CCIP WETH9/10 Bridges]
|
||
end
|
||
|
||
CHAIN138 -->|CCIP| MAINNET
|
||
CHAIN138 -->|CCIP| L2_OTHER
|
||
MAINNET -->|CCIP| CHAIN138
|
||
L2_OTHER -->|CCIP| CHAIN138
|
||
L2_OTHER -->|CCIP| MAINNET
|
||
```
|
||
|
||
---
|
||
|
||
## 2. Deployed contracts by network
|
||
|
||
### 2.1 Chain 138 (canonical)
|
||
|
||
| Category | Contract | Address | Purpose |
|
||
|----------|----------|---------|--------|
|
||
| **Phased core** | Universal Asset Registry | `0x0cb05600f58b310CD4734D2450A13D8d165a7658` | Asset registration |
|
||
| | Governance Controller | `0x29494F1C0011f87620501e3e5256bF4bf3308cD6` | Governance |
|
||
| | Universal CCIP Bridge | `0x10DBF6B0f2C9074855930284930FAdf697E1B92F` | CCIP bridge logic |
|
||
| | Bridge Orchestrator | `0x2f8FcFff8c3C6c5d807bADAd45358456543675B4` | Bridge coordination |
|
||
| **CCIP** | CCIPWETH9 Bridge | `0xcacfd227A040002e49e2e01626363071324f820a` | WETH9 cross-chain |
|
||
| | CCIPWETH10 Bridge | `0xe0E93247376aa097dB308B92e6Ba36bA015535D0` | WETH10 cross-chain |
|
||
| | CCIP Router | `0x42DAb7b888Dd382bD5Adcf9E038dBF1fD03b4817` | CCIP router (on 138) |
|
||
| | CCIPTxReporter | `0x3F88b662F04d9B1413BA8d65bFC229e830D7d077` | Report txs to mainnet logger |
|
||
| **PMM** | Mock DVM Factory | `0xB16c3D48A111714B1795E58341FeFDd643Ab01ab` | Create mock 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 |
|
||
| **Vault / Reserve** | Vault Factory, Reserve System, Reserve Token Integration | (see .env) | Reserves |
|
||
| **Settlement** | Merchant Settlement Registry, Withdrawal Escrow | (see .env) | alltra-lifi |
|
||
| **CREATE2** | Universal Asset Registry (det.), Universal CCIP Bridge (det.), Mirror Registry, Alltra Adapter | (see .env) | Deterministic deploys |
|
||
| **Lockbox** | Lockbox 138 | `0xC3a91d466fDAaBA8C8AF3af76c7036e4A113B669` | Trustless bridge receiver |
|
||
|
||
### 2.2 Ethereum Mainnet
|
||
|
||
| Category | Contract | Address | Purpose |
|
||
|----------|----------|---------|--------|
|
||
| **CCIP** | CCIPWETH9 Bridge | `0xc9901ce2Ddb6490FAA183645147a87496d8b20B6` | WETH9 cross-chain |
|
||
| | CCIPWETH10 Bridge | `0x04E1e22B0D41e99f4275bd40A50480219bc9A223` | WETH10 cross-chain |
|
||
| | CCIP Logger | `0x4F95297C23d9f4A1032B1c6a2E553225CB175BEe` | Receive 138 tx reports |
|
||
| **Trustless bridge** | Bond Manager | `0x11197e5eEEbf53d1E6a96a4e05efe2ef90c5b24b` | Bonds |
|
||
| | Challenge Manager | `0x3714B1A312e0916C7dCdc4EdF480Fc0339E59A59` | Disputes |
|
||
| | Liquidity Pool | `0x603e078eb5Cca4F5c817A2F76D073f924D7272d3` | LP |
|
||
| | Inbox | `0xe1a51Bc037a79AB36767561B147eb41780124934` | Inbox |
|
||
| | Swap Router | `0xC2FA05F12a75Ac84ea778AF9D6935cA807275E55` | Swaps |
|
||
| | Bridge Swap Coordinator | `0xF51581eee46f5A7Ef2A035C5B3Ac4a89bF6FbaAa` | Coordination |
|
||
| **Canonical** | WETH9 | `0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2` | Pre-existing |
|
||
| | WETH10 | `0xf4BB2e28688e89fCcE3c0580D37d36A7672E8A9f` | Pre-existing |
|
||
|
||
### 2.3 Other L2 / EVM (CCIP WETH bridges only)
|
||
|
||
Each row is one network; all have WETH9, WETH10, CCIPWETH9Bridge, CCIPWETH10Bridge deployed (addresses in .env).
|
||
|
||
| Network | Chain ID | CCIP WETH9 | CCIP WETH10 | LINK in .env | RPC env (example) | Explorer (example) |
|
||
|---------|----------|------------|-------------|--------------|-------------------|--------------------|
|
||
| **BSC** | 56 | ✅ | ✅ | ✅ | BSC_RPC_URL / INFURA | https://bscscan.com |
|
||
| **Polygon** | 137 | ✅ | ✅ | ✅ | POLYGON_RPC_URL / INFURA | https://polygonscan.com |
|
||
| **Base** | 8453 | ✅ | ✅ | ✅ | BASE_MAINNET_RPC | https://basescan.org |
|
||
| **Optimism** | 10 | ✅ | ✅ | ✅ | OPTIMISM_MAINNET_RPC | https://optimistic.etherscan.io |
|
||
| **Arbitrum** | 42161 | ✅ | ✅ | ✅ | ARBITRUM_MAINNET_RPC | https://arbiscan.io |
|
||
| **Avalanche** | 43114 | ✅ | ✅ | ✅ | AVALANCHE_RPC_URL | https://snowtrace.io |
|
||
| **Cronos** | 25 | ✅ | ✅ | ✅ | CRONOS_RPC_URL | https://cronoscan.com |
|
||
| **Gnosis** | 100 | ✅ | ✅ | ✅ | GNOSIS_RPC_URL | https://gnosisscan.io |
|
||
|
||
---
|
||
|
||
## 2.4 Chain 138 contract stack (dependency flow)
|
||
|
||
How core bridge and CCIP components relate:
|
||
|
||
```mermaid
|
||
flowchart TB
|
||
UAR[Universal Asset Registry]
|
||
GC[Governance Controller]
|
||
UCB[Universal CCIP Bridge]
|
||
BO[Bridge Orchestrator]
|
||
R138[CCIP Router 138]
|
||
B9[CCIPWETH9 Bridge]
|
||
B10[CCIPWETH10 Bridge]
|
||
REP[CCIPTxReporter]
|
||
LOG[CCIP Logger mainnet]
|
||
|
||
UAR --> UCB
|
||
GC --> UCB
|
||
UCB --> BO
|
||
BO --> B9
|
||
BO --> B10
|
||
R138 --> B9
|
||
R138 --> B10
|
||
REP -.->|reports txs| LOG
|
||
```
|
||
|
||
---
|
||
|
||
## 2.5 Trustless bridge data flow (138 ↔ Ethereum)
|
||
|
||
User path from Chain 138 lockbox to mainnet:
|
||
|
||
```mermaid
|
||
sequenceDiagram
|
||
participant U as User
|
||
participant L as Lockbox 138
|
||
participant I as Inbox (mainnet)
|
||
participant LP as Liquidity Pool
|
||
participant R as Swap Router
|
||
participant B as Bond Manager
|
||
|
||
U->>L: Deposit / lock
|
||
L->>I: Cross-chain message (relay)
|
||
I->>LP: Withdraw / claim
|
||
LP->>R: Swap (optional)
|
||
R->>U: Outbound asset
|
||
B->>B: Bonds / challenges (disputes)
|
||
```
|
||
|
||
---
|
||
|
||
## 2.6 Deployment footprint by network (contract types)
|
||
|
||
Which contract categories exist on each network:
|
||
|
||
| Contract type | 138 | ETH | BSC | Polygon | Base | Opt | Arb | Avax | Cronos | Gnosis |
|
||
|---------------|:---:|:---:|:---:|:-------:|:----:|:---:|:---:|:----:|:------:|:------:|
|
||
| UAR / UCB / BO | ✅ | — | — | — | — | — | — | — | — | — |
|
||
| CCIP WETH9/10 bridges | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||
| CCIP Logger | — | ✅ | — | — | — | — | — | — | — | — |
|
||
| CCIPTxReporter | ✅ | — | — | — | — | — | — | — | — | — |
|
||
| Trustless (Bond, LP, Inbox, Router) | — | ✅ | — | — | — | — | — | — | — | — |
|
||
| Lockbox | ✅ | — | — | — | — | — | — | — | — | — |
|
||
| PMM (DODO / mock DVM) | ✅ | — | — | — | — | — | — | — | — | — |
|
||
| Core eMoney (Compliance, Vault, Oracle, etc.) | ✅ | — | — | — | — | — | — | — | — | — |
|
||
| ISO4217W | — | — | — | — | — | — | — | — | ✅ | — |
|
||
|
||
---
|
||
|
||
## 2.7 Missing deployments for faster liquidity
|
||
|
||
The footprint above shows **PMM**, **Trustless (LP/Inbox)**, and **Lockbox** only on 138 and/or Ethereum. Deploying the following would enable faster or deeper liquidity:
|
||
|
||
| Missing deployment | Enables | Where missing | Script / runbook | Notes |
|
||
|--------------------|---------|---------------|------------------|--------|
|
||
| **PMM / DODO integration on L2s** | Local swap liquidity on BSC, Polygon, Base, etc.; users swap on L2 without bridging to 138 first | BSC, Polygon, Base, Optimism, Arbitrum, Avalanche, Cronos, Gnosis | `DeployDODOPMMIntegration.s.sol` per chain; use **official DODO DVM** on each (DODO lists these chains). Set chain-specific `DODO_VENDING_MACHINE_ADDRESS`, `OFFICIAL_USDT_*`, `OFFICIAL_USDC_*` in .env. | Requires compliant or bridge-wrapped token addresses on each L2; DODO is already deployed on these chains by DODO team. |
|
||
| **Trustless Inbox + LP on L2s** | Direct 138 ↔ L2 trustless flow (lock on 138 or L2, claim on the other) instead of only 138 ↔ Mainnet | BSC, Polygon, Base, Optimism, Arbitrum, Avalanche, Cronos, Gnosis | `DeployTrustlessBridge.s.sol` — currently **mainnet-only** for Inbox/LP/Bond. Would need chain-specific script or params (WETH address, chain id). | Design today: Lockbox 138 ↔ Inbox/LP Mainnet. Extending to L2 = deploy Inbox + BondManager + LP (+ SwapRouter) on each L2 and optionally Lockbox on L2. |
|
||
| **Lockbox on L2s** | Users lock on BSC/Polygon/etc. and claim on 138 (or vice versa) | BSC, Polygon, Base, Optimism, Arbitrum, Avalanche, Cronos, Gnosis | Same as above; Lockbox is chain-specific (e.g. Lockbox138). Would need LockboxBSC, LockboxPolygon, etc. or a parameterized Lockbox. | Paired with Inbox on 138 or mainnet depending on direction. |
|
||
| **Fund mainnet Liquidity Pool** | Trustless claims on mainnet can be paid out; no new contracts | Ethereum (LP already deployed) | Operator adds ETH/WETH to `LiquidityPoolETH` (see .env `LIQUIDITY_POOL_*`). | [ALL_MAINNETS_DEPLOYMENT_RUNBOOK.md §5.2](ALL_MAINNETS_DEPLOYMENT_RUNBOOK.md) and Requirements §4. |
|
||
|
||
```mermaid
|
||
flowchart LR
|
||
subgraph NOW["Current liquidity path"]
|
||
A[User on L2] -->|CCIP only after LINK| B[138 or Mainnet]
|
||
C[User on 138] -->|Trustless| D[Mainnet LP]
|
||
end
|
||
|
||
subgraph AFTER["After missing deployments"]
|
||
A2[User on L2] -->|PMM on L2| E[Swap on L2]
|
||
A2 -->|Lockbox + Inbox on L2| F[Claim on 138]
|
||
C2[User on 138] -->|Inbox on L2| G[Claim on L2]
|
||
D2[Mainnet LP] -->|Funded| H[Payouts work]
|
||
end
|
||
```
|
||
|
||
**Summary:** The largest gaps for **faster liquidity** are (1) **PMM/DODO integration on each L2** (use official DODO; add DODOPMMIntegration + pools per chain), (2) **Trustless Inbox + LP (+ optional Lockbox) on L2s** for direct 138 ↔ L2 trustless flows, and (3) **Funding the existing mainnet LP** so current trustless claims can be paid.
|
||
|
||
### Tasks list (4 gaps)
|
||
|
||
| # | Task | Status | Script / action |
|
||
|---|------|--------|-----------------|
|
||
| **G1** | Deploy PMM / DODO integration on L2s (BSC, Polygon, Base, Optimism, Arbitrum, Avalanche, Cronos, Gnosis) | ✅ Script ready | `scripts/deployment/deploy-pmm-all-l2s.sh`; set per-chain `*_RPC`, `*_DODO_VENDING_MACHINE_ADDRESS`, `*_OFFICIAL_USDT_ADDRESS`, `*_OFFICIAL_USDC_ADDRESS` in .env and run |
|
||
| **G2** | Deploy Trustless Inbox + LP (+ Bond) on L2s for direct 138 ↔ L2 flows | ✅ Script ready | `DeployTrustlessBridge.s.sol` supports L2 when `TRUSTLESS_WETH_ADDRESS` set; `scripts/deployment/deploy-trustless-l2s.sh` runs per chain |
|
||
| **G3** | Deploy Lockbox on L2s (lock on L2, claim on 138 or vice versa) | ✅ Script ready | Same as G2; use --lockbox tag |
|
||
| **G4** | Fund mainnet Liquidity Pool (ETH/WETH) so trustless claims can be paid out | ✅ Script ready | `scripts/deployment/fund-mainnet-lp.sh --eth <amt> --weth <amt>` or run script for interactive prompt; `.env` only for `LIQUIDITY_POOL_ETH_MAINNET`, RPC, key |
|
||
|
||
---
|
||
|
||
## 3. Capability matrix — what can be done now
|
||
|
||
| Capability | Networks involved | Requirements | Can do now? | Notes |
|
||
|------------|-------------------|--------------|-------------|--------|
|
||
| **RPC / read Chain 138** | Chain 138 | RPC_URL_138, .env | ✅ Yes | verify-chain138-full-deployment.sh passes |
|
||
| **CCIP wrap & bridge WETH (138 ↔ Mainnet)** | 138, Ethereum | Bridges + CCIP Router + **LINK on both chains** | ⚠️ After LINK | Deployer needs LINK; fund-ccip-bridges-with-link.sh |
|
||
| **CCIP wrap & bridge WETH (138 ↔ BSC, Polygon, etc.)** | 138, L2s | Same + per-chain LINK | ⚠️ After LINK | 20 LINK per chain (10 per bridge) |
|
||
| **Report Chain 138 txs to mainnet** | 138 → Ethereum | CCIPTxReporter (138), CCIPLogger (mainnet), CCIP config | ✅ Contracts live | Flow ready; relay/watcher may need run |
|
||
| **Create cUSDT/cUSDC pools (PMM)** | Chain 138 | DODO_VENDING_MACHINE_ADDRESS, DODOPMMIntegration | ✅ Yes | Mock DVM deployed; createCUSDTUSDTPool etc. |
|
||
| **Trustless bridge (lockbox ↔ mainnet)** | 138, Ethereum | Lockbox_138, BondManager, LP, Inbox, SwapRouter | ✅ Contracts live | Needs liquidity and config for full flow |
|
||
| **Tokenize / compliance (mint, vault)** | Chain 138 | Compliance Registry, Token Factory, Bridge Vault | ✅ Yes | Core eMoney stack deployed |
|
||
| **Oracle price feeds** | Chain 138 | Oracle Aggregator, Oracle Proxy | ✅ Yes | Configured on 138 |
|
||
| **State channels / mirror** | Chain 138 | Payment Channel Manager, Address Mapper, Mirror Manager | ✅ Yes | Deployed |
|
||
| **Settlement (alltra-lifi)** | Chain 138 | Settlement Registry, Withdrawal Escrow | ✅ Yes | Deployed |
|
||
| **ISO4217W (Cronos)** | Cronos | ISO4217W_* contracts | ✅ Deployed | Cronos-only |
|
||
| **CCIPLogger on other L2s** | BSC, Polygon, etc. | deploy-ccip-logger-all-chains.sh | Optional | Only mainnet logger deployed so far |
|
||
| **PMM / DODO pools on L2s** | BSC, Polygon, Base, etc. | DODOPMMIntegration + official DODO DVM per chain; token addresses on L2 | ❌ Not deployed | Would allow local swap liquidity on each L2; see §2.7 |
|
||
| **Trustless 138 ↔ L2 (Lockbox + Inbox on L2)** | 138 + any L2 | Deploy Inbox/LP/Bond (and optional Lockbox) on L2; extend DeployTrustlessBridge or add chain-specific script | ❌ Not deployed | Direct lock/claim 138 ↔ L2; see §2.7 |
|
||
| **Mainnet LP funded** | Ethereum | Add ETH/WETH to LiquidityPoolETH | ⚠️ Operator action | Enables payouts for existing trustless claims; no new contracts |
|
||
|
||
---
|
||
|
||
## 4. Requirements summary (by capability)
|
||
|
||
| Requirement | Where | Status / action |
|
||
|-------------|--------|-----------------|
|
||
| **LINK on each chain** | All CCIP bridge chains | Deployer must hold LINK; run fund-ccip-bridges-with-link.sh (10 LINK per bridge, 20 per chain with 2 bridges) |
|
||
| **Native gas (ETH/BNB/MATIC etc.)** | Each chain | Deployer needs gas for relay and user txs |
|
||
| **DODO_VENDING_MACHINE_ADDRESS** | Chain 138 | ✅ Set (mock DVM). For real DODO, deploy official DVM or use adapter (see DVM_DEPLOYMENT_CHECK.md) |
|
||
| **RPC for Chain 138** | .env | ✅ RPC_URL_138 / CHAIN138_RPC_URL set |
|
||
| **CCIP chain selectors** | .env | ✅ CHAIN138_SELECTOR, ETH_MAINNET_SELECTOR, per-chain selectors set |
|
||
| **Trustless bridge liquidity** | Ethereum mainnet | LP contract deployed; add liquidity for production use |
|
||
|
||
---
|
||
|
||
## 5. Live / tested status
|
||
|
||
| What | How tested | Result |
|
||
|------|------------|--------|
|
||
| **Chain 138 deployment** | `verify-chain138-full-deployment.sh` | ✅ 14 checks pass, 2 warnings (optional: besu namespace, genesis) |
|
||
| **Prerequisites** | `ensure-prerequisites.sh` | ✅ Pass (PMM set, LINK script available) |
|
||
| **PMM deployment** | `run-pmm-and-pools.sh` | ✅ DODOPMMIntegration deployed; pools can be created |
|
||
| **LINK funding** | `fund-ccip-bridges-with-link.sh` (real run) | ❌ Failed (no LINK balance); DRY_RUN shows commands |
|
||
| **Cross-chain CCIP transfer** | No automated e2e in repo | ⚠️ Not run; possible once bridges funded with LINK |
|
||
| **CCIPLogger receive** | No automated test in repo | ⚠️ Not run; CCIPTxReporter → CCIPLogger flow ready on-chain |
|
||
| **Trustless bridge (lockbox)** | Script/doc verification | ⚠️ Contracts verified on-chain; full path not live-tested |
|
||
| **Ethereum mainnet contracts** | Etherscan / prior docs | ✅ Deployed and some verified (see MAINNET_VERIFICATION_COMPLETE etc.) |
|
||
| **BSC, Polygon, Base, etc.** | .env + DeployAll / docs | ✅ Addresses in .env; verification status per chain in deployment docs |
|
||
|
||
---
|
||
|
||
## 6. Visual: “What’s possible now” vs “After LINK”
|
||
|
||
```mermaid
|
||
flowchart LR
|
||
subgraph NOW["✅ Possible now"]
|
||
A[RPC & read 138]
|
||
B[PMM create pools]
|
||
C[Tokenize / compliance]
|
||
D[Oracle feeds]
|
||
E[Channels / mirror]
|
||
F[Settlement]
|
||
G[Tx report to logger]
|
||
end
|
||
|
||
subgraph AFTER_LINK["⚠️ After funding LINK"]
|
||
H[CCIP WETH 138 ↔ Mainnet]
|
||
I[CCIP WETH 138 ↔ L2s]
|
||
end
|
||
|
||
subgraph OPERATOR["🔧 Operator / config"]
|
||
J[Add trustless LP]
|
||
K[Run relay/watcher]
|
||
end
|
||
|
||
NOW --> AFTER_LINK
|
||
AFTER_LINK --> J
|
||
```
|
||
|
||
---
|
||
|
||
## 7. Layer diagram (stack by capability)
|
||
|
||
```mermaid
|
||
flowchart TB
|
||
subgraph L1["L1 — Chain 138 core"]
|
||
C1[Compliance / Token Factory / Vault]
|
||
C2[Oracle / Channels / Settlement]
|
||
C3[PMM / Mock DVM]
|
||
end
|
||
|
||
subgraph L2["L2 — CCIP (all 10 networks)"]
|
||
C4[WETH9/10 bridges]
|
||
C5[Router / Reporter / Logger]
|
||
end
|
||
|
||
subgraph L3["L3 — Trustless (138 + mainnet)"]
|
||
C6[Lockbox 138]
|
||
C7[Bond / LP / Inbox / Swap mainnet]
|
||
end
|
||
|
||
L1 --> L2
|
||
L2 --> L3
|
||
```
|
||
|
||
---
|
||
|
||
## 8. Quick reference — scripts and docs
|
||
|
||
| Script | Purpose |
|
||
|--------|--------|
|
||
| `scripts/deployment/ensure-prerequisites.sh` | Check .env, keys, RPC, PMM, LINK note |
|
||
| `scripts/deployment/verify-chain138-full-deployment.sh` | Full Chain 138 verification (RPC, contracts, .env) |
|
||
| `scripts/deployment/check-balances-gas-and-deploy.sh` | Balance check; optional --deploy for 138 |
|
||
| `scripts/deployment/fund-ccip-bridges-with-link.sh` | Send LINK to all CCIP bridges (need LINK per chain) |
|
||
| `scripts/deployment/run-pmm-and-pools.sh` | Deploy PMM integration and optional pools |
|
||
| `scripts/deployment/deploy-official-dvm-chain138.sh` | Deploy official DODO DVM (blocked by Truffle/solc mix) |
|
||
| `scripts/deployment/deploy-pmm-all-l2s.sh` | **(G1)** Deploy DODOPMMIntegration on each L2 (BSC, Polygon, Base, etc.); set per-chain .env |
|
||
| `scripts/deployment/deploy-trustless-l2s.sh` | **(G2/G3)** Deploy Trustless stack (Bond, LP, Inbox, optional Lockbox) on each L2 |
|
||
| `scripts/deployment/fund-mainnet-lp.sh` | **(G4)** Fund mainnet LiquidityPoolETH; use `--eth <amt>` / `--weth <amt>` or interactive prompt (no .env amounts) |
|
||
| `scripts/deployment/verify-trustless-deployments.sh` | Verify all Trustless contracts (BondManager, LP, Inbox, Lockbox) on Mainnet, 138, BSC, Polygon, Base, Optimism, Cronos, Arbitrum, Avalanche, Gnosis via `cast code` |
|
||
|
||
| Doc | Content |
|
||
|-----|--------|
|
||
| `docs/deployment/DVM_DEPLOYMENT_CHECK.md` | DVM options (mock vs official) |
|
||
| `docs/deployment/WARNINGS_AND_OPTIONAL_TASKS.md` | Warnings and optional tasks |
|
||
| `docs/deployment/NEXT_STEPS_COMPLETION.md` | What’s done vs operator tasks |
|
||
| `docs/11-references/CONTRACT_ADDRESSES_REFERENCE.md` | Contract address reference |
|
||
|
||
---
|
||
|
||
---
|
||
|
||
## 9. Network-to-network CCIP map
|
||
|
||
Which chains have CCIP WETH bridges and can talk to each other (once LINK is funded):
|
||
|
||
```mermaid
|
||
flowchart LR
|
||
subgraph C138["Chain 138"]
|
||
N138[CCIP Bridges]
|
||
end
|
||
subgraph ETH["Ethereum"]
|
||
N1[CCIP Bridges]
|
||
end
|
||
subgraph L2["BSC, Polygon, Base, Optimism, Arbitrum, Avalanche, Cronos, Gnosis"]
|
||
NL2[CCIP Bridges]
|
||
end
|
||
|
||
N138 <-->|CCIP WETH9/10| N1
|
||
N138 <-->|CCIP WETH9/10| NL2
|
||
N1 <-->|CCIP WETH9/10| NL2
|
||
```
|
||
|
||
All 10 networks have WETH9 + WETH10 + CCIPWETH9Bridge + CCIPWETH10Bridge in .env; CCIP can connect any pair once routers are configured and bridges funded with LINK.
|
||
|
||
---
|
||
|
||
## 10. One-page summary table (all networks)
|
||
|
||
| Network | Chain ID | Core/CCIP | PMM | Trustless | Explorer | RPC env | LINK funded | Script verified | E2E tested |
|
||
|---------|----------|-----------|-----|-----------|----------|---------|-------------|------------------|------------|
|
||
| **Chain 138** | 138 | ✅ Full | ✅ Mock DVM | ✅ Lockbox | [explorer.d-bis.org](https://explorer.d-bis.org) | RPC_URL_138, CHAIN_138_RPC_URL | ❌ | ✅ verify-chain138 | ⚠️ No e2e |
|
||
| **Ethereum** | 1 | ✅ CCIP + Logger + Trustless | — | ✅ | etherscan.io | ETHEREUM_MAINNET_RPC, DESTINATION_RPC_URL | ❌ | — | ⚠️ Doc only |
|
||
| **BSC** | 56 | ✅ WETH9/10 + CCIP | — | — | bscscan.com | BSC_RPC_URL | ❌ | — | ❌ |
|
||
| **Polygon** | 137 | ✅ WETH9/10 + CCIP | — | — | polygonscan.com | POLYGON_RPC_URL | ❌ | — | ❌ |
|
||
| **Base** | 8453 | ✅ WETH9/10 + CCIP | — | — | basescan.org | BASE_MAINNET_RPC | ❌ | — | ❌ |
|
||
| **Optimism** | 10 | ✅ WETH9/10 + CCIP | — | — | optimistic.etherscan.io | OPTIMISM_MAINNET_RPC | ❌ | — | ❌ |
|
||
| **Arbitrum** | 42161 | ✅ WETH9/10 + CCIP | — | — | arbiscan.io | ARBITRUM_MAINNET_RPC | ❌ | — | ❌ |
|
||
| **Avalanche** | 43114 | ✅ WETH9/10 + CCIP | — | — | snowtrace.io | AVALANCHE_RPC_URL | ❌ | — | ❌ |
|
||
| **Cronos** | 25 | ✅ WETH9/10 + CCIP + ISO4217W | — | — | cronoscan.com | CRONOS_RPC_URL | ❌ | — | ❌ |
|
||
| **Gnosis** | 100 | ✅ WETH9/10 + CCIP | — | — | gnosisscan.io | GNOSIS_RPC_URL | ❌ | — | ❌ |
|
||
|
||
- **LINK funded:** Update to ✅ when `fund-ccip-bridges-with-link.sh` has been run successfully on that chain.
|
||
- **Script verified:** `verify-chain138-full-deployment.sh` (Chain 138 only). Other chains: addresses in .env from deploy runbooks.
|
||
- **E2E tested:** No automated e2e in repo for cross-chain CCIP or full trustless flow; operator can test manually after LINK funding.
|
||
|
||
---
|
||
|
||
## 11. CCIP chain selector env vars (for relay/config)
|
||
|
||
| Network | Chain ID | CCIP selector env (example) |
|
||
|---------|----------|-----------------------------|
|
||
| Chain 138 | 138 | CHAIN138_SELECTOR |
|
||
| Ethereum | 1 | ETH_MAINNET_SELECTOR |
|
||
| BSC | 56 | BSC_SELECTOR (or per-runbook name) |
|
||
| Polygon | 137 | POLYGON_SELECTOR |
|
||
| Base | 8453 | BASE_SELECTOR |
|
||
| Optimism | 10 | OPTIMISM_SELECTOR |
|
||
| Arbitrum | 42161 | ARBITRUM_SELECTOR |
|
||
| Avalanche | 43114 | AVALANCHE_SELECTOR |
|
||
| Cronos | 25 | CRONOS_SELECTOR |
|
||
| Gnosis | 100 | GNOSIS_SELECTOR |
|
||
|
||
Exact names may vary in `.env`; see `smom-dbis-138/.env.example` and deployment runbooks.
|
||
|
||
---
|
||
|
||
**Summary:** Contracts are deployed across Chain 138, Ethereum mainnet, and eight other EVM chains (BSC, Polygon, Base, Optimism, Arbitrum, Avalanche, Cronos, Gnosis). Everything that does not require LINK (RPC, PMM, tokenization, oracle, channels, settlement, tx reporting) can be used or tested now. CCIP WETH bridging is ready once LINK is funded on each chain; cross-chain CCIP and full trustless flows are not yet live-tested in this repo.
|
||
|
||
---
|
||
|
||
## 12. Optional next steps (operator)
|
||
|
||
| Step | Action | Notes |
|
||
|------|--------|--------|
|
||
| **CHAIN138_SELECTOR** | Set in `.env` (default `138`). To use a custom value from your CCIP Router: run `scripts/configuration/find-chain-selector.sh` or `cast call <CCIP_ROUTER> "getChainSelector()(uint64)" --rpc-url $RPC_URL_138` when RPC is reachable. | Required for `configure-*-bridges.sh`, `verify-chain138-full-deployment.sh`. |
|
||
| **Arbitrum / Avalanche / Gnosis Trustless** | Addresses are in `.env` (`ARBITRUM_*`, `AVALANCHE_*`, `GNOSIS_*`). `verify-trustless-deployments.sh` uses them when set. | No action unless you need to override. |
|
||
| **G4 – Fund mainnet LP** | Use script **tags** (no .env placeholders): `./scripts/deployment/fund-mainnet-lp.sh --eth 1.5 --weth 0.5`, or run interactively: `./scripts/deployment/fund-mainnet-lp.sh` or `./scripts/deployment/run-all-four-gaps.sh g4`. | Modular and callable; operator runs with key and gas. |
|