AccessControl
# contract AccessControl
is
IAccessControl
ERC165
Element
# function DEFAULT_ADMIN_ROLE
view
function DEFAULT_ADMIN_ROLE() external view returns (bytes32);
Returns:
Type | Internal Type | Name | Info |
---|---|---|---|
bytes32 | bytes32 | 0 | - |
# function db
view
Gets the DB contract
function db() external view returns (address);
Returns:
Type | Internal Type | Name | Info |
---|---|---|---|
address | contract IDB | 0 | The DB contract |
# function getRoleAdmin
view
Gets the admin of the role
function getRoleAdmin(bytes32 role) external view returns (bytes32);
Arguments:
Type | Internal Type | Name | Info |
---|---|---|---|
bytes32 | bytes32 | role | The role to get the admin for |
Returns:
Type | Internal Type | Name | Info |
---|---|---|---|
bytes32 | bytes32 | 0 | The admin of the role |
# function grantRoleAccount
onlyRole(getRoleAdmin(role))
Grants the role to the account
function grantRoleAccount(bytes32 role, address account) external;
Arguments:
Type | Internal Type | Name | Info |
---|---|---|---|
bytes32 | bytes32 | role | The granted role |
address | address | account | The account the role is granted to |
# function grantRoleKey
onlyRole(getRoleAdmin(role))
Grants the role to the DB key
function grantRoleKey(bytes32 role, bytes32 key) external;
Arguments:
Type | Internal Type | Name | Info |
---|---|---|---|
bytes32 | bytes32 | role | The granted role |
bytes32 | bytes32 | key | The DB key the role is granted to |
# function hasRole
view
Checks if the account has the role
function hasRole(bytes32 role, address account) external view returns (bool);
Arguments:
Type | Internal Type | Name | Info |
---|---|---|---|
bytes32 | bytes32 | role | The role the account is checked against |
address | address | account | The |
Returns:
Type | Internal Type | Name | Info |
---|---|---|---|
bool | bool | 0 | If the account has the role |
# function renounceRole
Removes the role from the message sender
function renounceRole(bytes32 role, address account) external;
Arguments:
Type | Internal Type | Name | Info |
---|---|---|---|
bytes32 | bytes32 | role | The revoked role |
address | address | account | The message sender |
# function revokeRoleAccount
onlyRole(getRoleAdmin(role))
Revokes the role from the account
function revokeRoleAccount(bytes32 role, address account) external;
Arguments:
Type | Internal Type | Name | Info |
---|---|---|---|
bytes32 | bytes32 | role | The revoked role |
address | address | account | The account the role is revoked from |
# function revokeRoleKey
onlyRole(getRoleAdmin(role))
Revokes the role from the DB key
function revokeRoleKey(bytes32 role, bytes32 key) external;
Arguments:
Type | Internal Type | Name | Info |
---|---|---|---|
bytes32 | bytes32 | role | The revoked role |
bytes32 | bytes32 | key | The DB key the role is revoked from |
# function supportsInterface
view
See {IERC165-supportsInterface}.
function supportsInterface(bytes4 interfaceId) external view returns (bool);
Arguments:
Type | Internal Type | Name | Info |
---|---|---|---|
bytes4 | bytes4 | interfaceId | 0 |
Returns:
Type | Internal Type | Name | Info |
---|---|---|---|
bool | bool | 0 | - |