# CCIP ChainID 138 - Quick Reference

**Status**: ⚠️ **NOT FULLY ENABLED** - Deployment Required

---

## 🎯 Quick Status

| Component | Status | Action Required |
|-----------|--------|-----------------|
| **CCIP Router** | ❌ Not Deployed | Deploy `CCIPRouter` contract |
| **LINK Token** | ❌ Not Deployed | Deploy LINK or use native ETH |
| **CCIP Chain Selector** | ✅ Calculated | `138` (or `0x000000000000008a`) |
| **CCIPWETH9Bridge** | ❌ Not Deployed | Deploy bridge contract |
| **CCIPWETH10Bridge** | ❌ Not Deployed | Deploy bridge contract |
| **WETH9** | ✅ Pre-deployed | Already in genesis |
| **WETH10** | ✅ Pre-deployed | Already in genesis |

---

## 📋 Deployment Order

1. **Calculate CCIP Chain Selector** (✅ Script ready)
2. **Deploy CCIPRouter** (or use native ETH fees)
3. **Deploy LINK Token** (optional - can use native ETH)
4. **Deploy CCIPWETH9Bridge**
5. **Deploy CCIPWETH10Bridge**
6. **Configure Bridges** with destination chains

**Or use the complete deployment script:**
```bash
./scripts/deployment/deploy-ccip-chain138-complete.sh
```

---

## 🚀 Quick Deployment Commands

### 1. Deploy CCIPRouter

```bash
# Set environment variables
export CCIP_FEE_TOKEN=0x0000000000000000000000000000000000000000  # Use native ETH
export CCIP_BASE_FEE=1000000000000000  # 0.001 ETH
export CCIP_DATA_FEE_PER_BYTE=100000000  # 0.1 gwei per byte

# Deploy
forge script script/DeployCCIPRouter.s.sol \
  --rpc-url $RPC_URL_138 \
  --broadcast \
  --private-key $PRIVATE_KEY
```

### 2. Deploy CCIPWETH9Bridge

```bash
# Set environment variables
export CCIP_ROUTER=<deployed_router_address>
export CCIP_FEE_TOKEN=0x0000000000000000000000000000000000000000  # Or LINK address

# Deploy
forge script script/DeployCCIPWETH9Bridge.s.sol \
  --rpc-url $RPC_URL_138 \
  --broadcast \
  --private-key $PRIVATE_KEY
```

### 3. Deploy CCIPWETH10Bridge

```bash
# Set environment variables (same as above)
export CCIP_ROUTER=<deployed_router_address>
export CCIP_FEE_TOKEN=0x0000000000000000000000000000000000000000

# Deploy
forge script script/DeployCCIPWETH10Bridge.s.sol \
  --rpc-url $RPC_URL_138 \
  --broadcast \
  --private-key $PRIVATE_KEY
```

---

## ⚙️ Configuration

### Update Environment Variables

After deployment, update `.env`:

```bash
# CCIP Infrastructure
CCIP_CHAIN138_ROUTER=<deployed_router_address>
CCIP_CHAIN138_LINK_TOKEN=<link_address_or_zero>
CHAIN138_SELECTOR=<calculated_selector>

# Bridges
CCIPWETH9_BRIDGE_CHAIN138=<deployed_bridge_address>
CCIPWETH10_BRIDGE_CHAIN138=<deployed_bridge_address>
```

### Configure Bridge Destinations

```bash
# Add Ethereum Mainnet as destination
cast send $CCIPWETH9_BRIDGE_CHAIN138 \
  "addDestination(uint64,address)" \
  5009297550715157269 \
  $CCIPWETH9_BRIDGE_MAINNET \
  --rpc-url $RPC_URL_138 \
  --private-key $PRIVATE_KEY
```

---

## 📚 Full Documentation

- **Complete Review**: [`docs/CCIP_CHAIN138_REVIEW.md`](CCIP_CHAIN138_REVIEW.md)
- **Implementation Summary**: [`docs/ccip/IMPLEMENTATION_SUMMARY.md`](ccip/IMPLEMENTATION_SUMMARY.md)
- **Deployment Guide**: [`docs/ccip/DEPLOYMENT_GUIDE_CHAIN138.md`](ccip/DEPLOYMENT_GUIDE_CHAIN138.md)
- **Chain Selector**: [`docs/ccip/CHAIN_SELECTOR_CALCULATION.md`](ccip/CHAIN_SELECTOR_CALCULATION.md)
- **Main Guide**: [`docs/ETH_WETH_CHAINLINK_GUIDE.md`](ETH_WETH_CHAINLINK_GUIDE.md)

---

**Last Updated**: 2025-01-27

