Auto Verify After Deployment#895
Conversation
|
@passabilities Thanks for suggesting this. This seems like a useful feature to have, however I'm not sure whether this would work well in practice. My main concerns are regarding latency, both for the plugin and from Etherscan. First, depending on the scenario, we don't always wait for a deployment to be confirmed but often just return an ethers contract instance which is still pending deployment. For example, after running Secondly, Etherscan does not immediately detect bytecode that was deployed to an address. We can see this error message that could be thrown by the hardhat-verify plugin https://github.com/NomicFoundation/hardhat/blob/b06601b9d67bd1f33f5217e215d26eecde6ea86e/packages/hardhat-verify/src/internal/errors.ts#L154, where it suggests to wait perhaps 5 confirmations before running verification. If we run verification immediately after a deployment, this kind of error could possibly occur quite frequently, whereas adding a delay would result in the first issue mentioned above. Due to these reasons, it could be more reasonable to allow the user to just run verification in their own scripts as needed, as it is currently. Let me know what you think. |
verify:verifyhardhat script after deployments