Skip to main content

GenericERC20

This contract simulates a generic ERC20 token that is mintable and burnable.

Functions#

constructor#

function constructor(
string name_,
string symbol_,
uint8 decimals_
) public

Deploy this contract with given name, symbol, and decimals

the caller of this constructor will become the owner of this contract

Parameters:#

NameTypeDescription
name_stringname of this token
symbol_stringsymbol of this token
decimals_uint8number of decimals this token will be based on

mint#

function mint(
address recipient,
uint256 amount
) external

Mints given amount of tokens to recipient

only owner can call this mint function

Parameters:#

NameTypeDescription
recipientaddressaddress of account to receive the tokens
amountuint256amount of tokens to mint