Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/content/docs/ignition/docs/guides/verify.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ Once your Ignition module is tested and ready, the next step is to deploy it to

Verifying a contract means making its source code public, along with the compiler settings you used, which allows anyone to compile it and compare the generated bytecode with the one that is deployed on-chain. Doing this is extremely important in an open platform like Ethereum.

In this guide we'll explain how to do this with the [Etherscan](https://etherscan.io/) explorer.
In this guide we'll explain how to do this on all Hardhat-supported verification services, including the [Etherscan](https://etherscan.io/) explorer, the [Blockscout](https://blockscout.com/) explorer, and the [Sourcify](https://sourcify.dev/) verification service.

## Getting an API key from Etherscan

The first thing you need is an API key from Etherscan. To get one, go to [their site](https://etherscan.io/login), sign in (or create an account if you don't have one) and open the "API Keys" tab. Then click the "Add" button and give a name to the API key you are creating (e.g. "Hardhat"). After that you'll see the newly created key in the list.
If you want to verify your contracts on Etherscan, you need an API key from Etherscan. Otherwise, Etherscan will be skipped and your contracts will be verified on the other services.

To get an API key, go to [their site](https://etherscan.io/login), sign in (or create an account if you don't have one) and open the "API Keys" tab. Then click the "Add" button and give a name to the API key you are creating (e.g. "Hardhat"). After that you'll see the newly created key in the list.

Open your Hardhat config and add the API key you just created as a configuration variable:

Expand Down Expand Up @@ -82,7 +84,7 @@ This guide assumes you are using the contracts and Ignition module from the [qui

Now you are ready to deploy your module to the testnet, but first we are going to make the source code of our contract unique. The reason we need to do this is that the sample code from the quick start guide is already verified in Sepolia, so if you try to verify it you'll get an error. If you are using your own contracts, you can likely skip this step.

Open your contract and add a comment with something unique, like your GitHub's username. Keep in mind that whatever you include here will be, like the rest of the code, publicly available on Etherscan:
Open your contract and add a comment with something unique, like your GitHub's username. Keep in mind that whatever you include here will be, like the rest of the code, publicly available on all enabled verification services:

```solidity
// Author: @john
Expand All @@ -105,6 +107,6 @@ If you get an error saying that the address does not have bytecode, it probably

:::

After the task has successfully executed, for each deployed contract you'll see a link to its publicly verified code.
After the task has successfully executed, for each deployed contract you'll see links to its publicly verified code.

To learn more about verifying, read our guide on [smart contract verification](/docs/guides/smart-contract-verification) documentation.
2 changes: 1 addition & 1 deletion src/content/docs/ignition/docs/reference/cli-commands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ OPTIONS:
--parameters A relative path to a JSON file to use for the module parameters
--reset Wipes the existing deployment state before deploying (default: false)
--strategy Set the deployment strategy to use (default: basic)
--verify Verify the deployment on Etherscan (default: false)
--verify Verify the deployment on all enabled verifiers (default: false)
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The option description uses the term “enabled verifiers”, but this doc page elsewhere describes verification in terms of “configured block explorers”. Consider aligning terminology (e.g., “all enabled verification services” or “configured explorers/services”) so users don’t think --verify only affects a subset of backends.

Suggested change
--verify Verify the deployment on all enabled verifiers (default: false)
--verify Verify the deployment on all configured block explorers (default: false)

Copilot uses AI. Check for mistakes.
--write-localhost-deployment Write deployment information to disk when deploying to the in-memory network (default: false)

POSITIONAL ARGUMENTS:
Expand Down
Loading