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

# Foundry - Verifying Contracts

> Learn how to verify smart contracts on Abstract using Foundry.

## Verifying Contracts

Contracts can be verified as they are deployed as described in [Deploying Contracts](/build-on-abstract/smart-contracts/foundry/deploying-contracts). This page outlines how to verify contracts that have already been deployed on Abstract.

<Steps>
  <Step title="Get an Abscan API key">
    Follow the [Etherscan documentation](https://docs.etherscan.io/getting-started/viewing-api-usage-statistics) to get an API key.
  </Step>

  <Step title="Verify an existing contract">
    Verify an existing contract by running the following command:

    <CodeGroup>
      ```bash Testnet theme={null}
      forge verify-contract 0x85717893A18F255285AB48d7bE245ddcD047dEAE \
          src/Counter.sol:Counter \
          --chain abstract-testnet
          --etherscan-api-key <your-etherscan-api-key-here> \
          --zksync
      ```

      ```bash Mainnet theme={null}
      forge verify-contract 0x85717893A18F255285AB48d7bE245ddcD047dEAE \
          src/Counter.sol:Counter \
          --chain abstract \
          --etherscan-api-key <your-etherscan-api-key-here> \
          --zksync
      ```
    </CodeGroup>

    ***Note**: Replace the contract path, address, and API key with your own.*
  </Step>
</Steps>
