# CCIP Integration Quick Start

## Installation

```bash
# Install main dependencies
npm install

# Install watcher dependencies
cd watcher && npm install && cd ..
```

## Configuration

Add to `.env`:

```env
# Ethereum Mainnet
ETHEREUM_MAINNET_RPC=https://mainnet.infura.io/v3/YOUR_KEY
ETHERSCAN_API_KEY=your_key
CCIP_ETH_ROUTER=0x80226fc0Ee2b096224EeAc085Bb9a8cba1146f7D
ETH_MAINNET_SELECTOR=0x500147

# Chain-138
CHAIN138_RPC_URL=https://rpc.d-bis.org
CCIP_CHAIN138_ROUTER=<router-address>
CHAIN138_SELECTOR=0x000000000000008a

# Deployment
PRIVATE_KEY=0x...
```

## Deploy

```bash
# 1. Deploy CCIPLogger to Ethereum Mainnet
npm run deploy:logger:mainnet

# 2. Point the flow at the historical Chain-138 reporter
export CHAIN138_CCIP_REPORTER=0x...

# 3. Start watcher
cd watcher && npm start
```

## Verify

```bash
# Check events on Ethereum
cast logs --from-block latest "RemoteTxLogged(uint64,bytes32,address,address,uint256,bytes)" --rpc-url $ETHEREUM_MAINNET_RPC
```
