How is there one ProxyAdmin contract per network per project?

Hi @abcoathup,

There is one ProxyAdmin contract per network per project

Could you explain in more detail how that happens? During the course of my development I have moved around many things, deleted migrations to simulate mainnet deployment, and now have no idea where the proxy admin is.

1 Like

Hello there! The ProxyAdmin is a central feature of the Transparent Proxy Pattern, and its role is to be the sole address that can interact with the proxy methods, rendering the proxy “transparent” to every other address.

The ProxyAdmin contract is deployed by the Upgrades plugin the first time you deploy a proxy, then it’s stored in the manifest file under the .openzeppelin/ directory and reused for future proxy deployments.

From the Upgrades Plugins documentation:

Both plugins provide two main functions, deployProxy and upgradeProxy , which take care of managing upgradeable deployments of your contracts. In the case of deployProxy , this means:

  1. Validate that the implementation is upgrade safe.
  2. Deploy a proxy admin for your project.
  3. Deploy the implementation contract.
  4. Create and initialize the proxy contract.
2 Likes