Roles
View Source: @nomisma/elektro-protocol-aux/contracts/backward-compatibility/Roles.sol
Roles
Library for managing addresses assigned to a Role. Contract defines struct Role
that keeps mapping for which address has requested Role
Structs
Role
Functions
add(struct Roles.Role role, address account)
remove(struct Roles.Role role, address account)
has(struct Roles.Role role, address account)
add
Function to grant role to account. New address is added to role
mapping
Arguments
role
struct Roles.Role
Role mapping of current roles to addresses
account
address
to grant role to
remove
Function to grant role to account. Address is removed from role
mapping
Arguments
role
struct Roles.Role
Role mapping of current roles to addresses
account
address
to remove from the mapping
has
Function to check if address is present in roleMapping
Arguments
role
struct Roles.Role
Role mapping of current roles to addresses
account
address
to check if its present in the mapping
Last updated
Was this helpful?