Homework: ERC20

The ERC20 standard uniforms token languages on the Ethereum network, this creates a common language with all of its concomitant benefits.

ERC20 functions allow the execution on instructions in a standard language. Examples of some of these functions are:
balance() this function provides the number of tokens in a particular address;

transfer() this function transfer tokens from the sender to a particular recipients; and

approve() this functions aids approving an instruction.
1 Like

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

Yes sir(s), 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.

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

The benefit is that it brings efficiency, so all tokens will understand the same language, making it easier for developers, and to integrate it in wallets and exchanges easily, as they use common code naming.

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

  • balanceOf(account) => returns the number of tokens held by an given address account.
  • transfer(recipient, amount) => transfers a given amount of tokens to a given recipient address.
  • transferFrom(sender, recipient, amount) => transfers a given amount of tokens from a sender adress to the given recipient address.
  • approve(spender, amount) => sets a given amount of tokens as the allowance of the given spender over the caller’s tokens.
  • allowance(owner, spender) => returns the amount of tokens that the spender will be allowed to spend/transfer from the owner tokens.
1 Like
  1. It makes mass adaption possible since functions and such are all structure in the same manner. A wallet knows to get the balance of tokenA is the same as tokenB which makes it easier and more efficient to use.
  2. balanceOf() -> get total number of tokenA in that address
    transfer() -> transfer tokens from another address
    totalSupply() -> get the total sum of tokenA
    approve() - approval to transfers X amount of tokens
1 Like
  1. having a universal standard for tokens is good, because wallets/exchanges all can use the same commands to interact with the tokens.
  2. totalsupply/balanceof/transfer
  1. What are the benefits of setting a token standard like ERC20?

Token standards are allowing an better Interoperability for the network. Through this are exchanges and wallets are able to support an new token on his release day.

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

totalSupply() = maximum amount of all tokens
balanceOf() = how many tokens are held by an specific address
transfer() = sends token from one account to another account

1 Like

1: having the ERC20 token standard allows for programmers to do faster development and it greatly increases interoperability.
2: Whats functions are in ERC20 Token Standard Interface:

  • name : Returns the name of the token
  • symbol : Returns the symbol of the token.
  • decimals : Returns the number of decimals the token uses
  • totalSupply: Returns the total token supply.
  • balanceOf : Returns the account balance of another account with address _owner .
  • transfer: Transfers _value amount of tokens to address _to
  • transferFrom : Transfers _value amount of tokens from address _from to address _to
  • approve : Allows _spender to withdraw from your account multiple times, up to the _value amount.
  • allowance : Returns the amount which _spender is still allowed to withdraw from _owner .
1 Like

This allows for the creation of new tokens, each following the same rules

totalSupply
balanceOf
approve
allowance
transferFron

1. What are the benefits of setting a token standard like ERC20?
The benefit of setting a token standard like ERC20 is that all wallets and exchanges can support all tokens built on ETH. Every node is able to properly read each contract which reduces friction in the Ehereum economy.

2. What functions are in the ERC20 Token Standard Interface and what do they do?
totalSupply: returns total circulating supply of tokens
balanceOf: returns how many tokens exist in a specified account
transfer: transfer and a specified amount from a specified account to another account
approve: account owner can approve the transfer of tokens from their account
allowance: returns amount allowed to be transferred from account to another

1 Like
  1. A standard creates a consistent language that enables multiple actors in the space to communicate and build upon, projects can speak to eachother.
  2. TotalSupply set the total number of tokens, balanceOf sets the balance of an account address, etc etc
1 Like
  1. What are the benefits of setting a token standard like ERC20?
    A token standard assures that all tokens under that standard operate under the same rules, understand each other and can use the same wallets.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    balanceOf() = The number of tokens held by a given address
    transfer() = Send tokens from one user to another
    approve() = Token holder gives permission to transfer up to a certain amount of tokens to another user
    transferFrom() = Smart contract takes up to the approved amount from user to send
    allowance() = Provides the number of tokens allowed to be sent from one address to another

1 Like
  1. Its a standard that every one follows, it has standard functions and naming conventions that one can use to create new tokens which are identical.
  2. getAccountBalance will return the balance of an account, the totalNumberOfTokens will return total available tokens, basically it’s an interface class.
1 Like
  1. What are the benefits of setting a token standard like ERC20?

-It makes it frictionless for application to communicate with one another. Making it seamless for developer to create application.

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

-Some of the function that are in ERC20 tokens are listed below. This is the standard for which developer operates under.

-balanceOf: Balance of the smart contract
-totalSupply: total amount of token in circulation
-transfer: Sending funds from one wallet to another
-transferFrom: Allows the automation of transferring funds from one wallet to another
-approve: This function allow the owner of the wallet to authorize the sending of funds.
-allowance: The amount of funds you want to send from one wallet to another wallet

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. The benefit is that all the tokens are created in the same way because it is a fungible standard. Meaning that all the wallets and exchanges are able to support every single token in the Ethereum ecosystem.
  2. totalSupply()–> Provide the information about the total supply of an specific token. balanceOf() --> Provide the number of tokens held by a given address.
    transfer()—> Used for token’s transfers to different addresses.
    allowance()—> Inform the number of tokens allowed to be transferred from a given address.
1 Like
  1. What are the benefits of setting a token standard like ERC20?
    The ERC20 Standard is a way to program and deploy fungible tokens on the Ethereum platform, so all the tokens in spite of being designed for different purposes, can be abstracted and be treated the same as objects in the Ethereum ecosystem. Basically they share a common name and parameter convention for frictionless communication. For example all the tokens must have the property (contained in a well-specified function) “Total Supply” which indicates how much of that particular token exist.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    Some examples: balanceOf() this 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.

1 Like
  1. Makes it easier for wallets to recognise the format of the code as they are all the same.

  2. ERC20 functions allow wallets to find a users balance and move tokens from one account to another.

1 Like

1 - ERC20 token standards allow wallets, exchanges, and websites etc to more easily add all ERC20 tokens as they have common naming and functions.

2 - common ERC20 parameters and functions:

totalSupply() : measures the total supply of a token

name : token name

symbol : token symbol

decimals : number of decimals

balanceOf(address) : the balance of a given address

transfer() : send token to another address

transferFrom() : send token from an address to another address

approve() : approve a transfer

allowance() : the number of tokens allowed to be transferred from a given address

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

Everyone can play and have fun in the sandbox – interoperable standards leads to interoperable projects and industry grows

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

Token’s Name = Symbol

Do something doSomething()

Approve something provide this information approve()

Get a balance balanceOf()

Sum totalsupply

Transfer transfer()& transferFrom()

Allow a 3rd party transfer allowance()

Designate whether integer (set to 0 ), or not (Set to a specific set of decimals) , to represent a fraction set to near-continuous range of values, Else, all other values (set to 18 ) decimals

1 Like

1.The benefits are that everyone in The blockchain will undesrtand and accept your language From point 0.

  1. BalanceOF gives you The balance in The account you are indicating
    Totalsupply: gives you The total amount that is available for a tx
1 Like