Skip to content

Latest commit

 

History

History
86 lines (53 loc) · 1.74 KB

minterrole.md

File metadata and controls

86 lines (53 loc) · 1.74 KB

Minter Role

Methods

isMinter

Returns if _account is a minter, i.e. has permission to mint tokens.

def isMinter(self, _account: Address) -> bool:

mintersList

Returns the list of minters. It calls the internal function _mintersList from roles.

def mintersList(self):

addMinter

Adds _account to the minters list. Then, the _account has permission to mint the tokens. Can be called only by the owner of the SCORE.

def addMinter(self, _account: Address) -> bool:

removeMinter

Removes _account from the minters list. Then, the _account no longer has permission to mint the tokens. Can be called only by the owner of the SCORE.

def removeMinter(self, _account: Address) -> bool:

renounceMinter

Can be called only by the minters. Renounces the position of address who executes this method as a minter. Then, the _account no longer has permission to mint the tokens.

def renounceMinter(self) -> bool:

EventLogs

MinterAdded

Triggered when a new minter is added.

@eventlog(indexed=0)
      def MinterAdded(self, _account: Address):

MinterRemoved

Triggered when a minter is removed.

@eventlog(indexed=0)
      def MinterRemoved(self, _account: Address):

Internal Functions

_addMinter

Adds _account to the minters list and emits MinterAdded event.

def _addMinter(self, _account: Address) -> None:

_removeMinter

Removes _account from the minters list and emits MinterRemoved event.

def _removeMinter(self, _account: Address) -> None:

Implementation