IRolesBase is an interface that abstracts the implementation of a contract with role control internal functions.
error MissingRole(address account, uint8 role)
error MissingAllRoles(address account, uint256 accountRoles)
error MissingAnyOfRoles(address account, uint256 accountRoles)
error InvalidProposedRoles(address fromAccount, address toAccount, uint256 accountRoles)
event RolesProposed(address fromAccount, address toAccount, uint256 accountRoles)
event RolesAdded(address account, uint256 accountRoles)
event RolesRemoved(address account, uint256 accountRoles)
function hasRole(address account, uint8 role) external view returns (bool)
Checks if an account has a role.
Name | Type | Description |
---|---|---|
account | address | The address to check |
role | uint8 | The role to check |
Name | Type | Description |
---|---|---|
[0] | bool | True if the account has the role, false otherwise |