# ERC20 Token Standard

## Simple explanation

Adding feature for smart contract to send, receive, check for total supply, check if the amount is available to transfer. This will gives us knowledge of the total supply of coins in circulation, wallet balance of a particular token and the ability to transfer a token.

## Fuctions defined by the standard

* 'balanceOf ' Allows smart contract to store and return the balance of the provided address. Accepts address as parameters and it will be public
* 'totalSupply' Allows an instance of the contract to calculate and return the total amount of the token that exists in circulation
* 'Transfer' Lets you transfer tokens between accounts
* 'transferFrom'  Allows smart contracts to automate the transfer process and send a given amount of tokens on behalf of the owner. A transfer is sending tokens (money) between the accounts. The contract can send a certain amount of tokens to another address.
* 'approve' The owner of the contract author authorizes or approves the given address to withdraw tokens. Variable `msg`is a field provided by wallets and external apps to interact with the contract. You can find this interaction in `msg.sender`field
* 'Allowance'\
  and a few optional fields like token name, symbol, number of decimal places in which it will be measured

**Optional fields**

* Token name
* Token Symbol
* Number of Decimals

Source: <https://news.earn.com/the-anatomy-of-erc20-6ab09d4206a5>

## Further reading

* Implementation: <https://eips.ethereum.org/EIPS/eip-20>
* Original proposal: <https://github.com/ethereum/EIPs/issues/20>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://nft-standards.gitbook.io/nft-standards-wiki/standards/erc20-token-standard.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
