Verifying AdminUpgradeabilityProxy

Hello
after deploying my proxy contract, how I can verify it?

‘AdminUpgradeabilityProxy’
Contract Address 0x5Dff9DBa100D260Abaa5d11DB1f3E32E55a7a0Aa | Etherscan

Truffle v5.3.0 (core: 5.3.0)
Solidity - ^0.6.12 (solc-js)

1 Like

HI @Elen welcome to the forums.

As you are using Truffle, you should try to use the plugin to help you speed along your verification. Follow the guide below.

If this does not work you can manually verify it via Etherscan. From the link you posted, click “Verify and Publish”. It will ask you to upload the solidity contracts (.sol files), and ask you to verify the compiler version and optimization parameters.

2 Likes

Hi @Elen,

What version of OpenZeppelin Upgrades Plugins did you use? For most public networks the proxy is already verified.

1 Like

Hello ,
@Tsushima_Yoshiko the plugin doesn’t generate .sol files …
@abcoathup how I can retrieve the version of the plugin?
thank you for your answers

1 Like

Hi @Elen,

If you look in package.json for the version.

1 Like

looks like version 1.6.0

I had a very small mistake on my implementation contract , i redeployed the contracts :

Deploying ‘AdminUpgradeabilityProxy’

transaction hash: 0x72993c9e8000a759ddc1f3eb179ba371f038e68eb015d1428ae10a8c2601f3c4
Blocks: 3 Seconds: 8
contract address: 0x80575A01f074C18466C2e889C4685fd8594d4b54
block number: 10051398
block timestamp: 1618586983
account: 0xd7c90Aea6945432B39028b1E62B9F76F7b151a0D

1 Like

I have same problem in Upgrades Hardhat plugin.
After deploying by upgrades.deployProxy to Rinkeby, should I verify the AdminUpgradeabilityProxy contract manually? As far as I know, Etherscan automatically detects delegeteCall opcode, then enables Is this a proxy? option. But it does not detect it is a proxy contract.

"devDependencies": {
    "@nomiclabs/hardhat-ethers": "^2.0.2",
    "@nomiclabs/hardhat-etherscan": "^2.1.1",
    "@nomiclabs/hardhat-waffle": "^2.0.1",
    "@openzeppelin/hardhat-upgrades": "^1.6.0",
    "chai": "^4.3.4",
    "ethereum-waffle": "^3.3.0",
    "ethers": "^5.1.0",
    "hardhat": "^2.2.0"
}

Here is my proxy contract on Rinkeby:
https://rinkeby.etherscan.io/address/0x1E0F50Bc8D8570ffa94485bbB17b3b50676ae246#code

And Etherscan Proxy contract support:
https://medium.com/etherscan-blog/and-finally-proxy-contract-support-on-etherscan-693e3da0714b

1 Like

I found something.
I changed @openzeppelin/upgrades-core from 1.6.0 (recently installed) to 1.5.1 in yarn.lock
It works! :star_struck: Here is my proxy contract:
https://rinkeby.etherscan.io/address/0x91D66291EE643162f2e00A532181d5EcBBc9bCf9#code

And in yarn.lock, I replaced the whole dependency with this

"@openzeppelin/upgrades-core@^1.5.0":
  version "1.5.1"
  resolved "https://registry.yarnpkg.com/@openzeppelin/upgrades-core/-/upgrades-core-1.5.1.tgz#2165f0c2961cc748e7d1c2bce1ba96589d31390b"
  integrity sha512-rL0h/+Yfcky98XaxLRcxKunmC2uVP+dr9tVxzZfbjDpIco7VkmyODsI1YBPZTn3e5kCj7A6cmgNrFmao/UkQyA==
  dependencies:
    bn.js "^5.1.2"
    cbor "^7.0.0"
    chalk "^4.1.0"
    compare-versions "^3.6.0"
    debug "^4.1.1"
    ethereumjs-util "^7.0.3"
    fp-ts "^2.7.1"
    io-ts "^2.2.9"
    proper-lockfile "^4.1.1"
    solidity-ast "^0.4.15"

Don’t forget yarn install and npx hardhat clean after modifying yarn.lock.

1 Like

:point_up_2:Of course, this is not the solution. I think there will be some update from OZ or Etherscan team.

1 Like

Hi @swkim109,

We need to verify the contracts in 1.6.0, other versions such as 1.5.1 have already been verified.

2 Likes

Thanks for clarifying! :+1:

1 Like

The contracts are verified now. Sorry about the inconvenience. Should be automated very soon.

4 Likes

Hi @Elen,

I marked your proxy as a Proxy in Etherscan

1 Like

@abcoathup – I’m running into some weird behavior.

I’m using the following:: “@openzeppelin/hardhat-upgrades”: “^1.7.0”, and I would have installed that within the last couple of days, so I’m on the latest.

I was able to deploy to Kovan last night. The proxy contracts verified just fine.
Now I’m trying another deploy this morning and suddenly the contracts aren’t being verified. The implementation contracts are verified automatically, I’m assuming b/c I verified those manually last night. But the proxy contracts aren’t even recognized as being possible proxies, so I don’t see the etherscan option to flag it as such. Instead, I only see a notice that there are other similar contracts.

So I’m wondering if the bytecode got corrupted somehow? and if so, what are some things I should look for?

I should note that we managed to deploy the same contracts from another project just fine. We’re still trying to find how those two projects are different; nevertheless, for the same project to work one moment, and then to NOT work only several hours later without any code changes is a mystery.

Any thoughts?

Thanks

Hi, IIRC, when you deploy contracts with proxy at the first time, there should be three contracts:

  • Implementation
  • ProxyAdmin
  • Proxy

And if you try to deploy again, you will only deploy a proxy, as there is only one ProxyAdmin per network deployed by your project and the implementation contract has already been deployed.
For more details, you can have a look at this: From: https://docs.openzeppelin.com/upgrades-plugins/1.x/faq#what-is-a-proxy-admin

1 Like

Yes, thank you. I was careful to remove all cache, artifacts and the .openzeppelin folder. So I was getting fresh contracts each time.

Was this on the same network? Can you share the address of the verified and non-verified proxies?

Same network, yes. Can I send you the addresses via pm?

Yeah sure you can send via pm.