Thanks for the list. I was assuming more would be introduced later in the programming courses but this will definitely get me a better understanding now.
The benefit is that exchanges and wallets will be able to support all tokens of the same standard, making it easier for new projects to develop and integrate.
totalSupply() - Provides how many tokens are in circulation
balanceOf() - Finds the balance of an account
transfer() - Moves tokens from one address to another
approve() - A token holder gives approval for another address to transfer a number of tokens called an allowance
transferFrom() - Transfers tokens from a token holderâs allowance to run a specific function.
allowance() - Provides the number of tokens allowed to be transferred between two addresses.
- Using standard rules for programing of new tokens is important, because allow to new tokens be easily accepted by exchanges, wallets.
- totalSupply() - show hom many token will be ever exist.
balanceOf(address account) - gives you balance of particular address
transfer(address to, unit tokens) - move required amount of tokens to particular address.
- standard is important for any type of industry, without which they can not communicate with each other. ERC20 token set the standard so that all the tokens are easily used and accepted by different exchanges and wallets.
- They make sure that everyone knows and uses them, so no misunderstanding and miscommunications will occur.
-
benefit for ERC20 token standard is that your new token will be supported by wallets and exchanges from the frist day on.
balanceOf ( ) - shows the number of tokens which are held by the given address
transfer ( ) - transfers a number of tokens directly to another address (not used in paying smart contracts)
approve ( ) - gives approval to transfer up to a certain number of tokens to another address (which is known as allowance) - used for SC
transferFrom ( ) - used for paying smart contracts - takes the number of tokens allowed to be transferred as payment
allowance ( ) - shows how many token are in allowance
-
It means that all of the parties involved can communicate with each other through conventional language. It means that whole community has same coding for same functions and everyone can read and understand each other codes easily.
-
In the ERC20 Token Standard Interface there are functions like:
a) function totalSupply(); which gives total supply of a token
b) function balanceOf(address tokenOwner); which reads the balance of tokens at specified address
c) function transfer(address to, unit tokens) which is used to transfer tokens
There are more than that. but here are some examples.
-
creating such a standard will allow all wallets and exchanges being able to connect among all these applications and tokens much easier and faster.
balanceOf() - shows the balance of that specific token, since everything on blockchain is public.
transfer() - transfers a specific amount of coin from a person to another
doSomething() - in case there is a condition to be met for a payment.
approve() - transferFrom() - these 2 work together as there is a condition to be met and only then the transfer will get through.
allowance() - this function allows a certain amount of tokens to be transferred.
2. What functions are in the ERC20 Token Standard Interface and what do they do?
Indeed, but you are not describing which are those functions, maybe you want to redesign your answer.
If you have any more questions, please let us know so we can help you!
Carlos Z.
-
Standards give us expectations. For every token built in compliance with a particular standard, we can expect a minimum form and function common to all. Seen another way, the standard under which a token is built will indicate a set of capabilities, functions, and use cases common to tokens under its compliance. This is useful to developers who can build applications with support of a set of common standards. The standard instructs the application how to best interface with the input and what functions are accessable to it. Thus extending the functionality and interoperability of developer applications.
-
The ERC20 standard ensures the following functions: totalSupply, balanceOf, transfer(), approve(), transferFrom(), allowance(), and 2 event functions: Approve() and Transfer.
totalSupply() returns the total # of token in circulation
balanceOf() returns the balance of a given address
transfer() sends a specified amount of coins to a specified address
approve() sets an allowance for a given address (usually a smart contract) to a specified amount of userâs funds
transferFrom() transfers an amount from an address in which the user has an allowance with. Amount must be < or = to the allowance. This function is usually used by a smart contract.
Approve() and Transfer() are 2 functions the token triggers automatically as a means to track certain data it uses without having to query the ledger.
Less friction, faster scalability.
2.
totalsupply() - Total supply of token
balanceOf() - Shows wallet balance
allowance()- Available tokens for transfer
doSomething() - command
approve() - function performing fund transfer
-
What are the benefits of setting a token standard like ERC20?
Standards allow that exchanges and wallets supporot any token that is programmed
according to this standard. -
What functions are in the ERC20 Token Standard Interface and what do they do?
totalSupply --> how many tokens are in ciculation
balanceOf --> to check how much balance a certain address has
1 - all wallets can interact in the same standardized way with all tokens
2 - totalSupply(): fetches the total supply of a token
balanceOf (address account): gets the balance of an account
transfer (): transfers tokens
- Its easier as a community if everyone is on the same standard there is less friction in the code.
- The ERC20 functions are used commonly for contract to make it more simple for adoption, theses functions are:
totalSupply(): Total amount of the Token
balenceOf(address): Provides a ledger of balances of any addresses
transfer(): This is a function that directly sends one address to the other. But is not recommended to use in smart contracts.
doSomething(): This function can execute once the demands of the function are met.
approve(): You are approving the transfer of a token to another address.
allowance(): The amount of token that can be transferred to a give address.
transferFrom(): The function that is activated and carries out the action (successful or unsuccessful) and sends the token accordingly.
??Qustion?? Is this the correct order I have seen so many different orders and i spent some time but I think this is right?
- Setting standards, like calling functions within the smart contract the same, enables wallets to handle all ERC token in the same manner and provides fictionless operations.
- Typical functions with an ERC contract:
A function to return the total supply: totalSuppy{âŚ}
A function to return the balance: balanceOf {âŚ}
- The benefits of having a token stadard such as ERC20 is to reduce friction and make it an environment where consistency reigns.
- TotalSupply-Gives total supply of tokens
BalanceOf-address account
Transfer-sends to another user address
Excellent answers, Itâs easy to understand. Please keep them like that
Carlos Z.
Homework on ERC20 token standard.
- What are the benefits of setting a token standard like ERC20?
= It secures that we use the same functions so we communicate in the same way. Increases efficiency and interoperability.
- What functions are in the ERC20 Token Standard Interface and what do they do?
totalSupply () Gives a number as an output.
balanceOf () Provides the number of tokens help by a given address.
allowance () Takes in the address of the tokenowner and the spender and gives as output, the number of tokens allowed to be transferred from a given address by another given address.
transfer () Takes in the address of the receiver and the funds which are to be sent to the account. It then gives a [boolean] output value which is either true or false. True means that the amount was transferred successfully where as false means the amount could not be transferred.
approve () You can approve someone to spend from your account. This function takes the address of the spender along with the coins to be spent as the input and tells whether the transaction was a success or a failure.
transferFrom () Takes in three inputs â the address of the sender, the address of the receiver, as well as the number of tokens to be transferred. It again gives an output to notify the success or the failure of the transfer.
-
That it will be compatible with exchanges, wallets and so on from day 1, since it will have the same structure as every other ERC20 token.
- balanceOf() 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() is an approval to transfer up to a certain amount of tokens.
- transferFrom() lets you define the sender address, which wonât have to be the same of the function caller address such as in transfer()
- allowance() provides the number of tokens allowed to be transferred from a given address by another address
-
What are the benefits of setting a token standard like ERC20?
interoperability
use of the same functions
easy token ICO -
What functions are in the ERC20 Token Standard Interface and what do they do?
-
function totalSupply() constant returns (uint theTotalSupply);
returns total supply -
function balanceOf(address _owner) constant returns (uint balance);
return the balance of the provided address -
function transfer(address _to, uint _value) returns (bool success);
This function lets the owner of the contract send a given amount of the token to another address just like a conventional cryptocurrency transaction. -
function transferFrom(address _from, address _to, uint _value) returns (bool success);
This function allows a smart contract to automate the transfer process and send a given amount of the token on behalf of the owner. -
function approve(address _spender, uint _value) returns (bool success);
When calling this function, the owner of the contract authorizes, or approves , the given address to withdraw instances of the token from the ownerâs address. -
function allowance(address _owner, address _spender) constant returns (uint remaining);
it tells which address is given what amount of tokens to be used
- A standard toke like ERC20 allows to interoperate within ERC20 tokens which brings consistency and efficiency.
- totalSupply() - the total number of tokens
balanceOf() - token balance of the address
transferFrom() - specifies a from address, to address and a value of transfer
approve() - authorizes an amount transfer of tokens to another address