Skip to content

contract.Roles

Aleksey Bykhun edited this page Jan 18, 2023 · 1 revision

Roles

Git Source

Library for managing addresses assigned to a Role.

Functions

add

Give an account access to this role.

function add(Role storage role, address account) internal;

remove

Remove an account's access to this role.

function remove(Role storage role, address account) internal;

has

Check if an account has this role.

function has(Role storage role, address account) internal view returns (bool);

Returns

Name Type Description
<none> bool bool

Structs

Role

struct Role {
    mapping(address => bool) bearer;
}
Clone this wiki locally