- 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
11 KiB
Undeployed Contracts — Pre-Deployment Tasks
Last Updated: 2026-02-28
Execution summary (2026-02-27): On-chain verification 36/38. Two missing: TransactionMirror (set TRANSACTION_MIRROR_ADDRESS in .env from script output) and DODO cUSDT/cUSDC pool (0x9fcB...). Deploy uses Core RPC only. Before deploy: if Core was read-only, run ./scripts/maintenance/make-rpc-vmids-writable-via-ssh.sh then ./scripts/maintenance/health-check-rpc-2101.sh. See REQUIRED_FIXES_AND_DEPLOYMENTS_STATUS.md, RPC_2101_READONLY_FIX.md.
Execution summary (2026-02-26): All runnable tasks executed. Env check, unified deploy dry-run, PMM pool dry-run, on-chain verification (36/36), deploy-optional-future-all --dry-run, fund-ccip-bridges-with-link --dry-run, check-balances-gas-and-deploy.sh, get-multichain-gas-prices.sh all completed. Mainnet dry-run and TransactionMirror simulate started (mainnet compiles CCIP bridges; run to completion when mainnet RPC is responsive). Previous: 1.x wallet/gas, 2.x gas API and estimates, 3.1 unified deploy dry-run (RPC + init fixes in smom-dbis-138), 3.2 DeployDeterministicCore simulated, 3.3 PMM pool script dry-run, 3.4 TransactionMirror, 3.6 optional-future, 3.7 fund-ccip dry-run, 4.6 on-chain verification (36/36). Optional env vars added to smom-dbis-138/.env when missing: DODO_PMM_INTEGRATION_ADDRESS, QUOTE_TOKEN_ADDRESS, WETH_ADDRESS_138 (public addresses only). PMM and unified deploy dry-runs now work with .env only (no inline env). Remaining: 3.5 mainnet dry-run (run when mainnet RPC is reachable); 4.1–4.5 post-deploy validation when components are deployed.
Source: AI_AGENTS_57XX_MCP_CONTRACTS_AND_CHAINS.md, DEX_AND_CROSS_CHAIN_CONTRACTS_NEEDED.md, DEPLOYED_CONTRACTS_OVERVIEW, deployment-status.json
This checklist covers: testing anything not yet deployed, checking deployer wallet gas, using the gas API to estimate deployment costs, and dry-running deployments before live execution.
Optional env vars (add/set when needed): In smom-dbis-138/.env, if missing, add (public addresses only): DODO_PMM_INTEGRATION_ADDRESS=0x79cdbaFBaA0FdF9F55D26F360F54cddE5c743F7D, QUOTE_TOKEN_ADDRESS=0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2, WETH_ADDRESS_138=0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 so PMM pool script and dry-runs work with .env only. Check: ./scripts/deployment/check-env-required.sh.
1. Check deployer wallet for gas
- 1.1 Resolve deployer address from env:
cd smom-dbis-138 && cast wallet address $PRIVATE_KEY - 1.2 Run balance check (Chain 138 + all networks the script supports):
Uses Infura/gas API where available; reports native token balance and estimated cost for 5M gas per chain. See FUNDING_AND_DEPLOYMENT_CHECKLIST.
cd smom-dbis-138 ./scripts/deployment/check-balances-gas-and-deploy.sh - 1.3 Chain 138: ensure deployer has at least ~0.006 ETH (5M gas × 1 gwei + buffer). Recommended 1–2 ETH. If balance is 0, fund from genesis alloc or validator (see FUNDING_AND_DEPLOYMENT_CHECKLIST §2).
- 1.4 Mainnet / L2: ensure deployer has sufficient native token per chain for any planned deployments (see DEPLOYMENT_GAS_COSTS_REALTIME for recommended balances).
2. Use gas API to estimate all deployment costs
- 2.1 Fetch current gas prices (Etherscan for mainnet, defaults/RPC for others):
Output can be sourced or used to update cost estimates.
cd smom-dbis-138 ./scripts/deployment/get-multichain-gas-prices.sh - 2.2 (Optional) Update doc with latest estimates:
Updates DEPLOYMENT_GAS_COSTS_REALTIME (or script’s target doc).
./scripts/deployment/update-gas-estimates.sh - 2.3 Estimate gas for undeployed items (by chain): TransactionMirror simulated via
forge script(no broadcast); DeployDeterministicCore reported ~10.67M gas. For pool creation usecast estimateon DODOPMMIntegration withcreateCUSDTCUSDCPool/createPoolargs when ready. EnhancedSwapRouter/DODOPMMProvider: run script dry-run when implemented. - 2.4 Sum estimated cost per chain and confirm deployer balance ≥ sum + buffer (e.g. 20–30%): Confirmed via check-balances-gas-and-deploy.sh; Chain 138 sufficient; mainnet/L2 need funding for full deploy.
3. Dry-run deployments
- 3.1 Chain 138 — unified deploy (no broadcast): Run
./scripts/deployment/deploy-contracts-unified.sh --dry-run --rpc-url $RPC_URL_138. RPC check uses 10s timeout; init.sh LOG_LEVEL fix applied so script runs with .env loaded.cd smom-dbis-138 ./scripts/deployment/deploy-contracts-unified.sh --dry-run --rpc-url "http://192.168.11.211:8545" - 3.2 Chain 138 — phased core (dry-run if script supports): Simulated
forge script script/deploy/DeployDeterministicCore.s.sol --rpc-url $RPC_URL_138(no--broadcast); script ran successfully with gas estimate.forge script script/deploy/DeployDeterministicCore.s.sol --rpc-url $RPC_URL_138 - 3.3 Chain 138 — PMM pool creation (dry-run): Set
DODO_PMM_INTEGRATION_ADDRESSandQUOTE_TOKEN_ADDRESS(e.g. WETH0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2), then runDRY_RUN=true CHAIN_ID=138 ./scripts/create-all-dodo-pools-from-token-api.sh. Script acceptsDODO_PMM_INTEGRATIONorDODO_PMM_INTEGRATION_ADDRESS. With Token API unavailable it reports "Pools created: 0"; with API running it would list tokens and log[DRY RUN] Would createPool .... Document: DODO_PMM_INTEGRATION, DODO_PMM_NEXT_STEPS. - 3.4 Chain 138 — TransactionMirror (optional): Run without
--broadcastto simulate:forge script script/DeployTransactionMirror.s.sol:DeployTransactionMirror --rpc-url $RPC_URL_138. See CONTRACT_DEPLOYMENT_RUNBOOK § TransactionMirror. - 3.5 Mainnet — dry-run (if deploying anything new): Requires
PRIVATE_KEY,ETHEREUM_MAINNET_RPCin .env. Run from environment with mainnet RPC access. Script validates tools, env, addresses, and compiles CCIP bridges.Or per-script:./scripts/deployment/dry-run-mainnet-deployment.shforge script script/... --rpc-url $MAINNET_RPC --dry-run. - 3.6 Optional/future deployments (dry-run only):
cd smom-dbis-138 ./scripts/deployment/deploy-optional-future-all.sh --dry-run - 3.7 Bridge/LINK funding (dry-run):
./scripts/deployment/fund-ccip-bridges-with-link.sh --link 10 --dry-run
4. Test anything not deployed (validation / unit / script)
- 4.1 PMM pools (Chain 138): Create cUSDT/cUSDC pool with
forge script script/dex/CreateCUSDTCUSDCPool.s.sol:CreateCUSDTCUSDCPool --rpc-url $RPC_URL_138 --broadcast --private-key $PRIVATE_KEY --with-gas-price 1000000000(script:smom-dbis-138/script/dex/CreateCUSDTCUSDCPool.s.sol). Requires POOL_MANAGER_ROLE on DODOPMMIntegration. If you see "Replacement transaction underpriced", a tx is pending at that nonce; wait for it to be mined or clear mempool, then retry with same or higher gas. After creation, test:getMidPrice,getOraclePrice,getBaseReserve,getQuoteReserveon pool address; confirm MCPdodo.get_pool_stateanddodo.identify_pool_interfacework with that address in allowlist. - 4.2 DODOPMMProvider: Not deployed; implementation placeholder. When implemented, add unit tests and a script dry-run for deployment.
- 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-runand 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.
- 4.6 On-chain verification (59 addresses; check-contracts-on-chain-138.sh): After any new deployment, run:
Includes TransactionMirror and DODO cUSDT/cUSDC pool in the list. Last run: 36 present, 2 missing; see REQUIRED_FIXES_AND_DEPLOYMENTS_STATUS.
./scripts/verify/check-contracts-on-chain-138.sh [RPC_URL]
5. Summary — undeployed items (for cost and dry-run scope)
| Chain | Item | Action for estimate / dry-run |
|---|---|---|
| 138 | PMM pools (cUSDT/cUSDC, cUSDT/USDT, cUSDC/USDC) | Estimate: createPool / createCUSDTCUSDCPool gas. Dry-run: pool-creation script or cast send --dry-run. |
| 138 | TransactionMirror | forge script or forge create with --dry-run / cast estimate. |
| 138 | DODOPMMProvider | When implemented: script dry-run + unit tests. |
| 138 | EnhancedSwapRouter | When pools exist: script dry-run. |
| 1 | (Trustless stack deployed; no new DODO from repo) | Gas estimate only if adding contracts. |
| 56, 137, 10, 100, 25, 42161, 8453, 42220, 1111, 43114 | cW* tokens, PMM pools | When deployment path exists: per-chain gas estimate + deploy script dry-run. |
6. References
- CONTRACT_DEPLOYMENT_RUNBOOK — Chain 138 gas price, RPC, TransactionMirror.
- FUNDING_AND_DEPLOYMENT_CHECKLIST — Balance check, funding sources.
- DEPLOYMENT_GAS_COSTS_REALTIME — Gas API, cost table.
- check-balances-gas-and-deploy.sh — Balance + gas report.
- get-multichain-gas-prices.sh — Gas prices for cost estimates.
- TODO_TASK_LIST_MASTER § Undeployed contracts pre-deployment — Master checklist link.