question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UUPS: Warning: A proxy admin was previously deployed on this network.

See original GitHub issue

After a clean install, deploying only UUPS proxy contracts, the following warning is thrown during each contract deployment for a local hardhat network.

Warning: A proxy admin was previously deployed on this network.

My guess is that the plugin still deploys a proxy admin for UUPS proxies, or that somehow some data from my previous Transparent proxy deployments is still in my computer somewhere, triggering the alert – but as I said, I did try with a clean dependency install.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:17 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
aspierscommented, Oct 9, 2021

“UUPS deployment does not use an admin” caused me some confusion at first - I think I understand what you mean now, but I’d like to double check if that’s OK?

Let me start by explaining the origin of my confusion as I understand it. My thinking was as follows:

Any upgradeable proxy, including a UUPS proxy, needs at least one account which can upgrade it (let’s ignore the crazy corner case where upgrade is a permissionless action which anyone can do). So thinking intuitively without focusing on any details of how UUPS works, that account is the notional “admin” of the proxy. Therefore according to that somewhat non-technical perspective of (say) a developer building these upgradeable proxies, or of an admin who wants to be able to upgrade them, it’s somewhat confusing to read a statement saying that a UUPS deployment does not use an admin.

However, I think your point was that it is not the UUPS code itself which determines the admin, but the code of the underlying implementation - right? And this is one of the main distinguishing features of UUPS vs. transparent: that UUPS delegates not only normal method calls, but also the management of the upgrade process itself.

In that respect, for UUPS proxies it is not OZ which is managing the admin role, whereas for transparent proxies it is. Did I get that right?

So in the context of this issue report, it would be great if the error message these nuances somehow more clear.

Thanks a lot!

2reactions
frangiocommented, May 27, 2021

Thank you for reporting @rellfy.

Did you delete the .openzeppelin/unknown-31337.json file? This is the network file for Hardhat Network.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is "Warning: A proxy admin was previously deployed on ...
This happens if you've previously deployed a Transparent proxy (which makes use of a proxy admin) and then try to deploy a UUPS...
Read more >
UUPS: Warning: A proxy admin was previously deployed on ...
After a clean install, deploying only UUPS proxy contracts, the following warning is thrown during each contract deployment for a local hardhat network....
Read more >
openzeppelin-upgrades/deploy-proxy.ts at master - GitHub
logWarning(`A proxy admin was previously deployed on this network`, [. `This is not natively used with the current kind of proxy ('uups').`,.
Read more >
Using the UUPS proxy pattern to upgrade smart contracts
UUPS is a gas-efficient proxy pattern that allows underlying logic to be upgraded when needed, without losing previous data.
Read more >
How to create a Beacon Proxy - Medium
Let's dive in and deploy a smart contract with the UUPS proxy pattern. ... Warning: A proxy admin was previously deployed on this...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found