Homework: ERC20

What are the benefits of setting a token standard like ERC20?
ERC20 Standardisation creates commonality of design and interaction which in turn leads to efficiency and predictability and greater adoption within the industry.

What functions are in the ERC20 Token Standard Interface and what do they do?
balanceOf(): provides the number of tokens held by a given address.
transfer(): transfers a number of tokens directly from the message sender to another address. But it doesn’t work well when tokens are being used to pay for a function in a smart contract.
approve(): a token holder gives another address approval to transfer up to a certain number of tokens(allowance).
transferFrom(): take certain tokes from sender’s account and carry on its work.
doSomething(): to operate instructions.
allowance(): provides the number of tokens allowed to be transferred from a given address by another given address.

1 Like
  1. What are the benefits of setting a token standard like ERC20? The benefits of the ERC20 standards are all wallets and exchanges can support the token from its inception and they all have the same value.
  2. What functions are in the ERC20 Token Standard Interface and what do they do? Total supply function which can read the amount of tokens in circulation. balanceOf function which can check the balance of any address given so exchanges and wallets can use it to search balances. Transfer function allows you to transfer tokens to another address.
1 Like
  1. all tokens adhering to ERC20 allows easy implementation of those tokes on exchanges and wallets as they all follow the same standard.

  2. totalsupply() this checks the total supply of the token
    balanceof(), this checks balance of an address
    transfer() sends tokens to another address
    allowance() restricts the amount of tokens that can be sent from one address to another

1 Like
  1. It standardizes the way to interact with tokens;
  2. totalSupply - returns the amount of tokens in existence;
    balanceOf - returns the amount of tokens owned by account;
    transfer - moves amount tokens from the caller’s account to recipient;
    transferFrom - moves amount tokens from sender to recipient using the allowance mechanism;
    approve - sets amount as the allowance of spender over the caller’s tokens;
    allowance - returns the remaining number of tokens that spender will be allowed to spend on behalf of owner through transferFrom
1 Like
  1. What are the benefits of setting a token standard like ERC20?

    Having a token standard allows wallets, exchanges etc. to support all coins of that standard.

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

    balanceOf(): provides the number of tokens held by a given address

    transfer(): transfers a number of tokens directly from the message sender to another address

    doSomething(): instructions

    approve(): gives another address approval to transfer up to a certain number of tokens.

    transferFrom(): the function that actually transfers the tokens from the allowed address.

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

1 Like
  1. efficiency, progress

balanceOf() --> gives back the balance of a specific address
transfer() --> transfer tokens from the sender address to another address
totalSupply()–> gives the total supply of the token

1 Like
  1. What are the benefits of setting a token standard like ERC20?
  • All tokens have the same standard
  • Making exchanging easily
  • handling is easier when all tokens follow the same structure
  1. What functions are in the ERC20 Token Standard Interface and what do they do?
  • totalSupply --> get total supply of tokens
  • balanceOf -> get balance of specific address
    transfer --> transfer tokens to wallet
  • transferFrom -> transfer from X to Y address
1 Like
  1. Allows wallets to provide token balances for many different tokens and exchages can list more tokens by providing the adress of the token’s contract. Standards increases effiency.

  2. Functions:

  • balanceOf() - shows balance of a particular adress
  • transfer() - sending from A to B
  • doSomething() - executes “Something” or a function that can be set
  • approve() - get approval to transfer up tokens from a particular adress, also known as allowance
  • transferFrom() - transfer a specific amount of tokens, after allowance is granted
  • allowance() - provides number of tokens allowed to be transferred from one adress to another one.

(parameters:)

  • name - name of token, no restrictions on the length
  • symbol - symbol by which the token contract should be known, like a ticker
  • decimals - means how divisible a token can be, from 0 (no divisible) to 18 or higher. Ethereum doesn’t deal with decimals, it is representing all numeric values as intergers. Thus, decimals just define how we want to display our balances.
  • totalsupply - sum of all balances
1 Like

Homework on ERC20 token standard.

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

Setting a standard allows all the smart contracts and decentralized applications running on the Ethereum network to communicate with each other.

Anything written to the ERC20 standard will contain the same naming conventions for the multitude of variables that are used within them, so this reduces friction regarding interoperability, and increases the efficiency of this economic system.

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

totalSupply: displays the maximum amount of that specific token that is held in addresses on the network.

balanceOf: when presented with an address, it will return the balance of that account.

transfer: moves funds from the contract owner’s address to the address provided by the user.

transferFrom: takes a sender and receiver address, coupled with an amount, and creates a transaction.

approve: the contract owner can authorize an address to withdraw tokens from the contract, if called.

allowance: reveals how many tokens are permitted to be transferred from one address by another address.

1 Like
  1. Clear and concise rules that the creation of a token must adhere to, so that the compliance with it will allow wallets and exchanges to support its usage.

    • 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
    • approve() function allows a token holder to give another address approval to transfer up
      to a certain number of tokens(allowance).
1 Like

1.- The benefits of setting a token Standard like ERC20, is that all users and applications have a common base to interact with each other. Otherwise, if functions for token contracts where named differently interaction would be more difficult.

  1. The functions in the ERC20 standard token are:
    balanceOf() - provides the balance of a given address
    transfer() - sends token amount to provided address, from sender address. This function does not track who sent the transfer once executed.
    approve() - provide approval from address holder to move token
    transferFrom() - a transfer that tracks origin of token transfer.
    allowance() -provides number of token that can be transferred
1 Like
  1. setting standards is good because when different tokens are created on Ethereum, they will all be able to communicate with one another, even if they are different tokens
  2. totalsupply: is the sum of all balances
    balance0f() : gives you the number of tokens inside an address
    transfer() : transfers tokens from one address to another
1 Like
  1. What are the benefits of setting a token standard like ERC20?

    • Token adoption will be higher since all wallets and exchanges will be able to support it.
  2. What functions are in the ERC20 Token Standard Interface and what do they do?

    • They are interfaces easy to use which includes plenty of instructions inside to query information
      about a specific smartcontract or token
      They can be used by anyone who use ERC20 standard
  1. The mains benefits is to have standarize the token that will allow an easier adoption on wallets and exchange from day 1.
    2.balanceOf : Give you the balance of an adress
    totalSupply : Give you the total number of token in circulation
    Transfer : Send an amount of token to another adress
    transferFrom : it is an automate process to send token
    approve : owner of a smart contrat authorises the withdraw of an adress
1 Like
  1. ERC20 is a common standard that wallets, exchanges and Tokens can use.
    2.total supply(), balanceOf(account address) are common functions. Total supply of the token and balance of specific address.
1 Like

1/ The advantage is that in this way all the network participants will have a common base, which makes it easy and possible to interact with each other.

2/ Depending on the function is what it will do, it can show the balance of an account for example or show you the amount of tokens on the network

HEllo

  1. Token adoption will be higher since all wallets and exchanges will be able to support it.
  2. balanceOf() - provides the balance of a given address
    transfer() - sends token amount to provided address, from sender address. This function does not track who sent the transfer once executed.
    approve() - provide approval from address holder to move token
    transferFrom() - a transfer that tracks origin of token transfer.
    allowance() -provides number of token that can be transferred
1 Like
  1. What are the benefits of setting a token standard like ERC20?
    All Wallets and Exchanges will be able to support these token straight from the beginning.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    • balanceOf(address account) provides the number of tokens held by a given address.
    • transfer() allows someone to transfer their ERC20 tokens to another public address.
    • totalSupply() equals the sum of all balances.

1 Like

@PapatoniC

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

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

Abel S.

1 Like

@JuanitoPecados

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

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

Abel S.

1 Like