Homework: ERC20

  1. Benefits of having a standard like ERC20 allows developers to use the same function names so it is easier for wallets and exchanges to incorporate them and all that is needed is the contract address.

  2. balanceOf (Address Account) - provide the balance of an address
    transfer () - transfer funds from one wallet to another
    allowance () - gives the number of tokens able to be transferred
    doSomething() - Operates instruction
    approve() - You can approve someone to spend from your account

1 Like
  1. The benefits of setting standards allows wallets and exchanges can interact so there is less friction. This improves the overall ecosystem.

  2. totalsupply shows how many tokens are in circulation. balanceOf shows the balance is a specific account.

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.

2 Likes

The function totalSupply() is used to create the total supply for your ERC-20 project. The balanceOf() function is used to see what the balance on a given wallet address is. And the transfer function is used for tx.

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    A Standard like ERC20 is very important because it enables the tokens, applications to "talk "to each other. All wallets, applications will understand the meaning of the functions because they are standard.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    There is the function Totalsupply that gives the amount of tokens in supply. There is also the function BalanceOf which will give the balance of the account given afterwards.

1 Like
  1. Functions of the ERC20:
    balance0f() = provides number of tokens held by particular address. Anyone can query any address’s balance = because all the data in blockchain is public
    transfer() = transfer tokens from sender to another addresses
    allowance() = number of tokens able to be transferred
    doSomething()= DO operates particular given instruction
    approve() = approves to SPEND
1 Like

totalSupply(uint) =>
The total amount of the token

balanceOf(address) =>
Get the balance of certain address

approve(address _spender, uint _amount) =>
the owner of the contract authorizes or approves a transaction

transfer(address _to, uint _amount) =>
transfer a token from the owner of the contract to an address

transferFrom(address _from, address _to, uint _amount) =>
transfer balance from one address to another

allowance(address _owner, address _spender) =>
the amount allowed to be spent

2 Likes
  1. Everybody can make their own token and they will all interact the same with eachother. So even if there are 1000 different tokens, they can communicate in the same way with eachother. This makes it so useable.

  2. for example totalSupply and balanceOf. totalSupply for each token to set a maximum supply and balanceOf for example when binance wants to check your account balance

1 Like
  1. The benefits of setting a token standard like ERC-20 is that by having conventions and standards, we greatly improve communication, wallets, exchanges and software can easily integrate with the tokens belonging to the standard.
  2. In the ERC-20 Token Standard Interface, we have the following functions:
  • balanseOf() provides the number of tokens held by a given address
  • transfer() transfers tokens directly from one address to another address
  • approve() a token holder gives another address approval to transfer up to a certain number of tokens

And money more…

1 Like

Homework on ERC20 token standard.

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

So we all speak the same language and we can easily interact

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

The balanceOf() function provides the number of tokens held by a given address.
The totalSupply() gives maximum number of tokens that exist.
The transfer() function transfers a number of tokens directly from the message sender to another address.

1 Like
  1. Setting a token standard like ERC20 benefits the system by having the same language to build by, communicate with, and lower friction when different programs interact. For example once a token was coded by the ERC20 standard all wallets or exchanges programmed to support will be able to read the data they need and will work with the token with no barrier.

  2. totalSupply() - the full amount of tokens created.
    balanceOf() - the amount of tokens in a particular adders.
    transfer() - move value from one public address to another.
    allowance() - the max amount of tokens allowed to be transferred in future.
    approve() - the max amount of tokens approved to be deducted from this account.

1 Like

HI sir, could you mention more ERC20 token functions? :grinning:

1 Like

Maybe the transfer() function?

Which is also a much used function

1 Like
  1. Benefits of setting the ERC20 standard make it easier for exchanges and wallets to add ERC20 tokens with standardized code.

  2. 1.BalanceOf() gives the balance of an account. 2. totalsupply is the total amount of tokens.

1 Like
  1. All exchanges and wallets can easily interoperate/integrate with eachother when the standard is followed.

  2. function totalSupply = How many tokens that are in circulation.
    function balanceOf = Get the balance of an account.

1 Like
  1. Standardization makes everything easier to operate and flow between different wallet
    tokens and stimulates the growth of the community and applications.

  2. TotalSupply> number of all tokens that exist
    Balance of> provides balance on ERC20 token portfolios
    Tansfer> allows ERC20 tokens to be transferred to different wallets.

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

The benefits are that wallets and Exchanges are able accept and support tokens from day one. They are also able to accept updates easily as the tokens run off the same standard.

  1. What functions are in the ERC20 Token Standard Interface and what do they do?
    totalsupply() will give maximum number of tokens that exist
    allowance() number of tokens that can be transferred between addresses
1 Like
  1. the benefits of having a standard like ERC20 allows wallets and exchanges to be programmed to support any token using that standard. This is much simpler and scalable than each token having its own personalized code.
    2.the functions that are in ERC20 tokens are, totalSupply() gives maximum number of tokens that exist
    balanceOf(address account) gives a public addresses’ balance of ERC20 tokens
    transfer and lastly allows someone to transfer their ERC20 tokens to another public address.
1 Like
  1. Today, ERC20 is the most successful/adopted ‘template’ to create fungible tokens to run on the Ethereum blockchain platform. Like any standard, when used widely, it improves communication, flow, efficiency and interoperability. In this case, by providing a standard way to program and to deploy tokens (smart contracts); a new token (a programmed currency beyond its native currency ETH) will immediately be accepted by any wallet that accepts ETH addresses and any exchange will recognize it too (even if not listed). The ERC20 has enabled the DeFi boom, empowered its massive growth and opened the race for other projects to aim to do better.

  2. totalsupply – sum of all balances, i.e. the total supply of the token.
    balanceOf() – sum of tokens in a given address.
    transfer() – to send tokes from one user to another.
    approve() – used in a two-step transfer process.
    allowance() – the number of tokens permitted to be transferred from a given address by another given address.
    doSomething() – instruction.

1 Like
  1. setting the ERC20 standard on ETH makes it possible that differens usecases / Tokens / SC can be operated on the ETH-blockchain. This opens up a new dimension of usage for TX with fungible Tokens - and all over a good instrument for operating finance.
  2. dont know about programming yet - just repeat what I just learned:
    functions like totalsupply, balanceOf, transfer tare standard-codes for ERC20. Same parameters / conventions make it possible to operate and interact different tasks (SCs, different coins/token) without barriers.
1 Like