Homework: ERC20

  1. all the exchanges/wallets on the ether network can immediately transact with them upon deploymentsince all erc20 tokens share the same naming in their code
  2. balance Of()gives balance of a specific amount, total supply the number of fungible tokens.
1 Like
  1. All tokens follow the same convention, which makes it easier to interact together
  2. Some functions are common to all ERC20 tokens, like for example balanceOf and totalSupply. balanceOf allows wallets or exchanges to know how much balance is on one particular address. totalSupply allows wallets/exchanges to know what is the maximum number of fungible tokens.
1 Like
  1. All tokens base on that standard will be able to communicate in a known and expected way.

  2. totalSupply() gives maximum number of tokens that exists. BalanceOf() gives a public address balance of erc20 tokens.

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    With a standard every new token put on ethereum can automatically interact with the exchanges and wallets. They all understand the same code-standard. Tokens can use the infrastucture of Ethereum without having to reinvent everything.
  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    There are, name, symbol, decimals and total supply in the ERC20 Standard. They provide a smooth acces to the Ethereum-Infrastrucure as it can be connected directly with wallets and exchanges.
1 Like
  1. There are thousands of different tokens made on the Ethereum platform. So, it is beneficial that wallets that interact with tokens on the platform have the same standard adds consistency and improves efficiency in a sense that everybody is building the same type of token and not creating their own. It propels the platform forward & encourages innovation.

  2. totalSupply() - Gives maximum number of tokens that exist
    balanceOf() - Gives a balance of address with ERC20 tokens
    transfer() - Allows someone to transfer their ERC20 tokens to another public address

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

Setting standards is a good practice in programming in general. The ERC20 allowed programmers to set up their tokens based over the ETH architecture, allowing a great environment for new projects and uniformity for the exchange platforms

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

Upon investigating I was able to find some functions in this website Investopedia:

  • TotalSupply: provides information about the total token supply
  • BalanceOf: provides account balance of the owner’s account
  • Transfer: executes transfers of a specified number of tokens to a specified address
  • TransferFrom: executes transfers of a specified number of tokens from a specified address
  • Approve: allow a spender to withdraw a set number of tokens from a specified account
  • Allowance: returns a set number of tokens from a spender to the owne

Source https://www.investopedia.com/tech/why-crypto-users-need-know-about-erc20-token-standard/

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    It makes things efficient because it enables everyone to interact with same naming conventions etc.
  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    balanceOf() : gives the balance of that address
    totalSupply(): retrieves the total number of tokens in circulation
1 Like
  1. What are the benefits of setting a token standard like ERC20?
    Using a standard like ERC20 reduces friction and makes it is easier for scaling and user mass adoption to happen. The ERC20 standard is made up of common features and interfaces for token contracts on the Ethereum blockchain and includes the ability for wallets to provide token balances for hundreds of different tokens and allows exchanges to list tokens by simply providing the token’s contract address.
    2.)
    The ERC20 token standard interface displays a set of functions that an Ethereum-based token must include. ERC20 tokens contain and display the following interface:

interface ERC20 {
function totalSupply() public view returns (uint);
function balanceOf(address tokenOwner) public view returns (uint balance);
function transfer(address to, uint tokens) public returns (bool success);
function approve(address spender, uint tokens) public returns (bool success);
function allowance(address tokenOwner, address spender) public view returns (uint remaining);
function transferFrom(address from, address to, uint tokens) public returns (bool success);

event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);

}

The description of the actions for the above functions are as follows:

totalSupply: Returns the total circulating amount of tokens.

balanceOf: Returns how many tokens exist in an account.

transfer: Transfer an amount of tokens from token owner’s account to another account.

approve: A token owner can approve for spender to transferFrom tokens from the token owner’s account.

allowance: Returns the amount of tokens approved by the owner that can transferred to the spender’s account.

transferFrom: Allows a spender account to transfer an amount of tokens on behalf of the token owner to another account.

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    Normalize all smart contracts programming code, in such a way everyone can interact and understand each smart contract

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    ‘getBalance()’ returns the amount of token of a given address.
    ‘totalSupply()’ gives the sum of all balances for a given token/smart contract.

1 Like
  1. The standard ERC20 ensures interoperability so that all exchanges and apps can communicate easily.

  2. Examples of functions are:

  • totalSupply = shows the maximum number of tokens.
  • balanceOf = shows the number of available balance in a given account.
  • transfer = sends tokens from one address to another.
  • approve = allows user to give another address access to a certain number of tokens to transfer it.
1 Like

1. What are the benefits of setting a token standard like ERC20?
All wallets automatically supports all tokens under the same standard.
2. What functions are in the ERC20 Token Standard Interface and what do they do?
totalSupply() returns the amount of tokens in existance.
balanceOf(account) returns the balance of the account in the input
transfer(address, value) sends tokens to another account.
transferFrom(sender, receiver, value) sends tokens from one account to another

1 Like
  1. ERC20 standards allow wallets and exchanges to support any token using that standard. This is much simpler than each token having its own code

totalSupply() gives number of tokens that are in circulation
balanceOf(address account) gives a public address its balance of ERC20 tokens
transfer() allows the transfer of ERC20 tokens.

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

There are thousands of people, who creates smart contracts. These smart contracts may needs to talk each other, and with the wallets, addresses, miners, nodes. If there would be no standards, then everybody needst to find out how to solve this system of communication. In ERC 20 standard, the main concepts are the similar to everybody

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

there are totalSupply, that show the total supply of a specific coin. This is useful for example exchanges.

there are balanceOf function, that is also a hard coded function and it tells the ecact number of coins of a specific address

1 Like

[quote=“filip, post:1, topic:8440”]
Homework on ERC20 token standard.

  1. What are the benefits of setting a token standard like ERC20?
    Without standards every token will have own functions which can work in the same way but it will be harder for every unit (wallets, smart contracts) to execute them in the same way because of different names etc.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    For example totalSupply (); transfer, balanceOf…

1 Like
  1. What are the benefits of setting a token standard like ERC20?
  • Every developer creates tokens in the same way (everyone is following the protocol)
  • Because tokens function in the same way, all exchanges and wallets are able to support tokens (even newly created ones) from the beginning.
  1. 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(): it does something based on a condition. It can use the “approve()” and “transferFrom()” functions to do what it needs to do;
  • allowance(): provides the number of tokens allowed to be transferred from a given address by another given address.

https://medium.com/@jgm.orinoco/understanding-erc-20-token-contracts-a809a7310aa5

1 Like

Homework on ERC20 token standard.

  1. What are the benefits of setting a token standard like ERC20 : It allows for a common standard way of coding smart contracts and tokens, so that the format and meaning is consistent across the entire network and wallets. It also allows for a consistent way in which smart contracts / programs running on a network is being developed on a commonly understandable language format.
  2. What functions are in the ERC20 Token Standard Interface and what do they do :
  • name - The long name of the token contract
  • symbol - the abbreviation / symbol by which the token is known
  • decimals - how devisable a token should be (between 0 and 18 decimals)
  • totalsupply - the sum of the balances
  • balanceOf() - number of tokens held by a specific address
  • transfer() - to transfer tokens from a sender address to a receiver address
  • doSomething() - an instruction that requires and action for example and activity the doer needs to do to have tokens transferred to his account
  • approve() - approve and action or a transfer of tokens
  • transferFrom() - identification of the account to be transferred from
  • approve() - approval of the transfer of tokens to take place
  • allowance() - number of tokens that is allowed to be transferred

This looks very basic to me, but I can see how this could be useful in coding simple supply chain contracts. I deduct that for a purchase contract the “allowance” may be the value that the parties agreed to enter into. The tranferFrom() function will be used to execute a progress payment for example, where the contract owner might want to “approve” the transfer of tokens to take place upon say a delivery condition being met. The “Doer” is the contractor / supplier and the “doSomething()” is the delivery condition that needs to be met. I hope my understanding is correct;

1 Like

In this way you can create an interopable ecosytem of new projects with their tokens.

Creating an ecosystem standard you create the commands/functions fo interact and act on the blockchain which permit to anyone to create something new knowing this commands/functions. With a simple line word I can transfer token, check balances, set/check a total supply of a token, etc etc

1 Like
  1. Having standards allows for wallets and exchanges to easy support new ERC20 tokens.

2.totalSupply() gives maximum number of tokens that exist
balanceOf(address account) gives a public addresses’ balance of ERC20 tokens
transfer() allows someone to transfer their ERC20 tokens to another public address

1 Like

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

having a standard like ERC20 increases efficiency and allows wallets and tokens to be able to communicate

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

totalsupply : equals the sum of all balances
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
allowance() : function 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?
    Standards, Benefit the Global Community as a whole. Allowing Universal Operations within a Network, When A standard setting like ERC20 is implemented, The Token can be used as a Fungible asset with full Adaption capabilities.
    1. What functions are in the ERC20 Token Standard Interface and what do they do?
      Some of the functions for the ERC20 Token standard are.
      -Total supply
      -Balance of=( Provides the Address Balance)
      -Approve Spend limit=(sets Owner Permissions)
      -Allowance=(sets Spend limit)
      -Transfer=(Transfers quantity to a specified Address)
      -Transfer From=(Transfers a Quantity from a specified Address)
1 Like