docs: update master documentation and push to Gitea (2026-03-06)
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
- MASTER_INDEX: Last Updated 2026-03-06; status 59/59 contracts; add NEXT_STEPS_LIST, CONTRACT_NEXT_STEPS_LIST - docs/README, NEXT_STEPS_INDEX, 06-besu/MASTER_INDEX: Last Updated 2026-03-06 - Contract check script: 59 addresses (PMM, vault/reserve, CompliantFiatTokens); canonical CCIP/router - New docs: EXECUTION_CHECKLIST, NEXT_STEPS_LIST, DOTENV_AUDIT, ADDITIONAL_PATHS, deployer gas runbook, WEMIX_ACQUISITION_TABLED, etc. - Config: deployer-gas-routes, cro-wemix-swap-routes, routing-registry, token-mapping - Scripts: check-contracts-on-chain-138, check-pmm-pool-balances-chain138, deployer-gas-auto-route, acquire-cro-and-wemix-gas - Operator rule: operator-lan-access-check.mdc Made-with: Cursor
This commit is contained in:
97
docs/03-deployment/DEPLOYER_GAS_AUTO_ROUTE_RUNBOOK.md
Normal file
97
docs/03-deployment/DEPLOYER_GAS_AUTO_ROUTE_RUNBOOK.md
Normal file
@@ -0,0 +1,97 @@
|
||||
# Deployer Gas Auto-Route Runbook
|
||||
|
||||
**Purpose:** Convert deployer wallet ERC-20 (or compliant) tokens to **native gas tokens** on each target chain where balance is below threshold. Uses internal path (Chain 138), Protocolink (public chains), or manual/LiFi (Wemix).
|
||||
|
||||
**Deployer address:** `0x4A666F96fC8764181194447A7dFdb7d471b301C8`
|
||||
|
||||
---
|
||||
|
||||
## Prerequisites
|
||||
|
||||
1. **Balance check:** Run deployer balance check first so you know which chains need gas.
|
||||
2. **Environment:** `smom-dbis-138/.env` (or project env loaded by `scripts/lib/load-project-env.sh`) with:
|
||||
- `PRIVATE_KEY` or `DEPLOYER_ADDRESS`
|
||||
- Per-chain RPC URLs: `RPC_URL_138`, `ETHEREUM_MAINNET_RPC`, `BSC_RPC_URL`, `POLYGON_MAINNET_RPC`, `GNOSIS_MAINNET_RPC`, `ARBITRUM_MAINNET_RPC`, `OPTIMISM_MAINNET_RPC`, `BASE_MAINNET_RPC`, `AVALANCHE_RPC_URL`, `CRONOS_RPC_URL`, `CELO_RPC_URL`, `WEMIX_RPC`, `GNOSIS_RPC`. For ALL Mainnet (651940) and Etherlink (42793): set `RPC_URL_651940` and `RPC_URL_42793` (or equivalent) when present so the orchestrator can show balance/route for those chains; otherwise they appear as "no RPC configured".
|
||||
3. **Config:** [config/deployer-gas-routes.json](../../config/deployer-gas-routes.json) — chain-to-method mapping and thresholds. **Multiple swap routes for CRO and WEMIX:** [config/cro-wemix-swap-routes.json](../../config/cro-wemix-swap-routes.json) — SwapSpace, ChangeNOW, SimpleSwap, StealthEX and others; used by `acquire-cro-and-wemix-gas.sh`.
|
||||
|
||||
---
|
||||
|
||||
## Steps
|
||||
|
||||
### 1. Run balance check (optional but recommended)
|
||||
|
||||
```bash
|
||||
cd smom-dbis-138
|
||||
./scripts/deployment/check-balances-gas-and-deploy.sh
|
||||
```
|
||||
|
||||
Or from repo root (if env is loaded):
|
||||
|
||||
```bash
|
||||
source scripts/lib/load-project-env.sh
|
||||
cd smom-dbis-138 && ./scripts/deployment/check-balances-gas-and-deploy.sh
|
||||
```
|
||||
|
||||
Confirm which chains show **INSUFFICIENT for deploy**.
|
||||
|
||||
### 2. Run the orchestrator
|
||||
|
||||
From **repo root**:
|
||||
|
||||
```bash
|
||||
./scripts/deployment/deployer-gas-auto-route.sh
|
||||
```
|
||||
|
||||
Options:
|
||||
|
||||
- `--dry-run` — do not execute any tx; only report and run path scripts in read-only mode.
|
||||
- `--no-execute` — output tx data and instructions only; no signing (Protocolink path never signs; script only outputs quote and next steps).
|
||||
- `--chain 138` — run only for chain 138 (or `--chain 1111` for Wemix only).
|
||||
|
||||
The orchestrator:
|
||||
|
||||
1. Reads [config/deployer-gas-routes.json](../../config/deployer-gas-routes.json).
|
||||
2. For each chain, gets deployer native balance via RPC and compares to `thresholdEther`.
|
||||
3. For chains **below threshold**, dispatches by `method`:
|
||||
- **internal (138):** Runs [scripts/deployment/chain138-tokens-to-gas.sh](../../scripts/deployment/chain138-tokens-to-gas.sh). If no cUSDT/cUSDC→WETH pool exists (current state), outputs "use genesis/validator only".
|
||||
- **protocolink:** Runs [scripts/deployment/protocolink-swap-to-gas.cjs](../../scripts/deployment/protocolink-swap-to-gas.cjs) to get a quote and next-step instructions; you build/sign the tx separately.
|
||||
- **manual:** Prints instructions and links (e.g. SwapSpace, ChangeNOW for Wemix); for 1111 also runs [scripts/deployment/wemix-acquire-via-lifi.js](../../scripts/deployment/wemix-acquire-via-lifi.js) for JSON output.
|
||||
|
||||
### 3. Per-path actions
|
||||
|
||||
| Path | Action |
|
||||
|------|--------|
|
||||
| **Chain 138** | If token-aggregation has no c*→WETH pool: fund deployer via **genesis alloc** or **validator transfer**. See [FUNDING_AND_DEPLOYMENT_CHECKLIST.md](FUNDING_AND_DEPLOYMENT_CHECKLIST.md). |
|
||||
| **Protocolink (public chains)** | Use the quote/output from `protocolink-swap-to-gas.cjs`. Build transaction via [Protocolink API](https://docs.protocolink.com/protocolink-api/overview) (estimate router data, build tx); sign with deployer key and submit. |
|
||||
| **Cronos (25)** | **Manual (multiple routes):** Protocolink does not support Cronos. Use any aggregator from [config/cro-wemix-swap-routes.json](../../config/cro-wemix-swap-routes.json) (SwapSpace, ChangeNOW, SimpleSwap, StealthEX) to swap ETH/BNB/USDT/USDC → CRO; send to deployer on Cronos. Required ~15 CRO. List all routes: `./scripts/deployment/acquire-cro-and-wemix-gas.sh` or `--list`. |
|
||||
| **Wemix (1111)** | **Manual (multiple routes):** Use any aggregator from [config/cro-wemix-swap-routes.json](../../config/cro-wemix-swap-routes.json) (SwapSpace, ChangeNOW, SimpleSwap, StealthEX) to swap ETH/BNB/POL → WEMIX; send to deployer on chain 1111. Required ~0.4 WEMIX. List all routes: `./scripts/deployment/acquire-cro-and-wemix-gas.sh` or `--list`. Then run `deploy-bridges-config-ready-chains.sh wemix` and complete-config. See [WEMIX_ACQUISITION_TABLED.md](WEMIX_ACQUISITION_TABLED.md). |
|
||||
|
||||
---
|
||||
|
||||
## References
|
||||
|
||||
- [FUNDING_AND_DEPLOYMENT_CHECKLIST.md](FUNDING_AND_DEPLOYMENT_CHECKLIST.md) — balance check, funding sources, mint ERC-20.
|
||||
- [WEMIX_ACQUISITION_TABLED.md](WEMIX_ACQUISITION_TABLED.md) — Wemix gas acquisition options and un-table steps.
|
||||
- [REMAINING_DEPLOYMENTS_FOR_FULL_NETWORK_COVERAGE.md](REMAINING_DEPLOYMENTS_FOR_FULL_NETWORK_COVERAGE.md) — Phase A/B/C and deployer gas as prerequisite.
|
||||
- [ADDITIONAL_RECOMMENDATIONS_TABLE.md](../00-meta/ADDITIONAL_RECOMMENDATIONS_TABLE.md) — deployer gas check (0a), operator quick reference (22).
|
||||
- [DEX_AND_AGGREGATORS_CHAIN138_EXPLAINER.md](../04-configuration/DEX_AND_AGGREGATORS_CHAIN138_EXPLAINER.md) — token-aggregation quote API and DODO PMM on 138.
|
||||
|
||||
### Multiple swap routes (CRO / WEMIX)
|
||||
|
||||
**Config:** [config/cro-wemix-swap-routes.json](../../config/cro-wemix-swap-routes.json) defines all aggregator routes for Cronos (25) and Wemix (1111). Each chain has a `swapRoutes` array with `id`, `name`, `type`, `fromAssets`, `toAsset`, `url`, `description`. To add a new route: append an object to `chains."25".swapRoutes` or `chains."1111".swapRoutes` and run `acquire-cro-and-wemix-gas.sh` to list it.
|
||||
|
||||
---
|
||||
|
||||
## Quick reference
|
||||
|
||||
| Command | Purpose |
|
||||
|---------|---------|
|
||||
| `./scripts/deployment/deployer-gas-auto-route.sh` | Run full auto-route (report + path scripts). |
|
||||
| `./scripts/deployment/deployer-gas-auto-route.sh --dry-run` | Report only; no execute. |
|
||||
| `./scripts/deployment/deployer-gas-auto-route.sh --chain 138` | Only Chain 138 path. |
|
||||
| `./scripts/deployment/chain138-tokens-to-gas.sh` | Chain 138: token-aggregation quote c*→WETH (or "use genesis/validator"). |
|
||||
| `node scripts/deployment/protocolink-swap-to-gas.cjs --chain-id 1` | Protocolink quote for Ethereum (USDC→WETH). |
|
||||
| `node scripts/deployment/wemix-acquire-via-lifi.js` | Wemix: manual instructions and deployer address (JSON). |
|
||||
| `./scripts/deployment/acquire-cro-and-wemix-gas.sh` | Print all CRO and WEMIX swap routes from config (multiple aggregators). |
|
||||
| `./scripts/deployment/acquire-cro-and-wemix-gas.sh --list` | One line per route (name + URL). |
|
||||
| `./scripts/deployment/acquire-cro-and-wemix-gas.sh --json` | Emit deployer and config path only (for tooling). |
|
||||
@@ -53,7 +53,7 @@ Execute in any order where no dependency; all must be satisfied before Phase 1
|
||||
|
||||
## Phase 1 — Chain 138 core (if not already deployed)
|
||||
|
||||
If core contracts are already deployed (36/38 present per verification), skip to Phase 2. Otherwise follow this order.
|
||||
If core contracts are already deployed (e.g. 59/59 present per check-contracts-on-chain-138.sh), skip to Phase 2. Otherwise follow this order.
|
||||
|
||||
| # | Item | Script / command | Depends on |
|
||||
|---|------|------------------|------------|
|
||||
@@ -75,7 +75,7 @@ Required for PMM routing. Full steps: [PRE_DEPLOYMENT_CHECKLIST.md](PRE_DEPLOYME
|
||||
| # | Item | Command / script |
|
||||
|---|------|------------------|
|
||||
| 2.1 | **TransactionMirror** | `./scripts/deployment/deploy-transaction-mirror-and-pmm-pool-after-txpool-clear.sh` (deploys mirror + cUSDT/cUSDC pool), or run `DeployTransactionMirror.s.sol` only. Set `TRANSACTION_MIRROR_ADDRESS` in .env. If deploy fails with CreateCollision, see [TRANSACTION_MIRROR_CHAIN138_COLLISION_FIX.md](TRANSACTION_MIRROR_CHAIN138_COLLISION_FIX.md); use `--skip-mirror` for pool-only. |
|
||||
| 2.2 | **PMM pools (all three)** | Either: (a) after 2.1 run `CreateCUSDTUSDTPool.s.sol` and `CreateCUSDCUSDCPool.s.sol`, or (b) `./scripts/deployment/create-all-pmm-pools-chain138.sh` (all three). Use Core RPC only. |
|
||||
| 2.2 | **PMM pools (mesh-first on Chain 138)** | Preferred: run `./scripts/create-pmm-full-mesh-chain138.sh` (creates all c*↔c*, optional c*↔official, optional c*↔WETH, optional official↔WETH). Minimum fallback: create legacy three pools via `./scripts/deployment/create-all-pmm-pools-chain138.sh`. Use Core RPC only. |
|
||||
| 2.3 | **Record pool addresses** | Note each pool address for Phase 3 (DODOPMMProvider registration). |
|
||||
| 2.4 | **Register c* as GRU (ERC-2535 integration)** | Set c* and token addresses in .env: `./scripts/deployment/set-dotenv-c-tokens-and-register-gru.sh` (or `--no-register` to only update .env). Then run RegisterGRUCompliantTokens (script runs it unless `--no-register`). **If registration reverts (empty data):** the proxy implementation may be older — upgrade first: `cd smom-dbis-138 && forge script script/deploy/UpgradeUniversalAssetRegistry.s.sol --rpc-url $RPC_URL_138 --broadcast --private-key $PRIVATE_KEY --with-gas-price 1000000000` (requires UPGRADER_ROLE). Then grant REGISTRAR_ROLE if needed (see script comment) and re-run set-dotenv script. See [GRU_M00_DIAMOND_FACET_MAP](../04-configuration/GRU_M00_DIAMOND_FACET_MAP.md); [GRU_M00_DIAMOND_REVIEW_GAPS_AND_RECOMMENDATIONS](../04-configuration/GRU_M00_DIAMOND_REVIEW_GAPS_AND_RECOMMENDATIONS.md). |
|
||||
|
||||
@@ -87,7 +87,7 @@ Required for PMM routing. Full steps: [PRE_DEPLOYMENT_CHECKLIST.md](PRE_DEPLOYME
|
||||
|---|------|--------|
|
||||
| 3.1 | **Add liquidity (optional)** | Per pool: approve base/quote to DODOPMMIntegration, then `addLiquidity(pool, baseAmount, quoteAmount)`. See [DODO_PMM_INTEGRATION.md](../../smom-dbis-138/docs/integration/DODO_PMM_INTEGRATION.md). |
|
||||
| 3.2 | **Deploy DODOPMMProvider** | `forge script script/liquidity/DeployDODOPMMProvider.s.sol:DeployDODOPMMProvider --rpc-url $RPC_URL_138 --broadcast --private-key $PRIVATE_KEY --with-gas-price 1000000000`. Set `DODO_PMM_PROVIDER_ADDRESS` in .env. |
|
||||
| 3.3 | **Register pools** | For each pool (cUSDT/cUSDC, cUSDT/USDT, cUSDC/USDC): call `provider.registerPool(tokenIn, tokenOut, poolAddress)` (via cast or script). |
|
||||
| 3.3 | **Register pools** | Register every created pool in DODOPMMProvider (legacy three at minimum; full mesh when used). |
|
||||
| 3.4 | **Token-aggregation** | Set `CHAIN_138_DODO_PMM_INTEGRATION` where the token-aggregation service runs; ensure indexer runs so API exposes pools. |
|
||||
| 3.5 | **MCP allowlist (optional)** | Use `ai-mcp-pmm-controller/config/allowlist-138.json` (Chain 138 pools). Run with `ALLOWLIST_PATH=config/allowlist-138.json CHAIN=138`. See [README-allowlist-138.md](../../ai-mcp-pmm-controller/config/README-allowlist-138.md). |
|
||||
|
||||
@@ -123,7 +123,7 @@ After each deployment phase and periodically.
|
||||
|
||||
| # | Item | Command / doc |
|
||||
|---|------|----------------|
|
||||
| 6.1 | **On-chain verification (Chain 138)** | `./scripts/verify/check-contracts-on-chain-138.sh [RPC_URL]`. Target 38/38 when TransactionMirror and all three PMM pools exist. |
|
||||
| 6.1 | **On-chain verification (Chain 138)** | `./scripts/verify/check-contracts-on-chain-138.sh [RPC_URL]`. Target 59/59 when TransactionMirror, all three PMM pools, vault/reserve, and CompliantFiatTokens exist. |
|
||||
| 6.2 | **Blockscout verification** | When Blockscout reachable: `./scripts/verify/run-contract-verification-with-proxy.sh`. See [BLOCKSCOUT_VERIFICATION_GUIDE.md](../08-monitoring/BLOCKSCOUT_VERIFICATION_GUIDE.md). |
|
||||
| 6.3 | **Update address docs** | Update [CONTRACT_ADDRESSES_REFERENCE.md](../11-references/CONTRACT_ADDRESSES_REFERENCE.md), [LIQUIDITY_POOLS_MASTER_MAP.md](../11-references/LIQUIDITY_POOLS_MASTER_MAP.md) with new pool and provider addresses. |
|
||||
| 6.4 | **Recommendations (R1–R24)** | Follow [RECOMMENDATIONS_OPERATOR_CHECKLIST.md](../00-meta/RECOMMENDATIONS_OPERATOR_CHECKLIST.md): verify on Blockscout, keep address refs updated, use correct RPC/gas, manage nonce, runbooks in sync, monitoring, testing, token mapping. |
|
||||
@@ -172,8 +172,8 @@ For a single page of exact commands (CCIP bridges, LINK relay, Blockscout verify
|
||||
|
||||
1. **Prerequisites:** RPC writable (Core only), deployer funded, **smom-dbis-138/.env** (no other dotenv), gas/cost estimate run, POOL_MANAGER_ROLE, **no stuck txs** (clear pool if needed), forge build.
|
||||
2. **Chain 138 core:** 01_DeployCore → set env → 02_DeployBridges (or unified script); WETH9 bridge; deterministic if needed.
|
||||
3. **PMM:** TransactionMirror + create all three PMM pools (cUSDT/cUSDC, cUSDT/USDT, cUSDC/USDC).
|
||||
4. **Provider:** Add liquidity (optional) → deploy DODOPMMProvider → register pools → token-aggregation env → MCP allowlist (optional).
|
||||
3. **PMM:** TransactionMirror + create mesh-first pools on Chain 138 (`create-pmm-full-mesh-chain138.sh`), or legacy three as minimum fallback.
|
||||
4. **Provider:** Add liquidity (optional) → deploy DODOPMMProvider → register all created pools → token-aggregation env → MCP allowlist (optional).
|
||||
5. **Optional:** EnhancedSwapRouter (when Uniswap/Balancer on 138), trustless stack, CCIP other chains, LINK relay.
|
||||
6. **cW*:** Per chain: deploy/bridge cW* tokens, create and fund pools per pool-matrix.
|
||||
7. **Verify & recommendations:** check-contracts-on-chain-138.sh, Blockscout verify, update address docs, R1–R24, full recommendations list.
|
||||
|
||||
@@ -20,6 +20,8 @@ This checks **native gas token** only (ETH, MATIC, BNB, etc.). ERC-20 tokens (US
|
||||
|
||||
**Deployer address:** `cast wallet address $PRIVATE_KEY` (from smom-dbis-138/.env)
|
||||
|
||||
**Auto-route (tokens → gas):** If the deployer holds ERC-20 (e.g. USDT, USDC, LINK) on a chain but is short on native gas, you can use the deployer gas auto-route to get swap/bridge instructions or quotes. Run from repo root: `./scripts/deployment/deployer-gas-auto-route.sh` (optional: `--dry-run`, `--chain 138`). See [DEPLOYER_GAS_AUTO_ROUTE_RUNBOOK.md](DEPLOYER_GAS_AUTO_ROUTE_RUNBOOK.md).
|
||||
|
||||
---
|
||||
|
||||
## 2. Funding Sources by Network
|
||||
@@ -190,7 +192,8 @@ cast send 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 "deposit()" --value 1000000
|
||||
### "RPC not accessible"
|
||||
|
||||
- For `192.168.11.211`: requires LAN/VPN access.
|
||||
- Try public RPC: `RPC_URL_138=https://rpc-http-pub.d-bis.org`
|
||||
- Do **not** switch deployment to public RPC. For deployment on Chain 138, use Core RPC only (`RPC_URL_138` on VMID 2101).
|
||||
- If Core RPC is unreachable, restore LAN/VPN access or fix Core RPC health first, then re-run deployment.
|
||||
|
||||
### "insufficient funds" on broadcast
|
||||
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
|
||||
## C.1 Deploy or bridge cW* tokens per chain
|
||||
|
||||
Chains: 1, 56, 137, 10, 42161, 8453, 43114, 100, 25, 42220, 1111.
|
||||
Chains (current pool-matrix scope): 1, 10, 56, 100, 137, 250, 324, 8453, 42161, 42220, 43114, 59144.
|
||||
Note: Wemix (1111) may still be part of bridge-coverage phases, but it is not currently in `cross-chain-pmm-lps/config/pool-matrix.json`.
|
||||
Tokens: cWUSDT, cWUSDC, cWAUSDT, cWEURC, cWEURT, cWUSDW (per pool-matrix).
|
||||
|
||||
**Steps:** (1) Use cross-chain-pmm-lps config/chains.json and pool-matrix.json. (2) Deploy CompliantWrappedToken (cW*) per chain or use bridge; set addresses in deployment-status.json and smom-dbis-138/.env. (3) Ref: TOKEN_CONTRACT_DEPLOYMENTS_REMAINING §3, CW_DEPLOY_AND_WIRE_RUNBOOK.
|
||||
|
||||
@@ -12,6 +12,10 @@
|
||||
- Number of pairs: **66** (12 choose 2).
|
||||
- **c* vs official (optional):** Each c* vs official USDT and vs official USDC on Chain 138 (if addresses are set).
|
||||
- Adds up to **24** pools (12×2) when both official tokens are configured.
|
||||
- **c* vs ETH (on-chain as WETH, optional):** Each c* vs WETH on Chain 138.
|
||||
- Adds up to **12** pools (12×1) when `WETH_ADDRESS_138` (or `QUOTE_TOKEN_ADDRESS`) is configured.
|
||||
- **official vs ETH (on-chain as WETH, optional):** official USDT/WETH and official USDC/WETH.
|
||||
- Adds up to **2** pools when official token addresses and WETH are configured.
|
||||
- **Already created:** The three legacy pools (cUSDT/cUSDC, cUSDT/USDT, cUSDC/USDC) are created separately; the script skips any pair that already has a pool.
|
||||
|
||||
### 1.2 Contracts and roles
|
||||
@@ -31,12 +35,19 @@ 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
|
||||
|
||||
# Create all c* vs c* pools and register with provider (and optionally c* vs official USDT/USDC)
|
||||
# Create all c* vs c* pools and register with provider
|
||||
# (plus optional c* vs official USDT/USDC and c* vs WETH)
|
||||
./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
|
||||
```
|
||||
@@ -48,7 +59,7 @@ DRY_RUN=1 ./scripts/create-pmm-full-mesh-chain138.sh
|
||||
|
||||
- Pools are created empty. Add liquidity per pool via `DODOPMMIntegration.addLiquidity(pool, baseAmount, quoteAmount)`.
|
||||
- See [PMM_POOLS_FUNDING_PLAN.md](PMM_POOLS_FUNDING_PLAN.md) and [ADD_LIQUIDITY_PMM_CHAIN138_RUNBOOK.md](ADD_LIQUIDITY_PMM_CHAIN138_RUNBOOK.md).
|
||||
- For the full mesh, prioritize funding the most-used pairs (e.g. cUSDT/cUSDC, cUSDT/USDT, cUSDC/USDC, then other c* vs c* and c* vs official).
|
||||
- For the full mesh, prioritize funding the most-used pairs (e.g. cUSDT/cUSDC, cUSDT/USDT, cUSDC/USDC, cUSDT/WETH, cUSDC/WETH, USDT/WETH, USDC/WETH, then other c* vs c* and c* vs official/c* vs WETH).
|
||||
|
||||
### 1.5 Allowlist sync with mesh (MCP/AI)
|
||||
|
||||
|
||||
@@ -71,19 +71,32 @@ forge script script/DeployTransactionMirror.s.sol:DeployTransactionMirror \
|
||||
|
||||
- Save the logged TransactionMirror address to `smom-dbis-138/.env` as `TRANSACTION_MIRROR_ADDRESS`.
|
||||
|
||||
### Step 2: Create PMM pools (cUSDT/cUSDC, cUSDT/USDT, cUSDC/USDC)
|
||||
### Step 2: Create PMM pools (mesh-first; legacy three as minimum)
|
||||
|
||||
Use **Core RPC only** (no Public fallback). Either use the combined script (Step 2a) or run each pool script (Step 2b).
|
||||
Use **Core RPC only** (no Public fallback). Preferred is full mesh creation; use legacy three-pool flow as minimum fallback.
|
||||
|
||||
**2a) Combined (TransactionMirror + cUSDT/cUSDC pool only):**
|
||||
**2a) Preferred — full mesh on Chain 138:**
|
||||
|
||||
```bash
|
||||
cd smom-dbis-138
|
||||
# Creates c* vs c*; optional c* vs official USDT/USDC; optional c* vs WETH; optional official vs WETH.
|
||||
./scripts/create-pmm-full-mesh-chain138.sh
|
||||
|
||||
# Optional flags:
|
||||
# MESH_ONLY_C_STAR=1
|
||||
# MESH_INCLUDE_WETH=0
|
||||
# MESH_INCLUDE_OFFICIAL_WETH=0
|
||||
```
|
||||
|
||||
**2b) Combined (TransactionMirror + cUSDT/cUSDC pool only):**
|
||||
|
||||
```bash
|
||||
./scripts/deployment/deploy-transaction-mirror-and-pmm-pool-after-txpool-clear.sh
|
||||
```
|
||||
|
||||
This deploys TransactionMirror then creates **only** the cUSDT/cUSDC pool. For the other two pools use 2b.
|
||||
This deploys TransactionMirror then creates **only** the cUSDT/cUSDC pool. For minimum legacy completion use 2c.
|
||||
|
||||
**2b) Create each pool manually** (e.g. after 2a, or if mirror already deployed):
|
||||
**2c) Create each legacy pool manually** (e.g. after 2b, or if mirror already deployed):
|
||||
|
||||
```bash
|
||||
cd smom-dbis-138
|
||||
@@ -118,7 +131,7 @@ forge script script/liquidity/DeployDODOPMMProvider.s.sol:DeployDODOPMMProvider
|
||||
--rpc-url "$RPC_URL_138" --broadcast --private-key "$PRIVATE_KEY" --with-gas-price "$GAS_PRICE"
|
||||
```
|
||||
|
||||
Save the logged address as `DODO_PMM_PROVIDER_ADDRESS` in `.env`. Then, for each pool (cUSDT/cUSDC, cUSDT/USDT, cUSDC/USDC), call:
|
||||
Save the logged address as `DODO_PMM_PROVIDER_ADDRESS` in `.env`. Then register each created pool (legacy three at minimum, full mesh when used):
|
||||
|
||||
```solidity
|
||||
provider.registerPool(tokenIn, tokenOut, poolAddress);
|
||||
@@ -147,7 +160,7 @@ After any new deployment:
|
||||
./scripts/verify/check-contracts-on-chain-138.sh [RPC_URL]
|
||||
```
|
||||
|
||||
Target: all expected addresses (e.g. 38/38 when TransactionMirror and DODO cUSDT/cUSDC pool are present). Update [REQUIRED_FIXES_AND_DEPLOYMENTS_STATUS.md](REQUIRED_FIXES_AND_DEPLOYMENTS_STATUS.md) and [CONTRACT_ADDRESSES_REFERENCE.md](../11-references/CONTRACT_ADDRESSES_REFERENCE.md) with new pool and provider addresses.
|
||||
Target: all expected addresses (e.g. 59/59 per check-contracts-on-chain-138.sh when TransactionMirror, DODO pools, vault/reserve, and CompliantFiatTokens are present). Update [REQUIRED_FIXES_AND_DEPLOYMENTS_STATUS.md](REQUIRED_FIXES_AND_DEPLOYMENTS_STATUS.md) and [CONTRACT_ADDRESSES_REFERENCE.md](../11-references/CONTRACT_ADDRESSES_REFERENCE.md) with new pool and provider addresses.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
**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).
|
||||
|
||||
**Routing context:** [routing-matrix-13x13.json](../../smom-dbis-138/real-robinhood/data/routing-matrix-13x13.json) — 138↔Celo (42220) **B/SBS** (CCIP bridges deployed 2026-03-04); 138↔Wemix (1111) **TBD** (deployer needs 0.4 WEMIX). Full coverage = all 13 chains with bridge + liquidity where designed.
|
||||
**Routing context:** [routing-matrix-13x13.json](../../smom-dbis-138/real-robinhood/data/routing-matrix-13x13.json) — 138↔Celo (42220) **B/SBS** (CCIP bridges deployed 2026-03-04); 138↔Wemix (1111) **Tabled** (see below). Full coverage = all 13 chains with bridge + liquidity where designed.
|
||||
|
||||
**Wemix (1111) tabled:** There is no in-repo route (aggregator/DEX integration) to swap ETH, BNB, or Polygon to WEMIX. Deployer needs ~0.4 WEMIX for gas to deploy CCIP bridges on Wemix. Until an automated route exists or WEMIX is acquired manually (e.g. [SwapSpace](https://swapspace.co/exchange-pairs/wemix-bnb), [ChangeNOW](https://changenow.io/currencies/wemix-main/polygon-matic)), **all Wemix network deployments are tabled**. See [WEMIX_ACQUISITION_TABLED.md](WEMIX_ACQUISITION_TABLED.md).
|
||||
|
||||
---
|
||||
|
||||
@@ -11,12 +13,13 @@
|
||||
|
||||
| Phase | Step | Status | Notes |
|
||||
|-------|------|--------|-------|
|
||||
| A | A.1 Mint cUSDT/cUSDC (138) | ⚠️ Blocked | Mint script now uses `GAS_PRICE_138`; with 500 gwei first tx accepted but confirmation times out while block production is stalled. When blocks advance, run `mint-for-liquidity.sh` (use `GAS_PRICE_138=500000000000` if “Replacement transaction underpriced”). |
|
||||
| A | A.2 Add liquidity PMM (138) | ⏳ Pending | After A.1 succeeds; run `mint-for-liquidity.sh --add-liquidity` or AddLiquidityPMMPoolsChain138. |
|
||||
| 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. |
|
||||
| B | B.1 Celo CCIP bridges | ✅ Done | Deployed; 0xD3AD6831aacB5386B8A25BB8D8176a6C8a026f04 (WETH9), 0xa4B9DD039565AeD9641D45b57061f99d9cA6Df08 (WETH10); .env updated; complete-config Celo→138 OK. |
|
||||
| B | B.2 Wemix CCIP bridges | ⏳ Blocked | Deployer 0 WEMIX; need 0.4 WEMIX then run `deploy-bridges-config-ready-chains.sh wemix`. |
|
||||
| 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). |
|
||||
| B | **Gnosis CCIP bridges** | ✅ Done (2026-03-04) | Deployed: WETH9 `0x4ab39b5BaB7b463435209A9039bd40Cf241F5a82`, WETH10 `0xC15ACdBAC59B3C7Cb4Ea4B3D58334A4b143B4b44`; .env updated. |
|
||||
| B | B.3 Fund CCIP with LINK | ⏳ Ready | Run `fund-ccip-bridges-with-link.sh` (dry-run done). |
|
||||
| B | B.3 Fund CCIP with LINK | ⏳ Blocked | `scripts/deployment/fund-ccip-bridges-with-link.sh` run (2026-03-04): many lanes failing with insufficient LINK or gas, Chain 138 Invalid params; top up LINK balances and gas on each chain before retry. |
|
||||
| C | C.1–C.2 cW* + edge pools | 📋 Runbook | [PHASE_C_CW_AND_EDGE_POOLS_RUNBOOK.md](PHASE_C_CW_AND_EDGE_POOLS_RUNBOOK.md). |
|
||||
| D | D.1–D.4 Optional XAU/vaults/trustless | 📋 Checklist | [PHASE_D_OPTIONAL_CHECKLIST.md](PHASE_D_OPTIONAL_CHECKLIST.md). |
|
||||
|
||||
@@ -41,9 +44,9 @@
|
||||
|
||||
| Area | Status |
|
||||
|------|--------|
|
||||
| Chain 138 core + PMM | 38/38 contracts; DODOPMMIntegration + 3 pools (cUSDT/cUSDC, cUSDT/USDT, cUSDC/USDC) created; DODOPMMProvider deployed. |
|
||||
| Chain 138 liquidity | **0** in pools — deployer WETH/cUSDT/cUSDC = 0; add liquidity blocked until mint/fund. |
|
||||
| CCIP 138 → 1, 56, 137, 10, 42161, 43114, 8453, 100, 25, **42220 (Celo)** | Configured (B/SBS). Celo CCIP bridges deployed 2026-03-04; Gnosis, Cronos config-ready; Wemix (1111) **TBD** (need 0.4 WEMIX). |
|
||||
| Chain 138 core + PMM | 59/59 contracts (check-contracts-on-chain-138.sh); DODOPMMIntegration + 3 pools (cUSDT/cUSDC, cUSDT/USDT, cUSDC/USDC) created; DODOPMMProvider deployed. |
|
||||
| Chain 138 liquidity | **Re-verify required** — prior run reported cUSDT/cUSDC liquidity add; this checklist previously showed zero liquidity. Treat liquidity state as unknown until reconfirmed on-chain. |
|
||||
| CCIP 138 → 1, 56, 137, 10, 42161, 43114, 8453, 100, 25, **42220 (Celo)** | Configured (B/SBS). Celo CCIP bridges deployed 2026-03-04; Gnosis, Cronos config-ready; Wemix (1111) **Tabled** (no ETH/BNB/POLY→WEMIX route; see [WEMIX_ACQUISITION_TABLED.md](WEMIX_ACQUISITION_TABLED.md)). |
|
||||
| Alltra 138 ↔ 651940 | ALT path live. |
|
||||
| cW* on public chains | Addresses in .env / design; **deployment-status.json empty** — no cW* pool addresses. |
|
||||
| LINK for CCIP | Fund bridges per lane so cross-chain messages execute. |
|
||||
|
||||
@@ -19,7 +19,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:** **38 present, 0 missing** (38 addresses). 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`. 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).
|
||||
|
||||
---
|
||||
|
||||
@@ -39,4 +39,4 @@
|
||||
1. Optional: `./scripts/clear-all-transaction-pools.sh` then wait 60s if nonce stuck.
|
||||
2. `./scripts/deployment/deploy-transaction-mirror-and-pmm-pool-after-txpool-clear.sh` (Core RPC only; checks nonce, RPC, gas; deploys mirror then pool).
|
||||
3. Set `TRANSACTION_MIRROR_ADDRESS` in `smom-dbis-138/.env` to the logged address.
|
||||
4. `./scripts/verify/check-contracts-on-chain-138.sh` (pass Core RPC URL or use RPC_URL_138) — target 38 present when both confirmed.
|
||||
4. `./scripts/verify/check-contracts-on-chain-138.sh` (pass Core RPC URL or use RPC_URL_138) — target 59 present when both confirmed (run check-contracts-on-chain-138.sh).
|
||||
|
||||
@@ -85,7 +85,7 @@ This checklist covers: **testing** anything not yet deployed, **checking deploye
|
||||
- [ ] **4.3** **TransactionMirror (Chain 138):** Deploy with `forge script script/DeployTransactionMirror.s.sol:DeployTransactionMirror --rpc-url $RPC_URL_138 --broadcast --private-key $PRIVATE_KEY --with-gas-price 1000000000`. If you see "Known transaction", the tx may be pending or already mined; check code at the logged address. Then test mirror receive path.
|
||||
- [ ] **4.4** **EnhancedSwapRouter:** Not deployed. When Uniswap/Balancer pools exist on 138, run deploy script with `--dry-run` and test quote path.
|
||||
- [ ] **4.5** **cW* tokens and PMM pools on public chains (1, 56, 137, etc.):** No addresses in deployment-status. No deployment from this repo yet. When you have a deployment path (bridge + factory or DODO), run gas estimate and dry-run per chain.
|
||||
- [x] **4.6** **On-chain verification (38 addresses):** After any new deployment, run:
|
||||
- [x] **4.6** **On-chain verification (59 addresses; check-contracts-on-chain-138.sh):** After any new deployment, run:
|
||||
```bash
|
||||
./scripts/verify/check-contracts-on-chain-138.sh [RPC_URL]
|
||||
```
|
||||
|
||||
37
docs/03-deployment/WEMIX_ACQUISITION_TABLED.md
Normal file
37
docs/03-deployment/WEMIX_ACQUISITION_TABLED.md
Normal file
@@ -0,0 +1,37 @@
|
||||
# Wemix (1111) deployments — tabled
|
||||
|
||||
**Last Updated:** 2026-03-06
|
||||
**Status:** All Wemix network deployments (CCIP bridges, config, LINK funding on 1111) are **tabled** until the deployer can acquire WEMIX for gas.
|
||||
|
||||
---
|
||||
|
||||
## Reason
|
||||
|
||||
- Deployer needs **~0.4 WEMIX** (native gas) on chain 1111 to deploy and configure CCIP bridges.
|
||||
- There is **no in-repo route** (aggregator/DEX integration or script) to swap **ETH**, **BNB**, or **Polygon (POL)** to WEMIX.
|
||||
- [TOKENS_AND_NETWORKS_MINTABLE_TO_DEPLOYER](../11-references/TOKENS_AND_NETWORKS_MINTABLE_TO_DEPLOYER.md) lists Wemix as “Bridge/DEX” only — i.e. manual acquisition.
|
||||
|
||||
---
|
||||
|
||||
## Options to un-table
|
||||
|
||||
1. **Manual acquisition:** Use a third-party aggregator (e.g. [SwapSpace](https://swapspace.co/exchange-pairs/wemix-bnb), [ChangeNOW](https://changenow.io/currencies/wemix-main/polygon-matic)) to swap ETH/BNB/POL to WEMIX and send to the deployer address on 1111. Then run `deploy-bridges-config-ready-chains.sh wemix` and complete-config.
|
||||
2. **In-repo route:** Implement or integrate an aggregator/DEX route (e.g. LiFi, Jumper, or chain 1111 DEX) that can swap ETH/BNB/POLY → WEMIX and credit the deployer; then document and run the same deploy/config steps. Placeholder script: `scripts/deployment/wemix-acquire-via-lifi.js` (outputs manual instructions and deployer address; extend when LiFi/Jumper support 1111).
|
||||
|
||||
**Deployer gas auto-route:** The orchestrator `./scripts/deployment/deployer-gas-auto-route.sh` includes Wemix (1111): when run, it prints manual instructions and links for WEMIX acquisition. See [DEPLOYER_GAS_AUTO_ROUTE_RUNBOOK.md](DEPLOYER_GAS_AUTO_ROUTE_RUNBOOK.md).
|
||||
|
||||
---
|
||||
|
||||
## What remains tabled
|
||||
|
||||
- B.2 Wemix CCIP bridges (`deploy-bridges-config-ready-chains.sh wemix`, complete-config 138↔1111).
|
||||
- Any Phase C/D work that depends on Wemix (cW* or edge pools on 1111).
|
||||
- Wemix token verification and production use until bridges are deployed.
|
||||
|
||||
---
|
||||
|
||||
## References
|
||||
|
||||
- [REMAINING_DEPLOYMENTS_FOR_FULL_NETWORK_COVERAGE.md](REMAINING_DEPLOYMENTS_FOR_FULL_NETWORK_COVERAGE.md) — Phase B.2, routing context.
|
||||
- [CONFIG_READY_CHAINS_COMPLETION_RUNBOOK](../07-ccip/CONFIG_READY_CHAINS_COMPLETION_RUNBOOK.md) — steps when Wemix is un-tabled.
|
||||
- [WEMIX_TOKEN_VERIFICATION.md](../07-ccip/WEMIX_TOKEN_VERIFICATION.md) — token addresses on scan.wemix.com.
|
||||
Reference in New Issue
Block a user