[How to Create Your Own Crypto Token ]-Steemit Crypto Academy | S5W2 | Homework Post for @reddileep
Introduction.
Image designed by me on Snapp
I am very excited to be a part of professor @reddileep's class this week on how to create your own cryptocurrency token.
Prof in the lecture explained to us that we can create or start our own cryptocurrency projects by creating crypto tokens or crypto coins. He did however explain to us that it requires more like more finance, coding skills, etc to create crypto coin as compared to crypto coins which require less funds and coding skills since they are created on already existing blockchains.
I would now like to present my work to the task given.
How To Create Your Own Cryptocurrency By Differentiating Between Token And Coin
A crypto coin and crypto coin are 2 words that a lot of people believe to be same and usually use them incorrectly.
What is Cryptocurrency Coin?
A cryptocurrency or crypto coin is a decentralized virtual asset or currency based on a blockchain. A blockchain is a ledger or distributed ledger on which all transactions are recorded.
Cryptocurrencies are unique to their blockchains. The bitcoin crypto coin runs on the btc blockchain, ethereum coin runs on the ethereum blockchain, solana runs on the solana blockchain, etc. This means that every cryptocurrency or crypto coins has its own blockchain and no 2 coins run on the same blockchain.
The first cryptocurrency bitcoin was launched in 2009 by Satoshi Nakamoto whose identity is still unknown to replaced the traditional banking system and bring financial freedom.
Cryptocurrencies or coins are secured by cryptography; a system where the coin or blockchain is protected by the use of private keys. Crypto coins have no single authority and are not protected by financial authorities. All these are done to ensure that users have complete control over private keys of their accounts and perform transactions whenever they want to.
Because coins are not protected by financial authorities and promote transactions through anonymity, some people have taken the opportunity to use it for illegal stuffs and as a result have resulted some countries into placing restrictions on them.
Crypto coins have undoubtedly become very popular and grow in value each and every day but are very volatile. You can a btc millionaire today and quickly lose half or more the next day.
Crypto coins are virtual and so cannot be moved around. One might think because you can transfer a coin to another user it mean it has been moved. This is not the case because only your account balance is changed and that of the recipient.
Like already stated, crypto coins are based on blockchain technologies and because of how beneficial they are, some companies are planning to use them in their co-operations to promote workplace transparency.
What Are Tokens?
Crypto tokens can be explained as digital or virtual assets created on already existing blockchains. They can be issued by existing projects and used to carry out activities on that project. They can be used to carry out transactions by serving as transaction fees and can also be used to take part in the project's governance.
An example of token is the SUN token used on the sun.io of the tron ecosystem to to carry out transactions and take part in governance by locking SUN for veSUN.
Crypto tokens have wider ranges of functionalities within the blockchains they have been issued or launched on. Tokens on the tron ecosystem act as TRC-10 and TRC-20 tokens whilst others on the ethereum blockchain act as ERC-20, ERC-75 and ERC-1175 tokens.
Tokens have become very important parts of the crypto world to the extent that there are NFTs (Non-Fungible Tokens). NFTs are tokens that are non interchangeable and so cannot be exchanged with anything else and not even other NFTs. NFTs include artworks, games, etc that have become assets of very high value. When an NFT like an art work or painting is sold, the owner takes it and gives it to the new owner meaning that NFT now belongs to only the new owner and there is no other in circulation. They have added so much value to the crypto token world.
Differences Between Tokens And Coins.
Tokens | Coins |
---|---|
Tokens are issued on already existing blockchains | Coins run on their own blockchains |
Cannot be mined | Can be mined |
Smart contracts are responsible for their operation | Operations do not depend on smart contracts |
Tokens are moved around. Examples are NFTs that I explained above | Coins are not moved around |
Creation of tokens are easier and not very complex | Creation of coins are very difficult and complex |
Issued primarily to be used on a blockchain's platform or to represent an asset | Introduced primarily as a store of value |
Tokens offer more functionalities or use cases | Coins offer less use cases or functionalities |
Are important parts of dApps and offer more uses | Have limited uses in dApps. |
Tokens can be exchanged for different ones on the same blockchain they run. Example; you can swap sun for wtrx in the tron ecosystem | Coins can only be exchanged for one another on exchanges. Example you cannot swap btc for eth on the etherem blockchain but you can swap btc for eth when using the binance exchange. |
Demonstrating Everything needed To Create A Crypto Token.
To create a token, you need to have some capital of at least $15 to pay gas fees and prepare a wallet. Aside having a wallet and funds, other things to keep in mind are;
To determine the blockchain platform to use,
To have some basic coding skills,
To determine the project type, it's purpose and functionalities.
For the purpose of this task, I would like to create my token on the binance smart chain using metamask wallet.
Installing Metamask On PC.
Metamask on computers is only available through browser extensions and so to install matamask on pc, follow these steps.
- Visit metamask
- Click on download.
- Click on install for chrome.
- Click on add to chrome.
- Click on add extension to download.
- Metamask is added.
Setting Up My Metamask Wallet.
- After the metamask chrome extension is added, a new page page is launched. Click on get started.
- Click on create a wallet.
- Read the terms and click on I agree.
- Enter new password and re-enter it to confirm. Tick on "I have read and agree to the terms". Click on create.
- A new page is opened where there's a video to watch on how to keep your wallet safe. After watching, click on next.
- Click on "click here to reveal secret words". Copy the seed phrase and click on next.
- Confirm the seed phrase in the order it was displayed to you. Click on confirm.
- Click on all done.
- Wallet is created.
Adding Blockchain Network To Create Token (Binance Smart Chain Network).
- From the homepage of the created metamask wallet, click on the drop down arrow on ethereum mainnet and click on add network.
- The next thing to do here is to enter the network name, chain ID, block explorer URL, currency symbol and new RPC URL.
The details here must be checked and entered correctly to avoid loss of funds.
- To get the correct details, visit chainlist
- Click on connect wallet at the top right corner.
- From the opened metamask extension, click on next.
- Click on connect.
- Metamask wallet is connected to chainlist.
- Search for your preferred network in the search bar. In this case, binance smart chain and click on add to metamask.
- Click on approve from the metamask extension.
- I was required to switch network and so I clicked on switch network.
- Binance smart chain network is added as shown.
Depositing BNB Into Wallet.
- First of all login to your metamask extension.
- Copy the BNB wallet address of metamask.
- Login to your binance account to withdraw bnb.
- Click on withdraw.
- The crypto withdraw page is selected and from there select BNB coin, enter copied address from metamask and network is automatically matched with bsc. Enter amount of BNB and click on withdraw. I entered 0.027 bnb which because of 0.0005 BNB network fee I will receive 0.0265BNB. At the time 0.02650 equaled $15.42
- Confirm network and enter codes to confirm transaction.
- Withdrawal requested is submitted.
- Wait for transaction to get processed and confirmed. Transaction is confirmed and bnb deposited.
The Remix IDE And How To Download The Code.
For this part of the task, I will try to explain the Remix IDE and show a step by step process on how to download its source code.
What Is The Remix IDE?
Remix IDE is an open source development tool that is a part of the 3 projects of the Remix Project. Remix IDE is a web and desktop application that is used to write simple and non complex codes. It does not require high level of coding knowledge and so is good for everyone to use.
![image.png](https://steemitimages.com/640x0/https://cdn.steemitimages.com/DQmdQHeKND29v7suFEcRALzpxiKVvvtF1bzPEToJjHo6o2N/image.png)
Remix IDE which stands for Remix Integrated Development Environment works on only the web browser in a desktop version and is used mainly in coding, deploying of ethereum smart contracts and as well teaching and learning of other ethereum projects.
The Remix IDE web application is written Javascript programming language, making Remix IDE a tool to write or code smart contracts and create tokens from the web browser.
Remix IDE coding tool allows users or token creators to develop, compile and deploy smart contracts for Ethereum and similar blockchains. To use Remix IDE, you need to visit remix.org and from there you will be presented with a lot of options and features to use in the creation and deployment of smart contracts or creation of tokens.
Decentralizing is the key to the crypto world and so Remix IDE being open source allows creators to have the freedom to decide the characteristics and functionalities of the tokens they want to create. It is important that the codes of tokens created are absolutely correct and error free so the Remix IDE has a feature known as the code debugger that gives users the chance to check for errors in written codes.
The solditiy code editor is a feature of Remix IDE that allows users to write codes. This feature is an interface or platform that provides us with tools for writing codes.
With the Remix IDE users can compile smart contracts, send transactions to configured environments like javascript VM, injected web3, etc and debug transactions. All these can be done with the help of the tab panel of the Remix IDE.
The Remix IDE is used to create smart contracts, tokens and dApps. The most popular network used is the Ethereum blockchain network but others like binance smart chin network is supported for use.
Before you can create a token, you must first download Remix IDE's code and them customize per the requirements of your token.
Downloading The Source Code of Remix IDE.
Like already stated above it is necessary we download the source code of Remix IDE first and then customize it to create our token.
I want to create a token on the binance smart chain network and hence a BEP-20 token so the source code to download is that of a standard BEP-20 token. These steps are followed to download the source code of Remix IDE.
- Visit binance docs
- Locate asset management in the table of contents on the right of the homepage and click on BEP20 asset.
- Click on issue BEP20.
- A new page is opened where there are a host of things you can do. This page also explains how to create a token.
- Scroll down the page and locate the section that reads "Create new contract BEP20Token.sol and copy contract code from the bep20 token template here". Click on here
- A file labelled "BEP20Token.template" is downloaded. This file just downloaded contains the source code.
Customizing The Code.
- To customize the downloaded source code, click on remix.ethereum on the issue token page. Or visit remix.ethereum to access the tool.
- The remix.ethereum tool is launched.
- At the left hand side of the page, click on contracts. Click on contracts since you are creating a new file. There are 3 options that appear after clicking on contracts. It is important to notice that all the file names have .sol. and so it is important you also name your file with .sol.
- Right click on contracts to open more options. Select new file and rename it as you want. I will name mine** Chenty Token.sol**. I have already sated that the 3 other files are named with .sol and so you name your new file with .sol since it is default.
- The next step is to open the downloaded source code on notepad and copy it.
- Paste the copied text in remix.id.
- Edit the codes in line #351 to #356 to give the token your preferred name, symbol, decimals, total supply. The name is what your token will be called, symbol is its shortened form and decimals is the number of decimals you want the toke to have. Total supply is the overall or total amount of coins of the token you want to be in existence. It is very important and so a number chosen should be done after careful consideration. Line #351 is the constructor.
- I would edit lines #351 -#356 into;
Name: "Chenty Token";
Symbol: "CYT";
Decimals: "18";
Total supply: "1000000* 10* 18";
- The next step is to compile the edited code. On the left side of the tool, click on the compiler tool. Then click on **Compile Chenty Token.sol
I was given a notification that I made a mistake in the edited code and so it can't be recompiled unless that error is fixed.
- I made the correction and tried again by clicking on Compile Chenty Token.sol
The mistake I made was in the format of the token symbol. It is important the symbol is written in the format "CYT" ; . CYT because my token symbol is CYT. I rather wrote the symbol as CYT ; .
- The next is to deploy and so click on the deploy and run transactions icon on the left side of the page. Click on deploy from the results.
To continue the token creation, you have to connect your metamask wallet to Remix IDE.
- Login to metamask and click on the 3 dots at the top right corner.
- From the drop down menu click on connected sites.
- Click on manually connect to current site.
- Click on next.
- Click on connect.
- Metamask is connected to Remix IDE as shown.
- On the Remix IDE page, locate the environment section. Click on it and select Injected web from the drop down menu and click on deploy.
- Click on confirm from the metamask extension to confirm transaction. For this charged a gas fee is charged and so it is necessary to have some amount of BNB in your wallet.
- Tokens are deployed.
How To Add Created Tokens Into Metamask Wallet.
To add my created Chenty tokens into my metamask wallet, these steps are followed.
- Get the contract address of the token or transaction hash of the transaction. This can be obtained by checking the transaction history of REX IDE at the bottom of the page. Copy the token's contract address.
- Login to metamask and click on import tokens at the bottom of the page.
- Paste the copied token address in the token contract address section. If the address is right the token symbol is automatically matched as shown. Click on add custom token.
- Click on import tokens.
- CYT tokens are added. I was only able to add 0.00000000018
CYT tokens into my metamask but my initial token supply I entered when customizing the source code was 1000000* 10* 18 and I thought was supposed to get 1000000 tokens.
How I didn't get 1000000 CYT tokens. I guess I made a mistake somewhere and I haven't been able to figure that out.
Verifying Transactions.
Verification of transactions can be done on both the Remix IDE and Bsc scan.
Verification On Remix IDE.
- At the bottom of the run page in Remix IDE, there's some information after a transaction like deploying of created tokens. You can also search for transactions here by searching with their transaction hash.
Expand the section to get more data.
From here the transaction hash for the first deployment is 0xdbaeb5551d973129fbe3397e4e56b05a801beaf1990e77ada86c2fa03d49a188 from 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4 to BEP20Token.(constructor). The gas used is 80000000 gas. The transaction cost and execution cost is 1581134
- The details for the addition of CYT tokens to my metamask were found below.
The CYT tokens have been sent from 0xd9145CCE52D386f254917e481eB44e9943F39138 to 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4. However I couldn't get the transaction fees for this transaction here. The transaction hash is 0x0bd4ce3e7fb569dd04b1367d9976ca3c6bb7df679f648ff7b75477078c742ee0
Verification on Bsc Scan.
- To verify transactions using bsc scan, visit bsc scan
- Search for the copied transaction hash of the transaction (0x0bd4ce3e7fb569dd04b1367d9976ca3c6bb7df679f648ff7b75477078c742ee0)in the search box of bsc scan to get the transaction details.
The status for the transaction is success, with block number 12922691, contract detail 0xe37cc995c04bd64178e4384e8626320cf4b2b6f7. The CYT tokens transferred was 0.00000000018 Chenty tokens for a fee of 0.00786567 BNB.
Contract details are in the screenshot below.
Conclusion.
I must say a big thank you to professor @reddileep for this very informative lecture on tokens and coins.
Coins are built are their own blockchain technology where as tokens are built on already existing blockchains.
To create a token is much easier than to create a coin. Creating a token uses less funds and no high level of programming skills but creating coins need huge funs since new blockchains will also be built.
I was able to create some Chenty Tokens on the binance smart chain network using Remiix IDE.
Thank you.
Upvoted! Thank you for supporting witness @jswit.
![default.jpg](https://steemitimages.com/640x0/https://cdn.steemitimages.com/DQmNwBDPMPvL1yaKWTYF4wxyUmxWiEJgAy1WZWTJyCha5wE/jswit_comment_initial.w320.jpg)