Homework: ERC20

  1. With a unified standard such as ERC20 exchanges, wallets, developers etc can all essentially sing of the same hymn sheet and collaborate easily knowing that they are all adhering to the same baseline standard.
  2. Most standard functions for the ERC20 standard are to do with querying balances (balanceOf), and transferring (transfer()).
1 Like

1. By setting a token standard such as ERC20, it makes it easier for programing the tokens. as all those tokens has the same standard on the Ethreum blockchain, it makes it easier for all of them to interact with each other in different smart contracts and dapps. as the programmers follow the same coding standard for ERC20 tokens, once an ERC20 token is created it will automatically appear and approved on the Ethereum blockchain.

2. The standard fucntions are;

  • balanceOf ( ) indicates the number of tokens the holder has.
  • transfer ( ) the action of transferring funds from one account to another.
  • approve ( ) approving on certain address to deduct or receive a certain amount of tokens, usually that address is the address of smart contracts.
  • transferFrom ( ) to deduct a certain amount of tokens from a certain address to activate the smart contract.
  • doSomething ( ) to do and operate certain action or calculations.
  • allowance ( ) the amount of tokens are allowed to be deducted from a certain address to activate the contract.
1 Like
  1. Standards make the network more efficient. All standardized tokens are using same functions and that makes it very easy for wallets, exchanges or anyone to interact with ERC20 tokens.

totalSupply() - Returns the amount of tokens in existence

balanceOf(account) - Returns the amount of tokens owned by account

transfer(recipient, amount) - moves amount of tokens from caller to recipient. Returns boolean indicating whether transfer succeeded or not and emits Transfer event

allowance (owner, spender) - Returns the remaining number of tokens that spender will be allowed to spend on behalf of owner through transferFrom.

approve(spender, amount) - Sets amount as the allowance of spender over the caller’s tokens. Returns boolean

transferFrom(sender, recipient, amount) - Moves amount tokens from sender to recipient using the allowance mechanism. Amount is then deducted from caller’s allowance. Returns boolean and emits Transfer event

1 Like
  1. By setting a token standard programmers can insure other programmers will be able to interpret and also verify their programs through an opensource interface.
  2. Examples of ERC20 functions that are standardized are:
    totalSupply function which indicates the (total supply) of a token.
    balanceOffunction verifies the (balance of) an account.
1 Like
  1. provide support for programming and integration by wallets and exchanges as all ERC-20 takers follow the same standards. It is also much easier to enquire about certain info related to the specific token
  2. balanceOf ()- provides details about the balance tokens in specific address; approve() - approves number of tokens to be transferred from a given address; allowance() - the allocated allowance for transfers from one address to another; transfer() - from the the sender to a given address
1 Like
  1. The ERC20 standards of the code allows for easy transactions to be approved of through all scripts that are using the ethereum network.
  2. There are functions like totalsupply(), balanceOf(address account) to just name 2. Total supply just tracks the total amount of Eth in circulation and the balance of function checks the balance of a specific ammount.
1 Like
  1. To ensure all tokens on the same network communicate in identical ways.
  2. Functions that run the token operations
1 Like
  1. What are the benefits of setting a token standard like ERC20?
    All wallets and exchanges can handle different transactions of different tokens because of ERC20 standard.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    Standard functions for all tokens such as totalSupply (all tokens in circulation) balanceOf (check balance in certain account) and transfer (number of tokens from A to B).

1 Like

Homework on ERC20 token standard.

  1. What are the benefits of setting a token standard like ERC20?

All wallets and exchanges know how to communicate with each new token.

  1. What functions are in the ERC20 Token Standard Interface and what do they do?

totalSupply(): gives maximum number of tokens that exist
balanceOf(address): gives a public addresses’ balance of ERC20 tokens
transfer(): allows transfer of their ERC20 tokens to another public address
doSomething(): operates instructions.
allowance(): provides the number of tokens allowed to be transferred from a given address by another.

1 Like
  1. Setting a token standard allows for wallets to be programmed to easily support any token which is using that particular standard. This makes transferring tokens from exchange to exchange very easy and efficient.

balanceOf() gives the balance of the selected address.
transfer() transfer the tokens from one address to another.
allowance() Shows the number of tokens that can be transfered
doSomthing() this operates the instructions
approve() You can allow another individual to spend from your wallet.

1 Like
  1. Some benefits include creating a space with the ability to communicate with each other so wallets, exchanges and contracts can work together, makes it much easier and allowing the industry to move forward.
  2. Some functions include total supply so you can see how many tokens are in circulation and balance of which is necessary for exchanges and wallets to know amount you own.
1 Like
  1. It makes it very easy to program something from one wallet to another

totalSupply() shows the maximum number of tokens that exist.
balanceOf() outputs the balance of the input address.
transfer() transfer the tokens from one address to another.
allowance() shows the number of tokens that can be transferred
doSomething() this operates the instructions
approve() can allow another individual to spend from this wallet.

1 Like
  1. it ensures tokens build upon it are programmed similarly.
  2. totalsupply, balanceOf(account), transfer, approve are few functions which are part of erc 20.
1 Like
  1. Its a basic set of rules that apply to all ERC tokens and allow them to interact with each other on the ETH blockchain.
  2. totalSupply = returns total supplt of ETH.
    balanceOf - returns balance in an account
    transfer - transfer an amount of tokens from an account to another
    approve - a token wner can approve payment or transfer from their account.
    allowance - returns the amount of tokens that are approved by an owner and can be spent
    transferFrom - allows a spender to transfer an amount of tokens from an account.
1 Like
  1. It´s good to have standards for the development of tokens and for the sake of each coin being fungible. Standards makes the process of token creation more efficient.

  2. a.Total supply: How many tokens are in circulation
     b. balanceOf: Wallets can check the balance of a particular address.
1 Like
  1. The standard allows the tokens to be easily interoperable across all wallets, exchanges and platforms. It also makes the work of programmers easier, when every token acts in an expected way.

  2. balanceOf() = returns the balance of an address.
    transfer() = transfers tokens from one address to another.
    approve() = gives approval to transfer a certain amount of tokens.
    transferFrom() = finalizes the transfer of approve().
    allowance() = returns the number of tokens allowed to be transferred between to addresses.

1 Like

Setting a token standard like ERC20 has the benefit of making the Ethereum network more efficient and encouraging development, as it makes it a lot easier to write code knowing what to expect from any token that fits the standard.

The ERC20 standard is very simple, but it contains certain basic functions that all token contracts must have: totalSupply(), balanceOf(), transfer() and allowance(). These function names are pretty self-explanatory, except allowance() which determines the amount of tokens that are allowed to be taken by a smart contract.

1 Like
  1. Wallets, applications and exchanges use a standard language which allows ease of communication, adoption, integration and efficiency.

  2. Ex. “totalsupply” is the total amount of tokens available. Balanceof finds the value of a specified account.

1 Like
  1. Creating once standard that all tokens must adhere to sets a framework to allow interoperability between tokens and between tokens and the platform.

  2. totalSupply - returns total number of tokens on the blockchain
    accountBalance - returns total number of tokens in specified wallet

1 Like
  • The key benefit of a widely used token standard such as ERC20 is that the different tokens all use the same functions and standards, so that they can easily ‘talk’ to each other
  • Some of the standard functions are in the ERC20 Token Standard Interface are totalSupply() = return the total available amount of that token (the ‘supply’), balanceOf() = return the token balance for a specific account
1 Like