Homework: ERC20

  1. ERC-20 standard benefits in the way that it provides common set of rules for tokens smart contracts ensuring their smooth communication with each other, allowing wallets to return balances of different tokens

-totalSupply - returns total number of tokens supplied within a smart contract
-balanceOf - provides number of tokens held by a given address
-transfer - deployed to directly transfer tokens from address to another
-approve - provides another address approval to transer up to a certain number of tokens (commonly used for smart contract addresses)
-allowance - provides number of tokens allowed to be transferred from a given address by another given address

1 Like
  1. Everyone is using the same language for functions.

balanceOf(): Tokens held by a specified address.
transfer(): Transfers tokens to another address.
approve(): Approve someone to spend from your account.
transferFrom(): Automate the transfer of tokens
allowance(): Anount of tokens allowed to be transferred.

1 Like
  1. It allows for easy integration into exchanges and wallets that deal with many different tokens built on the ERC20 standard. They all use the exact same functions and language, which makes working with them easier and more efficient.

  2. totalSupply() function tells you the total amount of tokens. balanceOf() function tells you the balance of the address in question. These are just two of many more in the ERC20 standard.

1 Like

1 A standard, helps to build a micro cosmos, with wallet, exchanges, token, all following the same standard, ERC20 in this case, and his code.
2 totalSupply: returns the total amount of tokens that exist in circulation;
balanceOf: store and return the balance of provided address;
approve: authorize or approve for the address to withdraw tokens from owner’s address;
transfer: send token to another address;
transferFrom: automate the transfer of tokens on behalf of the owner;

1 Like
  1. Creates less friction amongst the network so that transactions can occur more easily.

  2. balanceOf() gives balance of an account, totalsupply() gives the total number of tokens that exist

  1. It allows wallets to provide token balances for many different tokens and it creates a way for exchanges to list more tokens by providing only the address of the token’s contract. It allows many applications to integrate and interoperate with each other.
  2. The balance () function provides the number of tokens held by a given address. The transfer () function transfer a number of tokens directly to the message sender to another address. The approve () and transfer() functions allow a two step process. The allowance () function provides the number of tokens allowed to be transferred.
1 Like
  1. What are the benefits of setting a token standard like ERC20?

    ERC20 allows for all the exchanges and wallets to support new tokens and applications, since they’re based on the same programming.

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

  • totalSupply(): Gives the total amount of tokens that are in circulation.
  • balanceOf(): Gives the balance of a specific account.
  • transfer(): Transfers an amount of tokens from one account to the other.
  • approve(): Holder gives another account approval to transfer up to a certain number of tokens.
  • allowance(): Provides the amount allowed to be transferred from one account to the other.
1 Like
  1. What are the benefits of setting a token standard like ERC20?

All wallets and applications use the same ‘language’ for certain commands to interact with the token.

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

All the functions in ECR20 allow marketplaces and crypto-wallets to have a single, standardised set of commands to communicate with the range of tokens they manage. There area range of functions in ECR20 to do so. For example, the function totalSupply( ) pulls the entire circulating supply of the token that contract is tied to. The function balanceOf(address _owner) stores and retrieves the tokens owned by a person. The function approve(address _spender, uint _value) is used as an authentication step for the owner of the contract. It approves the withdrawal of specified amount of tokens from the owner’s address to the destination address.

1 Like
  • What are the benefits of setting a token standard like ERC20?
  1. Every developer “speaks the same language”, ie they all use the same name for functions regarding ERC20 tokens.
  2. Apps can call same functions for every ERC20 token, allowing interaction between many different tokens
  • What functions are in the ERC20 Token Standard Interface and what do they do?

FUNCTIONS

1 Like
  1. The benefits of setting a token standard like ERC20 are that it allows wallets and exchanges to be programmed on the same common naming in their code.
  2. totalSupply(). Gives max number of tokens that exist.
    balanceOf(address account) public addresses balance of ERC20 token.
1 Like
  1. What are the benefits of setting a token standard like ERC20?
  • A token standard like ERC20 token compliant, can easily communicate with all Exchanges, Wallets, Apps that use the same standard and brings consistency to community by increasing efficiency.
  1. What functions are in the ERC20 Token Standard Interface and what do they do?
  • The functions allows users to find out the balances of accounts as well as to transfer them from one account to another based on specific conditions. The 6 mandatory fuctions for each ERC20 token are :
  • 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?
Easily interrogatable easy to operate with one another, more efficient.

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

  • Total supply() function allows you to see how many tokens in circulation

  • Balance of() function allows you to check an address amount, to see how many tokens the address has

  • Transfer() function transfers a number of tokens directly from the message sender to another address.
    Transfer from() function allow the transfer process as well as send a given amount of token on behalf of the owner.

  • Approval() which emits details of approvals of tokens from one address to another.

  • Allowance() function provides the number of tokens allowed to be transferred from a given address by another given address

1 Like
  1. Having standards such as erc20 allows interoperability so that all developers are able to create programs that are able to communicate with each other. The standard increases compatibility between projects.

1) totalSupply() gives the number of tokens exist
2)balanceOf() gives the account balance of a given address
3) transfer() transfer number of tokens from sender to another addresss
4) transferFrom(): take certain tokes from sender’s account and carry on its work.
5) doSomething(): to operate instructions

1 Like
  1. Some of the benefits of having standards are, all ERC20 tokens have the same language and convention.

  2. Some functions in the ERC 20 are, Total Supply which tells you how many tokens there are in circulation. Balance Of is another function, which gives you the address of an account. Others are Transfer, Allowance, etc.

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    So we can build applications that can talk to one another. Without Standard, wallets would have to talk differently to all tokens. Standard makes networks more efficient and avoids friction.

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

  • function totalSupply - how many tokens are in circulation
  • function balanceOf (address account) - to get the balance of the address you want
2 Likes
  1. It makes it simpler for wallets and exchanges to add support for a new token because they have already programmed their applications to work with ERC 20 tokens.

totalSupply: the total supply a token has

transfer: transfer a specific amount of tokens from one address to another

balanceOf: gives the total number of tokens held in an address

1 Like

Efficiency and interoperability (ie works with wallets and exchanges as soon as it is deployed)

balanceOf (address) - can find out the balance of any address
totalSupply() the sum of all balances
approve() and transferFrom() – approve the transaction and transferFrom an address

1 Like

ERC20 tokens standards are beneficial because there are certain standards that the all ERC20 tokens must have. This means that it’s more efficient and compatible for transfers between wallets etc.
The ERC20 token standard interface has several functions eg. total supply() - total number of tokens available, balanceOf(address account) - balance of a specific account etc

1 Like
  1. Everyone is using the same language for functions and all exchanges and wallets will be able to support the new tokens immediately.

totalSupply(): total amount of tokens in circulation
transferFrom(): automates the transfer of tokens
balanceOf(): gives the balance of a specific account.
transfer(): transfers tokens to another address.
allowance(): Provides the amount of tokens that are allowed to be transferred.

1 Like
  1. By setting token standards, if any developer wants to create new token he follows those set of standards. In such way all tokens will be identical, and wallets will support new tokens as they function identically.
  2. balanceOf(address) - returns the balance of specified address, balance of any address is public.
    approve(spender address, amount) - the owner of smart contract authorizes and sends amount to the sender address.
    transfer(address, amount) - this is similar to bank transaction to send the amount to the sender address.
    transferFrom(from address,to address,amount) - this is an automation of transfer, in some cases smart contract may need to send amount on successful operation. If we consider example of sending some money to kid if he passes in school, smart contract can use transferFrom() funtion to transfer amount from his father’s address to kid’s address, without manual intervention of father.I welcome you all to correct me if i’m wrong :smile: