Access Control Enumerable Upgradeable

Extension of {AccessControl} that allows enumerating the members of each role.

Methods

DEFAULT_ADMIN_ROLE

function DEFAULT_ADMIN_ROLE() external view returns (bytes32)

Returns

Name
Type
Description

_0

bytes32

undefined

getRoleAdmin

function getRoleAdmin(bytes32 role) external view returns (bytes32)

Returns the admin role that controls role. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.

Parameters

Name
Type
Description

role

bytes32

undefined

Returns

Name
Type
Description

_0

bytes32

undefined

getRoleMember

Returns one of the accounts that have role. index must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.

Parameters

Name
Type
Description

role

bytes32

undefined

index

uint256

undefined

Returns

Name
Type
Description

_0

address

undefined

getRoleMemberCount

Returns the number of accounts that have role. Can be used together with {getRoleMember} to enumerate all bearers of a role.

Parameters

Name
Type
Description

role

bytes32

undefined

Returns

Name
Type
Description

_0

uint256

undefined

grantRole

Overload {grantRole} to track enumerable memberships

Parameters

Name
Type
Description

role

bytes32

undefined

account

address

undefined

hasRole

Returns true if account has been granted role.

Parameters

Name
Type
Description

role

bytes32

undefined

account

address

undefined

Returns

Name
Type
Description

_0

bool

undefined

renounceRole

Overload {renounceRole} to track enumerable memberships

Parameters

Name
Type
Description

role

bytes32

undefined

account

address

undefined

revokeRole

Overload {revokeRole} to track enumerable memberships

Parameters

Name
Type
Description

role

bytes32

undefined

account

address

undefined

supportsInterface

See {IERC165-supportsInterface}.

Parameters

Name
Type
Description

interfaceId

bytes4

undefined

Returns

Name
Type
Description

_0

bool

undefined

Events

RoleAdminChanged

Parameters

Name
Type
Description

role indexed

bytes32

undefined

previousAdminRole indexed

bytes32

undefined

newAdminRole indexed

bytes32

undefined

RoleGranted

Parameters

Name
Type
Description

role indexed

bytes32

undefined

account indexed

address

undefined

sender indexed

address

undefined

RoleRevoked

Parameters

Name
Type
Description

role indexed

bytes32

undefined

account indexed

address

undefined

sender indexed

address

undefined

Last updated