- so all tokens and smart contracts can be coded with the same language reducing confusion and creating a standard. it also allows wallets and exchanges to add all token in this language.
- 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
- Benefits of ERC20 is efficiency, frictionless ecosystem with same foundation. Allows all ERC20 tokens to be added to same wallet.
- totalSupply(): provides maximum number of tokens that exist; balanceOf(address): provides public address balance of ERC20 tokens; transfer(): allows transfer of ERC20 tokens to another public address; doSomething(): operates instruction; allowance(): provides the number of tokens allowed to be transferred from a given address by another.
[quote=“filip, post:1, topic:8440, full:true”]
Homework on ERC20 token standard.
-
What are the benefits of setting a token standard like ERC20?
-
What functions are in the ERC20 Token Standard Interface and what do they do?
-
ERC20 is the standard for fungible token. It allows the building of tokens that can easily communicate with each other, making it especially relevant for cryptocurrencies(any currency really). Each token is equivalent to the next, meaning that 1 eth is equal to all other eths. This gives the confidence that each token holds the same value. NFT’s (non-fungible tokens) are instead unique, and each hold different value and treated as unique collectible items.
-
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
totransferFrom
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.
- the benefits of the ERC- 20 standard it means that all exchanges and wallets will be able to support the tokens
- Function total supply gives the amount tokens in circulation and the balance of gives you the balance of a certain address
- What are the benefits of setting a token standard like ERC20?
- What functions are in the ERC20 Token Standard Interface and what do they do?
1.It makes the tokens Fungible, meaning all share the same value.
2.function balanceOf(address account) = shows the balance of the address account.
-
By having a standard like for example ERC20, wallets and exchanges are able to support new tokens right from the beginning and new tokens can be built on the network without friction.
-
balanceOf() provides a balance of a given address. That information is public.
approve() gives another address an allowance to access and transfer a certain amount of tokens.
transferFrom() is used to take an amount of tokens from an account that has approved the tokens to be transferred.
allowance() checks the number of tokens that are allowed to be transferred from an account to another.
-
The tokens has the same value, increasing effiency and facilitating the exchange.
-
totalSupply(): return the total tokens available
balanceOf(): return the total token available for one specific account.
1. What are the benefits of setting a token standard like ERC20?
We have the same basics. All have the same set of functions and really importand:
Since day 1 every exchange can “work” with a token based on std ERC20.
2. What functions are in the ERC20 Token Standard Interface and what do they do?
totalSupply() – Means how many tokens are around or in other words what is the total supply.
balanceof(AddressAccount) - store and return the balance of an addres
transfer() – Enable the transfer to a User
Aprove() – approve other users to spend your tokens
Allowance() – Query the amount of approved tokens.
- This ERC20 standard allow developers/application creators including exchanges, wallets, etc. to communicate with each other in the same way using the given standard no matter what token/smart contract is, reducing the friction in the ecosystem. A common language for everyone.
- ERC20 contracts have some functions to allow users to find useful information such as:
a. balanceOf(): This provides the number of tokens in a particular address/account.
b. transfer(): This transfers a number of tokens from an address/account to another.
c. allowance(): This provides the number of tokens allowed to be transferred from a particular address by another address/account.
- Any newly created token can interact in the same way with the blockchain and all existing wallets will accept new ERC20 tokens without modification.
- balanceOf() retrieves wallet balances of a specified address, totalSupply() regulates token supply.
-
It increases efficiency and allows tokens to operate on exchanges and wallets.
-
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
approve( ) function you can approve someone to spend from your account
totalSupply( ) function gives you how much token is in circulation
doSomething( ) is instructions
- What are the benefits of setting a token standard like ERC20?
The benefit of an ERC20 standard is it provides interoperability as all apps can read it.
- What functions are in the ERC20 Token Standard Interface, and what do they do?
balanceOf() – This returns the balance of a specific address.
allowance() – Provides how much tokens are allowed to be transferred
approve() – authorizes the transfer of an amount of tokens to another given address.
transferFrom() – Returns the amount that the sender is allowed to withdraw from the owner.
totalSupply() – Returns the total supply of tokens.
-
A token standard allows other currencies to be built on the Ethereum network. Standardizing the coding language will ensure everything interacts in a harmonious fashion without issue.
-
Some of the functions of the ERC Token Standard Interface include calculating Total Token Supply, Balance of an Account, or Transferring balances from between accounts.
-
Setting a token standard like ERC 20 means all tokens under the token standard are coded the same. They can then be accepted under that standard across all platforms exchanges and wallets.
-
The balanceof ( ) function privides the number of tokens held by an address.
The Transfer ( ) function transfers tokens from one account to another
- What are the benefits of setting a token standard like ERC20?
- it allows for interoperability an standard communication across the network by any participation entilty writing smart contracts
- What functions are in the ERC20 Token Standard Interface and what do they do?
- it allows for transparecny and communication on the Eth network along with fungibility between tokens
-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 a standard for erc20 allows other programs like wallets and exchanges to be able to handle the token.
2 functions include balance, quantity
- It allows wallets, exchanges etc to easily add all ERC 20 tokens as they have common naming in their code.
- The
balanceOf()
function provides the number of tokens held by a given address.
Thetransfer()
function transfers a number of tokens directly from the message sender to another address. - The
approve()
function gives another address approval to transfer up to a certain number of tokens, known as an allowance. - The
allowance()
function provides the number of tokens allowed to be transferred from a given address by another given address.
- What are the benefits of setting a token standard like ERC20? It provides a standard way of programming Smart Contracts so the network can easily communicate with multiple tokens.
- What functions are in the ERC20 Token Standard Interface and what do they do? There are multiple functions. One function is totalSupply which checks the number of total tokens in circulation. Another function is balanceOf which shows the token balance of a specific account.
- What are the benefits of setting a token standard like ERC20? The ERC20 token standard allows for a high degree of fungibility across exchanges and wallets, which in turn increased the functionality of the ecosystem, and the popularity of investment in the ecosystem.
- What functions are in the ERC20 Token Standard Interface and what do they do? Functions within the ERC20 Token Standard Interface include “totalSupply” which delineates the total supply of the particular token, "balanceOf(address account) which outlines the remaining amount of tokens yet to be distributed, and “transfer” which allows the transfer of tokens from one address to another.
- What are the benefits of setting a token standard like ERC20?
It standardises the way that applications communicate with eachother and the way they are written meaning there is greater interoperability between different smart contracts. - What functions are in the ERC20 Token Standard Interface and what do they do?
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