create account

How to create a simple token on HTMLCOIN/Qtum network by flaviovilasboas

View this thread on: hive.blogpeakd.comecency.com
· @flaviovilasboas · (edited)
How to create a simple token on HTMLCOIN/Qtum network
![DN9PfP7V4AAdDoc.jpg](https://steemitimages.com/DQmWopDzohy4Uv9VwuHhXYHm8iRjXo84GxSZzSMuHgLpSU9/DN9PfP7V4AAdDoc.jpg)

As everyone knows, HTMLCOIN's network supports smart contracts as well as Ethereum. There are few internet tutorials on how to actually create a token, even by the Ethereum network. So I came here to show you how to create an HTMLCOIN token in a simple and super well explained way. The tutorial will basically serve the HTMLCOIN and Qtum network.

1 - Open the Ethereum Solidity Compiler in https://ethereum.github.io/browser-solidity/ or by the button in the Smart Contract tab in the HTML wallet

2 - Close and delete anything that might be open in Solidity, in the "browser" tab

3 - Create a new file with the name of your token. Ex: MyToken.sol

4 - Enter the link https://github.com/qtumproject/QRC20Token/blob/master/QRC20Token.sol

5 - Copy everything and paste in Solidity, in the same file "MyToken.sol" that you created

6 - On the eighth line "contract", change "QRC20Token" by the name of your token. Ex: MyToken

6.2 - Do the same in "function TokenERC20" in line number 25

7 - Enter in to https://github.com/qtumproject/QRC20Token/blob/master/SafeMath.sol and copy all

8 - Create a new file in Solidity, called "SafeMath.sol" and paste the one you copied above

9 - Edit the name, symbol and total supply of your token. NOTE: Switch 9 for 1 and enter the explicit quantity
![1.png](https://steemitimages.com/DQmWf2YydDZgyEmKTxJJMZduDYf52e4XuHF8o7MPxh98MWE/1.png)

10 - After that, press the "Start to compile" button

11 - Now open your HTML wallet and wait for it to sync

12 - Open the "Smart Contract" option and then "Create"

13 - You will have two fields to fill, "Bytecode" and "Interface (ABI)"

14 - Return to Solidity and under the "Start to compile" button, select the file of your Token

15 - Click on "Details"

16 - There in the details will have the "BYTECODE", you will copy all code described in the line "object", as in the image
![2.png](https://steemitimages.com/DQmQ8aNAv2VrubCJ1xfxbxJfuHr2FVM8mgFeXz5zvTGPeHB/2.png)

17 - Paste everything in "Bytecode" in the HTML wallet and if it works out it will be like this
![3.png](https://steemitimages.com/DQmVYBJ8p2PnNhZ896et4v3iPbU8K7VLorMvjkxavgucbsE/3.png)

18 - If in case everything turns red, you copied and pasted wrong, redo

19 - Now in Solidity again, under "BYTECODE", in "ABI" copy everything by pressing the little button
![4.png](https://steemitimages.com/DQmNoXGve9QviDa3dUTbVhrxGB7VrJoUzc1bLc39o9bvmqs/4.png)

20 - Paste everything in the second field "Interface (ABI)" in the HTML wallet

21 - In the "Gas Limit" can put on 2500000, if you do not understand enough of what GAS is about

22 - Set the "Gas Price" to any value above 40 satoshi of HTML. Remember, whenever you send the tokens to another address, you must put an equivalent value or higher to the Gas Price of your token, so that the miner does not refuse your transaction

23 - In "Sender Address" define the wallet that will store the tokens

24 - It will stay like this
![5.png](https://steemitimages.com/DQmah9ZKWbfmqKCBRJo3hMPSkHpfhTMHv8NMLF9bkNshdrF/5.png)

25 - Click "Create Token", enter the wallet password if it is encrypted and give an "OK"

26 - Done, your contract was created and sent to the HTML network
![6.png](https://steemitimages.com/DQmNuFXqs3BC2S1rdvwtDhHshWXCdCX3ULMPqJ6xoxk1LJP/6.png)

27 - You have to have balance in the wallet to create the token, the higher the "Gas Price", the greater will be how much you will pay of fees

28 - When will I be able to use my token? You will be able to use the tokens when the network returns you part of the HTML's (in the form of mining) used to pay the contract
![7.png](https://steemitimages.com/DQmctXAMZpDNkMWsYghBzwTbA2ZD9MiRNgAzSNDd73wBS1a/7.png)

(Contract send = Contract Payment) (Mined = Contract Confirmed)

Well, you just created your token and can use it as you want. But first, wait for the 501 mine value confirmations, so your token is fully ready for use!

Do not use this tutorial to create tokens to apply scams, this is ugly, thanks!

=====> HOW TO ADD AND USE TOKENS <=====

1 - At the beginning of the wallet click on "Add Token"
![8.png](https://steemitimages.com/DQmUA9NjEwgotPim9VKwqW4gSyp6kNUn31GWkYUZhaALcq2/8.png)

2 - In "Contract Address" you will only need to enter the address of the contract you generated and the wallet where you placed the tokens
![9.png](https://steemitimages.com/DQmRj49oXUrjT6uBTvT41KxEFojEDcSUZxnrN76GAi3qZwm/9.png)

![10.png](https://steemitimages.com/DQmZpJWJaYwuK2p7yUz1gVtM5pxmtQDfjjH6ABX1SRQCYAM/10.png)

3 - Fill in automatically
![11.png](https://steemitimages.com/DQmYiLvX3U5pLY2h1ry51PkuW8z55VqGj3gcXFCKR2v4gW3/11.png)

4 - Click on "Confirm"

5 - And so, your tokens are visible and usable
![12.png](https://steemitimages.com/DQmTB1zFwMnDR4uxrWDnsnJm6nrRcbdsYUwnK6iLn2KYtwb/12.png)

6 - To send, just click "Send" and fill in
![13.png](https://steemitimages.com/DQmaXEgJV2o8FPTr9bWcSYxGSShZNESFBeT37HqYPMu3bAz/13.png)

7 - Always remember to put the right "Gas Price" (equal or superior)
![14.png](https://steemitimages.com/DQmUZwT8C5PZDyKuA2fVhtjZZfPYNQMsuVNP7zWVP23NB33/14.png)

8 - Enter your password if the wallet is encrypted and confirm the sending of your tokens
![15.png](https://steemitimages.com/DQmUBnkRreniCBErMK7T4CGC957w3hQZvhGEg9BmX7Jhp5u/15.png)

9 - To receive just give your address, right? xD

======================================================================

Tutorial by TheOdyssey - 02-27-2018
Telegram: @thodyssey

It was not easy to do this tutorial, much less translate it. If you want to make a donation, I'm very grateful!

HTML: Ho6xP2Nf7rCmZV5CHeBMdn9rFVCSoGoH4W
Qtum: QeAWYqTukCMTDoi87JomMvfBggNuKfv1cP
LTC: LKq7VqJmVpVyj3HH3MVDXQDaZo1FumEogP
ETH: 0x636ff85b10e9c4ee90e13ecb25173ccdb60f5e10
👍  , , , , , , , , , ,
properties (23)
authorflaviovilasboas
permlinkhow-to-create-a-simple-token-on-htmlcoin-qtum-network
categoryhtmlcoin
json_metadata{"tags":["htmlcoin","blockchain","ethereum","qtum","token"],"users":["thodyssey"],"image":["https://steemitimages.com/DQmWopDzohy4Uv9VwuHhXYHm8iRjXo84GxSZzSMuHgLpSU9/DN9PfP7V4AAdDoc.jpg","https://steemitimages.com/DQmWf2YydDZgyEmKTxJJMZduDYf52e4XuHF8o7MPxh98MWE/1.png","https://steemitimages.com/DQmQ8aNAv2VrubCJ1xfxbxJfuHr2FVM8mgFeXz5zvTGPeHB/2.png","https://steemitimages.com/DQmVYBJ8p2PnNhZ896et4v3iPbU8K7VLorMvjkxavgucbsE/3.png","https://steemitimages.com/DQmNoXGve9QviDa3dUTbVhrxGB7VrJoUzc1bLc39o9bvmqs/4.png","https://steemitimages.com/DQmah9ZKWbfmqKCBRJo3hMPSkHpfhTMHv8NMLF9bkNshdrF/5.png","https://steemitimages.com/DQmNuFXqs3BC2S1rdvwtDhHshWXCdCX3ULMPqJ6xoxk1LJP/6.png","https://steemitimages.com/DQmctXAMZpDNkMWsYghBzwTbA2ZD9MiRNgAzSNDd73wBS1a/7.png","https://steemitimages.com/DQmUA9NjEwgotPim9VKwqW4gSyp6kNUn31GWkYUZhaALcq2/8.png","https://steemitimages.com/DQmRj49oXUrjT6uBTvT41KxEFojEDcSUZxnrN76GAi3qZwm/9.png","https://steemitimages.com/DQmZpJWJaYwuK2p7yUz1gVtM5pxmtQDfjjH6ABX1SRQCYAM/10.png","https://steemitimages.com/DQmYiLvX3U5pLY2h1ry51PkuW8z55VqGj3gcXFCKR2v4gW3/11.png","https://steemitimages.com/DQmTB1zFwMnDR4uxrWDnsnJm6nrRcbdsYUwnK6iLn2KYtwb/12.png","https://steemitimages.com/DQmaXEgJV2o8FPTr9bWcSYxGSShZNESFBeT37HqYPMu3bAz/13.png","https://steemitimages.com/DQmUZwT8C5PZDyKuA2fVhtjZZfPYNQMsuVNP7zWVP23NB33/14.png","https://steemitimages.com/DQmUBnkRreniCBErMK7T4CGC957w3hQZvhGEg9BmX7Jhp5u/15.png"],"links":["https://ethereum.github.io/browser-solidity/","https://github.com/qtumproject/QRC20Token/blob/master/QRC20Token.sol","https://github.com/qtumproject/QRC20Token/blob/master/SafeMath.sol"],"app":"steemit/0.1","format":"markdown"}
created2018-02-27 06:43:45
last_update2018-02-27 23:29:15
depth0
children3
last_payout2018-03-06 06:43:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length5,840
author_reputation2,308,741,798
root_title"How to create a simple token on HTMLCOIN/Qtum network"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd0
post_id40,795,296
net_rshares3,435,921,486
author_curate_reward""
vote details (11)
@abstract-reserve · (edited)
Maybe everyone will have their own coin in the future! I bet if Andy Warhol was still alive he would want an Andy coin. :) Thank you for your hard work in putting this tutorial together @flaviovilasboas!
👍  , ,
properties (23)
authorabstract-reserve
permlinkre-flaviovilasboas-how-to-create-a-simple-token-on-htmlcoin-qtum-network-20180302t224139762z
categoryhtmlcoin
json_metadata{"tags":["htmlcoin"],"app":"steemit/0.1","users":["flaviovilasboas"]}
created2018-03-02 22:41:39
last_update2018-03-02 22:48:18
depth1
children0
last_payout2018-03-09 22:41:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length203
author_reputation47,601,624,087
root_title"How to create a simple token on HTMLCOIN/Qtum network"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id41,737,810
net_rshares0
author_curate_reward""
vote details (3)
@coin.info ·
**Coins mentioned in post:**

Coin | | Price (USD) | 📈 24h | 📉 7d
- | - | - | - | -
**ETH** | Ethereum | 880.339$ | _3.77%_ | _-7.38%_
**GAS** | Gas | 44.038$ | _18.63%_ | _-8.91%_
**HTML** | HTMLCOIN | 0.001$ | _9.9%_ | _-27.17%_
**LTC** | Litecoin | 218.974$ | _-1.8%_ | _-8.22%_
**QTUM** | Qtum | 29.116$ | _14.43%_ | _-11.05%_
👍  
properties (23)
authorcoin.info
permlinkre-flaviovilasboas-how-to-create-a-simple-token-on-htmlcoin-qtum-network-20180227t070332239z
categoryhtmlcoin
json_metadata{"app":"coininfo/1.0.0","format":"markdown"}
created2018-02-27 07:03:33
last_update2018-02-27 07:03:33
depth1
children1
last_payout2018-03-06 07:03:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length330
author_reputation133,144,230,969
root_title"How to create a simple token on HTMLCOIN/Qtum network"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id40,798,916
net_rshares0
author_curate_reward""
vote details (1)
@paccoin ·
I want to know ,how to list the coin onto exchanges.
After creating token  do we need anything more technically or we are already alright
properties (22)
authorpaccoin
permlinkre-coininfo-re-flaviovilasboas-how-to-create-a-simple-token-on-htmlcoin-qtum-network-20180915t022450728z
categoryhtmlcoin
json_metadata{"tags":["htmlcoin"],"app":"steemit/0.1"}
created2018-09-15 02:24:54
last_update2018-09-15 02:24:54
depth2
children0
last_payout2018-09-22 02:24:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length137
author_reputation56,588,479,429
root_title"How to create a simple token on HTMLCOIN/Qtum network"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id71,324,535
net_rshares0