HOW TO CREATE YOUR OWN ETHEREUM CURRENCY

Step 1: Decide what you want your token to be

In order to create an ERC20 token, you need the following:

  • The Token’s Name
  • The Token’s Symbol
  • The Token’s Decimal Places
  • The Number of Tokens in Circulation

Step 2: Code of the Contract

Here is a contract that you can essentially “Copy/Paste” to create your ERC20 token. Shoutout to TokenFactory for the source code.

//Token.sol
pragma solidity ^0.4.4;

contract Token {

/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}

/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance) {}

/// @notice send `_value` token to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not
function transfer(address _to, uint256 _value) returns (bool success) {}

/// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
/// @param _from The address of the sender
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not
function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {}

/// @notice `msg.sender` approves `_addr` to spend `_value` tokens
/// @param _spender The address of the account able to transfer the tokens
/// @param _value The amount of wei to be approved for transfer
/// @return Whether the approval was successful or not
function approve(address _spender, uint256 _value) returns (bool success) {}

/// @param _owner The address of the account owning tokens
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens allowed to spent
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {}

event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
  • The token name
  • The token symbol (I’d go no more than 4 characters here)
  • The token decimal places
  • How much you as the owner want to start off with
  • The number of tokens in circulation (to keep things basic, make this is the same amount as the owner supply)
  1. The supply that you set for the token is correlated to the number of decimal places that you set.
  1. You set the number of tokens you receive as the creator of the contract.

Step 3: Test The Token on The TestNet

Next, we’re going to deploy the contract to the Test Net to see if it works. It sucks to deploy a contract to the MainNet, pay for it, and then watch it fail.

Step 4. Get it on The Main Net

Now that everything’s working, it’s time to deploy it on the MainNet and let other people use it.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store