Introducing the Topic
Introduce how to create your own Cryptocurrency by differentiating between token and coin
Cryptocurrency is no doubt one of the biggest and fastest growing financial industry in the world. While a lot of people would have heard of Bitcoin (the first cryptocurrency) and Shiba Inu (The most pofitable crypto asset invested into in 2021), so many people do not know the difference between these two assets. Whilst one is a Crypto Coin, the other is a crypto token.
Crypto Coin
Crypto Coins are cryptocurrencies built on their native blockchains. The developers focus on building the blockchain and deploys a coin to the blockchain. Coins unlike tokens are built on the blockchain and for the purpose of the blockchain. Coins are usually mined on its native blockchain. Coins include BTC (built on he bitcoin Blockchain), ETH (Built on the Ethereum Blockchain), BNB (Built on the Binance Chain), DOGECOIN (Doge Blockchain), NEO (built on the NEO blockchain), STEEM (Built on the Steem Blockchain), and many more.
Crypto Token
Crypto token, although still a cryptocurrency is different from crypto coins as it is not built on its native blockchain. Most projects without a blockchain deploy their tokens on other blockchains which are already existing. With tokens, the the brain behind the project do not need to have the technical knowledge Examples of tokens are HT (Huobi Token, Built on the Ethereum Blockchain), SHIB (Shiba Inu token built on the Ethereum Blockchain), BTT (Built on the TRON Blockchain), and many more.
Coin | Token |
---|---|
Coins are operated on their native blockchain | Tokens are operated on other blockchains |
Coins are mined on their native blockchain | Tokens are not mined since they are not on their native blockchain |
Demonstrate how to prepare everything needed to create a crypto token, such as making a wallet and adding a few coins to it to pay the gas fee. (Here you should deposit at least 15$ worth of BNB coins from your exchange wallet to the newly created wallet)
I will be creating a crypto token and to do this, i will be using Binance Smart Chain. In other for this to be successful, I will be depositing $15 to serve as gas fee while creating the token.
Installing Metamask
One of the major tools to creating a token is MetaMask. MetaMask is a Web 3.0 wallet extension which can be downloaded on Firefox, Chrome, Brave, and Microsoft Edge, and can also be downloaded on phone. In this case, it is necessary to to use the metamask extension.
To download the MetaMask extension, you visit https://metamask.io/ and click on the Download button
Since I will be using the FIrefox extension, I will click on Install MetaMask for FireFox.
Click on add to FireFox to add the extension to the Firefox Browser
Adding a Wallet to the Extension
Once the extension is added, a wallet is either added or imported. To do this click on get started.
After clicking on get started, a page with the options to either create a new wallet or import a existing one is displayed. I will be importing a previously owned wallet.
Click on Import after inserting the seed phrase and the password which you intend to use.
After doing this, the wallet is imported into the extension.
Connecting Binance Smart Chain to MetaMask
To connect Binance Smart Chain to MetaMask, Click on the Settings after clicking on the wallet icon on MetaMask
ON the Settings menu, click on Network.
Click on Add Network on the Top right corner of the page to add Binance Smart chain
Then You add these informations into the columns on the page.
Network Name: Smart Chain
New RPC URL: https://bsc-dataseed.binance.org/
ChainID: 56
Symbol: BNB
Block Explorer URL: https://bscscan.com
Click on the Save Button and the Network is added to it safely
After creating the Smart chain wallet, I transferred 0.1 BNB from an Exchange (Binance) to the wallet since it is the minimum that could be transferred.
Balance appears on MetaMask
Explain the Remix IDE and download the source code by showing each step. (Screenshots required)
Remix Integrated Development Environment (IDE) is an Ethereum blockchain contract application that allows developers who intend to create smart contract, modify smart contracts as well as deploy the contracts for their project make use of open source codes. With Remix IDE, Developers wirth little or no skill in coding can create their contract by just copying the source code and doing a few editing to fit the purpose of the project's contract. Since Binance smart Chain and Ethereum Share similar address and contract format, it means that this application can be used on Binance Smart Chain as well.
Downloading the Source Code
Remember that I wrote in the previous paragraph that Remix IDE allows for the download of an already existing source code. As a developer creating a token on an already existing blockahin, creating a new source code isn't an option, all i have to do is download the existing source code for the existing blockchain. To download the BEP20 source code, here are the steps;
Go to https://docs.binance.org/ and select BEP20 in the table of content. On the BEP20 page, click on Issue BEP20.
On the next page, a self explanatory procedure on how to issue a BEP20 token is given. While reading the instruction, click on the (here) Button to download the contract code
Customizing The Source Code
After downloading the source code, the next step is to customize the source code to fit the purpose of the token and the project. To get this done, I will be using https://remix.ethereum.org.
On the landing page, click on Contract and right click to get the option of new file
After clicking on New File, I inserted the file name BEP20 Token.sol
The next step is to insert the source code gotten from https://docs.binance.org which is viewed on a Notepad to the Remix File created.
After pasting the source code, the next step is to edit the source code to suit the purpose of the token. On Code line 351, the Name, Symbol, Decimal and total supply of the token can be found and edited. Below is my Edit to suit the token;
- name: "Seltium";
- symbol: "Selt";
- decimals: 18;
- totalSupply: 100000000 * 10 ** 18;
After customizing the contract code, click on Solidity Complier on the left hand side of the page, click on Compile BEP20 Token.Sol.
Once the File is compiled, the next step is to click on deploy and run transaction
After Deploying, the name of the token as well as other details appears in the page.
Finishing the Creation of Token Via Metamask
To complete the process of token creation, Remix IDE needs to be connected to a wallet and to do this, i will be using MetaMask.
- Open the Metamask wallet and click on the Three lines at the top right (Account Option)
- Click on Manually connect site, and connect the site manually.
Connect to the Remix IDE Manually
Switch the environment to Injected Web3
After changing the environment to Injected Web3, the next step is to click on the deploy button.
This would cost an estimated gas fee of 0.00786593BNB
After clicking on the deploy button, a new token has been successfully created.
Below is the transaction ID from https://bscscan.com
Demonstrate all the steps to add your created crypto token into your any wallet such as Trust Wallet and MetaMask wallet. (Screenshots required)
In other to be able to add a token into a wallet, the first thing to do is to identify the contract address. To get the contract address of Seltium, it is the address that deployed the trasaction. In this case the address is 0x503e0548e3698b94cbd67b2553c92f6959e966c8
To import on MetaMask, Open the MetaMask Wallet and click on Import Token
When this is done, Insert the Contract address in the next page that requires the information.
Click on import token and the token would appear below in the token position
After clicking on Import, Selt token is imported in the wallet.
Verify transactions and other details through the relevant Block Explorer. (Screenshots required)
To verify my transaction, I checked the Remix IDE explorer debug below the script and it was successful
Furthermore, checking the BSC Scan to confirm transaction via the transaction ID. The Transaction appeare comfirmed, with the new Contract address displaying.
HEre is the transaction ID for the contract address being created, 0xc4c766a5be89c601e03f490468c2b90a28f99dc4fca3a062f6f490acaaebcff5. You can view it by clicking on the address https://bscscan.com/tx/0xc4c766a5be89c601e03f490468c2b90a28f99dc4fca3a062f6f490acaaebcff5
Conclusion
Participating in this class was a fun experience, while learning, I was also creating a token on the BSC chain. To conclude, it is very visible that there is a clear distinctive difference between a coin and a token. While most tokens are a product of smart contracts which are copied and tweeked to the taste of the developers, Coins are built from scratch on its blockchain.
Thanks to @reddileep for the class, I must confess that it was worth the time and effort.