Skip to content

Latest commit

 

History

History
96 lines (70 loc) · 1.98 KB

Roles.md

File metadata and controls

96 lines (70 loc) · 1.98 KB

Roles (Roles.sol)

View Source: openzeppelin-solidity/contracts/access/Roles.sol

Roles

Library for managing addresses assigned to a Role.

Structs

Role

struct Role {
 mapping(address => bool) bearer
}

Functions

add

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

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

has

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

Contracts