How You Can Make an Ethereum Token
Ethereum tokens are something that really took the cryptocurrency space by storm. The use of ethereum tokens provided the cryptocurrency community with a way to start new projects and turn ideas into reality with a modern approach, or to add more functionality to preexisting ideas. Ethereum tokens are quite interesting technology that you can even take advantage of yourself for your own projects.
While it may be a little harder to create your own ethereum fork or even a fully-fledged ERC-20 token, you can quite easily create a simple test network token and generate a smart contract with some helpful tools on your own and learn more about the potential of ethereum smart contracts. If you are interested in how ERC-20 tokens work and would like to learn a really simple way to make one, this may be just the place to start.
Disclaimer: This tutorial is for educational & novelty purposes only, there is no guarantee the information provided is accurate at the time you are reading it and you follow this guide entirely at your own risk, while it should be fine we have no control over the resources used and the links provided going forward. You are responsible for managing your own cryptocurrency and online safety. If you are unsure how to protect yourself and any cryptocurrency you may have on your device, please only read this guide rather than attempt to follow it yourself.
Reasons You May Want to Make a Token
While there are a broad range of reasons you could perhaps wish to create your own erc20 token, these are a few examples for more casual use cases as well. Not that you need a reason to want to learn something new.
- Digital novelties or to send to friends as unusual digital gifts
- Do you just want to learn more about ethereum and blockchain technology
- School projects that will stand out from the usual
- Teach students about blockchain and ethereum
What is an Ethereum Token?
An ethereum token is essentially something you could consider a digital asset, one that uses the ethereum blockchain to function with the help of smart contracts. A token can be used for many things, a project may use a token to exchange for specific goods or services they may provide, many tokens are used for voting rights, they may be used to improve the user experience in some way, or be used as a store of value. While not the only reasons a token could exist, many popular tokens fall into one of these groups in one way or another. The amount of tokens can vary as can various other parts of the contract code used in a smart contract for an erc20 token. Smart contracts on the ethereum network use a programming language called Solidity, which is designed to make building smart contracts fast and efficient.
What is ERC-20?
Most of the tokens you will come across that are based on ethereum will fit the erc20 standard. This standard was originally issued in 2015 and is now grown to be a very popular protocol that helps define many tokens, their functionality, and the smart contracts they use. It's worth noting that you shouldn't confuse a token on the ethereum network with Ether (ETH) which is the native token that is used on the ethereum blockchain and is required to interact with their own smart contacts or move tokens around on it in the form of gas. When using the erc20 token standard you can rest assured that a huge range of dApp providers, ethereum wallets, and other services will be compatible with the token thanks to the large degree of adoption it has garnered.
Getting Started Making Your Own ERC-20 Token
While there are a number of ways you can go about this we will be taking a specific route, that's not to say there is at all various alternatives to things suggested to use this here, it is merely beyond the scope of a single article to cover all the various options and the pros and cons of each of them. This should only be considered casual reading, if you do want to create a serious token for your project, it's worthwhile spending a lot more time researching the subject on your own. For this project, we will be taking a very simple approach that almost anyone would be able to do if they were so inclined.
- MetaMask browser extension
- Some Ropsten Test Network Ether
- The desire to make a token in the first place
Preparing MetaMask
If this is the first time you are attempting any kind of ethereum development it's likely you will require a wallet address to use for this that is on an ethereum test network, for this example we recommend and will be using the Ropsten Test Network. The first thing to do if you haven't yet is to install the MetaMask extension. So go ahead and create an account in your MetaMask wallet and when you have the option to select which network, choose the Ropsten Test Network. If you have trouble working this out on your own, it's likely worth spending some extra time becoming familiar with MetaMask and learning more about how it works, there are many great resources online that can help you learn the basics if you still need to learn them, MetaMask themselves even have some fantastic information over on their support page in the FAQ section.
Getting Test Ethereum
Before we start this section, don't be a jerk. Test ethereum is a resource for ethereum development and helps provide us with many of the great things we now have and will have in the future on the ethereum network. Please don't take advantage of resources offering test ether, it is not "normal" ethereum and does not represent the same value mainnet ether does.
There are various faucets around you may be able to find to get some test ether for the Ropsten Test Network, one of those can be found here. To use a faucet provide your public address from MetaMask on the account you prepared earlier, and you will be credited some if the faucet has some available. Again, don't be a jerk you have nothing to gain by trying to claim a bunch of test ether from faucets.
Always do your own due diligence when it comes to using tools like developer faucets for whatever network you are experimenting with, and beware of any that request excessive information. It is vital you never give anyone your MetaMask seed words or private keys, that includes faucets like these.
Creating an Ethereum Token
While in a more advanced situation this can get rather complex depending on your needs. Building ethereum smart contracts is a useful skill and something that requires some knowledge of both Solidity and how the ethereum network operates. However, that doesn't mean there aren't simpler options to get your feet wet and create a simple test token, which more fits the scope of this tutorial and is the direction we are going to go.
Step 1:
Now that you have your test ethereum and have prepared MetaMask you can head on over to thetokenfactory.com or alternatively tokenfactory.surge.sh if one of these is offline for some reason. They both operate the same way so there should be no difference in which you choose, at least at the time of writing.
Step 2:
On the top of the page, you will find a navbar with a few different options, select "Create Token Contract"
Step 3:
You will be met with a fairly straightforward page that requires you to input variables in four different boxes. It even provides some examples to give you an idea of the format required for each box if you are unsure. In the first box we will input our total supply, the second our name, the third the number of decimal places, and lastly our symbol.
Step 4:
After you have filled out the boxes you should check them over and ensure that you are happy with what you have added to the inputs. You'll notice the input for "decimal places" suggests 4 as a default option, while this is acceptable commonly tokens will use 18 decimals, this is merely a standard that ether itself uses and makes it easier to break down tokens into smaller pieces. Why this matters here is that your total supply takes into account these decimal places as well, so if your total supply is 100 and your decimal places variable is set to 4, for example, you would need to add four more zeroes to your total supply. If you set your decimal places to 18 like many people would add 18 zeroes to the end of the first input once you have decided on your total token supply (the number of tokens you want to create).
Step 5:
Click the Create Token button at the bottom of the page, you should see a MetaMask window appear and if so follow the prompts. If not you may need to go into the MetaMask settings and manually connect to the website. If you do need to manually connect it is fairly straightforward. Simply go to the MetaMask settings menu, select Connections, then Add Site.
Step 6:
Once you have confirmed the contract deployment with MetaMask, you will need to wait a few moments for the smart contract to be deployed on the Ropsten ethereum test network.
Using Your ERC-20 Token
Once your transaction has been completed and your smart contract is deployed you are greeted with a page that allows you to do various things with your token. While you can do these things in other ways, it is a good place to experiment with your token by doing simple things like checking your balance. If you want to send your token to a friend they will simply need to provide you with a suitable transfer address (and to set their network in MetaMask to Ropsten) as this example does not use the main ethereum network.
Using Etherscan to View Smart Contracts
If you are doing this experiment you may find it interesting to see the smart contract that has been generated for you. If you are planning to experiment further with a more advanced token creation this might be an interesting step for you to take as well with the test token you have just created. Fantastically Etherscan provides a Ropsten Testnet Explorer that will allow you to do just that. Now by grabbing the address you used, either from the page you reached at the end of your token creation, or by grabbing it from MetaMask you can head on over to https://ropsten.etherscan.io/ and insert the address.
If you do grab your normal Ropsten test network public key from MetaMask you will have to find the smart contract creation manually in your transaction history, but this will be easy to do. Either way, once you find the page containing your smart contract code you can check it out yourself and see some of the variables you set earlier included in the contract code. If you are just reading along you can view the code for the token smart contract created for this tutorial here.
Learn More or Trade Ethereum
We hope you enjoyed this beginners guide to creating an ethereum token. Again it's important to note this is not the route to take if you are preparing for a more serious project and is purely for educational purposes. Ethereum can be quite interesting. So if you would like to learn more and get started with ethereum development and things like learning the programming language Solidity to make smart contracts yourself, you can head over to ethereum.org/en/developers/ where there is a range of information to get you started on your journey to becoming an ethereum smart contract developer.
The goal of this tutorial is just to pique your interest in the potential of ethereum and smart contracts, keep an eye out for more interesting articles coming soon.
If you are interested in trading ethereum using non-custodial trading that keeps you more in control of your funds, head on over to LocalCoinSwap and start trading ethereum, bitcoin, and much more. You can also join our Telegram community or follow us on Twitter, Facebook, and most major social platforms.