Bitcoin Forum
May 09, 2024, 10:36:10 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [BEGINNER FRIENDLY GUIDE] Launch your own TOKEN in a few simple steps!  (Read 396 times)
This is a self-moderated topic. If you do not want to be moderated by the person who started this topic, create a new topic.
einax (OP)
Copper Member
Member
**
Offline Offline

Activity: 164
Merit: 40

einax.com


View Profile WWW
September 04, 2018, 06:24:55 AM
Last edit: September 04, 2018, 12:40:55 PM by einax
Merited by ABCbits (11), dbshck (5), suchmoon (4), mk4 (2), DdmrDdmr (2), Velkro (2), seoincorporation (1), tranthidung (1), morvillz7z (1), mdayonliner (1), Retty (1)
 #1

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 we will show you how you can create your own ERC20 token and start distributing it through einax.com token trading platform.

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:
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 https://einax.com

3. Listing token on einax.com
This part is easy. Simply drop us a message via Telegram with a link to your verified token smart contract.
Our telegram group is: https://t.me/einax_exchange
Once your token is listed on einax.com you may start distributing it via airdrops to a broad audience or create redeemable vouchers if you need more personalized approach. All services are free. We also plan to launch TOKEN/ETH trading pairs on November 1st, 2018. Your token will be listed on an exchange automatically.

If you have any further questions please feel free to ask here in this topic.
Cheers!  Wink

PS: We've published a guide on how to launch your own AirDrops on einax platform. The good part is that you don't even have to deposit anything to test airdrops - every new account registered at einax.com receives 100 Welcome Tokens for free.

1715294170
Hero Member
*
Offline Offline

Posts: 1715294170

View Profile Personal Message (Offline)

Ignore
1715294170
Reply with quote  #2

1715294170
Report to moderator
The block chain is the main innovation of Bitcoin. It is the first distributed timestamping system.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
Colorblind
Member
**
Offline Offline

Activity: 392
Merit: 41

This text is irrelevant


View Profile
September 04, 2018, 12:35:21 PM
 #2

You should have also made a guide on how to obtain 2$ worth of ethereum.

Update: I deeply appreciate the fact you have spent 2$ worth of your ETH to create those screenshots Wink
seoincorporation
Legendary
*
Offline Offline

Activity: 3150
Merit: 2933


Top Crypto Casino


View Profile
September 04, 2018, 01:19:04 PM
 #3

...

Damn son! That looks easy as hell, now i understand lot of things, thanks to share this tutorial, already give you a merit for it, you deserve it, was like read a explanation done with apples.

And think about the fact that you only need $2 to make the token, makes my mind blows  Grin

So, i will follow your tutorial and if i get stuck in any step i will let you know.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
Velkro
Legendary
*
Offline Offline

Activity: 2296
Merit: 1014



View Profile
September 04, 2018, 01:22:48 PM
 #4

Merit goes to you.
Great guide! It should clearly show people how easy is to create new ICO/crypto in like 30 minutes. Is it worth your money? Ask yourself that.
People need to know that, good job Smiley
petyang12
Member
**
Offline Offline

Activity: 352
Merit: 10


View Profile
September 04, 2018, 01:58:38 PM
 #5

Nice guide on how to create an erc20 etheruem based token. Also it cost you money and your time but worth it as many will learn how to create new tokens ( I hope most projects will be sucessful ).

▀▀▀▀▀▀▀▀▀▄ ▀▀▀▀▀▀▄ ▀▀▀▄     T F S     ▄▀▀▀ ▄▀▀▀▀▀▀ ▄▀▀▀▀▀▀▀▀▀
Move Your Game To The Next Level
[    TG GROUP    ]  [  TG CHANNEL  ]  [     TWITTER     ]  [     MEDIUM     ]
mk4
Legendary
*
Offline Offline

Activity: 2758
Merit: 3833


Paldo.io 🤖


View Profile
September 04, 2018, 02:55:36 PM
 #6

Noice. One of those rare topics by Newbies that actually contributes something. I sure damn hope the readers are going to use this information for educational purposes only though, we have had enough shitcoins already.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Colorblind
Member
**
Offline Offline

Activity: 392
Merit: 41

This text is irrelevant


View Profile
September 04, 2018, 06:22:07 PM
 #7

Noice. One of those rare topics by Newbies that actually contributes something. I sure damn hope the readers are going to use this information for educational purposes only though, we have had enough shitcoins already.

Yeah this forums being spammed by useless info quite a lot. At least this section is a safe haven Wink I wonder if you could do some bitcoin guides OP.
Retty
Member
**
Offline Offline

Activity: 154
Merit: 47


View Profile
September 04, 2018, 07:54:11 PM
 #8

Right. thats it......Rettycoin is underway!

ICO price only $5 per token. Max supply only 300 trillion!

Who's in?  Wink

Great info by the way, just goes to show how easy it is to be scammed!
einax (OP)
Copper Member
Member
**
Offline Offline

Activity: 164
Merit: 40

einax.com


View Profile WWW
September 05, 2018, 05:56:53 AM
 #9

Right. thats it......Rettycoin is underway!

ICO price only $5 per token. Max supply only 300 trillion!

Who's in?  Wink

Great info by the way, just goes to show how easy it is to be scammed!

You see I fundamentally disagree with this logic. ERC-20 is a valid technology, and like any other tech, it can be used for scams. It is people who always decide if the tech will be used for good or evil. A screwdriver can be used to rob people. Hammer can be used to kill. Most of the world's criminals using fiat, not crypto. If not this tool - scammers will use some other tool like they did before (remember insane premines, rigged wallets etc). Scammers will always find a way, and we shouldn't stop progress because of that.

Retty
Member
**
Offline Offline

Activity: 154
Merit: 47


View Profile
September 05, 2018, 08:43:22 AM
 #10

Right. thats it......Rettycoin is underway!

ICO price only $5 per token. Max supply only 300 trillion!

Who's in?  Wink

Great info by the way, just goes to show how easy it is to be scammed!

You see I fundamentally disagree with this logic. ERC-20 is a valid technology, and like any other tech, it can be used for scams. It is people who always decide if the tech will be used for good or evil. A screwdriver can be used to rob people. Hammer can be used to kill. Most of the world's criminals using fiat, not crypto. If not this tool - scammers will use some other tool like they did before (remember insane premines, rigged wallets etc). Scammers will always find a way, and we shouldn't stop progress because of that.

Who said it wasn't valid technology?

Wherever money/value is involved there are crooks,thieves and scammers. Its happened for thousands of years and i have no doubt it will continue in the future.

There was no logic in my reply, it was quite obviously said in jest...sorry it didnt amuse you!  Undecided
Dau1coduot
Newbie
*
Offline Offline

Activity: 85
Merit: 0


View Profile
September 05, 2018, 10:06:34 AM
 #11

Thanks OP, you show how it's easy to create a token, just a few simple steps and cheap. That's why we must be careful with new ICO.
einax_oliver
Newbie
*
Offline Offline

Activity: 19
Merit: 0


View Profile WWW
September 11, 2018, 02:32:24 PM
 #12

Thanks OP, you show how it's easy to create a token, just a few simple steps and cheap. That's why we must be careful with new ICO.
No, you should be wary of new ICO for a quite different reason. Hammers are cheap and very effective in bashing skulls, but you should not be afraid of hammers. You should always be afraid of those who use the tool, not the tool itself.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!