I am reading this code from Patrick Collins' tutorial

const { run } = require("hardhat")

const verify = async (contractAddress, args) => {
    console.log("Verifying contract...")
    try {
        await run("verify:verify", {
            address: contractAddress,
            constructorArguments: args,
    } catch (e) {
        if (e.message.toLowerCase().includes("already verified")) {
            console.log("Already verified!")
        } else {

module.exports = {

It works, but I cannot find where "verify:verify" is implemented. (line 6)

I checked Hardhat doc. I couldn't find any reference to the run( ) function.

Thank you


1 Answer 1


The "verify:verify" is hardhat internal and is the way you tell hardhat to verify the code.

As dev you don't have to implement this function

Hope it helps

  • thank you @donoso. Is there a document about all the internal commands?
    – oldpride
    Apr 5, 2023 at 10:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.