Homework: ERC20

One.

A standard makes it so that it easy to build upon. Like lego blocks. if you create another lego block you adhere to the lego standard. With standards everyone can easily read what you have written and understand it without having to adjust their reading to your language that no one knows.

Two

  1. balanceOf() function provides the number of tokens held by a given address.
  2. transfer() function transfers a number of tokens directly from the message sender to another address.
  3. approve() and
  4. transferFrom() a two step process. In the first step a token holder gives another address (usually of a smart contract) approval to transfer up to a certain number of tokens, known as an allowance. The token holder uses approve() to provide this information.
  5. allowance() function provides the number of tokens allowed to be transferred from a given address by another given address
1 Like

Everyone can interoperate on the same standard network with each smart contract, interoperable behavior on ETH platform.

There many functions of ERC-20 Token Standard Interface. ERC-20 was designed to use ETH platform only with mandatory and optional rules. Here are the mandatory rules: total supply balance of supply, transfer to and from, approve, and allowance. Here are your optional rules: token name, symbol, and decimal. They perform accounting and Standards according to the rules making tokens fungible and accountable.

1 Like

1)Having a standard makes it more efficient, allowing different tokens to be exchanged easily.

2)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 by another given address

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

transferFrom() - gives another address approval to transfer up to a certain number of tokens

approve() - provides information allowing another address approval to transfer up to a certain number of tokens

1 Like

Standards make everyone using the same conventions, e.g. for available functions and for variable names. This greatly increases efficiency in developing the whole ecosystem.

totalSupply() to request the total supply of the tokens of this smart contract.
balanceOf() to request the token balance of a certain address.
transfer() to transfer tokens from one address to another
approve(), transferFrom(), allowance() are used for access of tokens in a smart contract

1 Like

ERC 20

  1. ERC20, a technical standard used for all smart contracts on the Ethereum blockchain for implementation of token comes with it many benefits which are as follow:
  • It provides the rules that all Ethereum token can adhere to.
  • empowers developers of all types to accurately predict how their new tokens will function within the larger Ethereum system…
  • It simplifies the rules and task set for developers in order for their work not to be rejected on the Ethereum blockchain.
  • it ensures compatibility between the many different tokens issued on the blockchain
  • it ensures Ethereum tokens of different types will all perform uniformly in any place within the Ethereum network.
  • it ensures ERC20 compliant to all digital tokens that support ether currency
  1. The funtions that are in the ERC20 token standard interface are as follows:
  • function allowance - allows for two addresses to create repeated unidirectional transfers.

- funtion approve - calls for the original wallet owner to approve a transaction that is about to be made on his behalf.

  • function balanceOf - accept a single input (address of the token owner) and returns a single constant (unit balance) - the amount of tokens a queried address holds.
  • function totalSupply - the possible total supply of all tokens in circulation that can ever be.
  • function transferFfrom- allows for a smart contract to execute a transfer on behalf of the wallet owner.
  • function transfer - sending token from a single wallet owned by the owner to another peer wallet address.
1 Like
  1. What are the benefits of setting a token standard like ERC20?
    It utilizes standardized functions to provide simplicity in the code so token code can easily and quickly converse with ERC20

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    totalSupply() is a standard function that provides how many tokens are in circulation
    balanceOf() give a number of tokens that the account has

1 Like
  1. the benefits of setting a token standard are the it makes them interoperable with each other. If you make an erc20 token you can be automatically stored on exchanges and wallets.
  2. balanceOf(address account) = public addresses’ balance
    transfer() = transfer of tokens to another address
    totalSupply() = maximum number of tokens that exist
1 Like
  • What are the benefits of setting a token standard like ERC20?~ Making the different tokens exchange easily, so this enables wallets and exchanges built on a standard that is common knowledge and true for all ERC20 tokens.
  • What functions are in the ERC20 Token Standard Interface and what do they do?~A total-supply, balance of(account), transfer, approve are just few functions which are part of erc 20. In addition the standard protocol allows for transfer of tokens by way of transfer(), approve() & transferfrom().
1 Like
  1. What are the benefits of setting a token standard like ERC20?
    ERC20 is the standard for creating cryptocurrencies. The standard allows cryptocurrencies to be integrated in the market including wallets, exchanges, apps, etc. Without it there would be more friction in the market.
  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    ●
    The main functions in ERC20 are the following:
    _totalSupply() allows to view total token supply in the specific network.
    _balanceOf() allows to input adress account and recieve total balance
    _transfer() allows to send tokens setting as input: both receiver and sender’s address.
    _transferFrom() transfer from given adress to another account which has been approved to do so.
    _approve() allows receiver to withdraw from another account
1 Like

A token standard means that everyone will use the same format when they create their own tokens.
This way, each wallet can interract with each token, there is no confusion in between tokens and this allows for a more tightly knit community and ecosystem. A standard allows for more connection between different tokens and the ideologies behind them :slight_smile:

THE ERC20 standard has the following default functions:
Totalsupply() = shows the total supply of the token
balanceof() = shows the balance of tokens for a given address
transfer() = allows the transfer of tokens between addresses
approve() = approval of an address to another address to transfer tokens to it
transferfrom() = this is used after an address is approved and it is used to transfer tokens from that address
allowance() = determines how many tokens can be transferred with transferfrom()

1 Like
  • What are the benefits of setting a token standard like ERC20?
    They can be shared, exchanged for other tokens or transferred to another user.
  • What functions are in the ERC20 Token Standard Interface and what do they do?
    [transfer] allows required amount of tokens to be transferred from the total supply to a user account.
    [totalSupply] identifies the total number of tokens created.
    [balanceOf] returns the number of tokens a given address has in its account.
    [transferFrom] is the function that allows a user to transfer tokens to another user.
    [approve] checks a transaction against the total supply of tokens.
    [allowance] function checks the balance of the user’s account and will cancel the transaction if there are insufficient tokens.
1 Like
  1. When you set a token standard, it means that wallets and exchanges that support that standard will be able to support that token from the beginning.
  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 ‘approve()’ function gives an address approval to transfer up to a certain number of tokens, called an allowance. The ‘transferFrom()’ function to transfer up to the allowance. The ‘allowance()’ function provides the number of token set as the allowance or the number of tokens allowed to be transferred from your address to another.
1 Like
  1. It allows for efficient markets and mass adoption. As well as ease of creating the tokens because developers are familiar with the code.
  2. Totalsupply() dictates token total supply
    balanceof() shows specific wallet address token supply
    transfer() allows tokens to transfer between wallet addresses.
    approve() approval from one address to another for value transfer of tokens.
    transferfrom() approves transfers from a given address.
    allowance() dictates how many tokens an address can transfer.
1 Like
  1. ERC20 allows all tokens using its standard to communicate between each other because they use the same codes

  2. commands like totalSupply() and balenceOf() will give you information about the supply or balances. Others like transfer() will send a command to transfer and amount of tokens, and approve() to authorize a transfer request. transferFrom() will allow you to set the to and from points for a transfer. allowance() specifies the quantity

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    That once you create a coin it will allow your coin to be traded in all exchanges and wouldn’t cause any friction with the economic system, plus it verifies that the coin is fungible and it lets all wallets know how to interact with your token.
  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    Total supply function : gives the total supply of the coin circulation.
    BalanceOf function : gives the balance in the users account.
1 Like
  1. What are the benefits of setting a token standard like ERC20?
    making communication faster and easier so that exchanges and wallets can communicate, and support the token build whit the erc20 standard
  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    totalSypply
    balance-gives back the balance of the spic. address
    doSomething- instruction
    transferFrom- sending tokens between difr. addresses
    approve -authorization
    allowence - how many tokens are allowed to be transfered
1 Like

Homework on ERC20 token standard.

  1. What are the benefits of setting a token standard like ERC20?
    Common standard allows for streamlined progress and development of network because it outlines rules for arranging functions and sets up how contacts are written. Existing standard for ERC-20 reduces amount of labor for developers because they do not need to adjust or re-write code just because a bunch of new tokens just got created or a new rule was put in place.

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

  • totalSupply() → uint256 - Returns the amount of tokens in existence.

  • balanceOf(address account) → uint256 - Returns the amount of tokens owned by account .

  • transfer(address recipient, uint256 amount) → bool - Moves amount tokens from the caller’s account to recipient .
    Returns a boolean value indicating whether the operation succeeded.

  • allowance(address owner, address spender) → uint256 - Returns the remaining number of tokens that spender will be allowed to spend on behalf of owner through [ transferFrom ]( This is zero by default.
    This value changes when [ approve ] or [ transferFrom ] are called.

  • approve (spender, amount) - Sets amount as the allowance of spender over the caller’s tokens.
    Returns a boolean value indicating whether the operation succeeded.

  • transferFrom (sender, recipient, amount) - Moves amount tokens from sender to recipient using the allowance mechanism. amount is then deducted from the caller’s allowance.
    Returns a boolean value indicating whether the operation succeeded.
    Emits a [ Transfer ]) event.

G.

1 Like

Great answers. It’s easy to understand. Great work. :clap:

Carlos Z.

1 Like

1)benefits of setting a token standard :
-it unites the different communities and avoids tribalisme.
-easier for programmers to understand each others.
-the token would be added easilly to exchanges /wallets.

2)functions in the ERC20 interface :
-balanceOf() : you write inside the brackets the adress of wallet which you want to know its balance
-transfer() : to transfer tokens
-totalSupply() : how many tokens are in circulation

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    Standards increase efficency of communication and writing programs that working together
  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    approve - approval for another account to transfer specified numbers of tokens
    transferFrom() - transfer from a specific token account
    Allowance() - number of tokens allow to transfer from approve
    balanceOf(address) - balance of tokens of given account address
    transfer() - transfers a certain amount from one address to another
    totalsupply() - total numbers of tokens in circulation
    doSomething() - carries out or takes action when all set conditions are med
1 Like