Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For each function a modifier is attached to, the bytecode of the full modifier is added (reference here). So, by adding a private/internal function call, the bytecode of the logic statements is only copied to the contract once and each modifier only references the function call.
I went ahead and turned the modifiers we've made into private func calls. I left
onlyOwner
as-is to maintain the Synthetix code. One thing I'm wondering- what are your thoughts of removingOwned.sol
in favor of OZ's Ownable2Step?