Only 2 contracts deployed with upgradable contract

I deployed an upgradable contract to mainnet but I think it timed out and it didn’t return any addresses in the console however 2 contracts were created:

:computer: Environment
I am using hardhat and this was my deploy code:

 const NFT20Factory = await ethers.getContractFactory("NFT20Factory");
  console.log("Deploying AirFactory... \n");
  const nft20Factory = await upgrades.deployProxy(NFT20Factory, [], {
    initializer: "initialize",
    unsafeAllowCustomTypes: false,

I would like now to verify those 2 contracts and see how to proceed.

In other upgradable contracts that I deployed, usually 3 contracts are created on first deploy.


1 Like

Hi @surfer77,

It looks like you have deployed an implementation contract and a proxy contract. You should be able to interact with this contract.

There is only one ProxyAdmin contract per project per network. I assume you have already deployed an upgradeable contract to mainnet from the project.

If you check in your .openzeppelin/mainnet.json you should have an address for admin.

1 Like

This was the first time I wanted to deploy to mainnet but I do have a previous admin in .openzeppelin/mainnet.json 0x3206a055d7d2854aAa7eD8F25F6ab4FF3BF101CB .

I believe that to bootstrap this new project we copied the old folder from the other project with the .openzeppelin/mainnet.json included.(can’t think how that got there otherwise)

You can see here the AdminUpgradeabilityProxy 0x14d4D06B8e8df9B85A37D622aA95784a4FCcB130

I don’t think it messed up the old contract right (0x3206a055d7d2854aAa7eD8F25F6ab4FF3BF101CB)? as i didn’t run upgrade, etc before. (I only deployed with commands on my first msg)

1 Like

Hi @surfer77,

It just means that you are sharing the ProxyAdmin for both projects. If you change the ownership of the ProxyAdmin it will impact both projects.

1 Like

I ended up removing the .openzepelin and redeploying from scratch and all worked well :slight_smile:

Thanks for the answers and always help

1 Like