How to create your own Ethereum ERC20 token

From CoinWiki
Revision as of 17:53, 23 March 2019 by QuintonP (talk | contribs) (Created page with "An ERC20 token is a protocol for proposing improvements to the Ethereum (ETH) network. The token can have value as well as be sent and received just like any other cryptoc...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

An ERC20 token is a protocol for proposing improvements to the Ethereum (ETH) network. The token can have value as well as be sent and received just like any other cryptocurrency.

The first step to creating a ERC20 token is to decide what you want the token to be. You'll need to choose the following:

  • A name for your token
  • Your token's symbol (generally 3-4 characters long)
  • The number of tokens you will have in circulation
  • How many decimal places your token will have (Most tokens have 18 decimal places but you can have any number you like)

For my token KiwiCoin, I chose: - KiwiCoin - KIWI - 180000000 - ​18

The next step is to code your ERC20 contract. You can copy this contract code below courtesy of TokenFactory and paste it into your favorite code editor. I use Atom.

You'll need to change the values in lines 119-123 to that of your tokens as seen here.

Erc20-function.png

Things to keep in mind. There is a correlation between the decimals you set and your tokens supply. For example, if you want 1,000 tokens and you have your decimal set at 5, you will need to set the total supply to be 100000000 (5 zeros added to the amount).

The next step is to test your token on the test net. If don't have it already, you will need to download MetaMask]. Log in and set up MetaMask so that you are in the Ropsten Test Network as shown.

Erc20-meta1.png