Hi! I'm trying to get UUPS proxy verified on Etherscan, followed
for deployment and attempted to verify using hardhat-etherscan, documented everything in README of a tiny repo with sample code. I also tried uploading code through Etherscan UI with pretty much the same results, which is probably better left for a separate post.
Are you using the address of the proxy or the implementation for verification?
There is an option on Etherscan to verify a proxy. If you follow the steps, it will tell you that the implementation is not verified and give you the implementation address.
But it's not. I was asking specifically about verifying proxy contracts themselves, not implementation. Sorry it's not obvious from the post, I'll update it when I get the access to do so, can't edit the post at the moment.
@Skyge@madeindreams thanks! That was just a Rinkeby deploy
no need to verify it, obviously. I'll post the actual addresses shortly, I'm about to deploy on Mainnet.
I think the UUPS proxy contract has been verified on the all networks
Is it just a temporary way of doing things, are there plans to automate verification, or is it supposed to be verified once per network because it's not supposed to be changed?
"Similar match" means verified! Note that it says "Contract Source Code Verified". It is supposed to be verified once per network, the proxy contracts do not change.
There are plans to automate verification, but we consider this good enough for now and we have prioritized other work.
If it's not good enough for your use case, do let us know.
Hi @frangio - I'm extending the ERC1967 (it's kind of a hack to make the hardhat-deploy plugin work with UUPS). Do you have any ideas why verification fails for this?
Successfully submitted source code for contract
contracts/ArtistCreatorProxy.sol:ArtistCreatorProxy at 0xe5E3FcF8938b440DF61b344c68A22057Ce367e9c
for verification on Etherscan. Waiting for verification result...
We tried verifying your contract ArtistCreatorProxy without including any unrelated one, but it failed.
Trying again with the full solc input used to compile and deploy it.
This means that unrelated contracts may be displayed on Etherscan...
Successfully submitted source code for contract
contracts/ArtistCreatorProxy.sol:ArtistCreatorProxy at 0xe5E3FcF8938b440DF61b344c68A22057Ce367e9c
for verification on Etherscan. Waiting for verification result...
NomicLabsHardhatPluginError: The contract verification failed.
Reason: Fail - Unable to verify
...
What should work without fail is to deploy the contract and then retrieve from artifacts/build-info the input part of the build info file that contains your contract. This is the Standard JSON Input that you can upload to Etherscan later.