Token with Fixed Supply
A fungible token with a fixed supply can be minted once and has a total maximum supply for all of its lifetime.
Last updated
A fungible token with a fixed supply can be minted once and has a total maximum supply for all of its lifetime.
Last updated
The smart contract template for fungible tokens with a fixed supply. After deployment, no new tokens can be created.
The fixed supply version of a token guarantees that no additional tokens can be created after initial deployment.
_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. For this contract this will be the maximum supply to ever exist.
Function | Input Parameters | Description | Output |
---|---|---|---|
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