Skip to content

Commit

Permalink
docs: update hardhat verification docs (#130)
Browse files Browse the repository at this point in the history
Signed-off-by: Brendan Graetz <[email protected]>
  • Loading branch information
bguiz committed Feb 26, 2024
1 parent 57946ac commit b8e1ef2
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,30 @@ module.exports = {
enabled: true,
apiUrl: "https://server-verify.hashscan.io",
browserUrl: "https://repository-verify.hashscan.io",
},
etherscan: {
enabled: false,
}
};
```

Note that the `hardhat-verify` plugin has Etherscan enabled by default, and Sourcify disabled by default, hence you need to set both flags as above in the configuration.

Then run

```console
npx hardhat run --network testnet scripts/deploy.js
npx hardhat verify --network testnet <CONTRACT_ADDR>
```

Alternatively, to do so programmatically, invoke `hre.run` to run the required task.

```js
await hre.run('verify:sourcify', {
address: deployedAddress,
});
```

This is useful when you intend to run verification within a [Hardhat script](https://hardhat.org/hardhat-runner/docs/advanced/scripts).

Your contract should be now verified.

0 comments on commit b8e1ef2

Please sign in to comment.