MellowACL is a lightweight but extendable access control layer that wraps OpenZeppelin’s AccessControlEnumerableUpgradeable. It introduces automatic tracking and enumeration of active roles to improve governance transparency.
This contract is intended to be inherited by modules that require dynamic role management and storage-isolated initialization.
struct MellowACLStorage {
EnumerableSet.Bytes32Set supportedRoles;
}
supportedRoles: A unique set of role identifiers (bytes32) currently assigned to any addressSlotLibrary.getSlot("MellowACL", name_, version_)
supportedRoles() → uint256Returns the number of currently active roles (i.e., roles with at least one member).
supportedRoleAt(index: uint256) → bytes32Returns the role identifier at the specified index from the active role set.
hasSupportedRole(role: bytes32) → boolReturns true if the role is currently active (i.e., assigned to at least one account).