> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shieldhq.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Contract Deployment

> Deploy Shield contracts to production

# Contract Deployment

Deploy Shield contracts to Base mainnet.

## Pre-Deployment Checklist

* [ ] Contracts audited
* [ ] Testnet deployment tested
* [ ] Addresses documented
* [ ] Frontend ready
* [ ] Monitoring configured

## Mainnet Deployment

### 1. Prepare

```bash theme={null}
cd contracts
npm install
```

### 2. Configure Environment

```bash theme={null}
export PRIVATE_KEY=your_mainnet_private_key
export ALCHEMY_API_KEY=your_alchemy_key
export BASESCAN_API_KEY=your_basescan_key
```

<Warning>
  Never commit private keys to git!
</Warning>

### 3. Check Balance

```bash theme={null}
npx hardhat balance --network baseMainnet --address YOUR_ADDRESS
```

Ensure you have enough ETH for deployment (\~0.01 ETH).

### 4. Deploy

```bash theme={null}
npx hardhat run scripts/deploy.ts --network baseMainnet
```

Save the deployed address.

### 5. Verify

```bash theme={null}
npx hardhat verify --network baseMainnet DEPLOYED_ADDRESS
```

### 6. Update Frontend

Add to `.env`:

```env theme={null}
NEXT_PUBLIC_SHIELD_CONTRACT_BASE=0x...deployed_address
```

## Post-Deployment

* [ ] Contract verified on BaseScan
* [ ] Frontend environment updated
* [ ] Documentation updated
* [ ] Community notified
* [ ] Monitoring enabled

## Monitoring

Set up alerts for:

* Failed transactions
* Unusual activity
* Contract balance

## Emergency Response

If issues found:

1. Assess severity
2. Communicate to users
3. Deploy fix if possible
4. Document incident
