1 - Enables interaction within the network, promotes programming best practice and better communicability.
Reduces friction, and allows interoperability between wallets, exchanges, web servers and other contracts.
2 - Functions every compliant token needs to support.
Among them, balance inquiry, burn tokens, total supply, dosomething, approve, transferfrom, allowance…
-
The benefit is that everybody speak the same language so all ethereum wallet speak the same way for all different token. All Exchanges will be able to handle the token that follow the same standart
-
totalSupply() to see the number of tokens in circulation / balanceOf(address_owner) to see at the balance of a specific address.
Homework on ERC20 token standard
-
What are the benefits of setting a token standard like ERC20?
The benefit of setting a token standard is that we can make tokens interact with each other in a simple way, also there is no need to have different type of wallets and platforms can handle new tokens easier. So if we build tokens with ERC20 standard the functionality of each token can be different but they all share the same structure in the way of how they are programmed. -
What functions are in the ERC20 Token Standard Interface and what do they do?
Functions in the ERC20 Token Standard are:
- name() returns the name of a token;
- symbol() returns the symbol of the token, like a stock ticker;
- decimal() returns the number of decimal that te token uses;
- totalSupply() returns the token total supply;
- balanceOf(address _owner) returns the account balance of another account with address _owner;
- transfer(address _to, unit256 _value) transfers _value amount of tokens to address _to. The function SHOULD throw if the message caller’s account balance does not have enough tokens to spend;
- transferFrom(address _from, address _to, uint256 _value) the transferFrom method is used for a withdraw workflow, allowing contracts to transfer tokens on your behalf;
- approve(address _spender, uint256 _value) allows _spender to withdraw from your account multiple times, up to the _value;
- allowance(address _owner, address _spender) returns the amount which _spender is still allowed to withdraw from _owner.
- All exchangers and wallets are able to support all tokens based on this standard, when a new token is coming out it will be supported from day one
- There are standard functions such as totalSupply (how many tokens are in circulation), balanceOf (the number of tokens for an exact account address) and transfer
- The ERC20 standard is audited, and as long as you include the same functions, the third party of business will have an easy way of accepting your token and ensuring no bugs or critical flaws have been included
- Currently: balanceOf () how much is in account wallet transfer () used in transacting from 1 acct to another doSomething () instructions of smart contract
-
The benefits are that all token can interact in a secure and easy way on the ethereum network. Also all wallets and exchanges can deploy very easy every token using them in diferent smart contracts.
-
ERC20 defines the functions
balanceOf
This function allows a smart contract to store and return the balance of the provided address.
totalSupply
This function allows an instance of the contract to calculate and return the total amount of the token that exists in circulation.
transfer
This function lets the owner of the contract send a given amount of the token to another address just like a conventional cryptocurrency transaction.
transferFrom
This function allows a smart contract to automate the transfer process and send a given amount of the token on behalf of the owner.
approve
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.
Token Name: optional for the name of token
Token Symbol: optional for the symbol of the token
Number of Decimals: determines the amount of the token will be calculated.
- What are the benefits of setting a token standard like ERC20?
A) A smart contract on eth can represent its own cryptocurrency
Allows wallets and exchanges to hold tokens
-
What functions are in the ERC20 Token Standard Interface and what do they do?
-
balanceOf() function indicates how many token on a given address
-
transfer() Transferring balance from one account to another under varying conditions
- All wallets, webservers, exchanges and nodes running the standard can run tokens written in the standard, as it is understood by all, promotes less friction in operation, smoother operation. and good programming practices.
2.Standard functions universally supported. such as Balance inquiries, Total Supply, ownership etc
- Easier for programmers, but also for products like exchanges and wallets. All ERC20 tokens automatically will work in the ERC20 ecosystem.
- Things like balance and total supply. And i’m sure a lot more, but i will learn that when i get to the programming part
-
The benefits of setting a token standard like ERC20 are that all wallets and exchanges will support the different tokens from day one.
-
The functions that are in the ERC20 Token Standard are the following.
-
balanceOf
-> Checks the balance of an account. -
totalSupply
-> Calculates the total supply of tokens in circulation. -
transfer
-> Allows the owner of the contract to send tokens to another address. -
transferFrom
-> Automates the transfer process -
approve
-> Approves the withdraw of tokens. -
allowance
-> Set the number of tokens a certain address can use.
-
The ERC-20 Token Standard allows to deploy fungible tokens on top of Ethereum network. In order to reduce friction between different entities and models. When you have a same standard frame to create a token, wallets and exchanges can instantly recognize and interact with that.
name
the long name of token contract.
symbol
the symbol of the token usually 3 or 4 characters.
decimals
how divisible a token can be. True the number of digits that come after the
decimal point for final users.
totalsupply
equal to the sum of all the wallets ballances in the contract.
balanceOf()
provide number of token of a given address.
transfer()
transfers tokens directly from sender to another address.
approve()
first step to give another adress approval to transfer up to the tokens, we can call this allowance.
allowance()
provides the number of tokens allowed to be transferred from an address by another address.
transferFrom
allowing an automated transaction of token from one addresses to another previously authorized in the contract.
ERC-20 also have two Events triggered when the contract make some actions.
Transfer()
provides dettails of the movement of tokens from one address to another.
Approval()
provides details of approvals of tokens from one address to another.
Homework on ERC20 token standard.
- What are the benefits of setting a token standard like ERC20? Token standards allow the community to easily integrate and interoperate. All exchanges and wallets will be able to support the tokens.
- What functions are in the ERC20 Token Standard Interface and what do they do? Some of the functions include “total supply”(supply of tokens), “balanceOf” (balance provided in specified account), “transfer” (transferring tokens to other public addresses)
- Token standards enable smooth communication between tokens and other entities such as wallets or exchanges.
- Some functions:
- balanceOf(): returns the token balance of an adress
- transfer(): transfers tokens from the sender to other address
- approve(): allows a smart contract to retrieve up to certain amount of tokens of a specific address
- transferFrom(): transfers tokens from a specific approved address
- allowance(): returns the amount of tokens that can be transferred to a given address by another address
- It allows wallets and other exchange platforms to recognize the token without having to adjust to specifically made code.
- name - name of the token being exchanged as an ERC20
symbol - the abbreviation of the token so it can easily be understood on exchanges
totalSupply() - the total amount of tokens on the smart contract`
balanceOf() - gives the balance of tokens held by that user
transfer() - Transfers token from the sender to an address
approve() - gives information to allow for a transaction to take place
transferFrom() - take tokens from one account and place it in another
allowance() - provides the number of tokens allowed to exchange
-
What are the benefits of setting a token standard like ERC20? - A token standard means that wallets and exchanges can integrate and interact with tokens immediately. This makes them efficient and allows fungible tokens to be exchanged on a 1 to 1 basis as well as being divisible. They are useful for exchanging value.
-
What functions are in the ERC20 Token Standard Interface and what do they do? -
function totalSupply() - returns how many tokens are in circulation.
function balanceOf (address account) - returns the balance of the named address. Wallets. And exchanges will use this function to see the balance of an account.
function transfer (address recipient, unit 256 amount) - transfers tokens to a named recipient.
1. What are the benefits of setting a token standard like ERC20?
○ Interoperability - Exchanges, Wallets, contracts
2. What functions are in the ERC20 Token Standard Interface and what do they do?
○ 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.
○ transferFrom() gives another address (usually of a smart contract) approval to transfer up to a certain number of tokens, known as an allowance
○ approve() to provides information to allow a transaction to take place
1 the benefits of the ecr20 standard allow different tokens to be programed but they will have the same core fundamentals which make it easier for programmers to do stuff like add other tokens address to the smart contract wallets they are programing
2 the ecr20 function are 1 name 2 symbol 3 decimals 4 totalSupply 5 balanceOf 6 transfer 7 transferFrom 8 approve 9 allowance
name : is the name of the smart contract
symbol : is the smart contract symbol
decimals : i dont know
totalSupply : is the total number tokens in circulation
balanceOF : give the other wallets the ability to look at your balance
transfer : is the address your sending it to and how much
transferFrom : is the transfer from one wallet to another
approve : is when the transfer has been approved
allowance : is when the transfer is complete and the person who started the transfer gets the remaining balance back
1.- Allows more acceptance of tokens in exchanges and wallets. So the exchanges and wallets are ready to support any token made by the ERC20 standard
2.- Total Supply, balanceOf, transfer, approve, allowance
- What are the benefits of setting a token standard like ERC20?
Having a token standard allows smart contracts to all be built in the same manner which means that they can all easily communicate with wallets and exchanges with any hassle
- What functions are in the ERC20 Token Standard Interface and what do they do?
Some examples of functions that can be found in the ERC20 token standard is totalsupply () and balanceOf()
- Having ERC20 as a standard allows exchanges and wallets to support any token using that standard, because they have common naming in their code.
- Some of the functions are:
totalSupply() – gives the max number of tokens that exist.
balanceOf() – provides the amount of tokens held by a given address.
transfer() – allows someone to transfer their tokens to another address and the value transferred.
approve() – gives another address the approval to transfer a certain amount of funds from that given address.