Homework: ERC20

Sorry @thecil , I totally missed that part of the question. :slight_smile: Thanks for pointing this out!

balanceOf = Returns the balance of the queried address.
totalSupply = Returns the total supply amount of the token that exists.
transfer = Specify the recipient and the amount and this function allows for transferring the specified amount of tokens.
transferFrom = This allows for automation of transfers. Like transferring a fixed amount for a bill each month.
approve = This function approves a request to withdraw tokens.
allowance = Specifies the amount of tokens an approve request is allowed to withdraw.

Did I get it right? :slight_smile:

1 Like
  1. all users of the standard can communicate efficiently. e.g. wallets, exchanges
  2. balanceOf gives the total amount of tokens for an address, transfer transfers from account a to account b
1 Like
  1. by setting a standard it aids in writing new programs because the programmer can re-use the parts that are built into the standard. By making it easier to create new programs you will have a larger number of programmers using the standard. The standard will save the programmers time and they will be using code that has been tested and debugged.

  2. The standard has functions like Balance, issue/burn tokens, manage ownership, total supply and more.

1 Like
  1. The benefits of setting a token standard like ERC20 allows for the entire community to build applications that can talk with each other.
  2. Some of the functions in the ERC20 Token Standard Interface are “function totalSupply ()” a function to know how many tokens are in supply and “function balanceOf (address account)” where you give an address account you want the balance of.
1 Like
  1. Everything is interoperable with everything else. Anyone can call a function and know it will work. This speeds up development because we don’t need to reinvent the wheel.
  2. Functions control the balances and transferring of tokens. They are balanceOf() and transfer() respectively. Others are approve() and transferFrom() - these ones allow similar processes but using a two-step process. Basically functions allow the programmer to manipulate the tokens.
1 Like
  1. All token have the same functions this way, and so every token functions in the same way making operations smoother and with less friction.

  2. Total Supply is a function, it governs the total amount of the token that will be on the network.
    balanceOf is a function that gets the balance of a certain address

1 Like

@kyliezz
Welcome back to forum :slightly_smiling_face:

1 Like

The ability of each token under ERC20 to operate on the same standard with same set of rules, also different wallets to provide balances for hundreds of different tokens and creating platforms for exchanges to list more tokens by only providing an address of the token contract etc…

ERC20 standard allows users to to find out the balances of accounts aswel as to transfer from one account to another under certain conditions ERC20 functions are;

balance0f () - number of tokens held by a given address [balance]

transfer () - send tokens from one address to another

Approve () - send value amount of tokens

transferFrom () - transfer up to a certain amount of tokens

Allowance () - sets number of tokens to be set amongst different address

From what I read there re 2 ways of transferring and the two work hand in hand with the allowance function but in a nutshell that is my understanding.;

  1. Having an ERC20 standard within Ethereum ensures any deployed tokens within the network will have the same naming and parameter conventions. It allows newly launched tokens to be listed on exchanges and interact with wallets immediately. All ERC20 tokens within the set standard enables them to integrate and interoperate with each other for optimal efficiency

  2. Some of the functions that are present on ALL ERC20 tokens are:
    function totalsupply(): total number of tokens in the smart contract
    function balanceOf(address account): shows the balance of the specified address
    function transfer(address, recipient, Uint256 amount): transfers set amount of tokens from one address to a recipient

  1. What are the benefits of setting a token standard like ERC20?
  • it is a standart of programing so exchanges and walltets support this
  1. What functions are in the ERC20 Token Standard Interface and what do they do?
  • ballanceOf () - provides the number of tokens held by a given address
    transfer () - transfer a number of tokens from address A to B
    allowance () - provide the number of tokens allowed to be transferred from address A to B
    approve () - approval to transfer tokens

1.The benefits of setting a token standard like ERC20 allows all apps, wallets, and exchanges, that use it to communicate with one another.
2. Wallets and exchanges that are compatible with ERC20 standard interface are able to see the balance of and the total supply of fungible tokens.

1 Like
  1. It allows all of the apps to communicate with each other. Also makes it easier for exchanges.
  2. balanceOf # of tokens held by a given address
    totalsupply() sum of all balances
    transfer() transfers a # of tokens from sender to another address
    allowance() the # of tokens allowed to be transferred from a given address to another given address.
2 Likes
  1. By creating a standard, products and services that allow operate with many ERC 20 tokens will have an easier technical time in handling all the tokens. If you learn the standard, you will understand more tokens than if having to learn the nuances of every token.
  2. Some functions include:
    • Balanceof() – checks the balance of tokens in a specific address or the total amount in the contract
    • Approve() – Approves a specific amount of tokens to be transferred if that amount of tokens in the specified address
    • Transfer() – Transfers an amount of tokens
    • Allowance – The amount of tokens approved by an address that has permission to transfer using the smart contract
2 Likes

1.What are the benefits of setting a token standard like ERC20? So everyone programs using the same way therefore programs can communicate
2.What functions are in the ERC20 Token Standard Interface and what do they do? Function totalSuplly(), balanceOf(address account), approve(), transferFrom(), transfer(address recipient)

  1. What are the benefits of setting a token standard like ERC20?
    Ensure all apps and new currency are interopable and brings consistency to the community.
  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    totalSupply() gives maximum number of tokens that exists.
    balanceOf(address account) give the address and how much balance it has.
    approve() being approved to the network.
    Transferfrom() where it has been transfered from.
1 Like

1 A token standard makes that everyone speaks the same language, wallets can communicate with erc-20 tokens, dapps can be deployed. makes it easy for further developments of the space.
2 totalSupply() - takes the total of all available tokens
balanceOf() - indicates the amount of tokens kept in a wallet
transferFrom() - sends an amount of tokens from wallet A to wallet B
approve() - allows another address to access an certain amount of tokens
allowance() - maximum amount which is allowed to be transferred

1 Like

(1) Having standards allows new tokens / projects to build on top of ethereum and allows wallets and exchanges to support any token using that standard.

(2)
totalSupply() gives max. number of tokens that exist.
balanceOf(address account) gives the balance of ERC20 tokens of that public address.
transfer() allows to transfer ERC20 tokens to another public address.

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

– Setting a standard enables wallets and exchanges to accept any ERC20 token.

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

–Some of the functions are:

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

[/quote]

1 Like

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

Yes sir, 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.

  1. having a standard allows all tokens to talk to each other. more importantly, it allows wallets and exchanges to support the token as soon as the token is deployed on the blockchain. wallets and exchanges do not have to spend time trying to figure out how to support a new token.
  2. Total Supply (how many tokens in circulation)
    Balanceof (how many tokens does a certain account/address have)
    transfer (send a certain amount of eth to a certain account/address)
    Mint (add to circulating supply)
    Burn(remove tokens from circulation)

many more that i dont know yet.

1 Like