Skip to content
ClearClear
Docs
Protocol/AccessManager

AccessManager

Source: contracts/peripherals/AccessManager.sol · Guide: credit

1 min readUpdated View source

On this page
Network
Chain id
Address
Base Sepolia
84532

Functions that change state

Function
Who can call
Also
grantAdmin(address admin)
onlyAdmin
notNull(admin), notAdmin(admin)
grantMember(address member)
onlyOperator
notNull(member), notMember(member)
grantOperator(address operator)
onlyAdmin
notNull(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)
onlyOperator
revokeOperator(address operator)
onlyOperator
_isOperator(operator)
revokeRole(bytes32 role, address account)
The role's admin role (DEFAULT_ADMIN_ROLE unless set otherwise)
setMembershipRegistry(address registry)
onlyAdmin

Read 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.