-
Benefits of setting a token standard is that it allows developers to create smart contracts taht are specific to different platforms depending on its use case. This is why there is the ERC20 standard for fungible smart contracts that can be hosted in wallets and exchanges, and there is the ERC721 standard for NFTs that are hosted in video game platforms.
-
All ERC20 tokens have the below functions:
totalSupply() sets a cap on the maximum supply to the number of tokens available.
balanceOf(address account) shows the number of tokens held by an address
transfer() transfers a number of tokens from the sender to another address
approve() functions to allows a token holder the ability to give another address approval to transfer up to a certain number of tokens.
allowance() provides the number of tokens allowed to be transferred from a given address by another.