Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate contract verficiations using verify and etherscan-verify tasks #586

Open
penandlim opened this issue May 19, 2022 · 1 comment
Open

Comments

@penandlim
Copy link
Contributor

at the end of each deploy script, we should add verify task based on which network we are on

Using hardhat-etherscan plugin's verify task:

await hre.run("verify:verify", {
  address: contractAddress,
  constructorArguments: [
    50,
    "a string argument",
    {
      x: 10,
      y: 5,
    },
    "0xabcdef",
  ],
  libraries: {
    SomeLibrary: "0x...",
  }
});

Using hardhat-deploy's etherscan-verify task:

await hre.run("etherscan-verify", {
  contractName: deploymentName,
});
@lilPlumberBoy
Copy link
Contributor

Is it better to have a line at the end of each deploy script or to have a separate script to verify everything after its deployed like here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants