ProxyAdmin verification error

Hey guys, when running: npx hardhat verify --network matic 0x2CB7FfCE5d0e128268D8AA7549EBefB9B293Dc21

, we're seeing:

Verifying implementation: 0x3Adf7e2B2aCfFf48d11802EC0b1591Cc19672804
Nothing to compile
Implementation 0x3Adf7e2B2aCfFf48d11802EC0b1591Cc19672804 already verified.
Verifying proxy: 0x2CB7FfCE5d0e128268D8AA7549EBefB9B293Dc21
Contract at 0x2CB7FfCE5d0e128268D8AA7549EBefB9B293Dc21 already verified.
Linking proxy 0x2CB7FfCE5d0e128268D8AA7549EBefB9B293Dc21 with implementation
Successfully linked proxy to implementation.
Verifying proxy admin: 0x877D0e3fB2732d074aa70D961320e3AE58320705
Failed to verify ProxyAdmin contract at 0x877D0e3fB2732d074aa70D961320e3AE58320705: Bytecode does not match with the current version of ProxyAdmin in the Hardhat Upgrades plugin.
An unexpected error occurred:
Error: Verification completed with the following errors.
Error 1: Failed to verify ProxyAdmin contract at 0x877D0e3fB2732d074aa70D961320e3AE58320705: Bytecode does not match with the current version of ProxyAdmin in the Hardhat Upgrades plugin.

:1234: Code to reproduce


:computer: Environment

Hi, welcome to the community! :wave:

The ProxyAdmin | Address 0x877d0e3fb2732d074aa70d961320e3ae58320705 | PolygonScan has been verified, you can have a check.

1 Like

Can anyone assist with a ProxyAdmin verification error our team is seeing? We're able to deploy a smart contract, however when we try to verify with npx hardhat verify --network matic <smart contract address> we see the following error:

Verifying implementation: 0x3Adf7e2B2aCfFf48d11802EC0b1591Cc19672804
Nothing to compile
Implementation 0x3Adf7e2B2aCfFf48d11802EC0b1591Cc19672804 already verified.
Verifying proxy: 0x2CB7FfCE5d0e128268D8AA7549EBefB9B293Dc21
Contract at 0x2CB7FfCE5d0e128268D8AA7549EBefB9B293Dc21 already verified.
Linking proxy 0x2CB7FfCE5d0e128268D8AA7549EBefB9B293Dc21 with implementation
Successfully linked proxy to implementation.
Verifying proxy admin: 0x877D0e3fB2732d074aa70D961320e3AE58320705
Failed to verify ProxyAdmin contract at 0x877D0e3fB2732d074aa70D961320e3AE58320705: Bytecode does not match with the current version of ProxyAdmin in the Hardhat Upgrades plugin.
An unexpected error occurred:
Error: Verification completed with the following errors.
Error 1: Failed to verify ProxyAdmin contract at 0x877D0e3fB2732d074aa70D961320e3AE58320705: Bytecode does not match with the current version of ProxyAdmin in the Hardhat Upgrades plugin.

:1234: Code to reproduce

npx hardhat verify --network matic 0x2CB7FfCE5d0e128268D8AA7549EBefB9B293Dc21

:computer: Environment

Hardhat

The ProxyAdmin contract at 0x877D0e3fB2732d074aa70D961320e3AE58320705 already has a "similar match" on Polygonscan, so there isn't any further verification needed for it. All of your addresses look verified at this point (with exact match for the implementation and similar match for the proxy contracts, which is expected), so you should be good to go.

I'll look further into why this is giving an error though (rather than just saying the proxy admin is already verified).

The ProxyAdmin verification error occurs because it was deployed by a previous version of the Hardhat Upgrades plugin with different compiler settings. I've opened a GitHub issue https://github.com/OpenZeppelin/openzeppelin-upgrades/issues/674 to address this.

But as mentioned above, since there is already a similar match in this case, no further verification is necessary for your existing ProxyAdmin address.

Good day; any updates with this issue?