I am developing a contract that extends both UUPSUpgradeable
and AccessManaged
. I would like to restrict access to the upgrade function by overriding _authorizeUpgrade
like so:
function _authorizeUpgrade(address) internal override restricted {}
However, the documentation explicitly recommends against the use of restricted
on internal
functions:
The
restricted
modifier should never be used oninternal
functions, judiciously used inpublic
functions, and ideally only used inexternal
functions.
Are any recommendations or best practices for restricting access to _authorizeUpgrade
in an AccessManaged
contract? As far as I can tell, using restricted
here DOES have the desired effect, but I would like to make sure that this is okay to do given the warnings in the documentation above.