Search code examples
solidityhardhatetherscan

Have a dApp automatically verify a contract deployed by a factory


Say a contract factory deploys a new contract on Ethereum at any point in time (not when the factory smart contract is deployed). A clone is deployed on trigger by a user.

Is it possible to automatically verify this new contract on Etherscan from the dApp?

PS: I know you can verify it manually on Etherscan, but how if I need the dApp to do it automatically?


Solution

  • There is a Hardhat plugin that verifies your contract on Etherscan by calling their verification API.