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

# FAQ: Contract Verification

> Privately verify contracts on public networks with Hardhat or Foundry, revert public verification, and verify proxies and hardhat-ignition deployments.

> [card]
>
> ## I verified my contract publicly but want it to be private. Can I remove the public verification of the contract?
>
> ***
>
> To revert your contract back to private and visible only within your project, [contact our support team](https://tenderly.co/contact-us) or email [support@tenderly.co](mailto:support@tenderly.co). Make sure to provide your username, project, and contract address. Our team will then delete the public verification for the specified contract.

> [card]
>
> ## How do I privately verify contracts from public networks (Mainnet, Holesky, etc.) in Tenderly?
>
> ***
>
> Private verification means that contracts will be visible only to Tenderly users who have access to your project.
>
> * When verifying with hardhat, it's necessary to [set the `config.tenderly.private` flag](https://docs.tenderly.co/contract-verification/hardhat#configure) in `hardhat.config.ts` . Contracts will be verified publicly unless you specify this flag.
> * When verifying with Foundry, the [Verifier URL](https://docs.tenderly.co/contract-verification/foundry.md#verifier-url) should end with **`/public`**:
>   ```bash theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
>   ## private verification URL
>   https://api.tenderly.co/api/v1/account/me/project/project/etherscan/verify/network/8253
>
>   ## public verification URL
>   https://api.tenderly.co/api/v1/account/me/project/project/etherscan/verify/network/8253/public
>   ```

> [card]
>
> ## If I publicly verify a contract on Tenderly, will it still be visible after I delete it from my contracts?
>
> ***
>
> Yes, publicly verified contracts remain visible even after you delete them from your list of contracts. To
> ensure your contracts are visible only within your project, you can use private verification instead. Learn more
> about [different verification types and the verification
> process](https://docs.tenderly.co/contract-verification/overview.md).

> [card]
>
> ## How can I verify contracts with hardhat-ignition?
>
> ***
>
> Deploy using `hardhat ignition deploy` and be sure to add **`--deployment-id`** with a specific value when running the command.
>
> ```bash lines={4} theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
> TENDERLY_AUTOMATIC_VERIFICATION=true \
> npx hardhat ignition deploy ./ignition/modules/Lock.ts \
>     --network virtual_base \
>     --deployment-id deploy-to-virtual-base
> ```

> [card]
>
> ## How do I verify contracts automatically with harhdat-tenderly plugin?
>
> ***
>
> * **For versions `>= 2.4.0 and >=1.10.0`**, the plugin recognizes the environment variable **`TENDERLY_AUTOMATIC_VERIFICATION`**. Use it to switch automatic verification on or off.
>   Example:
>
>   ```bash filename="bash.sh" theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
>   TENDERLY_AUTOMATIC_VERIFICATION=true npx hardhat deploy
>   ```
>
>   * **For versions `< 2.4.0 and < 1.10.0`**, you must call `tenderly.setup` in `hardhat.config.ts` in the following way to control automatic verification.
>
>     ```js filename="hardhat.config.js" theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
>     tenderly.setup({ automaticVerifications: !!process.env.TENDERLY_AUTOMATIC_VERIFICATION })
>     ```

> [card]
>
> ## Do I need to call tenderly.setup() in hardhat.config.ts?
>
> ***
>
> Starting from 2.4.0 and 1.10.0, you don't need to call `tenderly.setup` method.

> [card]
>
> ## How should I name networks in hardhat.config.ts?
>
> ***
>
> * Public networks can have any name.
>
>   For Virtual Environments, depending on the version of `@tenderly/hardhat-tenderly`:
>
>   * network name **must be `tenderly`** with **versions `< 2.4.0` and `< 1.10.0`**.
>   * network name can be arbitrary, with **versions `>= 2.4.0` and `>= 1.10.0`**.

> [card]
>
> ## How do I verify proxy contracts in Hardhat?
>
> ***
>
> * Automatic verification of proxy contracts works out of the box with **versions `>= 2.1.0` and `>= 1.10.0`**.
>
>   * For versions **versions `< 2.4.0` and `< 1.10.0`**, follow the [automatic proxy verification workaround](https://docs.tenderly.co/contract-verification/hardhat-proxy.md).
>   * To avoid the workaround:
>
>   ```bash filename="upgrade.sh" theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
>   npm update @tenderly/hardhat-tenderly
>   ```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.