AccessManager
Source: contracts/peripherals/AccessManager.sol · Guide: credit
Functions that change state
Function
Who can call
Also
grantAdmin(address admin)onlyAdminnotNull(admin), notAdmin(admin)grantMember(address member)onlyOperatornotNull(member), notMember(member)grantOperator(address operator)onlyAdminnotNull(operator), notOperator(operator)grantRole(bytes32 role, address account)The role's admin role (
DEFAULT_ADMIN_ROLE unless set otherwise)initialize(address admin)Once, when the proxy is initialised
renounceRole(bytes32 role, address account)Only the account renouncing its own role
revokeAdmin(address admin)onlyAdmin_isAdmin(admin)revokeMember(address member)onlyOperatorrevokeOperator(address operator)onlyOperator_isOperator(operator)revokeRole(bytes32 role, address account)The role's admin role (
DEFAULT_ADMIN_ROLE unless set otherwise)setMembershipRegistry(address registry)onlyAdminRead functions
Anyone can call these; they change nothing.
Function
Returns
DEFAULT_ADMIN_ROLE()bytes32
getRoleAdmin(bytes32 role)bytes32
hasRole(bytes32 role, address account)bool
isAdmin(address admin)bool
isMember(address member)bool
isOperator(address operator)bool
membershipRegistry()address
supportsInterface(bytes4 interfaceId)bool
Events
Event
AdminAdded(address admin)AdminRemoved(address admin)Initialized(uint8 version)MemberAdded(address member)MemberRemoved(address member)MembershipRegistryUpdated(address registry)OperatorAdded(address operator)OperatorRemoved(address operator)RoleAdminChanged(bytes32 role indexed, bytes32 previousAdminRole indexed, bytes32 newAdminRole indexed)RoleGranted(bytes32 role indexed, address account indexed, address sender indexed)RoleRevoked(bytes32 role indexed, address account indexed, address sender indexed)Errors
No custom errors; failures revert with a reason string.