- What are the benefits of setting a token standard like ERC20?
The benefits are that if everyone is using the standard then developer’s, wallets and exchanges can easily communicate with each other. - What functions are in the ERC20 Token Standard Interface and what do they do?
Totalsupply. transfare.approve,balanceOf.
- It allows the various tokens to use the same code and instructions, this allow wallets and exchanges to interact with the various tokens.
- balanceOf (get the balance at an address),
totalSupply (returns the total tokens in circulation),
transfer (move tokens to another address),
transferFrom (more automated version of transfer),
approve (authorize withdrawal from owner’s address), and
allowance (“gives the 3rd party the right to facilitate a transaction with the owners token”
- Ethereum Request for Comments 20 as a Standard allows for easier interoperability and reduced friction with in the ethereum and crypto space generally.
- Some of its functions include; balanceOf, totalSupply, transfer, transferFrom, approve and allowance. Optional fields are token name, symbol and number of decimal places to be measured.
The benefits of having a standard like ERC20 are that all the wallets can communicate with other wallets using the same language. Another benefit is that other tokens with other functionalities can be built on the ethereum coin.
The functions that were covered in the lecture were: Total supply (shows the number of tokens), BalanceOf (Checks the balance inside a wallet),
- Standard model for the code makes it easier for the community to make exchanges with ERC 20 tokens
- Transfer() which emits details of the movement of tokens from one address to another.
Approval() which emits details of approvals of tokens from one address to another.
- so that all tokens communicate in the same language.
- balanceOf() - provides the number of tokens held in a specific address.
transfer() - transfers tokens from one address to another
totalSupply() - provides the total number of tokens
- Make it easy to communicate in a standard way with tokens and transfer value on the Ethereum network.
- totalSupply – that will set a total amount for the token
balanceOf – how many tokens are exist on an account
transfer – transfer a certain amount of tokens from one account to the other.
Homework on ERC20 token standard.
1. What are the benefits of setting a token standard like ERC20?
Answer: The benefits of a standard ERC20 token are:
- Everyone can build the same version of the token
- Different Vendor Wallets will be able to support and read from a standard token (right out of the box) whenever new tokens are created.
- Standards are very powerful for tokens and allow thousands of smart contract coding to done in an efficient manner, and helps avoids friction amongst programmers, developers, vendors, exchanges, and the Ethereum EVM ecosystem
- ERC20 is also Fungible where each token is the same value.
2. What functions are in the ERC20 Token Standard Interface and what do they do?
Answer: Benefits of ERC20 Token Standard Interface are:
- Allows wallets to provide token balances for hundreds of different tokens
- Creates a mean for exchanges to list more tokens by providing nothing more than the address of the token’s contract.
1.) Standards allows the exchanges to utilize all the different ERC-20 tokens and their different codes.
2.) Functions that allows everything to work or function, total suppy, balance information and allows for the transfer of ERC-20 Tokens.
- What are the benefits of setting a token standard like ERC20?
- all smart contracts that implement ERC20 stander are listed on crypto-exchange without need to any tech. work.
- different wallets will be able to support and read from stander token ERC20.
- Reduced risk since the developers already know the behavior of stander ERC20 during transactions so they don’t have to worry much about it.
- What functions are in the ERC20 Token Standard Interface and what do they do?
- 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 to transferFrom 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 a number of tokens on behalf of the token owner to another account.
-
Standards allow for a framework in which unique tokens can be created but still easily integrate with exchanges and wallets.
-
The functions of the ERC20 provide the basic standardized framework on which tokens can be build. Allowing them to be unique but at the same time easily integrated.
1.What are the benefits of setting a token standard like ERC20?
The benefits is that the ERC-20 is standard for fungible tokens.
it makes exchanges, and wallets, talking the same language always.
2.What functions are in the ERC20 Token Standard Interface and what do they do?
The balanceOf() function provides the number of tokens held by a given address.
The transfer() function transfers a number of tokens directly from the message sender to another address
doSomething () instruction for depployment of contract
approve () and transferFrom () allows the above to deploy in a 2-step process
- Wallets and exchanges are able to support a number of different tokens built on the same standard.
- A number of different functions, some of them are:
- balanceOf() - allows to check the balance
- transfer() - sending tokens
- allowance() - a number of tokens allowed to be transferred from the account.
- What are the benefits of setting a token standard like ERC20 All of the different wallets, exchanges, platforms, etc need to speek the same language to foster more ease of function and operation. ERC20 sets the standard by which this is accomplished. 2. What functions are in the ERC20 Token Standard Interface and what do they do? balanceOf() --> gives back the balance of a specific address totalSupply() which gives a number as an output. This number is the total supply of the token allowance() --> shows how many tokens are allowed to be transfered approve(): a token holder gives another address approval to transfer up to a certain number of tokens(allowance). doSomething(): to operate instructions. transferFrom - specifies a from address, to address and a value to transfer (return bool success)
- What are the benefits of setting a token standard like ERC20?
We have the benefits of being able to communicate between other apps that are created on top of ETH, wallets can communicate between them as they are using the same language. - What functions are in the ERC20 Token Standard Interface and what do they do?
ThebalanceOf()
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.
Theallowance()
function provides the number of tokens allowed to be transferred from a given address by another given address.
1. What are the benefits of setting a token standard like ERC20?
It helps a fast adoption of Token by users, due to the fact that all existing standartized wallets, and other services are already supporting this token. This helps much.
2. What functions are in the ERC20 Token Standard Interface and what do they do?
There is number of functions.
There is function balanceOf() which gives a balance of tokens.
There is transfer() function sending tokens between users.
Aloha.
- What are the benefits of setting a token standard like ERC20?
A standard interface allows any tokens on Ethereum to be re-used by other applications: from wallets to decentralized exchanges.
- What functions are in the ERC20 Token Standard Interface and what do they do?
name() → Returns the name of the token (Optional)
symbol() → Returns the symbol of the token (Optional)
decimals() → Returns the number of decimals the token uses (Optional)
totalSupply() → Returns the total token supply
balanceOf(address _owner) → Returns the account balance of another account with address _owner
transfer(address _to, uint256 _value) → Transfers _value amount of tokens to address _to, and MUST fire the Transfer event. The function SHOULD throw if the message caller’s account balance does not have enough tokens to spend.
allowance(address _owner, address _spender) -> Returns the amount which _spender is still allowed to withdraw from _owner.
transferFrom(address _from, address _to, uint256 _value) → Transfers _value amount of tokens from address _from to address _to.
approve(address _spender, uint256 _value) → Allows _spender to withdraw from your account multiple times, up to the _value amount.
-
Benefits of setting a token standard are fungibility and inter-operability . Can be supported across all wallets and exchanges for better mass adoption.
-
Functions in the ERC20 token interface are -
approve()- gives approval to transfer tokens to a specified address
allowance()- provides number of tokens allowed to be transferred
transfer()-sends tokens from one address to another directly
transferFrom()- allows transfer from a SC to users account.
doSomething()- operates instructions
balanceOf()- available token balance
-
Standards such as erc20 allow for use cases of ethereum to have a common parent language.
totalSupply - get the total supply of the token
transfer - send tokens to an address
approve - allow withdrawral from account to occur
allowance - send an amount of tokens to an address
balanceOf - get balance of an address
transferFrom - returns amount which an address is allowed to withdraw from another address / account