follow us on twitter . like us on facebook . follow us on instagram . subscribe to our youtube channel . announcements on telegram channel . ask urgent question ONLY . Subscribe to our reddit . Altcoins Talks Shop Shop


This is an Ad. Advertised sites are not endorsement by our Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise Here

Author Topic: [GUIDE] CREATE your own TOKEN in a few simple steps!  (Read 2347 times)

Offline boysnoel12

  • Jr. Member
  • *
  • Activity: 70
  • points:
    338
  • Karma: 3
  • Welcome to my "PROFILE"!
  • Trade Count: (0)
  • Referrals: 0
  • Last Active: December 20, 2023, 06:02:04 AM
    • View Profile

  • Total Badges: 18
    Badges: (View All)
    Fifth year Anniversary Fourth year Anniversary 10 Posts
[GUIDE] CREATE your own TOKEN in a few simple steps!
« on: September 11, 2018, 08:33:36 PM »
Hello everyone I would like to share this "GUIDE" in here.

Ever wanted to create a token for your project, build up a community of supporters by destributing tokens through an airdrop and maybe launch an ICO at some point? Then this guide is for you!
In this step-by-step guide I will show you how you can create your own ERC20 token.

0. Have some ETH
In order to finish this guide you will need to have at least $2 worth of Ethereum [ETH]. In this guide I'm using Metamask Chrome Extenstion which you can get here: https://metamask.io/


1. Creating an ERC20 Ethereum based token
First we want to deploy a smart contract that is ERC20 standard compliant.
Open up Remix (which is an awesome browser-based IDE for smart contract development) by following this link: https://remix.ethereum.org/. By default you will see some ballot.sol smart contract. You may close this ballot.sol tab and create a new one by clicking on a circled "+" sign
Now once you've got a new empty tab copy the code below and paste it into Remix:

Code: [Select]
pragma solidity ^0.4.24;

// ----------------------------------------------------------------------------
// (c) BokkyPooBah / Bok Consulting Pty Ltd 2018. The MIT Licence.
// ----------------------------------------------------------------------------


// ----------------------------------------------------------------------------
// Safe maths
// ----------------------------------------------------------------------------
library SafeMath {
    function add(uint a, uint b) internal pure returns (uint c) {
        c = a + b;
        require(c >= a);
    }
    function sub(uint a, uint b) internal pure returns (uint c) {
        require(b <= a);
        c = a - b;
    }
    function mul(uint a, uint b) internal pure returns (uint c) {
        c = a * b;
        require(a == 0 || c / a == b);
    }
    function div(uint a, uint b) internal pure returns (uint c) {
        require(b > 0);
        c = a / b;
    }
}


// ----------------------------------------------------------------------------
// ERC Token Standard #20 Interface
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
// ----------------------------------------------------------------------------
contract ERC20Interface {
    function totalSupply() public constant returns (uint);
    function balanceOf(address tokenOwner) public constant returns (uint balance);
    function allowance(address tokenOwner, address spender) public constant returns (uint remaining);
    function transfer(address to, uint tokens) public returns (bool success);
    function approve(address spender, uint tokens) public returns (bool success);
    function transferFrom(address from, address to, uint tokens) public returns (bool success);

    event Transfer(address indexed from, address indexed to, uint tokens);
    event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}


// ----------------------------------------------------------------------------
// Contract function to receive approval and execute function in one call
//
// Borrowed from MiniMeToken
// ----------------------------------------------------------------------------
contract ApproveAndCallFallBack {
    function receiveApproval(address from, uint256 tokens, address token, bytes data) public;
}


// ----------------------------------------------------------------------------
// Owned contract
// ----------------------------------------------------------------------------
contract Owned {
    address public owner;
    address public newOwner;

    event OwnershipTransferred(address indexed _from, address indexed _to);

    constructor() public {
        owner = msg.sender;
    }

    modifier onlyOwner {
        require(msg.sender == owner);
        _;
    }

    function transferOwnership(address _newOwner) public onlyOwner {
        newOwner = _newOwner;
    }
    function acceptOwnership() public {
        require(msg.sender == newOwner);
        emit OwnershipTransferred(owner, newOwner);
        owner = newOwner;
        newOwner = address(0);
    }
}


// ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ----------------------------------------------------------------------------
contract FixedSupplyToken is ERC20Interface, Owned {
    using SafeMath for uint;

    string public symbol;
    string public  name;
    uint8 public decimals;
    uint _totalSupply;

    mapping(address => uint) balances;
    mapping(address => mapping(address => uint)) allowed;


    // ------------------------------------------------------------------------
    // Constructor
    // ------------------------------------------------------------------------
    constructor() public {
        symbol = "FIXED";
        name = "Example Fixed Supply Token";
        decimals = 18;
        _totalSupply = 1000000 * 10**uint(decimals);
        balances[owner] = _totalSupply;
        emit Transfer(address(0), owner, _totalSupply);
    }


    // ------------------------------------------------------------------------
    // Total supply
    // ------------------------------------------------------------------------
    function totalSupply() public view returns (uint) {
        return _totalSupply.sub(balances[address(0)]);
    }


    // ------------------------------------------------------------------------
    // Get the token balance for account `tokenOwner`
    // ------------------------------------------------------------------------
    function balanceOf(address tokenOwner) public view returns (uint balance) {
        return balances[tokenOwner];
    }


    // ------------------------------------------------------------------------
    // Transfer the balance from token owner's account to `to` account
    // - Owner's account must have sufficient balance to transfer
    // - 0 value transfers are allowed
    // ------------------------------------------------------------------------
    function transfer(address to, uint tokens) public returns (bool success) {
        balances[msg.sender] = balances[msg.sender].sub(tokens);
        balances[to] = balances[to].add(tokens);
        emit Transfer(msg.sender, to, tokens);
        return true;
    }


    // ------------------------------------------------------------------------
    // Token owner can approve for `spender` to transferFrom(...) `tokens`
    // from the token owner's account
    //
    // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
    // recommends that there are no checks for the approval double-spend attack
    // as this should be implemented in user interfaces
    // ------------------------------------------------------------------------
    function approve(address spender, uint tokens) public returns (bool success) {
        allowed[msg.sender][spender] = tokens;
        emit Approval(msg.sender, spender, tokens);
        return true;
    }


    // ------------------------------------------------------------------------
    // Transfer `tokens` from the `from` account to the `to` account
    //
    // The calling account must already have sufficient tokens approve(...)-d
    // for spending from the `from` account and
    // - From account must have sufficient balance to transfer
    // - Spender must have sufficient allowance to transfer
    // - 0 value transfers are allowed
    // ------------------------------------------------------------------------
    function transferFrom(address from, address to, uint tokens) public returns (bool success) {
        balances[from] = balances[from].sub(tokens);
        allowed[from][msg.sender] = allowed[from][msg.sender].sub(tokens);
        balances[to] = balances[to].add(tokens);
        emit Transfer(from, to, tokens);
        return true;
    }


    // ------------------------------------------------------------------------
    // Returns the amount of tokens approved by the owner that can be
    // transferred to the spender's account
    // ------------------------------------------------------------------------
    function allowance(address tokenOwner, address spender) public view returns (uint remaining) {
        return allowed[tokenOwner][spender];
    }


    // ------------------------------------------------------------------------
    // Token owner can approve for `spender` to transferFrom(...) `tokens`
    // from the token owner's account. The `spender` contract function
    // `receiveApproval(...)` is then executed
    // ------------------------------------------------------------------------
    function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) {
        allowed[msg.sender][spender] = tokens;
        emit Approval(msg.sender, spender, tokens);
        ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data);
        return true;
    }


    // ------------------------------------------------------------------------
    // Don't accept ETH
    // ------------------------------------------------------------------------
    function () public payable {
        revert();
    }


    // ------------------------------------------------------------------------
    // Owner can transfer out any accidentally sent ERC20 tokens
    // ------------------------------------------------------------------------
    function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) {
        return ERC20Interface(tokenAddress).transfer(owner, tokens);
    }
}
I copied this code from this wiki page
Now click "Start to comile" and make sure there are no compilation errors (red messages)

Now log in to your MetaMask browswer extension and make sure Remix is connected to it. It should appear like so:

Change your token name, symbol and total supply:
 

Now simply switch contract to FixedSupplyToken and hit Deploy button. That's it!

After you hit Deploy button Remix will ask you for a confirmation

If you're fine with the gas price it suggests you to pay you may click "Confirm" at the bottom of this pop up window.
This will bring up Metamask window that looks something like this:
Where we can see that our contract depoloyment will cost us $1.12
Now click "Confirm" button and your contract should be deployed to Ethereum mainnet

After a couple of minutes it should get confirmed and you will see the link to your freshly deployed smart contract in Metamask transactions list. Here's my token's deployment transaction:
https://etherscan.io/tx/0x6a39c40cc35eb03874808358eb0ab2ea9967c0c27f40fe3bf65c345fa2080da2
Token's smart contract address is: 0x0e0a6c613ea16ae347cb98732e152530ae9bc7f2
Great! At this point our token is fully functional.

2. Confirm contract on etherscan.io
It's always a good idea to confirm your smart contracts code on etherscan.io so everybody will be able to view it easily. Since my token's contract address is 0x0e0a6c613Ea16aE347CB98732e152530Ae9Bc7F2 I will use it as an example

Go to token's contract page on etherscan.io:
https://etherscan.io/address/0x0e0a6c613ea16ae347cb98732e152530ae9bc7f2

Click on Code tab and hit Verify And Publish

On the "Verify Contract Code" you should fill all the required fields correctly so etherscan could verify your token's smart contract code:
Click Verify and Publish button and if everything is well you should see the following:

Now that token's code is verified anybody can easily review it and make sure it does exactly what you are claiming it does. Furthermore this token is now eligible to be listed on exchange sites where you want to be listed after ICO is finished.
Signature space for rent.

Altcoins Talks - Cryptocurrency Forum

[GUIDE] CREATE your own TOKEN in a few simple steps!
« on: September 11, 2018, 08:33:36 PM »

This is an Ad. Advertised sites are not endorsement by our Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise Here


Offline ayatoslaw

  • Legendary
  • *
  • *
  • *
  • *
  • Activity: 2060
  • points:
    27118
  • Karma: 86
  • Trade Count: (0)
  • Referrals: 12
  • Last Active: March 30, 2024, 10:52:29 AM
    • View Profile

  • Total Badges: 24
    Badges: (View All)
    Fifth year Anniversary Fourth year Anniversary 10 Posts
Re: [GUIDE] CREATE your own TOKEN in a few simple steps!
« Reply #1 on: September 12, 2018, 04:23:08 AM »
Is that true original coin?
if it really means that everyone can make toke? and the scammers make tokens that way? is there a way for the token to know the composition of the token? or is it open source? because if we can know, maybe we can know the token while ico is a scam.

Offline alfian141

  • Sr. Member
  • *
  • Activity: 418
  • points:
    615
  • Karma: 1
  • Trade Count: (0)
  • Referrals: 0
  • Last Active: March 12, 2019, 10:14:51 AM
    • View Profile

  • Total Badges: 17
    Badges: (View All)
    10 Posts First Post Karma
Re: [GUIDE] CREATE your own TOKEN in a few simple steps!
« Reply #2 on: September 12, 2018, 04:54:25 AM »
Is that true original coin?
if it really means that everyone can make toke? and the scammers make tokens that way? is there a way for the token to know the composition of the token? or is it open source? because if we can know, maybe we can know the token while ico is a scam.
you can make own token,  but the security and how to market it, and the price make it legal in ether are the problem you mush slove before ICO.

............███..............................
...........█...███████.........▄███▄.........
...........████████████...███..█..██.........
.....................████..███.▀████.........
..........████████████████..███...███........
........................███..███...███.......
......████████████............███████........
....████...███.................█████.........
▄██████..████...█▀▀▀.█.▄█.█▀▀█..███..███.....
██...█..███.....█....█▄▀..█..█..██..███.▄▄▄..
▀████▀.███..██..▀▀▀█.█▀█..█▀▀▀.....███.██▀▀█.
......███..███..▄▄▄█.█.▀█.█......████..██..█.
......██..███...................████..████▀..
.........█████..............█████████████....
........███.███..███.......█████████████.....
.......███...███..████.......................
........███...███...███████████████..........
.........█████.███...███.....................
.........█...██.███...███████████▄...........
.........▀████.........███████..██...........
.............................▀███▀...........

























  Join Chat   
Telegram

  ANN Thread 
Bitcointalk

Offline Helga

  • Misbehaving
  • Baby Steps
  • *
  • *
  • Activity: 11
  • points:
    143
  • Karma: -6
  • Trade Count: (0)
  • Referrals: 0
  • Last Active: February 10, 2020, 07:44:42 AM
    • View Profile

  • Total Badges: 12
    Badges: (View All)
    10 Posts First Post Fifth year Anniversary
Re: [GUIDE] CREATE your own TOKEN in a few simple steps!
« Reply #3 on: September 17, 2018, 01:04:52 PM »
Is that true original coin?
if it really means that everyone can make toke? and the scammers make tokens that way? is there a way for the token to know the composition of the token? or is it open source? because if we can know, maybe we can know the token while ico is a scam.

I will suggest the best token creation company Coinsclone for creating a token
Helga
Cryptocurrency Enthusiast

Offline boysnoel12

  • Jr. Member
  • *
  • Activity: 70
  • points:
    338
  • Karma: 3
  • Welcome to my "PROFILE"!
  • Trade Count: (0)
  • Referrals: 0
  • Last Active: December 20, 2023, 06:02:04 AM
    • View Profile

  • Total Badges: 18
    Badges: (View All)
    Fifth year Anniversary Fourth year Anniversary 10 Posts
Re: [GUIDE] CREATE your own TOKEN in a few simple steps!
« Reply #4 on: October 04, 2018, 07:01:39 PM »
It's all true there's nothing fake in there, the only problem is the person behind the token itself if it is use for scam or not scam. You can create too if you want.

There's an exchange that will accept your own token in their exchange. Einax.com they also had airdrops system for those ICO who wants to conduct an airdrops.
Signature space for rent.

Offline Goku01

  • Sr. Member
  • *
  • Activity: 608
  • points:
    1002
  • Karma: 22
  • Trade Count: (0)
  • Referrals: 2
  • Last Active: February 28, 2023, 10:59:07 AM
    • View Profile

  • Total Badges: 20
    Badges: (View All)
    10 Posts First Post Fifth year Anniversary
Re: [GUIDE] CREATE your own TOKEN in a few simple steps!
« Reply #5 on: October 10, 2018, 08:08:09 PM »
Is that true original coin?
if it really means that everyone can make toke? and the scammers make tokens that way? is there a way for the token to know the composition of the token? or is it open source? because if we can know, maybe we can know the token while ico is a scam.

Everyone can make their own coin but your coin will be valuable when there is proper management, advertisement, control , legit project etc. Without value there are no point of making coins. Security is a big factor. So keep that in mind. 

Offline tamango

  • Hero Member
  • *
  • Activity: 790
  • points:
    4025
  • Karma: 8
  • Beyond Protocol Street Team
  • Trade Count: (0)
  • Referrals: 1
  • Last Active: June 11, 2021, 06:07:28 PM
    • View Profile

  • Total Badges: 22
    Badges: (View All)
    10 Posts First Post Sixth year Anniversary
Re: [GUIDE] CREATE your own TOKEN in a few simple steps!
« Reply #6 on: October 10, 2018, 09:13:58 PM »
Thanks for this tutorial I think I will try to build my own coin just for fun... is seems really funny!
Beyond Protocol Street Team
http://beyond.link | Coming Fall 2021
Official altcoinstalks thread

Altcoins Talks - Cryptocurrency Forum

Re: [GUIDE] CREATE your own TOKEN in a few simple steps!
« Reply #6 on: October 10, 2018, 09:13:58 PM »


Offline Unknown

  • Sr. Member
  • *
  • *
  • *
  • Activity: 385
  • points:
    630
  • Karma: 35
  • Trade Count: (0)
  • Referrals: 1
  • Last Active: May 05, 2022, 09:38:23 AM
    • View Profile

  • Total Badges: 22
    Badges: (View All)
    10 Posts First Post Fifth year Anniversary
Re: [GUIDE] CREATE your own TOKEN in a few simple steps!
« Reply #7 on: October 12, 2018, 09:15:28 AM »
Its easy to create our own token but sadly marketing your own token to have a value is not easy, thats why many projects failed during ICO

 

ETH & ERC20 Tokens Donations: 0x2143F7146F0AadC0F9d85ea98F23273Da0e002Ab
BNB & BEP20 Tokens Donations: 0xcbDAB774B5659cB905d4db5487F9e2057b96147F
BTC Donations: bc1qjf99wr3dz9jn9fr43q28x0r50zeyxewcq8swng
BTC Tips for Moderators: 1Pz1S3d4Aiq7QE4m3MmuoUPEvKaAYbZRoG
Powered by SMFPacks Social Login Mod