# Mirror, Two-Way, and Related Contracts Search Results

**Date**: 2025-12-11
**Search Scope**: Ethereum Mainnet deployments

---

## 🔍 Search Summary

Searched for the following contracts that may have been deployed to Ethereum Mainnet:
1. **MirrorManager** - Cross-chain mirror registry
2. **TwoWayTokenBridge** (L1 and L2) - Two-way token bridge
3. **Tether-related contracts** - No specific "Tether" contract found

---

## 📋 Contract Status

### ✅ **Deployed and Verified on Mainnet**

| Contract | Address | Status | Etherscan |
|----------|---------|--------|-----------|
| **CCIPWETH9Bridge** | `0x3304b747E565a97ec8AC220b0B6A1f6ffDB837e6` | ✅ **VERIFIED** | [View](https://etherscan.io/address/0x3304b747E565a97ec8AC220b0B6A1f6ffDB837e6) |
| **CCIPWETH10Bridge** | `0x8078A09637e47Fa5Ed34F626046Ea2094a5CDE5e` | ✅ **VERIFIED** | [View](https://etherscan.io/address/0x8078A09637e47Fa5Ed34F626046Ea2094a5CDE5e) |

---

### ⏳ **Not Deployed to Mainnet (But Available in Codebase)**

#### 1. MirrorManager (Kaleido Mirror Pattern)

**Contract Details:**
- **File**: `contracts/mirror/MirrorManager.sol`
- **Purpose**: Registry of mirrored token/contract addresses across chains with replay protection
- **Kaleido Pattern**: ✅ Implements Kaleido's Mirror pattern for address registry
- **Deployment Script**: `script/DeployMirrorManager.s.sol`
- **Status**: ❌ **NOT DEPLOYED** to Mainnet
- **Required Env Var**: `MIRROR_ADMIN` (not set in .env)

**Kaleido Pattern**: In Kaleido's architecture, Mirror contracts maintain address mappings across chains for cross-chain contract resolution.

**Contract Features:**
- Cross-chain address mirroring
- Replay protection
- Pausability
- Admin-controlled

**To Deploy:**
```bash
forge script script/DeployMirrorManager.s.sol \
  --rpc-url $ETH_MAINNET_RPC_URL \
  --private-key $PRIVATE_KEY \
  --broadcast \
  --verify
```

---

#### 2. TwoWayTokenBridgeL1

**Contract Details:**
- **File**: `contracts/bridge/TwoWayTokenBridgeL1.sol`
- **Purpose**: L1/Main chain side - locks canonical tokens and triggers CCIP message to mint on L2
- **Deployment Script**: `script/DeployTwoWayBridge.s.sol`
- **Status**: ❌ **NOT DEPLOYED** to Mainnet
- **Required Env Vars**:
  - `CCIP_ROUTER` (set)
  - `CCIP_FEE_TOKEN` (LINK token address)
  - `BRIDGE_L1_TOKEN` (canonical token on L1) - **NOT SET**

**Contract Features:**
- Token locking on L1
- CCIP message sending
- Destination chain configuration
- Replay protection

---

#### 3. TwoWayTokenBridgeL2

**Contract Details:**
- **File**: `contracts/bridge/TwoWayTokenBridgeL2.sol`
- **Purpose**: L2/secondary chain side - mints mirrored tokens on inbound and burns on outbound
- **Deployment Script**: `script/DeployTwoWayBridge.s.sol` (deploys both L1 and L2)
- **Status**: ❌ **NOT DEPLOYED** to Mainnet
- **Required Env Vars**:
  - `CCIP_ROUTER` (set)
  - `CCIP_FEE_TOKEN` (LINK token address)
  - `BRIDGE_L2_TOKEN` (mintable token on L2) - **NOT SET**

**Contract Features:**
- Token minting on L2
- Token burning on outbound
- CCIP message handling
- Destination chain configuration

**To Deploy:**
```bash
# Set required environment variables first:
# BRIDGE_L1_TOKEN=<canonical_token_address>
# BRIDGE_L2_TOKEN=<mintable_token_address>

forge script script/DeployTwoWayBridge.s.sol \
  --rpc-url $ETH_MAINNET_RPC_URL \
  --private-key $PRIVATE_KEY \
  --broadcast \
  --verify
```

---

### ✅ **Tether Contract (Kaleido Pattern)**

**Status**: Implemented via **TwoWayTokenBridge** following Kaleido's Tether pattern.

**Kaleido Tether Pattern**:
- In Kaleido's architecture, a "Tether" contract anchors private chain state to a public Ethereum network
- Stores signed state proofs from the private chain
- Creates immutable, verifiable records of state

**This Implementation**:
- **TwoWayTokenBridgeL1/L2** implements the Tether-like pattern
- Synchronizes state between Mainnet (L1) and Chain-138 (L2)
- Uses CCIP for secure cross-chain messaging
- Maintains token balance synchronization (lock on L1, mint on L2)

**Files**:
- `contracts/bridge/TwoWayTokenBridgeL1.sol` - L1/Mainnet side
- `contracts/bridge/TwoWayTokenBridgeL2.sol` - L2/Chain-138 side

**See**: `docs/deployment/KALEIDO_TETHER_MIRROR_PATTERN.md` for detailed explanation

---

## 🔍 Search Methods Used

1. **Broadcast Files**: Checked all Foundry broadcast JSON files for Mainnet (chain ID 1)
2. **.env File**: Searched for contract addresses in environment variables
3. **Etherscan API**: Queried for contracts created by deployer address
4. **Codebase Search**: Searched for contract files and deployment scripts
5. **Documentation**: Reviewed deployment status documents

---

## 📊 Findings

### Contracts Found in Codebase:
- ✅ MirrorManager.sol - Available
- ✅ TwoWayTokenBridgeL1.sol - Available
- ✅ TwoWayTokenBridgeL2.sol - Available

### Contracts Deployed to Mainnet:
- ✅ CCIPWETH9Bridge - Deployed and verified
- ✅ CCIPWETH10Bridge - Deployed and verified
- ❌ MirrorManager - **NOT DEPLOYED**
- ❌ TwoWayTokenBridgeL1 - **NOT DEPLOYED**
- ❌ TwoWayTokenBridgeL2 - **NOT DEPLOYED**

### Missing Environment Variables:
- `MIRROR_ADMIN` - Required for MirrorManager deployment
- `BRIDGE_L1_TOKEN` - Required for TwoWayTokenBridgeL1 deployment
- `BRIDGE_L2_TOKEN` - Required for TwoWayTokenBridgeL2 deployment

---

## 🚀 Next Steps

### To Deploy MirrorManager:
1. Set `MIRROR_ADMIN` in `.env` (multisig recommended)
2. Run deployment script
3. Verify contract on Etherscan
4. Update `.env` with deployed address

### To Deploy TwoWayTokenBridge:
1. Set `BRIDGE_L1_TOKEN` in `.env` (canonical token address on Mainnet)
2. Set `BRIDGE_L2_TOKEN` in `.env` (mintable token address on L2/Chain-138)
3. Ensure `CCIP_ROUTER` and `CCIP_FEE_TOKEN` are set
4. Run deployment script (deploys both L1 and L2)
5. Verify contracts on Etherscan
6. Update `.env` with deployed addresses

---

## 📝 Notes

- All deployment scripts are available and ready to use
- Contracts are compiled and tested
- Missing environment variables are blocking deployment
- No evidence found of MirrorManager or TwoWayTokenBridge being deployed to Mainnet
- The Etherscan API query for the deployer address did not return additional contracts beyond the two CCIP bridges

---

**Last Updated**: 2025-12-11
**Search Performed By**: Automated contract discovery script

