-
The benefits of setting a token standard like ERC20 is that it increases efficiency and allows tokens to operate on platforms and wallets seamlessly.
-
The functions that are in the ERC20 are:
- totalSupply() which gives a number as an output. This number is the total supply of the token
- balanceOf() which takes the address of an owner as the input and gives the balance of the users as output
- allowance() function takes in the address of the tokenOwner and the spender and gives as output, the number of tokens allowed to be transferred from a given address by another given address.
- transfer() function simply takes in the address of the receiver and the funds which are to be sent to the account
- approve() function. You can approve someone to spend from your account.
- transferFrom() function. It takes in three inputs — the address of the sender, the address of the receiver, as well as the number of tokens to be transferred. And gives an output of the success or failure of the transfer.