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