Homework: ERC20

balanceOf store & return the balance of the provided address.
totalsupplyGet the total amount of token
transfer lets the owner of the contract send token amount to another address.
transferFrom contract can send certain amt of token to another address on your behalf.
approve approves the given address to withdraw token from the owner’s address.
allowanceChecks wallet for amount of token to cover transaction and cancels if not.
https://github.com/ethereum/EIPs/issues/20

:grimacing:

1 Like
  1. By creating a standard it allows for a friction-less use of them. All wallets and exchanges can easily use them and they can be moved around without difficulty.
  2. Since there are standards on the functions of the token there is no confusion on how to call said function no matter the token. Like all tokens must have a transfer, transferFrom, and an approve function.

Homework ERC20:

  1. Setting standards for ERC20 tokens enables smart contracts to integrate with each other and become more efficient.
  2. Totalsupply enables the contract to calculate and return the total amount of tokens in circulation. BalanceOf stipulates the account balance of an address. Transfer function allows for the transfer of tokens from one address to another.
1 Like

Answers:

  1. By setting a token standard like ERC20, it allows every developers to follow exactly a standard protocol which in return enable their respective development to communicate with each other exactly the way they wanted. Most importantly it creates interoperability.

  2. The standards function in the ERC20 looks like totalsupply, balanceOf and some others. totalsupply allows the contract to calculate and return the total amount of the token that exists in circulation. Whereas balanceOf allow a smart contract to store and return the balance of the provide address.

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

It brings efficiency to the ecosystem by allowing all parties interacting with the ERC20 token communicate quickly under the same standards.

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

Totally supply function ; The balance function ; The transfer function ; The doer function; The allowance function

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

It makes communication between an infinite number of programs possible. With communication comes the ability to function with confidence and consistency.

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

The “totalsupply” function lets wallets and exchanges see the amount of tokens in circulation.
the “balanceOf” function lets wallets and exchanges know the amount of tokens available by address.

  1. All wallets and exchanges will support tokens written in Solidity. It gives a a standard way to integrate and operate with each other.

  • balanceOf
    Provides the number of tokens held by a given address.

  • transfer
    Transfer tokens directly from the message sender to another address.

  • totalSupply
    Identifies the total number of tokens created.

  • transferFrom
    Makes a third party able to carry out a transfer.

  • approve
    Makes the token holder 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 given address.

1 Like
  • What are the benefits of setting a token standard like ERC20?
    It allows apps/wallets/exchanges to easily communicate and work together with no friction

  • What functions are in the ERC20 Token Standard Interface and what do they do?
    totalSupply: tells you how many tokens are in circulation
    balanceOf(address account): tells you the balance of a specific account
    transfer(address recipient, uint256 amount): for transferring

1 Like
  1. The benefits of setting a standard are that it allows developers to easily construct tokens that can be accepted by wallets and exchanges. Using the standard also saves develpers the R&D effort of developing their own unique language. Using a standard will make tokens easier to debug and audit as a greater number of people will have experience with the standard.
  2. There are several functions in the ERC20 Token Standard, some of them are:
    a. balanceOf(), returns the balance of the addres in question.
    b. transfer, transfers unit from one address to another.
    c. approve, authorizes the address to withdraw tokens from the owners address.
    e. totalSupply(), returns the total number of tokens that exist.
    f. name(), the long complete name of the token, i.e. Speedster
    g. symbol(), the abreviated name, like stock ticker, i.e. SPR
1 Like
  1. Having a standard for ERC20 tokens serves numerous functions. It allows wallets to easily integrate all the tokens. It lets tokens interact with each other. Helps with security when used for a smart contract and many more functions that I just can’t think of at this time.

  2. The ERC20 tokens standard has many universal function.

  3. Total supply gives the number of Total available token supply Sum of all tokens

  4. BalanceOf provides the number of tokens held by a specific address.

  5. Transfer lets a message sender send tokens directly to an address.
    There are many more functions like approve, transferFrom, dosomething, allowance. The list goes on I’m sure there are more

1 Like

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

Yes sir/miss, but could you please describe what those functions do?

If you have any more questions, please let us know so we can help you! :slight_smile:

Carlos Z.

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    It makes sure that applications can interact with each other. It makes it easy for community to build applications and smart contract.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    Totalsupply - indicated how many tokens there are
    balanaceOf(address account) - shows the balance of the account
    transferring - makes it possible to move the tokens between account holders

1 Like

Sure,
The supply function gives you the total balance of your tokens.
The balance function gives you the exact number of tokens you have left in your address.
The transfer function allows you to transfer tokens from address A to address B
The doer function allows you to tell the token to execute an action.
The allowance function tells you the number of tokens you need to transfer if the coded conditions when creating the token are met.

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

You can create fungible tokes that can be connect and understand by the protocol.

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

totalSupply to get all the amount or circulating tokens
balanceOf to know how much tokens a address got
transfer to transfer to an account to another

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    Token standards provide common functions by which wallets can process tokens created by different and independent developers without changing their codes. That facilitates wide acceptance of tokens in the Ethereum community and encourages the creation of new tokens.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    ERC20 standard supports the following common functions:
    balanceOf() – provides the balance of tokens held by a given address
    transfer() – transfers tokens from one address to another address
    approve() – establishes approval of transferring a fixed amount of tokens from one address to another
    allowance() – provides the amount of tokens previously approved by a sending address to be sent to a receiving address
    transferFrom() – gets tokens from an address, which has previously approved sending tokens to the receiving address
    totalSupply() – calculates the total amount of tokens in circulation

1 Like
  1. Standardized programming to allow New coins and old coins to not dilute the network with a lot of uncertainty. ie. All coins act by the same rules.
  2. totalSupply()
    balance Of()
  1. Standards allow for inter-operability. They essentially create a common language for user which enables easy use of wallets, exchanges, and creation of new tokens. It also simplifies reading as the programmer doesn’t have to learn a new language for every token.

  2. totalSupply() : gives total number of tokens that exist
    balanceOf() : gives a public addresses’ balance of fungible ERC20 tokens
    approve() : gives approval to collect the required number of tokens from the contract’s address. The approve function also checks the transaction against the total supply of tokens to make sure that there are none missing or extra.
    transfer() : allows transfer of tokens from one public address to another
    transfer from() : automates payment transfers to a specific account.
    allowance() : cancels transactions that don’t have the minimum amount of tokens required to execute the transaction

2 Likes

1- The benefits of having a standard for all tokens are that applications that are built can talk to each other, all wallets know how to interact with ERC20 tokens, and this creates efficiency and takes away friction, thus promoting better progress in this space!

2- There is totalSupply, which tells you how many tokens are in circulation. There is balanceOf, which allows you to input the address of the account you want to know the balance of. :slight_smile: There is transfer, which sends tokens from the sender of the message to the receiver. In addition:
approve: a token holder gives another address approval to transfer up to a certain amount of tokens
transferFrom: allows the receiver to TAKE funds from a certain address/account
allowance: provides the number of tokens that can be transferred from one address to another.

1 Like

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

Yes sir, but could you please describe what those functions do?

If you have any more questions, please let us know so we can help you! :slight_smile:

Carlos Z.

1 Like
  1. What are the benefits of setting a token standard like ERC20? Tokens can then integrate and operate together for greater efficiency and overall advancement of the all ERC20 tokens built on the Ethereum platform.
  2. What functions are in the ERC20 Token Standard Interface and what do they do? standard functions within the code such as transfers, balances and overall supply. ie. transferFrom(), balanceof(), totalSupply()
1 Like