# How to verify UUPS proxy on Etherscan

**URL:** <https://forum.openzeppelin.com/t/how-to-verify-uups-proxy-on-etherscan/12954>\
**Category:** Upgrades\
**Tags:** proxies\
**Created:** [July 23, 2021, 5:31pm UTC](https://forum.openzeppelin.com/t/how-to-verify-uups-proxy-on-etherscan/12954 "2021-07-23T17:31:58Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eugene\_T](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/eugene_t/32/7806_2.png) [@Eugene\_T](https://forum.openzeppelin.com/u/Eugene_T)\
**Post date:** [July 23, 2021, 5:31pm UTC](https://forum.openzeppelin.com/t/how-to-verify-uups-proxy-on-etherscan/12954/1 "2021-07-23T17:31:59Z")

</div>

Hi! I'm trying to get UUPS proxy verified on Etherscan, followed

> [@UUPS Proxies: Tutorial (Solidity + JavaScript)](https://forum.openzeppelin.com/t/uups-proxies-tutorial-solidity-javascript/7786):
>
> UUPS Proxies: A Tutorial In this tutorial we will deploy an upgradeable contract using the UUPS proxy pattern. We assume some familiarity with Ethereum upgradeable proxies. Introduction to UUPS The original proxies included in OpenZeppelin followed the [Transparent Proxy Pattern](https://blog.openzeppelin.com/the-transparent-proxy-pattern/). While this pattern is still provided, our recommendation is now shifting towards UUPS proxies, which are both lightweight and versatile. The name UUPS comes from [EIP1822](https://eips.ethereum.org/EIPS/eip-1822), which first documented the pattern. While both …

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.

#### 🔢 Code to reproduce

> **[GitHub - utgarda/oz-uups-hardhat-verification](https://github.com/utgarda/oz-uups-hardhat-verification)**
>
> Contribute to utgarda/oz-uups-hardhat-verification development by creating an account on GitHub.

#### 💻 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

---

<div class="post-metadata">

**Author:** ![madeindreams](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/madeindreams/32/23461_2.png) [@madeindreams](https://forum.openzeppelin.com/u/madeindreams)\
**Post date:** [July 24, 2021, 4:24pm UTC](https://forum.openzeppelin.com/t/how-to-verify-uups-proxy-on-etherscan/12954/2 "2021-07-24T16:24:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Eugene\_T](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/eugene_t/32/7806_2.png) [@Eugene\_T](https://forum.openzeppelin.com/u/Eugene_T)\
**Post date:** [July 24, 2021, 10:25pm UTC](https://forum.openzeppelin.com/t/how-to-verify-uups-proxy-on-etherscan/12954/3 "2021-07-24T22:25:19Z")

</div>

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

 ![implementation_verified](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/a/a558a025c8a21b42876045e7c035ff75c5542205.png)

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

 ![proxy_not_verified](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/0/04d0ef2c4d7fa4566f8fcdee9df5dd058e773ad1.png)

> **[ERC1967Proxy | 0x48597923ca253F2e9965bc2a1185F8270b094CA0](https://rinkeby.etherscan.io/address/0x48597923ca253F2e9965bc2a1185F8270b094CA0#code)**
>
> The Contract Address 0x48597923ca253F2e9965bc2a1185F8270b094CA0 page allows users to view the source code, transactions, balances, and analytics for the contract address. Users can also interact and make transactions to the contract directly on...

---

<div class="post-metadata">

**Author:** ![madeindreams](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/madeindreams/32/23461_2.png) [@madeindreams](https://forum.openzeppelin.com/u/madeindreams)\
**Post date:** [July 25, 2021, 1:36am UTC](https://forum.openzeppelin.com/t/how-to-verify-uups-proxy-on-etherscan/12954/4 "2021-07-25T01:36:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Eugene\_T](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/eugene_t/32/7806_2.png) [@Eugene\_T](https://forum.openzeppelin.com/u/Eugene_T)\
**Post date:** [July 25, 2021, 12:04pm UTC](https://forum.openzeppelin.com/t/how-to-verify-uups-proxy-on-etherscan/12954/5 "2021-07-25T12:04:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Skyge](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/skyge/32/343_2.png) [@Skyge](https://forum.openzeppelin.com/u/Skyge)\
**Post date:** [July 25, 2021, 3:00pm UTC](https://forum.openzeppelin.com/t/how-to-verify-uups-proxy-on-etherscan/12954/6 "2021-07-25T15:00:36Z")

</div>

Hi, welcome! 👋

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?

---

<div class="post-metadata">

**Author:** ![madeindreams](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/madeindreams/32/23461_2.png) [@madeindreams](https://forum.openzeppelin.com/u/madeindreams)\
**Post date:** [July 25, 2021, 9:28pm UTC](https://forum.openzeppelin.com/t/how-to-verify-uups-proxy-on-etherscan/12954/7 "2021-07-25T21:28:57Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Eugene\_T](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/eugene_t/32/7806_2.png) [@Eugene\_T](https://forum.openzeppelin.com/u/Eugene_T)\
**Post date:** [July 26, 2021, 12:42pm UTC](https://forum.openzeppelin.com/t/how-to-verify-uups-proxy-on-etherscan/12954/8 "2021-07-26T12:42:26Z")

</div>

@Skyge @madeindreams thanks! That was just a [Rinkeby deploy](https://rinkeby.etherscan.io/address/0x48597923ca253F2e9965bc2a1185F8270b094CA0#code)  
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

 ![image](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/0/0948c8a41eadf159e612369bfc4e7cdc1fff7884.png)

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?

---

<div class="post-metadata">

**Author:** ![frangio](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/frangio/32/15251_2.png) [@frangio](https://forum.openzeppelin.com/u/frangio)\
**Post date:** [July 26, 2021, 9:30pm UTC](https://forum.openzeppelin.com/t/how-to-verify-uups-proxy-on-etherscan/12954/9 "2021-07-26T21:30:03Z")

</div>

"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.

---

<div class="post-metadata">

**Author:** ![gigamesh](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/gigamesh/32/4800_2.png) [@gigamesh](https://forum.openzeppelin.com/u/gigamesh)\
**Post date:** [November 28, 2021, 12:27am UTC](https://forum.openzeppelin.com/t/how-to-verify-uups-proxy-on-etherscan/12954/10 "2021-11-28T00:27:08Z")

</div>

Hi @frangio - I'm extending the ERC1967 (it's [kind of a hack](https://github.com/wighawag/hardhat-deploy/issues/146#issuecomment-907755963) to make the hardhat-deploy plugin work with UUPS). Do you have any ideas why verification fails for this?

**ArtistCreatorProxy.sol**

```auto
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.7;

import '@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol';

contract ArtistCreatorProxy is ERC1967Proxy {
    constructor(
        address _logic,
        address admin_,
        bytes memory _data
    ) payable ERC1967Proxy(_logic, _data) {
        assert(_ADMIN_SLOT == bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1));
        _changeAdmin(admin_);
    }

    function getImplementation() external view returns (address implementation) {
        implementation = super._getImplementation();
    }
}

```

This is how I'm attempting the verification:

```auto
  async function verifyContract(address: string, constructorArguments: any[] = []) {
    console.log({ address, constructorArguments });
    let verified = false;
    while (!verified) {
      try {
        //// Verify contract on etherscan
        await run('verify:verify', {
          address,
          constructorArguments,
        });
        verified = true;
      } catch (err) {
        console.log(err);
        if (err.message === 'Contract source code already verified') {
          break;
        } else {
          console.log('\nWaiting 10 seconds...');
          await new Promise((res) => setTimeout(res, 10_000));
        }
      }
    }
  }
};

const artistCreatorProxy = await deployments.deploy('ArtistCreator', {
    from: deployer.address,
    gasLimit: 5000000,
    log: true,
    proxy: {
      owner: deployer.address,
      proxyContract: 'ArtistCreatorProxy',
      execute: {
        methodName: 'initialize',
        args: [],
      },
    },
  });

const creatorImpAddress = (await deployments.get('ArtistCreator_Implementation')).address;

await verifyContract(artistCreatorProxy.address, [creatorImpAddress, deployer.address, '0x']);

```

Result:

```auto
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
...

```

---

<div class="post-metadata">

**Author:** ![frangio](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/frangio/32/15251_2.png) [@frangio](https://forum.openzeppelin.com/u/frangio)\
**Post date:** [December 1, 2021, 10:46pm UTC](https://forum.openzeppelin.com/t/how-to-verify-uups-proxy-on-etherscan/12954/11 "2021-12-01T22:46:08Z")

</div>

@gigamesh I'm not sure why that would be failing. Could be any of the reasons listed in [How to verify a contract on Etherscan/BscScan/PolygonScan](https://forum.openzeppelin.com/t/how-to-verify-a-contract-on-etherscan-bscscan-polygonscan/14225).

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.

---

<div class="post-metadata">

**Author:** ![gigamesh](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/gigamesh/32/4800_2.png) [@gigamesh](https://forum.openzeppelin.com/u/gigamesh)\
**Post date:** [December 3, 2021, 6:20am UTC](https://forum.openzeppelin.com/t/how-to-verify-uups-proxy-on-etherscan/12954/12 "2021-12-03T06:20:05Z")

</div>

Got it working. Thanks!

---

<div class="post-metadata">

**Author:** ![takeshi.reg](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/takeshi.reg/32/14647_2.png) [@takeshi.reg](https://forum.openzeppelin.com/u/takeshi.reg)\
**Post date:** [May 2, 2022, 8:16am UTC](https://forum.openzeppelin.com/t/how-to-verify-uups-proxy-on-etherscan/12954/13 "2022-05-02T08:16:04Z")

</div>

It took some time for me to find out how to verify a Rinkeby proxy on Etherscan. It seems like there's no automatic verification. Found this page - [https://rinkeby.etherscan.io/proxyContractChecker](https://rinkeby.etherscan.io/proxyContractChecker). Successfully verified my proxy - [https://rinkeby.etherscan.io/address/0xDbBc9242F3aa324E0d1A34394d254e73cf0243aE#readContract](https://rinkeby.etherscan.io/address/0xDbBc9242F3aa324E0d1A34394d254e73cf0243aE#readContract)
