Skip to content

Instantly share code, notes, and snippets.

@jmerestain
Created April 14, 2020 08:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmerestain/34c45e2356303ff6a1c3cf82e5a2955e to your computer and use it in GitHub Desktop.
Save jmerestain/34c45e2356303ff6a1c3cf82e5a2955e to your computer and use it in GitHub Desktop.
@public
def mint(_to: address, _value: uint256):
"""
@dev Mint an amount of the token and assigns it to an account.
This encapsulates the modification of balances such that the
proper events are emitted.
@param _to The account that will receive the created tokens.
@param _value The amount that will be created.
"""
assert self.issuers[msg.sender] == True
assert _to != ZERO_ADDRESS
self.total_supply += _value
self.balanceOf[_to] += _value
log.Transfer(ZERO_ADDRESS, _to, _value)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment