Files
smom-dbis-138/docs/deployment/PREREQUISITES.md
2026-03-02 12:14:09 -08:00

69 lines
2.2 KiB
Markdown

# Prerequisites for LINK Funding, PMM, and CCIPLogger
Complete these **before** running the three operator task scripts.
---
## 1. Environment
- **`.env`** in `smom-dbis-138` with at least:
- `PRIVATE_KEY` — deployer key (with gas on each chain and LINK where needed).
- `RPC_URL_138` — Chain 138 RPC.
- Per-chain RPC and CCIP vars (see runbook and `.env.example`).
**Check:** Run `scripts/deployment/ensure-prerequisites.sh` to validate and fix what can be automated.
---
## 2. Dependencies (for CCIPLogger)
- From **`smom-dbis-138`** run:
```bash
npm install --legacy-peer-deps
```
so Hardhat is available in `smom-dbis-138/node_modules`.
- If Hardhat compile fails (e.g. missing `@emoney/interfaces`), either:
- Install the missing package if it exists, or
- Skip CCIPLogger (optional) or use a Foundry-only workflow.
---
## 3. LINK funding
- **Requirement:** Deployer must hold **LINK** on each chain where you fund bridges (Chain 138, Ethereum, BSC, Polygon, Base, Optimism, Arbitrum, Avalanche, Cronos, Gnosis).
- **.env:** Bridge and LINK token vars are already set from deployment; no extra prereq except balance.
- **Script:** `scripts/deployment/fund-ccip-bridges-with-link.sh` (use `DRY_RUN=1` first).
---
## 4. PMM (Chain 138)
- **Requirement:** A **DODO Vending Machine (DVM) factory** address on Chain 138.
- DODO does not list Chain 138; use your own deployment or an existing DVM if available.
- **.env:** Set:
- `DODO_VENDING_MACHINE_ADDRESS` — DVM factory on Chain 138.
- `OFFICIAL_USDT_ADDRESS`, `OFFICIAL_USDC_ADDRESS` — official or wrapped USDT/USDC on Chain 138 (already have placeholders).
- `COMPLIANT_USDT_ADDRESS`, `COMPLIANT_USDC_ADDRESS` — already set.
- **Script:** `scripts/deployment/run-pmm-and-pools.sh`.
---
## 5. CCIPLogger (optional)
- **Requirement:** Node/npm and Hardhat in `smom-dbis-138` (see §2).
- **.env:** `PRIVATE_KEY` and per-chain RPC (Hardhat reads `.env`).
- **Script:** `scripts/deployment/deploy-ccip-logger-all-chains.sh` (run from `smom-dbis-138`).
---
## One-shot check
From `smom-dbis-138`:
```bash
./scripts/deployment/ensure-prerequisites.sh
```
Then run each task script as needed (LINK funding, PMM, CCIPLogger).