Why ERC1967Proxy needs admin management?

The ERC1967Proxy inherits ERC1967Upgrade which in turn has proxy admin management functions (e.g. _changeAdmin). All of those functions are either private or internal and are never used in the ERC1967Proxy inheriting them.

I guess the functions are reserved for those who want to modify ERC1967Proxy. But why would anyone need it when all the logic (including upgradability) is on the implementation side? Is there a real world example?

ERC1967Upgrade simply provides helper functions for working with ERC1967 storage slots. If the contract that inherits it does not use some of those private functions, that is fine and they will not be included by the optimizer.

The admin functions are used by TransparentUpgradeableProxy which inherits ERC1967Proxy which inherits ERC1967Upgrade.

1 Like