8

I've read about and understand the idea behind the ERC20 Token Standard, but is there an official contract people can download and use? Or is it an official list of functions a smart contract should include in order to be up to standard?

Anyone know where I can find a polished and ready to go version of ERC20? I first read about it here: https://github.com/ethereum/EIPs/issues/20 And I also looked at this: https://theethereum.wiki/w/index.php/ERC20_Token_Standard

Or am I missing something super obvious?

2
  • Check out OpenZeppelin's implementation of a standard ERC20 token for an example that follows best security practices.
    – arseniy
    May 4, 2017 at 13:11
  • Yes, it is an agreed upon list of functions + events a smart contract must include to meet the standard. See the answer by Eth to this question: ethereum.stackexchange.com/questions/16714/…. In the comments, we asked if there was an official list somewhere. So far, it seems like the Ethereum wiki and the github threads are the only 2 places that list these 6 functions + 2 events that make up the ERC20 standard, and the specific words in which they need to be written. For instance: "TotalSupply" not "TotalCoinSupply"
    – Tesa
    May 29, 2017 at 9:16

1 Answer 1

6

The ERC20 standard defines an interface, which is the name of the functions as well as their signature. Signature means a list of their arguments. It also defines what these functions should do. But it does not define how you implement it and thus it does not include any code.

For some suggested implementations, have a look at this GitHub repo: https://github.com/ConsenSys/Tokens

3
  • 4
    If that's your real name, you have the coolest name ever.
    – Sentinel
    May 4, 2017 at 13:52
  • 1
    "It also defines what these functions should do." < This feels confusing to me, I think what Thorkil meant to say here is that "It also defines what each function returns". So basically it says, if you want to call yourself an ERC-20 you have to offer these functions that return these types of things. Other than that, do what you want!
    – Todd Vance
    Jan 22, 2018 at 21:28
  • 1
    Also possibly helpful: The ERC20 Token Standard Interface according to Wikipedia. Apr 29, 2018 at 17:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.