> 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.
**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).
**Related:** [TODOS_CONSOLIDATED](../00-meta/TODOS_CONSOLIDATED.md) § First (0a–0c) | [CONTRACT_DEPLOYMENT_RUNBOOK.md](CONTRACT_DEPLOYMENT_RUNBOOK.md) | [RECOMMENDATIONS_OPERATOR_CHECKLIST](../00-meta/RECOMMENDATIONS_OPERATOR_CHECKLIST.md)
**Run all checkable items:** `./scripts/deployment/run-before-deploy-checks.sh` ([§7](#7-run-all-checkable-items-one-script)).
---
## 1. Mandatory fixes and checks (do first)
These must be satisfied before **any** Chain 138 deployment. Run preflight once; repeat if RPC, env, or nonce change.
| # | Item | Action / fix |
|---|------|--------------|
| **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 1–2 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.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. |
| **1.8** | **Gas / cost estimate** | Before deploying: `cd smom-dbis-138 && ./scripts/deployment/calculate-costs-consolidated.sh` (Chain 138 min gas 1 gwei). See [DEPLOYMENT_GAS_COSTS_REALTIME](../11-references/DEPLOYMENT_GAS_COSTS_REALTIME.md). |
| **1.9** | **POOL_MANAGER_ROLE** | Deployer must have `POOL_MANAGER_ROLE` on DODOPMMIntegration for pool creation and DODOPMMProvider registration. |
| **Correct RPC** | Use **only**`RPC_URL_138` from `smom-dbis-138/.env` for deployments. Must point to **Core RPC** (VMID 2101, `http://192.168.11.211:8545`). Never use Public RPC for deploying. |
| **Correct dotenv** | All deployment secrets from **`smom-dbis-138/.env`** only. Do not source a different .env for deploy. |
| **Gas / cost** | Run gas/cost estimation before deploying (e.g. `calculate-costs-consolidated.sh`). Chain 138 minimum gas 1 gwei. |
| **Do not deploy when stuck** | Clear tx pool, wait ~60s; use scripts that check nonce when available. |
---
## 3. Identified gaps to fix or confirm before deploy
| Gap | Location / scope | Fix / action |
|-----|------------------|--------------|
| **Wemix (1111) token addresses** | config/token-mapping-multichain.json | Confirm WETH, USDT, USDC on [scan.wemix.com/tokens](https://scan.wemix.com/tokens); update config and WEMIX_TOKEN_VERIFICATION.md if different; run `validate-config-files.sh`. |
| **Canonical addresses** | token-aggregation, .env | Canonical token addresses (e.g. CUSDC_ADDRESS_138, CUSDT_ADDRESS_138) in env or smart-contracts-master.json; token-aggregation uses env override. See [REQUIRED_FIXES_UPDATES_GAPS](../REQUIRED_FIXES_UPDATES_GAPS.md) §3. |
| **AlltraAdapter setBridgeFee** | AlltraAdapter.sol | Fee configurable via `setBridgeFee(uint256)`; operator calls after deploy. Set `ALLTRA_BRIDGE_FEE`, `ALLTRA_ADAPTER_CHAIN138` in .env. |
| **Smart accounts / Paymaster** | DeploySmartAccountsKit | Script reads `ENTRY_POINT`, `SMART_ACCOUNT_FACTORY`, `PAYMASTER` from env. Deploy ERC-4337 contracts separately and set in .env. |
| **Quote service FABRIC_CHAIN_ID** | bridge/quote-service | Uses `FABRIC_CHAIN_ID` from env (default 999). Set when Fabric is live. |
| **CCIPWETH9Bridge** | Env / runbook | Use only canonical bridge (e.g. `0x971c...`); do **not** use deprecated `0x89dd...`. Set `CCIPWETH9_BRIDGE_CHAIN138` in env. See RECOMMENDATIONS_OPERATOR_CHECKLIST R4. |
| **Token mapping** | config/token-mapping.json | Single source of truth for 138↔Mainnet; when adding tokens update token-mapping.json and optionally CHAIN138_TOKEN_ADDRESSES. R24. |
---
## 4. Token deployments remaining (prerequisites for full token/PMM coverage)
If you plan to deploy **additional** tokens or vaults after core + PMM, ensure prerequisites and order. Full list: [TOKEN_CONTRACT_DEPLOYMENTS_REMAINING](../11-references/TOKEN_CONTRACT_DEPLOYMENTS_REMAINING.md).
| Category | Prerequisite | Notes |
|----------|-------------|--------|
| **DeployCompliantFiatTokens (cEURC, cEURT, cGBP*, cAUD*, cJPY*, cCHF*, cCADC, cXAU*)** | `CREATE2_FACTORY_ADDRESS` (e.g. from DeployDeterministicCore) | Use Core RPC (IP:port). After deploy: update CHAIN138_TOKEN_ADDRESSES and env. |
| **Optional cCADT** | Add to DeployCompliantFiatTokens.s.sol if needed | Tether-style CAD. |
| **Vault ac* / vdc* / sdc*** | Base tokens deployed (e.g. cUSDC, cUSDT, then extra compliant) | DeployAcVdcSdcVaults; extend for each new base. |
| **cW* on public chains** | Per-chain RPC, bridge, pool-matrix | Design in POOLS_AND_NETWORKS_FULL_DESIGN; pool-matrix in cross-chain-pmm-lps. |
| **ACADT / ALL Mainnet** | Alltra ecosystem | No script in repo; address TBD when Alltra adds CAD token. |
---
## 5. PMM-specific: before adding liquidity and provider
| 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). |
| 5.5 | **Token-aggregation** | Set `CHAIN_138_DODO_PMM_INTEGRATION` where token-aggregation runs so API indexes DODO pools. |
---
## 6. Operator recommendations (R1–R24) — before and after deploy
**Ongoing:** R17 (monitor bridge/oracle events), R18 (Blockscout and /api up), R24 (token-mapping.json source of truth).
Full list: [RECOMMENDATIONS_OPERATOR_CHECKLIST](../00-meta/RECOMMENDATIONS_OPERATOR_CHECKLIST.md).
---
## 7. Run all checkable items (one script)
From repo root, run every check that can be automated (preflight, env, forge build, contract tests, config validation). Optionally include gas estimate, alltra e2e, and on-chain verification.
The script reports **PASS** or **FAIL** per step and exits 0 only if all steps pass. Remaining items (deployer gas, POOL_MANAGER_ROLE, RPC writable if needed) require operator/LAN; see §1 and §2.