0

Maybe all of you know the plugin to hardhat @hardhat-etherscan. It's very useful to verify contracts that we have their solidity files.

Sometimes, we want to deploy contracts with only their interface(ABI) and bytecode, and with a pre-build solt file to verify in the etherscan GUI. In this scenario where we only have these data (without any solidity files), we can use hardhat-etherscan to verify programmatically? I have used this plugin inside my deploy script with something like this:

await hre.run("verify:verify", {
   address: deployedAddress,
   constructorArgsParams: yourArgs,
   contract: "contracts/NameContract.sol:NameContract",
});

Ok, this specifically targets a .sol contract. Is there any way to make this from a artifact or a solt file?

Maybe it's too much, but it would make the task of verification much easier, and it could reduce the problems of verification (which I'm sure we've all experienced at some point).

Hope your answers, this is my first question :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.