Homework: ERC20

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

Hello sir, could you please describe a little bit what those functions do?

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

Carlos Z

1 Like

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

Hello sir, those are not the functions on the ERC20 Standard, if you can please redesign the question describing some of the proper functions.

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

Carlos Z

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

Indeed sir, also could you please describe a little bit about which are most of the functions and what they do?

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

Carlos Z

  1. Nodes will understand the common language.
  2. Some functions and their uses.
    totalSupply ( ) equals the sum of all balances
    balanceOf ( ) provides the number of tokens held by a given address
    trancfer ( ) transfers a number of tokens directly from the message sender to another address
    allowans ( ) provides the number of tokens allowed to be transferred from a given address by another given address
1 Like
  1. Tokens are structured in the same way.This enables wallets and dapps to interact with all tokens, which use the same standard.

  2. ERC-20 tokens come with several standardized functions:

totalSupply() —> provides total number of tokens
balanceOf() —> number of tokens held by a given address
transfer() —> transfers a number of tokens directly from the message sender to another address
approve() —> approve someone to spend from your account
transferFrom() —> take certain tokens from sender’s account
allowance() —> provides the number of tokens allowed to be transferred from a given address by another

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

It allows tokens to be interactive, allows people to be able to readily discern the functions in the tokens they are using, allows contracts to be more easily interactive, protects privacy and ethical standards, and prevents fraud.

This facilitates app production, especially wallets and other applications that interact directly with Ethereum based tokens.

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

totalSupply Says how many tokens there are.

balanceOf Gives balance of account for which you give the address.

1 Like
  1. The token standard, like ERC20, allows exchanges to add these tokens to their exchanges easily and interact to get balance or transfer amount, etc.
  2. The examples of functions in ERC20 tokens are,
  • balanceOf(address account) gives that specific account balance.
  • totalSupply() provides the number of tokens in supply.
  • transfer() allows transferring tokens to different accounts.
  1. Total Supply, Allowance, Balance and Transfer of ERC 20 tokens.
  1. The benefit of setting a token standard is that anybody that deals with the tokens (ie: Wallets) they will know the basic functionality of any token that is created.

  2. one function is balanceOf() which will check the balance of a particular address and another is transfer() which is for transferring.

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 does?

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

Carlos Z.

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

The ERC20 standard makes tokens fungible and interoperable.

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

// Get the balance of an ERC20 token at an Ethereum address
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}

/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}

1 Like
  1. The benefits of having a token standard is that all wallets and all exchanges will automatically be able to accept the token.

  2. There are functions that will, for instance, specify the total circulating supply, send to a wallet address or shows the balance of a specific address.

1 Like
  1. Standards make it easier for exchanges and wallets to list all the ERC20 tokens, and also having standards means that wallets and exchanges already know how to “comunicate” with those new tokens.
  2. balanceOf(adress) - this gives a balance of an adress that is entered in the function. totalSupply() gives total number of tokens that exist. transfer() is used to transfer tokens to another adress
  1. Standardizing allows for current infrastructure (exchanges, wallets, etc.) to easily support newly created ERC20 tokens. If a token is issues on a different standard, new infrastructure needs to be built to interact with the token.

  2. function name() public view returns (string) - returns the name of your token
    function totalSupply() public view returns (uint256) - returns the total supply for your token

1 Like
  1. Most crypto currencies are tokens (smart contract) on top of the Ethereum network. Ether is a coin, everything built on top of that is a token. ERC20 standard defines how we program these tokens in theory. It’s good to have standards, if codes are laid out in the same way, all exchanges and wallets will be able to support them. It’s been very beneficial for the entire space. Most popular tokens are fungible tokens, ERC20 is the standard for these.

  2. Balanceof function shows total number of tokens an address holds. Transfer function sends tokens between accounts. Dosomething operates instructions.

1 Like
  1. You have all developers creating tokens in the same way which makes easier to cooperate. Without standards every token would be different and it would be troublesome to track the differences in using them.
  2. balanceOf() and totalSupply(), they respectively return the balance of given address, and total supply of all tokens.
1 Like
  1. It uses the same code as all other ERC-20 tokens. You don’t need to create another language and it reduces friction in terms of creativity and trade.
  2. Mathematical functions like add/subtract, multiply/divide, loops and programming functions like balanceOf(XXXxxxXXXxxx) that gives the balance of said Eth account
1 Like

A token standard is beneficial for it makes all tokens interoperable and sets standards for wallets, exchanges web servers and other contracts.

Total supply is the number of tokens that exist
BalanceOf provides the number of tokens at a given address
Allowance is the max allowed to be transferred
Approve authorizes a transfer
Transfer moves tokens from one address to another

1 Like
  1. The benefit of having standards such as the ERC-20 token is that everyone (exchange apps wallet apps) will be on the same page. Everyone will be able to talk to each other seamlessly, without complications. All the tokens will be compatible, thus making interactions more efficient.

  2. Examples of functions and their definitions are as follows;
    a. transfer()=send tokens
    b. balanceOf()=the amount of tokens in an account.
    c. totalSupply()=total amount of tokens.
    d. approve()=to get the go ahead to transfer tokens.

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

The benefits is the ability for compatibility of programs and economies, to where the there is no friction.  


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

There are 5 functions in a ERC20 Token:

The Balance which is used to provided the total number of tokens held.

The Transfer sends tokens from one address to another, but in the instance for paying for a function there is the "Doer", sub function if you will.

The Approve and Transfer functions are used to facilitate a self contained eco system.

There is the approval of sending funds from the user to a address, that is usually to a smart contract; after approved their is the transfer known as the allowance function. The allowance which is used to provide the number of tokens allowed, has been calculated, then a transfer will take place, or a result of fail thus no allowance.

1 Like