View Source: openzeppelin-solidity/contracts/access/Roles.sol
Roles
Library for managing addresses assigned to a Role.
struct Role {
mapping(address => bool) bearer
}
- add(struct Roles.Role role, address account)
- remove(struct Roles.Role role, address account)
- has(struct Roles.Role role, address account)
Give an account access to this role.
function add(struct Roles.Role role, address account) internal nonpayable
Arguments
Name | Type | Description |
---|---|---|
role | struct Roles.Role | |
account | address |
Remove an account's access to this role.
function remove(struct Roles.Role role, address account) internal nonpayable
Arguments
Name | Type | Description |
---|---|---|
role | struct Roles.Role | |
account | address |
Check if an account has this role.
function has(struct Roles.Role role, address account) internal view
returns(bool)
Returns
bool
Arguments
Name | Type | Description |
---|---|---|
role | struct Roles.Role | |
account | address |