Token with Mintable Supply
A fungible token with a mintable supply can be minted once and has the functionality to mint additional tokens throughout its lifetime.
The smart contract template for fungible tokens with a mintable supply is suited for uses cases where the token should follow additional issuance in the future. After deployment, new tokens can be created.
Variables
_name: The name of your token contract
_symbol: The ticker symbol ($XXX) of your token contract
_decimals: The total decimals (after 0) of your token. Generally this is set ot 18.
_totalSupply: The total supply of your minted token. This is the initial supply. New tokens can be minted.
Functions
owner
None
Returns the address of the current owner.
address
renounceOwnership
None
Allows the current owner to relinquish control of the contract.
emits OwnershipTransferred
event
transferOwnership
address newOwner
Transfers ownership of the contract to a new account.
emits OwnershipTransferred
event
getOwner
None
Returns the token owner address.
address
decimals
None
Returns the token decimals.
uint8
symbol
None
Returns the token symbol.
string memory
name
None
Returns the token name.
string memory
totalSupply
None
Returns the total token supply.
uint256
balanceOf
address account
Returns the number of tokens owned by an account.
uint256
_transfer
address recipient, uint256 amount
Transfers tokens to a specified address.
bool
allowance
address owner, address spender
Returns the remaining number of tokens that spender is allowed to spend.
uint256
approve
address spender, uint256 amount
Sets the amount of tokens that a spender is allowed to withdraw.
bool
transferFrom
address sender, address recipient, uint256 amount
Moves tokens from sender
to recipient
using allowance mechanism.
bool
increaseAllowance
address spender, uint256 addedValue
Atomically increases the allowance granted to a spender.
bool
decreaseAllowance
address spender, uint256 subtractedValue
Atomically decreases the allowance granted to a spender.
bool
burn
uint256 amount
Destroys a specified amount of tokens from the caller.
emits Transfer
event
burnFrom
address account, uint256 amount
Destroys a specified amount of tokens from an account, deducting from the caller's allowance.
emits Transfer
event
mint
address account, uint256 amount
Creates new tokens and assigns them to an account, increasing the total supply.
None
Last updated