Skip to main content

Verifying Contracts

1

Get an Etherscan API key

Follow the Etherscan documentation to get an API key.
2

Update Hardhat configuration

Add the below etherscan configuration object to your Hardhat configuration file.Replace <your-etherscan-api-key-here> with your Etherscan API key from the previous step.
hardhat.config.ts
3

Verify a contract

Run the following command to verify a contract:
Replace <contract-address> with the address of the contract you want to verify.

Constructor Arguments

To verify a contract with constructor arguments, pass the constructor arguments to the verify command after the contract address.