Homework: ERC20

  1. It increases efficiency, ease of programming, and allows tokens to operate seamlessly in all exchanges and wallets.
  2. balanceOf(address) - returns the balance of the provided address
    totalSupply() - calculate and returns the total number of tokens in circulation
    transfer(address, amount) - send the amount of tokens to the given address, deducting them from the senders address
    transferFrom() - allows the owner to automate the process of sending the tokens
    approve() - the owner of the contract approves the given address to withdraw tokens
    allowance() - returns the current amount of tokens approved by an owner to a specific address, as set in the approve function
1 Like
  1. ERC20 tokens use the same programming interface, so all wallets can support them.

  2. Functions
    totalSupply(): returns the total amount of the token that exists in circulation.
    balanceOf(): returns the balance of the provided address.
    approve(): authorizes the given address to withdraw instances of the token from the owner’s address.
    transfer(): lets the owner of the contract send a given amount of the token to another address just like a conventional cryptocurrency transaction.
    transferFrom(): allows a smart contract to automate the transfer process and send a given amount of the token on behalf of the owner.

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    Having a standard like ERC20 allows wallets and exchanges to be programmed to support any token using that standard. This is much simpler and scalable than each token having its own personalized code.

  2. 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

1 Like
  1. What are the benefits of setting a token standard like ERC20?
    It allows interoperability between all tokens written in that standard, it also makes it easier for wallets and exchanges to work with this industry wide standard
  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    transferFrom() - allows the contract to automatically send funds on the users behalf
    approve() - allows a given address to withdraw
    balanceof() - brings the balance of any given address
1 Like
  1. Benefits of Standards are that the whole network understands the commands. For example a new Token can be accepted immediately after release by exchange or wallet.

  2. These Functions

  • balanceOf()
  • totalSupply()
  • transfer()
  • transferFrom()
  • approve()
  • allowance()

allow a Smart Contract to send, receive, check of total supply and check for available amount on individual address.

1 Like

1. What are the benefits of setting a token standard like ERC20?
a. Mainly for optimization, improving the usages of accounts and makes transactions much more convenient.

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

a. “TotalSupply()” ; This allows an instance of the contract to calculate the total amount of the token
in circulation.
b. “BalanceOf()” ; This allows a smart contract to store and return the balance of the given
address.
c. “approve()” ; Calling this function authorizes the provided address to withdraw instances of the
token from the owner.
d. “Transfer()” ; Calling this function lets the contract owner send an amount of the token to another
address as a transaction.
e. “TransferFrom()” ; This function allows a smart contract automated transfer process for sending
a given amount.
f. “Allowance()” ; This function indicates maximum allowed tokens for transfer.

1 Like

Homework on ERC20 token standard.

  1. What are the benefits of setting a token standard like ERC20?
    That we can share, communicate and interoperate with all other wallet or exchange in the Cryptospace
  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    balanceOf(): provides the number of tokens held by a given address.

transfer(): transfers a number of tokens directly from the message sender to another address. But it doesn’t work well when tokens are being used to pay for a function in a smart contract.

approve(): a token holder gives another address approval to transfer up to a certain number of tokens(allowance).

transferFrom(): take certain tokes from sender’s account and carry on its work.

doSomething(): to operate instructions.

allowance(): provides the number of tokens allowed to be transferred from a given address by another given address.

1 Like
  1. What are the benefits of setting a token standard like ERC20?
  2. What functions are in the ERC20 Token Standard Interface and what do they do?

1.Using ERC20 allows wallets to be programmed to take any token. This makes the exchanges more efficient as balances can be provided irrespective of the tokens that they receive.

2.function totalSupply() gives a number as an output giving the total token supply.
function balanceOf() = Get the account balance of another account with address owner.

function allowance() sends the value amount of tokens to the address

function transfer() sends the value amount of tokens from an address to another address

function approve() allows the spender to withdraw from your account, multiple times, up to value amount. If this is called again it then overwrites the current allowance with the value.

function transferForm() returns the amount which the spender is still allowed to withdraw from the owner.

1 Like
  1. Token standard is the way a smart contract is structured. So if we use the same standard for all tokens we improve their functionality and efficiency. It allows the compatibility of a token with every exchange and wallet, and enables interoperability between different smart contracts and applications.

  2. balanceOf(): provides the number of tokens held by a given address.

    transfer() : transfers a number of tokens directly from the sender to another address.

    allowance(): provides the number of tokens allowed to be transferred from a given address by another given address.

    approve(): approval to transfer up to a certain number of tokens.

    transferFrom(): transfer tokens on behalf of a user.

1 Like

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

A standard such as ERC20 allows exchanges, wallets, apps etc to be programmed to support any token using that standard therefore making things more scalable and simple than each token having its own distinct code. It ensures interoperability between tokens which results in much improved consistency and efficiency.

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

  • totalSupply() which gives a number as an output. This number is the total supply of the token.
  • balanceOf() which takes the address of an owner as the input and gives the balance of the users as output.
  • allowance() function takes in the address of the token owner and the spender and gives as output, the number of tokens allowed to be transferred from a given address by another given address.
  • transfer() function simply takes in the address of the receiver and the funds which are to be sent to the account.
  • approve() function. You can approve someone to spend from your account.
  • transferFrom() function. It takes in three inputs — the address of the sender, the address of the receiver, as well as the number of tokens to be transferred. And gives an output of the success or failure of the transfer.
1 Like

Homework on ERC20 token standard.

  1. What are the benefits of setting a token standard like ERC20?
    The benefits of setting a token standard is that it allows wallets to provide token balances for hundreds of different tokens and creates a means for exchanges to list more tokens by providing nothing more than the address of the token’s contract (smart contract that contains a map of account addresses and their balances). Basically, ERC20 standard defines how everyone programs tokens on the ethereum blockchain, and this is beneficial because if everyone programs the smart contract functions for tokens in the same way, then all exchanges and all wallets will be able to support those tokens from “day one.”
  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    List item
  • There is Balanceof() which provides the number of tokens held by a given address.
  • Transfer() which transfers a number of tokens directly from the message sender to another (recipient) address–does not check for recipient’s address
  • Approve() Token holder gives another address (usually it’s a smart contract) approval to transfer UP to a certain number of tokens–called allowances–and uses approve () to provide this info.
  • Allowance() function provides the number of tokens allowed to be transferred from a given address by another given address.
    Transferfrom() allows a “doer” contract to take funds from a given address in order to execute its functions.
1 Like
  1. What are the benefits of setting a token standard like ERC20?
  • Exchanges and Wallets can easily support the token because they can “talk” to the token.
  1. What functions are in the ERC20 Token Standard Interface and what do they do?
  • They are commands / machine instructions that execute a specific task, and there is a convention used by all who program an ERC20 token.
  1. It creates a standard for making tokens, without ERC20 adding each token to exchanges & wallets would be very complex and time consuming.

    • total supply.
    • how many tokens a given address has(Balance).
    • transfer, that takes amount of tokens from supply and from.
    • approve, that verifies how many tokens you can give to a user taken into account the total supply.
    • Allowance checks that one user has enough balance to send to somewhere else.

1 It facilitates interaction with the token when writing some app or contract
2 balanceOf() - provides number of token held by a given address
transfer() - transfer a number of tokens from the issuer to other address
approve() - used to allow other address or smart contract to transfer holders tokens to a certain specified amount
allowance() - provides a number of tokens allowed to be transferred from a given address to a given address
transferFrom() - transferrs tokens from address to other address
totalsupplu() - return sum of all balances

1 Like

ERC20 is a Ethereum standard which defines how we program the tokens. It was created to provide a common set of features and interfaces for token contracts in Ethereum. As Solidity allow us to program a token in any way, the standard allow us to follow a structure which then wallets and exchanges will support. ERC20 provides a standard way to deploy on the ETH ecosystem.

  • 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.
  • The approve() function provides approval to transfer up to a certain number of tokens, known as an allowance, usually to a smart contract address.
  • the transferFrom() function then allows the smart contract to transfer a specific amount of tokens from the allowance.
  • The allowance() function provides the number of tokens allowed to be transferred from a given address by another given address.
1 Like
  1. Interaction in a known and expected way.
  2. total supply: maximum number of tokens
    balance Of: balance of ERC20 tokens
    transfer: allows you to transfer ERC20 tokens.
1 Like
  1. What are the benefits of setting a token standard like ERC20?
    Standards are important: efficiency solving problems, integrating/ interoperating with each other.

  2. What functions are in the ERC20 Token Standard Interface and what do they do?
    ERC20 tokens are fungible and has same values. Where as ERC1115 and ERC721 are tokens that are use in games where each tokens has different values.

1 Like

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

ERC-20 gives a foundation for all tokens to be built upon. As long as we build on ERC-20 tokens and platforms will be seamlessly interchangeable and interoperable.

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

totalsupply() - All tokens in circulation (sum of all wallets)
balanceOf() shows number of tokens held by any address
transfer() function allows the transfer of funds along with other functions depending on what parameters are met

1 Like
  1. It creates a standard that all tokens created will follow. This makes them all compatible with the same exchanges and wallets.

totalSupply() = the total existing number of tokens
balanceOf() = balance of tokens held by a given address
transfer() allows someone to transfer their tokens to another public address
approve() = gives another address approval to transfer a an amount of funds from the given address. Smart contracts are given permission to take the necessary funds needed to perform requested operations .
allowance()= how many tokens are in the allowance
transferFrom()= request to perform the transferring of funds by another address.

1 Like

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

ERC20 provides a standard way to program and deploy tokens. This way tokens can be compatible with various exchanges and wallets.
Overall having a standard like ERC20 increases the efficiency and interoperability of tokens.

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

totalSupply () - returns how many tokens are in circulation.
balanceOf (account) - returns the balance of an account which is provided as an input.

1 Like