> ## 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.

<div className="flex flex-col gap-4 mt-8">
  <Card>
    <div className="flex flex-col gap-2">
      <h2 id="i-verified-my-contract-publicly-but-want-it-to-be" className="text-xl font-semibold">I verified my contract publicly but want it to be private. Can I remove the public verification of the contract?</h2>

      <hr className="dark:border-neutral-800" />

      <div>
        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.
      </div>
    </div>
  </Card>

  <Card>
    <div className="flex flex-col gap-2">
      <h2 id="how-do-i-privately-verify-contracts-from-public-ne" className="text-xl font-semibold">How do I privately verify contracts from public networks (Mainnet, Holesky, etc.) in Tenderly?</h2>

      <hr className="dark:border-neutral-800" />

      <div>
        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](/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](/contract-verification/foundry#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
          ```
      </div>
    </div>
  </Card>

  <Card>
    <div className="flex flex-col gap-2">
      <h2 id="if-i-publicly-verify-a-contract-on-tenderly-will-i" className="text-xl font-semibold">If I publicly verify a contract on Tenderly, will it still be visible after I delete it from my contracts?</h2>

      <hr className="dark:border-neutral-800" />

      <div>
        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](/contract-verification/overview).
      </div>
    </div>
  </Card>

  <Card>
    <div className="flex flex-col gap-2">
      <h2 id="how-can-i-verify-contracts-with-hardhat-ignition" className="text-xl font-semibold">How can I verify contracts with hardhat-ignition?</h2>

      <hr className="dark:border-neutral-800" />

      <div>
        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
        ```
      </div>
    </div>
  </Card>

  <Card>
    <div className="flex flex-col gap-2">
      <h2 id="how-do-i-verify-contracts-automatically-with-harhd" className="text-xl font-semibold">How do I verify contracts automatically with harhdat-tenderly plugin?</h2>

      <hr className="dark:border-neutral-800" />

      <div>
        * **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 })
            ```
      </div>
    </div>
  </Card>

  <Card>
    <div className="flex flex-col gap-2">
      <h2 id="do-i-need-to-call-tenderly-setup-in-hardhat-config" className="text-xl font-semibold">Do I need to call tenderly.setup() in hardhat.config.ts?</h2>

      <hr className="dark:border-neutral-800" />

      <div>
        Starting from 2.4.0 and 1.10.0, you don't need to call `tenderly.setup` method.
      </div>
    </div>
  </Card>

  <Card>
    <div className="flex flex-col gap-2">
      <h2 id="how-should-i-name-networks-in-hardhat-config-ts" className="text-xl font-semibold">How should I name networks in hardhat.config.ts?</h2>

      <hr className="dark:border-neutral-800" />

      <div>
        * 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`**.
      </div>
    </div>
  </Card>

  <Card>
    <div className="flex flex-col gap-2">
      <h2 id="how-do-i-verify-proxy-contracts-in-hardhat" className="text-xl font-semibold">How do I verify proxy contracts in Hardhat?</h2>

      <hr className="dark:border-neutral-800" />

      <div>
        * 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](/contract-verification/hardhat-proxy).
          * To avoid the workaround:

          ```bash filename="upgrade.sh" theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
          npm update @tenderly/hardhat-tenderly
          ```
      </div>
    </div>
  </Card>
</div>
