ERC725Alliance / ERC725

Repository for code and discussion around ERC725 and related standards
Apache License 2.0
127 stars 66 forks source link

refactor: move ERC725X logic inside internal functions #184

Closed CJ42 closed 1 year ago

CJ42 commented 1 year ago

What does this PR introduce?

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.