In our contracts we have 3 permission access levels.
Admin, operator, Alerter. with designated modifiers. namely: OnlyAdmin, OnlyOperator, OnlyAlerter. All in one base contract inherited by many others.
in our new version. We have reached bytecode size limit. And from the quest to reduce code size, decided to switch those modifiers into functions with same name and logic. It achieved up to 1000 bytes code size savings in one contract.
I know onlyOwner by zeppelin is also a modifier.
but couldn’t find anywhere why is it important for the access permission to be handled in a modifier rather then a function.
I know its inlined so gas consumption is a bit better. But for us the relevant functions are not used frequently.
But either then that - what is hiding their?