2

I have deployed an upgradable contract using a factory contract which its code is as fallows:

bytes memory bytecode = abi.encodePacked(
    type(TransparentUpgradeableProxy).creationCode,
    abi.encode(implementation, proxyAdmin, "")
);

assembly {
    contractAddress := create2(
        0,
        add(bytecode, 32),
        mload(bytecode),
        salt
    )
}

Everything is working fine. I did verify the implementation using hardhat but I can't verify the proxy itself. Hardhat gives me the following error:

Failed to verify TransparentUpgradeableProxy contract at addr: Bytecode does not match with the current version of TransparentUpgradeableProxy in the Hardhat Upgrades plugin.

Any ideas?

I tried the hardhat CLI tool for verification

Navid Far
  • 41
  • 3

0 Answers0