0

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 {
            console.log(e)
        }
    }
}

module.exports = {
    verify,
}

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

1 Answer 1

0

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

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

Your Answer

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

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