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

# Verify Smart Contract using Foundry

Verifying a smart contract allows developers to review your code from within the CeloScan Block Explorer

## Prerequisites

[Project must be setup using Foundry](/developer/deploy/foundry)

## Verifying Contracts

Set your environment variable

```bash theme={null}
// get your API key here: https://etherscan.io/register
export ETHERSCAN_API_KEY=<your etherscan API key>
```

Use the following command

For Celo Sepolia Testnet:

```bash theme={null}
forge verify-contract --chain-id 11142220 <contract_address> <contract_location> --etherscan-api-key $ETHERSCAN_API_KEY --watch
```

For Celo Mainnet:

```bash theme={null}
forge verify-contract --chain-id 42220 <contract_address> <contract_location> --etherscan-api-key $ETHERSCAN_API_KEY
 --watch
```
