Purpose

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.

Responsibilities

Storage Layout

struct MellowACLStorage {
  EnumerableSet.Bytes32Set supportedRoles;
}
SlotLibrary.getSlot("MellowACL", name_, version_)

View Functions

supportedRoles() → uint256

Returns the number of currently active roles (i.e., roles with at least one member).

supportedRoleAt(index: uint256) → bytes32

Returns the role identifier at the specified index from the active role set.

hasSupportedRole(role: bytes32) → bool

Returns true if the role is currently active (i.e., assigned to at least one account).