Crash Course in Launching a Crypto Token
There’s a lot going on in the cryptocurrency space; new assets and coins pop up every day, and an increasing number of services are moving to a web3 setup.
It is a great blessing that my current position has provided me access to numerous opportunities to learn about cryptocurrencies and web3. In this article, I hope to share a little bit about setting up my own cryptocurrency.
Tokens
Tokens are assets that exist on a blockchain. They can represent anything that be defined by a numerical balance: An amount of money, shares in a company, or even loyalty points for a restaurant.
Ethereum maintains a list of standards that help to support the development of tokens and other applications. There’s a lot of standards which would be beyond the scope of this article, but in the context of tokens, the most prevalent one is ERC-20.
In short, some of the key functionality that is supported by a ERC-20 is:
checking a user’s balance for the token; how much of this token do I have?
transferring tokens from one user to another; almost equivalent to me handing someone else physical coins
checking the total number of tokens in circulation
Using Solidity to Build a Token
Solidity is a programming language that is used to build smart contracts in Ethereum. I will admit that I’m fairly new to the language myself, but one of the beauties of the cryptocurrency ecosystem is that everything is open-source by design. And that includes the setup for key crypto infrastructure, such as tokens.
I followed these instructions as well to create my own token here.
I encourage you to read through these in detail, but the TLDR of these instructions are as follows:
Set up a new Ethereum wallet on MetaMask for a test network, or testnet (I chose Rinkeby here)
Use a testnet faucet to add Ethereum assets for testing
Download and set up Hardhat, a Solidity development environment
Build the smart contract for your token in Solidity. This repository provides all the core functionality of an ERC-20 token, which I leveraged to implement my own ERC-20 token.
Compile and deploy the smart contract
I did most of this If you were to repurpose this for your own coin, then you should only need to modify this file, as well as create a .env file containing your wallet’s private key.
Once I executed this setup, I can view this token in my MetaMask wallet and send it to whoever I want.