🤔 Got questions? Schedule an office hours session.
Contract Verification

FAQ: Contract Verification

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, please contact our support team via the or 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.

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 in hardhat.config.ts . Contracts will be verified publicly unless you specify this flag.
  • When verifying with Foundry, the Verifier URL should end with /public:
    ## 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

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.

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.

TENDERLY_AUTOMATIC_VERIFICATION=true \
npx hardhat ignition deploy ./ignition/modules/Lock.ts \
    --network virtual_base \
    --deployment-id deploy-to-virtual-base

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

    hardhat.config.js
    tenderly.setup({ automaticVerifications: !!process.env.TENDERLY_AUTOMATIC_VERIFICATION })

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.

How should I name networks in hardhat.config.ts?

  • Public networks can have any name.

For Virtual TestNets, DevNets, and Forks, 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.

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.
  • To avoid the workaround:
upgrade.sh
npm update @tenderly/hardhat-tenderly