Homework: ERC20

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
  1. What are the benefits of setting a token standard like ERC20?
    Similar to the benefits of having a standard for anything, it means that the functions for all ERC20 tokens are similar, so if you know how to program for one, then you know how to program for all. All applications built on ERC20 tokens can talk to each other, basically it prevents reinventing the wheel every time someone wants to build an ERC20 application, and any exchange or wallet that supports ERC20 tokens will be able to support all of them.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    function totalSupply() - it tells you how many tokens are in circulation
    function balanceOf(address account) - it will reveal the balance of tokens for the specified account
    function transfer(address recipient, uint256 amount) - used to transfer tokens

The article also included:
name - the name of the token
symbol - the 3-4 character symbol for the token, ie. “LINK”
decimals - a way of showing token balances, how many 0s are used to the right of the decimal place
approve and transferFrom - a 2-step process to transfer tokens
allowance - a permitted amount of tokens to be transferred by an address

1 Like
  1. The benefit is a convention that all wallets can use in order to process the data. Like English language that connects us from all over the world the ERC20 standart connects wallets, contracts and marketplaces in crypto space.

  2. ERC20 has some functions:
    All of them corresponds to the actual meaning of the word combination.Easy Breezy.

function totalSupply() 
function balanceOf(address tokenOwner) 
function allowance(address tokenOwner, address spender)
public view returns (uint);
function transfer(address to, uint tokens)
function approve(address spender, uint tokens)
function transferFrom(address from, address to, uint tokens)
1 Like
  1. ERC20 unify the token standards to utilize wallets and exchanges using same common naming.
  2. totalSupply(): gives maximum number of tokens that exist
    balanceOf(address): gives a public addresses’ balance of ERC20 tokens
    transfer() function simply takes in the address of the receiver and the funds which are to be sent to the account
1 Like

1.) It makes everything simple, easy to understand and more relaible if everybody use the same standard like in any other proffesion.

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.

The allowance() function provides the number of tokens allowed to be transferred from a given address by another given address

example, Joe can now call doSomething() and doSomething() can use transferFrom() to take 10 Do tokens from Joe’s account and carry on its work. If Joe doesn’t have 10 tokens in their account, or their allowance is less than 10 tokens, doSomething() will fail.

1 Like
  1. Setting a token standard like ERC-20 means tokens are more fungible in terms of having greater support from exchanges and wallets. Platforms are able to integrate and interoperate leading to an increased efficiency.

  2. totalSupply() function gives the number of tokens that exist in the contract.
    balanceOf() function provides the number of tokens held by a particular address.
    allowance() function provides the number of tokens allowed to be transferred.
    transfer () function has the address of the receiver.
    approve() function allows the contract to validate how much of a token you truly have.
    transferFrom() Uses 3 inputs - the address of the sender, the address of the receiver and the number of tokens to be transferred.

1 Like

Welcome to the community

transfer: moves tokens from one address to another address.
transferFrom: allows contracts to transfer tokens on your behalf.
approve: allows address to withdraw from your account multiples times up to a certain amount specified.

1 Like
  1. The standard allow to developers be more efficient when create their own applications. An example is connection between several exchanges and wallets.

  2. There are serveral functions ERC20:

    • balanceOf() - shows the balance of tokens in an address
    • transfer() - transfer tokens from owner’s address to another address
    • approve() - approval to transfer up to a certain number of tokens
    • doSomething() - execute an instruction
    • transerFrom() - allow to take tokens from owner’s account and carry on its work
    • allowence() - show how many tokens can be transferred from one account to another
1 Like
  • having a standard such as ERC20 is very important. it will bring more efficiency to the space, provide more consistency and allow different projects to be supported by already existing platforms.

  • totalsupply -sets a total supply of the token.
    balanceOf() - gives you a number of tokens held by a certain address
    transfer() - sends tokens from the message sender to a certain address

1 Like

Setting up a token standard such as the ERC20 gives the smart contracts a common feature and standards that allows each applications to communicate with each other easily using the same language. This provides a benchmark and parameters for tokens that makes it possible to be transferred between wallet addresses.

Some of the functions in the ERC20:

  • balance Of( ) shows the number of tokens held in an address
  • transfer ( ) gives the command to transfer token to a specified address.
  • allowance ( ) provides the number of tokens allowed to be transferred.
1 Like