# EOA Deployment - Ready Status

**Date**: 2025-12-11
**Status**: ✅ Scripts Ready - RPC Configuration Needed

---

## ✅ What's Ready

### Deployment Scripts Updated

Both deployment scripts have been updated to support EOA (Externally Owned Account) admin:

1. **DeployMainnetTether.s.sol**
   - Uses `TETHER_ADMIN` from `.env` if set
   - Falls back to deployer address if not set
   - No multisig required

2. **DeployTransactionMirror.s.sol**
   - Uses `MIRROR_ADMIN` from `.env` if set
   - Falls back to deployer address if not set
   - No multisig required

### Admin Configuration

- **Type**: EOA (Externally Owned Account)
- **Default**: Deployer address (if `TETHER_ADMIN`/`MIRROR_ADMIN` not set)
- **Custom**: Set `TETHER_ADMIN`/`MIRROR_ADMIN` in `.env` for different admin

---

## ⚠️ Remaining Issue

### RPC Authentication Error

**Error**: `HTTP error 401 with body: Must be authenticated!`

**Cause**: `ETH_MAINNET_RPC_URL` contains placeholder `YOUR_KEY` instead of actual API key

**Fix**: Update `.env` file:
```bash
ETH_MAINNET_RPC_URL=https://eth-mainnet.g.alchemy.com/v2/YOUR_ACTUAL_API_KEY
```

Replace `YOUR_ACTUAL_API_KEY` with your real Alchemy API key.

---

## 🚀 Deployment Commands (After RPC Fix)

Once `ETH_MAINNET_RPC_URL` is updated with actual API key:

### Deploy MainnetTether
```bash
cd /home/intlc/projects/smom-dbis-138
source .env

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

### Deploy TransactionMirror
```bash
forge script script/DeployTransactionMirror.s.sol \
  --rpc-url $ETH_MAINNET_RPC_URL \
  --private-key $PRIVATE_KEY \
  --broadcast \
  --verify \
  --via-ir \
  -vvvv
```

---

## 📋 Configuration Summary

### Required in `.env`
- ✅ `PRIVATE_KEY` - Already set
- ⚠️ `ETH_MAINNET_RPC_URL` - Needs actual API key (currently has placeholder)
- ✅ `ETHERSCAN_API_KEY` - Already set

### Optional in `.env`
- `TETHER_ADMIN` - Custom admin address (defaults to deployer if not set)
- `MIRROR_ADMIN` - Custom admin address (defaults to deployer if not set)

---

## ✅ Verification Steps

After updating RPC URL:

1. **Test RPC Connection:**
   ```bash
   cast block-number --rpc-url $ETH_MAINNET_RPC_URL
   ```
   Should return current block number.

2. **Check Deployer Balance:**
   ```bash
   cast balance $(cast wallet address $PRIVATE_KEY) --rpc-url $ETH_MAINNET_RPC_URL
   ```
   Should show sufficient ETH for gas.

3. **Deploy Contracts:**
   Run deployment commands above.

---

## 🔐 Admin Address

### Default Behavior

If `TETHER_ADMIN` and `MIRROR_ADMIN` are not set:
- **Admin**: Deployer address (`0x4A666F96fC8764181194447A7dFdb7d471b301C8`)
- **Type**: EOA (Externally Owned Account)
- **Control**: Single private key

### Custom Admin

To use a different admin address:
```bash
TETHER_ADMIN=0x...  # Your admin address
MIRROR_ADMIN=0x...  # Can be same or different
```

---

## 📝 Post-Deployment

After successful deployment:

1. **Verify Contracts on Etherscan**
2. **Test Admin Functions**
3. **Set Up Off-Chain Services**
4. **Document Admin Address**
5. **Secure Admin Private Key**

---

## ⚠️ Security Notes

- **EOA Admin**: Single private key controls all admin functions
- **Recommendation**: Use hardware wallet for admin private key
- **Storage**: Never commit private keys to git
- **Recovery**: Document recovery procedures
- **Upgrade Path**: Can transfer admin to multisig later if needed

---

**Last Updated**: 2025-12-11
**Status**: Scripts Ready - RPC Configuration Needed

