# Contracts to Deploy - Complete List **Last Updated**: 2025-12-11 **Deployment Script**: `script/DeployAll.s.sol` --- ## 📋 Contracts by Chain ### Ethereum Mainnet (Chain ID: 1) **Status**: Most contracts already deployed, only missing CCIPLogger | Contract | Status | Gas Estimate | Notes | |----------|--------|--------------|-------| | **WETH9** | ✅ Already Deployed | N/A | Using existing: `WETH9_MAINNET` from `.env` | | **WETH10** | ✅ Already Deployed | N/A | Using existing: `WETH10_MAINNET` from `.env` | | **CCIPWETH9Bridge** | ✅ Already Deployed | N/A | Already deployed on Mainnet | | **CCIPWETH10Bridge** | ✅ Already Deployed | N/A | Already deployed on Mainnet | | **CCIPLogger** | ❌ **TO DEPLOY** | ~3,000,000 gas | **Only contract to deploy** | **Total Gas for Mainnet**: ~3,000,000 units (CCIPLogger only) --- ### Cronos (Chain ID: 25) **Status**: Full deployment required | Contract | Status | Gas Estimate | Notes | |----------|--------|--------------|-------| | **WETH9** | ❌ **TO DEPLOY** | ~1,460,000 gas | Deploy new or use existing if configured | | **WETH10** | ❌ **TO DEPLOY** | ~1,460,000 gas | Deploy new or use existing if configured | | **CCIPWETH9Bridge** | ❌ **TO DEPLOY** | ~1,460,000 gas | Requires WETH9 address | | **CCIPWETH10Bridge** | ❌ **TO DEPLOY** | ~1,460,000 gas | Requires WETH10 address | | **CCIPLogger** | ❌ **TO DEPLOY** | ~2,920,000 gas | Requires CCIP router config | **Total Gas for Cronos**: ~8,760,000 units (all 5 contracts) --- ### BSC - Binance Smart Chain (Chain ID: 56) **Status**: Full deployment required | Contract | Status | Gas Estimate | Notes | |----------|--------|--------------|-------| | **WETH9** | ❌ **TO DEPLOY** | ~1,460,000 gas | Deploy new or use existing if configured | | **WETH10** | ❌ **TO DEPLOY** | ~1,460,000 gas | Deploy new or use existing if configured | | **CCIPWETH9Bridge** | ❌ **TO DEPLOY** | ~1,460,000 gas | Requires WETH9 address | | **CCIPWETH10Bridge** | ❌ **TO DEPLOY** | ~1,460,000 gas | Requires WETH10 address | | **CCIPLogger** | ❌ **TO DEPLOY** | ~2,920,000 gas | Requires CCIP router config | **Total Gas for BSC**: ~8,760,000 units (all 5 contracts) --- ### Polygon PoS (Chain ID: 137) **Status**: Full deployment required | Contract | Status | Gas Estimate | Notes | |----------|--------|--------------|-------| | **WETH9** | ❌ **TO DEPLOY** | ~1,460,000 gas | Deploy new or use existing if configured | | **WETH10** | ❌ **TO DEPLOY** | ~1,460,000 gas | Deploy new or use existing if configured | | **CCIPWETH9Bridge** | ❌ **TO DEPLOY** | ~1,460,000 gas | Requires WETH9 address | | **CCIPWETH10Bridge** | ❌ **TO DEPLOY** | ~1,460,000 gas | Requires WETH10 address | | **CCIPLogger** | ❌ **TO DEPLOY** | ~2,920,000 gas | Requires CCIP router config | **Total Gas for Polygon**: ~8,760,000 units (all 5 contracts) --- ### Gnosis Chain (Chain ID: 100) **Status**: Full deployment required | Contract | Status | Gas Estimate | Notes | |----------|--------|--------------|-------| | **WETH9** | ❌ **TO DEPLOY** | ~1,460,000 gas | Deploy new or use existing if configured | | **WETH10** | ❌ **TO DEPLOY** | ~1,460,000 gas | Deploy new or use existing if configured | | **CCIPWETH9Bridge** | ❌ **TO DEPLOY** | ~1,460,000 gas | Requires WETH9 address | | **CCIPWETH10Bridge** | ❌ **TO DEPLOY** | ~1,460,000 gas | Requires WETH10 address | | **CCIPLogger** | ❌ **TO DEPLOY** | ~2,920,000 gas | Requires CCIP router config | **Total Gas for Gnosis**: ~8,760,000 units (all 5 contracts) --- ## 📊 Deployment Summary ### Total Contracts to Deploy | Chain | Contracts to Deploy | Total Gas Units | |-------|---------------------|-----------------| | **Ethereum Mainnet** | 1 (CCIPLogger only) | 3,000,000 | | **Cronos** | 5 (all contracts) | 8,760,000 | | **BSC** | 5 (all contracts) | 8,760,000 | | **Polygon** | 5 (all contracts) | 8,760,000 | | **Gnosis** | 5 (all contracts) | 8,760,000 | | **TOTAL** | **21 contracts** | **38,040,000 gas** | --- ## 🔄 Deployment Order ### For Ethereum Mainnet: 1. **CCIPLogger** (only contract) ### For Other Chains (Cronos, BSC, Polygon, Gnosis): 1. **WETH9** (if not using existing) 2. **WETH10** (if not using existing) 3. **CCIPWETH9Bridge** (requires WETH9) 4. **CCIPWETH10Bridge** (requires WETH10) 5. **CCIPLogger** (requires CCIP router) --- ## 📝 Contract Dependencies ``` WETH9 ──┐ ├──> CCIPWETH9Bridge WETH10 ─┘ └──> CCIPWETH10Bridge CCIP Router ──> CCIPLogger LINK Token ──> CCIPWETH9Bridge, CCIPWETH10Bridge ``` --- ## 🎯 Deployment Commands ### Ethereum Mainnet (CCIPLogger only) ```bash forge script script/DeployCCIPLoggerOnly.s.sol:DeployCCIPLoggerOnly \ --rpc-url mainnet --chain-id 1 \ --private-key $PRIVATE_KEY --broadcast --verify -vvvv ``` ### Cronos (All contracts) ```bash forge script script/DeployAll.s.sol:DeployAll \ --rpc-url cronos --chain-id 25 \ --private-key $PRIVATE_KEY --broadcast --verify -vvvv ``` ### BSC (All contracts) ```bash forge script script/DeployAll.s.sol:DeployAll \ --rpc-url bsc --chain-id 56 \ --private-key $PRIVATE_KEY --broadcast --verify -vvvv ``` ### Polygon (All contracts) ```bash forge script script/DeployAll.s.sol:DeployAll \ --rpc-url polygon --chain-id 137 \ --private-key $PRIVATE_KEY --broadcast --verify -vvvv ``` ### Gnosis (All contracts) ```bash forge script script/DeployAll.s.sol:DeployAll \ --rpc-url gnosis --chain-id 100 \ --private-key $PRIVATE_KEY --broadcast --verify -vvvv ``` --- ## ⚠️ Important Notes 1. **CCIPLogger**: May require Hardhat/OpenZeppelin dependencies. If Foundry deployment fails, use: ```bash npm run deploy:logger:mainnet ``` 2. **WETH9/WETH10**: Script checks for existing addresses in `.env`. If configured, will use existing instead of deploying new. 3. **CCIP Configuration**: Each chain requires specific CCIP router and LINK token addresses in `.env`. 4. **Gas Estimates**: Based on typical contract sizes. Actual gas may vary. --- **Next Steps**: Check wallet balances and proceed with deployment!