How to create a simple token on HTMLCOIN/Qtum networksteemCreated with Sketch.

in #htmlcoin7 years ago (edited)

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

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

17 - Paste everything in "Bytecode" in the HTML wallet and if it works out it will be like this
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

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

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

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

(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

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

10.png

3 - Fill in automatically
11.png

4 - Click on "Confirm"

5 - And so, your tokens are visible and usable
12.png

6 - To send, just click "Send" and fill in
13.png

7 - Always remember to put the right "Gas Price" (equal or superior)
14.png

8 - Enter your password if the wallet is encrypted and confirm the sending of your tokens
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

Sort:  

Coins mentioned in post:

CoinPrice (USD)📈 24h📉 7d
ETHEthereum880.339$3.77%-7.38%
GASGas44.038$18.63%-8.91%
HTMLHTMLCOIN0.001$9.9%-27.17%
LTCLitecoin218.974$-1.8%-8.22%
QTUMQtum29.116$14.43%-11.05%

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

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!