0

Our team is seeing the following error when trying to verify a proxy contract via Hardhat:

After running: npx hardhat verify --network matic 0x2CB7FfCE5d0e128268D8AA7549EBefB9B293Dc21 we are seeing:

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.

Is anyone familiar with this error and potential troubleshooting pathways?

codr
  • 889
  • 3
  • 13
  • 22

1 Answers1

1

In this case polygonscan itself found a similar source code and it appears was verified by similarity https://polygonscan.com/address/0x877D0e3fB2732d074aa70D961320e3AE58320705#contracts

Another good thing to check is if the compiler version in the hardhat config for this contract is correct, as it could be that hardhat is using a different version.

For example, if you had multiple solidity versions in your contracts you can put different versions in hardhat config:

module.exports = {
  solidity: {
    compilers: [
      {
        version: "0.8.2",
      },
      {
        version: "0.8.9",
      },
    ],
  },
};
Flavio
  • 159
  • 1
  • 3