How to create your own token on tron ?

How to create your own token on tron ?

By yanis | little crypto guides | 2 Feb 2021


TRC20 are tokens on tron, that can be used in tron DEXes like justswap

 

1 - Requirements
  • Having tronlink installed on your computer
  • Having at least 30 trx (1$ if u're on mainnet)

 

2 - Codebase

Codebase can be found here : https://github.com/zyumingfit/TRC20-Contract-Template (yes, there's 5 files)

 

3 - Editing contract files

If you want to edit files, you can do using any plain text editor (for example, windows notepad or notepad++). For setting up token name/ticker, you should edit Token.sol file. Here's a screenshot (I've a custom theme on notepad++) !

f1243a7b9eb17092792ec2309f7873ca7b786f4b1427d1a55fbdda4027f2e2d6.jpg

 

4 - [optional] - if u want to deploy contract on testnet

If you want to deploy token on testnet, go to switch tronlink to shasta testnet.

You can get some testnet TRX on faucet !

0c6e5ffc1ba0ecebec6ec74390a1c59f857c82af02b75ed226e6a1f7a722ac40.jpg

 

5 - Load interface

Go to tronscan.io if you want to use mainnet, or shasta.tronscan.io if you want to use testnet ! 

Connect tronlink (using button) and then go to blockchain > contract deployment

b4265777b6f48a24e411eedd37546b5879b50476c213a527b4745b9a4778fd2e.jpg

 

6 - Upload and compile contract

Now, select all files and initiate compiling ("Compile" button)

211c64e6c89bb56af1cd13903a87d56d2e7cc74dcdd23a860ee012ef2d2b78fb.jpgc367112656237fe6d9fae25c1db8485251a5567ca0d980633830002ec6b83a8d.jpg

note : while compiling, you should select 0.5.x solidity version, else you'll have errors

You should have a result like this :

compilation success

 

7 - Deploy Contract

Then click "deploy" (the red button).

Very important : main contract is Token, and you should set user fee percentage to 100 (so users will pay 100% of the fees, else YOU are charged for gas).

In my case, contract is TD85JX5V4RLMFW98Yaf4SR8jhaBXt1UfFy (on testnet).

 

8 - Apply for official Token registration

For getting your token officially listed, there's a last step : listing it on tronscan.

For that, go to tokens > token record (still on tronscan), and then fill the form ! 

 

9 - That's all

Token is now live here (contract address : TD85JX5V4RLMFW98Yaf4SR8jhaBXt1UfFy) ! 

If you want, feel free of sending addresses of YOUR tokens in the comments.

And if I didn't explain well, feel free of asking help in the comments !!!

How do you rate this article?

9


yanis
yanis

I'm not afraid of the matrix, I AM THE MATRIX (pure code here)


little crypto guides
little crypto guides

In this blog, I give you tutorials for using some cryptocurrencies or crypto-like things.

Publish0x

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.