Skip to content

Refactor AccessControl#277

Open
maxnorm wants to merge 2 commits intoPerfect-Abstractions:mainfrom
maxnorm:review-facets
Open

Refactor AccessControl#277
maxnorm wants to merge 2 commits intoPerfect-Abstractions:mainfrom
maxnorm:review-facets

Conversation

@maxnorm
Copy link
Collaborator

@maxnorm maxnorm commented Feb 23, 2026

Summary

Split AccessControl to match the new facet based approach

Changes Made

Checklist

Before submitting this PR, please ensure:

  • Code follows the Solidity feature ban - No inheritance, constructors, modifiers, public/private variables, external library functions, using for directives, or selfdestruct

  • Code follows Design Principles - Readable, uses diamond storage, favors composition over inheritance

  • Code matches the codebase style - Consistent formatting, documentation, and patterns (e.g. ERC20Facet.sol)

  • Code is formatted with forge fmt

  • Existing tests pass - Run tests to be sure existing tests pass.

  • New tests are optional - If you don't provide tests for new functionality or changes then please create a new issue so this can be assigned to someone.

  • All tests pass - Run forge test and ensure everything works

  • Documentation updated - If applicable, update relevant documentation

Make sure to follow the contributing guidelines.

Additional Notes

@netlify
Copy link

netlify bot commented Feb 23, 2026

👷 Deploy request for compose-diamonds pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 1bc8947

* @dev Emits a {RoleGranted} event.
* @custom:error AccessControlUnauthorizedAccount If the caller is not the admin of the role.
*/
function grantRole(bytes32 _role, address _account) external {
Copy link
Collaborator Author

@maxnorm maxnorm Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure on how far we split. I've added grant and revoke together as "Roles" but we can easily see 2 different facets for each

@maxnorm maxnorm requested a review from mudgen February 23, 2026 21:41
@maxnorm maxnorm force-pushed the review-facets branch 2 times, most recently from 0006f72 to 1bc8947 Compare February 24, 2026 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant