-
I'm having a problem with programmatically verifying the FundMe contract on the Rinkeby testnet. This issue is similar to discussion #207. When I run
Note:
However, if I verify manually on the command line using
Now the contract is successfully verified. So there seems to be an issue (at least on Rinkeby) when verifying using the const { run } = require("hardhat")
async function verify(contractAddress, args) {
console.log("Verifying contract...")
console.log(`contractAddress is ${contractAddress}`) //db
console.log(`args is ${args}`) //db
try {
await run("verify:verify", {
address: contractAddress,
constructor: args,
// constructor: ["0x8A753747A1Fa494EC906cE90E9f37563A8AF630e"], //db
})
} catch (e) {
if (e.message.toLowerCase().includes("already verified")) {
console.log("Contract already verified.")
} else {
console.log("Contract verification failed:")
console.log(e)
}
}
}
module.exports = { verify } Any thoughts about what's going wrong? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Solved this by fixing the typo in |
Beta Was this translation helpful? Give feedback.
Solved this by fixing the typo in
verify.js
:constructor -> constructorArguments