Use hardhat-etherscan with artifacts or solt files for verification #1937
-
Hi everyone! Idk if can ask this here (sorry if not). This is about the plugin @hardhat-etherscan. 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:
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, risky or unnecessary (idk), 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). Thanks :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Can you expand on what do you mean by this? It seems like you want to verify a contract but you don't have the original source code. If that's the case, then that's not possible, because you need to provide something that, when compiled, will generate the same bytecode that is on-chain. But maybe do you mean something else? Maybe you can give us a precise example. And yes, asking here is perfectly fine! |
Beta Was this translation helpful? Give feedback.
Can you expand on what do you mean by this? It seems like you want to verify a contract but you don't have the original source code. If that's the case, then that's not possible, because you need to provide something that, when compiled, will generate the same bytecode that is on-chain. But maybe do you mean something else? Maybe you can give us a precise example.
And yes, asking here is perfectly fine!