openzeppelin-upgrades
openzeppelin-upgrades copied to clipboard
CLI: UpgradeableBeacon incorrectly detected as upgradeable implementation
UpgradeableBeacon is incorrectly detected as an upgradable implementation because it has a function with signature upgradeTo(address), which causes it to "look" like a UUPS implementation, even though this function is for the beacon itself and not related to UUPS.
Steps to reproduce:
- Install https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/ using Foundry
- Run upgrades core CLI
- The following error occurs:
lib/openzeppelin-contracts/contracts/proxy/beacon/UpgradeableBeacon.sol:UpgradeableBeacon
lib/openzeppelin-contracts/contracts/proxy/beacon/UpgradeableBeacon.sol:31: Contract `UpgradeableBeacon` has a constructor
Define an initializer instead
https://zpl.in/upgrades/error-001
lib/openzeppelin-contracts/contracts/access/Ownable.sol:38: Contract `Ownable` has a constructor
Define an initializer instead
https://zpl.in/upgrades/error-001
+1 to this, I need to call npx @openzeppelin/upgrades-core@^1.32.3 validate from a GHA and this happens.