Skip to content

How to launch Ethereum ICO / ERC20 Tokens

Posted in Blockchain, Blockchain only, Crypto, Initial Coin Offering, Most active, and Smart Contracts

Launch Ethereum ICO / ERC20 Tokens in private network and rinkeby test network

In this article, I will explain step by step process to launch ICO or ERC20 token. I assume that you have knowledge of Solidity Language. ICO is Initial Coin Offering. Here Coin and Token are the same. The Ethereum token standard (ERC20) is used for Ethereum smart contracts. Developed in 2015, ERC20 defines a common list of rules that an Ethereum token has to implement. Giving developers the ability to program how new tokens will function within the Ethereum ecosystem. This token protocol became popular with crowdfunding companies via initial coin offering (ICO).

Step1: Install Truffle Suite. Truffle is your “YOUR ETHEREUM SWISS ARMY KNIFE”.

$npm install -g truffle

Step 2: Create Directory “my-token” and run following command. truffle init will create project structure.

$truffle init

Once completed, you’ll now have a project structure with the following items:

  • contracts/: Directory for Solidity contracts
  • migrations/: Directory for scriptable deployment files
  • test/: Directory for test files for testing your application and contracts
  • truffle.js: Truffle configuration file

Step 3: Install OpenZeppelin. Execute following command from “my-token” folder. OpenZeppelin is an open framework of reusable and secure smart contracts in the Solidity language.

$npm install zeppelin-solidity

Step 4: Create MyCoins.sol file in “my-token/contracts” folder.

pragma solidity ^0.4.11;
import “zeppelin-solidity/contracts/token/StandardToken.sol”;
contract ExampleToken is StandardToken {
string public name = “KPBird Tokens”;
string public symbol = “KPB”;
uint public decimals = 18;
uint public INITIAL_SUPPLY = 10000 * (10 ** decimals);
function ExampleToken() {
totalSupply = INITIAL_SUPPLY;
balances[msg.sender] = INITIAL_SUPPLY;

Step 5: Create “my-token/migrage/2_deploy_contracts.js”

const MyCoins = artifacts.require(“./MyCoins.sol”)
module.exports = function(deployer, network, accounts) {

Step 6: Configure your private network to truffle.js. network_id must match with your private ethereum network Id. Read my previous article how to setup ethereum private node.

module.exports = {
networks: {
development: {
host: “localhost”,
port: 8545,
network_id: “4224”

Step 7: Compile & deploy contract. Execute following commands from “my-token” folder. Make sure your private ethereum node is running while executing following command.

$truffle compile
$truffle migrate

Truffle migrate will generate address of your token / smart contract. It will looks like this “Address 0xd9da9081410f6025853c4a5610984346f07ea4a2”

Congratulations.. you have successfully deploy token in your private network

Deploy your coin on Rinkeby test network

Here, I assume you have account in Rinkeby network with Ether to publish smart contract. This article will help you to create Rinkeby account and get some fake ether.

Step 1: Modify truffle.js configuration file like following

module.exports = {
networks: {
development: {
host: “localhost”,
port: 8545,
network_id: “4224”
rinkeby: {
host: “localhost”, // Connect to geth on the specified
port: 8545,
from: “<YOUR ACCOUNT ADDRESS>”, // default address to use for any transaction Truffle makes during migrations
network_id: 4, // rinkeby network id
gas: 4612388 // Gas limit used for deploys

Step 2: Run geth client with rinkeby network

geth --rinkeby --rpc --rpcapi db,eth,net,web3,personal

Step 3: Compile & Deploy my-token to rinkeby network using following command. Execute following command from “my-token” folder

$truffle migrate --network rinkeby

Truffle migrate will generate address of your token / smart contract. It will looks like this “Address 0xd9da9081410f6025853c4a5610984346f07ea4a2”. It will also generate transaction Id. You can check transaction status in “

Congratulations.. Your token / coin is deployed on Rinkeby test network.



Blockchain only,Most active,Blockchain

March 3, 2018 at 10:28PM

Please follow and like us:

Be First to Comment

Leave a Reply

%d bloggers like this: