Upgrade Transparent Proxy to UUPS

Is it possible to upgrade from a Transparent Proxy Pattern to the UUPS pattern? This sentence below taken from the 'Proxies' doc page seems that its referencing 'Transparent to UUPS' as 'old to new' but I want to be sure on that assumption.

"It is possible to upgrade from a contract using the old mechanism to a new one"

Page - https://docs.openzeppelin.com/contracts/5.x/api/proxy

:1234: Code to reproduce

:computer: Environment

The documentation's statement about old to new is referring to the security mechanism for checking whether an upgrade remains UUPS compliant. The old mechanism refers to a rollback check, while the new mechanism refers to using the ERC1822 interface. Both of those are for UUPS implementations.

Converting a transparent proxy to UUPS is not officially supported. It should be possible to make a transparent proxy behave like UUPS by upgrading to an implementation that extends UUPSUpgradeable, then renouncing the ownership of the ProxyAdmin -- this effectively shifts the upgrade logic to the implementation. However, this hasn't been tested, some tooling may stop working after the conversion (for example, the Upgrades Plugins may not identify it as UUPS), and you may not have the gas effectiveness of UUPS (calls still need to go through the transparent proxy which is more expensive). If you want to consider this, ensure you review and test it extensively.

1 Like