Hello!
I'm building a custom NFT that is meant to be upgradeable. I'm currently using the recommended UUPS proxies,
contract Blabla is Initializable, ERC721Upgradeable, ERC721BurnableUpgradeable, AccessControlUpgradeable, UUPSUpgradeable {
which are created from a factory method (that lives in a separate smart contract) like this:
bytes memory data = // some initialization stuff
ERC1967Proxy proxy = new ERC1967Proxy(implAddress, data);
...
I'm deploying all with hardhat and it works great - even the upgrades.
The situation at the moment is:
Proxy ----> Impl Address
My understanding is that if I want my NFT to be upgraded, I should upgrade proxy
. However, I expect a ton of proxies out there, and I'd like to avoid having to update each individual one. This would be painful both for users or even myself.
Instead, what I was thinking about was:
Proxy, Proxy2 ----> Implementation Proxy -----> Implementation v1
In this context, if I upgraded Implementation Proxy
, it would make both Proxy and Proxy2 to point to a newer implementation:
Proxy, Proxy2 ----> Implementation Proxy -----> Implementation v2
Any thoughts on the pros/cons of this? Is this something that makes sense or are there any red flags?
Thanks a lot in advance.
Code to reproduce