in a contract I saw that I had the token erc20. Who could explain to me what is the erc20 and what is it for?
please
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.
Sign up to join this communityERC20 is just a standard for smart contracts that is used to create tokens.
It defines certain features as a standard which allows for whoever wants to support them (example: exchanges or wallets) to be able to integrate with them pretty much out of the box.
The documentation of the ERC20 standard describes it as
This standard provides basic functionality to transfer tokens, as well as allow tokens to be approved so they can be spent by another on-chain third party.
and
A standard interface allows any tokens on Ethereum to be re-used by other applications: from wallets to decentralized exchanges.
https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
You can find more information together with a sample implementation of the standard here: https://theethereum.wiki/w/index.php/ERC20_Token_Standard
ERC20 is the name of a class of tokens that can be created on the ethereum blockchain. Many altcoins are ERC20 tokens. Some examples are OmiseGo, Polymath, and Golem. To be an ERC20, the token has to have a set of minimal functions associated with it. One example is the "totalSupply()" function which, when called, returns the existing number of tokens.
This makes the token easy to interact with.
1) Other software, like wallets and exchanges, know how to find the total supply of coins and how to transfer funds from one address to another.
2) Instead of having to write all the code for creating a token from scratch you can use cost free and bug free templates to create a new token.