What is "Warning: A proxy admin was previously deployed on this network"

Currently deploying Proxy contract using the following code:

  const Foo = await ethers.getContractFactory("Foo");
  const foo = await upgrades.deployProxy(
    { initializer: "initialize" }

This warning message is appearing in all my tests:

Warning: A proxy admin was previously deployed on this network

    This is not natively used with the current kind of proxy ('uups').
    Changes to the admin will have no effect on this new proxy.

Is this cause of concern or can I simply ignore?

:computer: Environment

Hardhat / Openzeppelin

Hi @fabda,

This happens if you've previously deployed a Transparent proxy (which makes use of a proxy admin) and then try to deploy a UUPS proxy afterwards. The warning is just a reminder that proxy admins only apply to Transparent proxies and have no effect on UUPS proxies.

As long as you keep that in mind, you can safely ignore this warning or disable the warning. See https://github.com/OpenZeppelin/openzeppelin-upgrades/issues/369#issuecomment-920399254 for more details.

1 Like