Trying to upgrade a already deployed proxy contact on etherscan

Hi, I am trying to verify my transparent proxy contract. I successfully verified the implementation contract. But having problems when trying to verify the proxy. I use create3factory to deploy the contracts. I am getting this error:

Failed to verify TransparentUpgradeableProxy contract at 0x4b17F5Ef7F6CcdD06105F0a260c0E39eC6376007: Bytecode does not match with the current version of TransparentUpgradeableProxy in the Hardhat Upgrades plugin.
Failed to verify directly using hardhat verify: The address provided as argument contains a contract, but its bytecode doesn't match any of your local contracts.

:1234: Code to reproduce

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol";
import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";

contract TransparentProxy is TransparentUpgradeableProxy, Ownable {
        address _logic,
        address _admin,
        bytes memory _data
    ) payable TransparentUpgradeableProxy(_logic, _admin, _data) {

:computer: Environment


Since your proxy is deployed as your custom TransparentProxy contract, you would need to verify it manually, because its bytecode is different from what the Hardhat plugin normally deploys. See How to verify a contract on Etherscan/BscScan/PolygonScan for general info on verification.

Note: your pattern to use Ownable within the proxy itself is not recommended, because that risks storage clash and possible function selector clashes with the implementation. See Instead, consider using OwnableUpgradeable in your implementation instead.

yes, I read this one but still having problems with verifying. I upload solc-input.json and I am getting this error :
Error! Invalid constructor arguments provided. Please verify that they are in ABI-encoded format

here is my abi encode data :

yes I am aware of selector clashes problem but its already deployed contract.

From your contract creation tx, it looks like your ABI encoded data might be:


this is my creation tx on bsc:
This didn't work because you get it from eth I guess. How did you get that ABI encoded data may I learn that?

this also didn't work on etherscan

Right, I got it from Ethereum. What you provided earlier looks right for your bsc deployment.

I don't think I can help further as this really depends on how you compiled and deployed it. Just ensure that your solc JSON input contains your proxy contract which you deployed, and that your compiler version for Etherscan verification matches what you used to compile the proxy contract.

1 Like