Skip to content

Latest commit

 

History

History
86 lines (53 loc) · 1.73 KB

burnerrole.md

File metadata and controls

86 lines (53 loc) · 1.73 KB

Burner Role

Methods

isBurner

Returns if _account is a burner, i.e. has permission to burn tokens.

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

burnersList

Returns the list of burners. It calls the internal function _burnersList from roles.

def burnersList(self):

addBurner

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

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

removeBurner

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

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

renounceBurner

Can be called only by burners. Renounces the position of address who executes this method as a burner. Then, the address no longer has permission to burn the tokens.

def renounceBurner(self) -> bool:

EventLogs

BurnerAdded

Triggered when a new burner is added.

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

BurnerRemoved

Triggered when a burner is removed.

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

Internal Functions

_addBurner

Adds _account to the burners list and emits BurnerAdded event.

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

_removeBurner

Removes _account from the burners list and emits BurnerRemoved event.

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

Implementation