Library for managing the address assigned to a role. During initialization, the score deployer is added to the minterslist, pauserslist and burnerlist, i.e. the deployer can perform all these operations from the start.
It is used to assign a address to a specific role. It is an internal function, which is called from the function in minterrole
, burnerrole
and pauserrole
. The role is checked, and that role is assigned to the address.
def add(self, Role: str, _account: Address):
It is used to remove a address from a specific role. It is an internal function, which is called from the function in minterrole
, burnerrole
and pauserrole
. The role is checked, then the address is checked to see if it has that role. Then, the address is removed from that role.
def remove(self, Role: str, _account: Address):
It is used to check if a address is assigned to a specific role. It is an internal function, which is called from the function in minterrole
, burnerrole
and pauserrole
.
def has(self, Role: str, _account: Address) -> bool:
It is used to return the list of the minters, i.e. the addresses that were given permission to mint the tokens.
def _mintersList(self):
It is used to return the list of the burners, i.e. the addresses that were given permission to burn the tokens.
def burnersList(self):
It is used to return the list of the pausers, i.e. the addresses that were given permission to pause and unpause the operations.
def pausersList(self):