I Access Control Enumerable
Last updated
Last updated
External interface of AccessControlEnumerable declared to support ERC165 detection.
Returns the admin role that controls role
. See {grantRole} and {revokeRole}. To change a role's admin, use {AccessControl-_setRoleAdmin}.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
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.
Name | Type | Description |
---|---|---|
Returns the number of accounts that have role
. Can be used together with {getRoleMember} to enumerate all bearers of a role.
Grants role
to account
. If account
had not been already granted role
, emits a {RoleGranted} event. Requirements: - the caller must have role
's admin role.
Returns true
if account
has been granted role
.
Revokes role
from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted role
, emits a {RoleRevoked} event. Requirements: - the caller must be account
.
Revokes role
from account
. If account
had been granted role
, emits a {RoleRevoked} event. Requirements: - the caller must have role
's admin role.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
role
bytes32
undefined
_0
bytes32
undefined
role
bytes32
undefined
index
uint256
undefined
_0
address
undefined
role
bytes32
undefined
_0
uint256
undefined
role
bytes32
undefined
account
address
undefined
role
bytes32
undefined
account
address
undefined
_0
bool
undefined
role
bytes32
undefined
account
address
undefined
role
bytes32
undefined
account
address
undefined
role indexed
bytes32
undefined
previousAdminRole indexed
bytes32
undefined
newAdminRole indexed
bytes32
undefined
role indexed
bytes32
undefined
account indexed
address
undefined
sender indexed
address
undefined
role indexed
bytes32
undefined
account indexed
address
undefined
sender indexed
address
undefined