Homework: ERC20

1-Gives everyone the same platform to work from so that contracts created by different entities can be read equally and efficiently.
2-totalSupply() - how many tokens are in circulation
balanceOf() - how many tokens that balance has

1 Like

The benefits of setting a token standard like ERC20 is that all exchanges, wallets other contracts can support this token. This ensures a frictionless and efficient economy.

Some functions in ERC20 Token Standard Interface are:

A. function totalSupply() constant returns (uint theTotalSupply);

 Means how many tokens are in circulation.

B. function balanceOf(address _owner) constant returns (uint balance);

Means how much tokens has an account.

C. function transfer(address _to, uint _value) returns (bool success);

 Means the owner of the contract can sent an certain amount of the token to another     address.
1 Like
  1. The benefits of having ERC20 standards for tokens ensure that all systems can easily read the codes such as checking token balance.
  2. totalSupply() gives maximum number of tokens in the account is one function that allows all nodes to check max number of token of all on the system.
1 Like

1.- The standard ERC20 gives uniformity and efficiency so the different wallets and exchange sites so they can manage and exchange many different tokens, having the same language help the system to support great number of tokens simplifying and opening the door to the creation and diversification.

2.- totalSupply when this limit is reached the Smart Contract will refuse to create new tokens.

BalanceOf this has to give the balance of any given address.

Transfer From this can be use to transfer tokens between any two user who have them.

1 Like
  1. So all ERC20 are interoperable. Providing a standard is usefull for start-ups + for storing different tokens into an ERC20 wallet.
  2. totalSupply(), balanceOf(), transfer(), …
1 Like

1. What are the benefits of setting a token standard like ERC20?
Having a standard like ERC20 allows wallets and exchanges to be programmed to support any token using that standard. This is much simpler and scalable than each token having its own personalized code.

2. What functions are in the ERC20 Token Standard Interface and what do they do?
totalSupply() gives maximum number of tokens that exist
balanceOf(address account) gives a public addresses’ balance of ERC20 tokens
transfer() allows someone to transfer their ERC20 tokens to another public address

2 Likes
  1. Tokens are able to communicate with each other and it prevents friction in the community.
  2. ERC20 includes functions such as balanceOf, which gets the current token balance of an account, and totalSupply, which shows how many tokens are in circulation.
1 Like

Indeed sir, but could you please explain what those functions does?

If you have any more questions, let us know to help you :nerd_face:

Carlos Z

1 Like
  1. Allows for all exchanges, wallets, web servers, and other contracts to be accepted from the start.

  2. transfer() = transfer specified amount to recipient,
    balanceOf() = return balance of account,
    totalSupply() = return total supply of tokens in circulation.

1 Like
  1. Then everyone uses the same coding for their tokens, so that all wallets can be used, otherwise each token would require their own wallet.
  • balanceOf() function provides the number of tokens held by a given address
  • transfer() is fine for sending tokens from one user to another it doesn’t work so well when tokens are being used to pay for a function in a smart contract.
  • approve() and transferFrom() are two functions that allow the above scenario to work using a two-step process. In the first step a token holder gives another address (usually of a smart contract) approval to transfer up to a certain number of tokens, known as an allowance. The token holder uses approve() to provide this information
1 Like
  1. Setting a token standard allows for easier adaptation of new tokens released in accordance with said standard. It will be immediately compatible with current nodes and wallets.

  2. The ERC20 token standard has functions that determine how the basic mechanics of the tokens work, such as balance inquiries, transfers, total supply tracking, etc.

1 Like
  1. Effeciency so every exchange can read and accept the same standard, also meaning programmers aren’t all writing different contracts for the same thing in different ways.

  2. balanceOf - “This function allows a smart contract to store and return the balance of the provided address”

totalSupply - “this function allows an instance of the contract to calculate and return the total amount of the token that exists in circulation.”

transfer - “This function lets the owner of the contract send a given amount of the token to another address just like a conventional cryptocurrency transaction.”

transferFrom - “This function allows a smart contract to automate the transfer process and send a given amount of the token on behalf of the owner.”

approve - " When calling this function, the owner of the contract authorizes, or approves , the given address to withdraw instances of the token from the owner’s address."

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

All the ERC20 tokens have the same programming are laid out in the same way. So exchanges and wallets are able to support those tokens since they all work the same.

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

totalSupply - Shows how many tokens are in circulation.

transfer - moves a number of tokens directly from the sender to the recipient.

transferFrom - Moves the amount of tokens from sender to recipient.

balanceOf - gives you the balance of a specific adress.

approve - Set the amount of allowance the spender is allowed to transfer from the function caller balance. The function returns whether the allowance was succesfully set.

allowance - allows an adress to give an allowance to another adress to be able to retrieve tokens from it.

1 Like
  1. It dsentralizes the system, meaning that it can support tokens that use the standard as well as wallets.

  2. The balanceOf() function provides the number of tokens held by a given address. The transfer() function transfers a number of tokens directly from the message sender to another address. Doer has a function doSomething()

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    Because it is a standard, all exhanges can work easily with this token standard. Everyone know this standard, it’s easily programmable.
  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    To allow users to find out the balances of accounts as well as to transfer them from one account to another under varying conditions.
1 Like
  1. The standard allows different wallets/exchanges/dapps to easily read the code and check the account balance, support new tokens, etc…

totalSupply() = supply of all the tokens
balanceOf() = retrieve the account balance of a specific adress
transfer() = transfers a specific amount of tokens to another adress
approve() = approves/authorizes an adress to withdraw tokens from owner’s adress
transferFrom() = allows the transfer process to send tokens on behalf of the owner
allowance() = states how many tokens are allowed to be transfered from one adress to another

1 Like
  1. The benefit of setting a token standard like ERC20 token is to ensure that all tokens
    should be programmed to comply with the ERC20 standards.
    This will ensure uniformity in functionality of all token created and will anable all
    wallets and exchanges to easily support all tokens that comply with ERC20
    standards

  2. Functions in the ERC20 Token Standard interface are :

    balanceOf() - provides the number of ttokens held by a given address
    transfer() - transfer a number of tokens directly from the message sender to
    another address

1 Like
  1. A major advantage of establishing a token standard like ERC20 is that they will all behave the same way. You know you can send an ERC20 token to an Ethereum wallet or to an exchange, and it will be recognized. These applications can rely on the fact that all ERC20 tokens will share the same functions and they will all be named the same.
  2. Some functions mentioned in the ERC20 standard interface include: totalSupply() - This gives the number of all tokens in circulation. Also, balanceOf(address account). This will tell you how many tokens an account has.
1 Like
  1. to ensure that all ERC20 tokens can interoperate and communicate efficiently.

  2. balanceOf() function provides the number of tokens held by a given address.
    transfer() function transfers a number of tokens directly from the message sender
    to another address.

1 Like
  1. Having standards allows wallets/exchanges to easily add all ERC 20 tokens because they have common naming in their code.
  2. balanceOf() Gives balance of a specific account, totalsupply the number total fungible tokens.
1 Like