How to verify UUPS proxy on Etherscan

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.

Please help me find that puzzle piece.

:1234: Code to reproduce

:computer: Environment

Hardhat 2.5.0
solc 8.2.0
node v16.3.0
hardhat-ethers 2.0.2
hardhat-etherscan 2.1.4
@openzeppelin/contracts-upgradeable 4.2.0
@openzeppelin/hardhat-upgrades 1.9.0

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.

Use that address to verify your contract.

1 Like

Thanks, implementation verification works, same as marking the contract as proxy after the implementation is verified.

The proxy contract itself, unfortunately, stays unverified - similar match is the best I get.

1 Like

You should mark this as resolved. It's a very common topic and it will help users find a solution faster!

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.

Hi, welcome! :wave:

I am not sure, but I think the UUPS proxy contract has been verified on the all networks, could you please share the proxy contract address?

1 Like

Ha that's because we don't verify them. OZ team have to verify them. It was fast when I deployed mine, it should be verified soon!

1 Like

@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

it's "similar match" on Rinkeby with this version

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.

1 Like