When a child contract inherits ERC725X and override the public execute functions (standards and batch), if super is used in the function body, the onlyOwner modifier will run twice.
Move the logic from the execute (standard and batch) inside their own internal function. This allow to easily override the internal functions in child contract to modify the core logic only, without adding duplicate checks.
What does this PR introduce?
When a child contract inherits ERC725X and override the public
execute
functions (standards and batch), ifsuper
is used in the function body, theonlyOwner
modifier will run twice.Move the logic from the
execute
(standard and batch) inside their own internal function. This allow to easily override theinternal
functions in child contract to modify the core logic only, without adding duplicate checks.