Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SC-472] Move everything to AccessControl roles #20

Merged

Conversation

hexonaut
Copy link
Contributor

This PR removes the onlyThis and onlyGuardian modifiers and merges them into the more general access control contract. You may be wondering why the bridge receiver was moved back to a non-default-admin role SUBMISSION_ROLE . This is because all that actions that are admin such as set the guardian, update delay, etc should only be accessible behind the delay. IE the receiver (eg. OptimismReceiver) should not be overall admin able to execute changes without the delay.

Instead queue should be specific to bridge receiver to put a message in a delay, and the default admin is the contract itself. See: _grantRole(DEFAULT_ADMIN_ROLE, address(this)); in the Executor constructor.

So in summary:

Submission role: can submit messages under a delay
Guardian role: can cancel queued messages
Default admin role: can do anything without delay including change delay, guardian role, submission role, etc.

test/Executor.t.sol Outdated Show resolved Hide resolved
test/Executor.t.sol Show resolved Hide resolved
Copy link

Coverage after merging SC-472-guardian-merge-into-access-control into SC-463-merge-auth-bridge will be

100.00%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   Executor.sol100%100%100%100%

@hexonaut hexonaut merged commit 56bfd0a into SC-463-merge-auth-bridge Jun 14, 2024
3 checks passed
@hexonaut hexonaut deleted the SC-472-guardian-merge-into-access-control branch June 14, 2024 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants