Consider contract @openzeppelin5/contracts/proxy/utils/Initializable.sol
where INITIALIZABLE_STORAGE
constant is defined as private. It makes sense, Initializable
is base contract.
Now consider AppUpgradeableContract.sol
which inherits from Initializable
and keeps application specific logic. It defines own CONTRACT_STORAGE
constant
Now to my question: is it important to keep CONTRACT_STORAGE
private? From my perspective it can be made public IF AppUpgradeableContract.sol
will be inherited ONLY by a newer version of application
I think that makes sense (or a similar thing can be said but for the storage slot getter which uses that constant). Normally you'd want it to be private, otherwise it would be like exposing private variables for inheritance.