Homework: ERC20

  1. ERC20 Standard allows wallets to provide token balances for hundreds of different tokens and creating a means for exchanges to list more tokens. Most token contracts are created using ERC20 so they can communicate and understand each other. This increases efficiency because contracts know and can integrate.

  2. balanceOf (): provides the number of tokens held by a given address.
    transfer(): tis good to send tokens from one user to another but not for paying for a function on a smart contract. This function transfers a number of tokens directly from the message sender to another address.
    approve(): a token holder gives another address approval to transfer up to a certain number of tokens(allowance).
    transferFrom(): takes certain tokes from sender’s account and carries 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. ERC20 provides a standard for tokens, wallets, and exchanges to be interoperable with one another.

  2. balanceOf() gets balance of an address
    transfer() transfers tokens from one address to another
    approve() gives an address permission to transfer a certain amount of tokens
    allowance() determines the number of tokens one address can send to another
    transferFrom() performs the action of sending funds

1 Like
  1. Standards such as ERC20 ensures interoperability between wallets, exchanges and applications.

  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
    approve() allows for tokens to be used for smart contract.
    transferFrom() typically moves tokens from user wallet into smart contract to perform something.

1 Like
  1. it allows all the token to exchange easier and have common code.
  2. balance of account, total supply are two examples. the first gives the Wallet balance. the second gives total token supply.
1 Like

1 one contract can work with all of the standard ERC20 tokens.
2there are a lot of functions, but here are the main ones:
balanceOf- gets the balance of a user
approve- give an address an allowance to spend
transfer- give an address some coins(need to approve first)
mint- make more coins
burn- remove coins

1 Like

All application and wallets can interoperate and communicate.

total supply, balance of,

1 Like

What are the benefits of setting a token standard like ERC20?
The benefits of setting a token standard like ERC20 include: network, wallet, and exchange efficiency. Any tokens that are created using this standard are able to
be easily accepted by exchanges, wallets, ledgers, etc. Furthermore, updates and changes can be made more easily when code is uniform.

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

ERC20 has many functions - totalSupply is a function that sums all of balances available for an account. balanceOf() provides the number of tokens available. transfer() allows a user to send
funds to an unverified recipent. There are many and each function has been hard coded to cost a certain amount - this amount is called gas and conversions between
gas and the market cost of gas all allowed so that fees gauging is limited.

1 Like

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

1 Like
  1. Because just like with a outlet, creating a standard for plugs makes everything easier for users, devices are easily integrated, same with Tokens.

  2. TotalSupply(): gives maximum number of tokens that exist.
    BalanceOf () gives a public addresses’ balance of ERC20 tokens.
    Transfer() allows transfer of their ERC20 tokens to another public address.
    Approve() When called the owner of the contract authorises the address to withdraw tokens from the owners address.
    Transferfrom() to take tokens from allowance as a payment.
    Allowance() provides the number of tokens allowed to be transferred from a given address by another.

1 Like
  1. There are several benefits of ERC20 and other token standards. First of all the issuers of tokens don’t need to implement their own blockchain solution. As a result, cryptocurrency exchanges can add an ERC20 token with little efforts only, they don’t have to implement APIs for a new native blockchain currency. Exchanges as well as decentralized applications can talk with wallets frictionless and efficiently, e.g. reading the balance uses the same function for all ERC20 tokens. Also, ERC20 tokens can leverage from the existing infrastructure (and security) of Ethereum. In general, the ERC20 token standard promotes interoperability between smart contracts. As a result, all infrastructure components such as user interfaces, exchanges and wallets can be connected to a smart contract in a predictable way.
  2. ERC20 token standard functions and purpose:
    function totalSupply: Returns the number of existing tokens
    function balanceOf: Returns the number of tokens sitting on a particular address (account)
    function transfer: Moves an amount of tokens from the address of the function caller (sender) to a recipient address.
    function approve: Sets the amount of tokens, that an address (spender) is allowed to transfer from the account of the function caller (sender). Basically, the ERC20 standard allows an address (owner) to grant permisson to another address (spender) to retrieve tokens from the owner.
    function allowance: Returns the remaining number of tokens that the spender is allowed to transfer on behalf of the owner.
    function transferFrom: Moves an amount of tokens from the sender to the recipient using the approval/allowance mechanism.
1 Like
  1. What are the benefits of setting a token standard like ERC20?
    all exchanges, and wallets will be able to support the tokens

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    function totalSupply() shows the total supply of a token, function balanceOf(address account) shows balance of specified account, and ect

1 Like
  1. makes it more efficient + a common language

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
allowance() is provides information about how many tokens are in the allowance

1 Like
  1. Because the program can use the same language and we can easily communicate between the tokens that use a standard
  2. totalsupply: shows what is total supply of all tokens
    transfer: to transfer tokens
    balanceOf: show balance
    etc.
1 Like

It is usefull for a common infrastructure. Wallets and exchanges can adopt and interact with these standardized tokens much easier.

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.
approve() and transferFrom() are two functions that allow to pay for a function in a smart contract if used combined.

1 Like
  1. Having standards for the ERC20 tokens allows wallets and exchanges to communicate more efficiently as opposed to a new language for each token.

  2. totalSupply() tells the total number of tokens in existence, transfer() allows the transfer of tokens from one address to another and balanceOf shows the number of tokens per address.

1 Like

1-Benefits are that we speak the same language which means that wallets etc understand the
codes.

2.(totalsupply) Available supply of tokens.
(balanceOf) balance checker of a user or/and address.
(transfer) transferring an amount from sender to receiver.

1 Like
  1. What are the benefits of setting a token standard like ERC20? By creating a token standard it minimises conflicts and promotes interoperability.

2.What functions are in the ERC20 Token Standard Interface and what do they do?Total supply ( Total token supply) and balance (available token balance).

1 Like
  1. Easy interaction between wallets and network, reduces friction.
  2. totalSupply -total supply of tokens
    balanceOf -amount of tokens in a specific account
    transfer -sends a specified amount of tokens from A to B
    approve -gives approval to transfer up to a certain number
    allowance -a number of tokens allowed to be transfered
1 Like
  • What are the benefits of setting a token standard like ERC20? All programmers must develop within the same parameters, which allow all exchanges and wallets to be able to support the token from the moment it’s deployed.

  • What functions are in the ERC20 Token Standard Interface and what do they do? Balance (gives balance), Total Supply (displays total supply of token).

1 Like
  1. To have the ECR20 token standard allows the wallets and Exchanges to support any token using the same standard.

  2. Functions like (total supply) number of coin that exists and also Functions like circulation supply …burning mechanism.

1 Like