What do You Need to Create an ERC20 Token?
To date, Ethereum confidently holds the title of the second digital currency in the world. The team of Vitalik Buterin was able to do much more than just another cryptocurrency.
Their developments have significantly gone beyond the edge of the crypto world and are already being used in a variety of fields. In particular, some technologies are being implemented in the traditional banking system.
One of the basic factors of the Ethereum success is the functionality to develop a custom, unique ERC20 token for each user. Thanks to this, many different projects have been successfully implemented. The most important peculiarity is that to issue an ERC20 token you don’t need to have any specific knowledge, a simple code understanding is enough. You’ll find the instruction on how to create a new Ethereum token below.
Smart contracts are the very Ethereum distinction
In fact, there are a lot of peculiarities in the Ethereum system. However, we should highlight the one that actually made this cryptocurrency recognizable. It is this development that hundreds of industries around the world are interested in. We are talking about smart contracts – a technology that has become the original development of the ETH creators.
A smart contract itself is a self-executed code. It is thanks to its appearance that the decentralization of cryptocurrencies became possible in principle. Smart contracts have become the foundation for the creation of a decentralized infrastructure operating with the ERC20 token. The development team spent a huge amount of time developing the technology, the experts managed to bring it to the end, and it became a huge breakthrough.
Learn what language is better to choose for smart contract creation
Token standards
ERC or Ethereum Request for Comment is a common token standard. It means the technical specifications both for the tokens themselves, and for the smart contracts. There are 4 types overall, but there are many differences among them.
ERC20
ERC20 is the most famous Ethereum token type. It was proposed in 2015. For the compliance, the token should have such options:
- token name,
- sufficient amount of tokens;
- balance displaying;
- transfer of crypto assets between the wallets.
If you need some tokens, you should buy them or create via smart contracts, because unlike Ethereum cryptocurrency, you can’t mine tokens to increase their number.
For the successful launch, you’ll need to test the tokens first. Within the common test, there are not enough options, and all the operations are conducted with real money. Still, there are 2 blockchain kinds – testnet and mainnet. You should carry the testing out on the first one, and the second option serves as the basic Ethereum Blockchain.
ERC223
It is a less popular token standard. Its requirements are similar to the ones of ERC20, but there is one important difference. Here you can return the money. It is the most widespread problem in the digital community, when the transaction is made to the wrong address, or the coin of a specific type is transferred to an address of another cryptocurrency type, and so it is not converted and is lost. To solve this issue, the ERC223 token was created. It works well with all the Ethereum software types.
ERC621
A standard that is sure to please the financial managers. It is designed for emissions and the issue of additional tokens, and also for their withdrawal from circulation. For example, if you run an ICO but the demand is significantly higher than the supply, with ERC621 you can quickly add the required amount. This also works in the opposite direction. In the white paper of the project, it can be noted that tokens that are not sold will be withdrawn from circulation. In fact, the ERC621 is another enhanced version of the ERC20 type with no critical differences.
ERC721
If the previous tokens were more like ERC20 analogs with advanced functionality, ERC721 is a unique token. Have you heard about the Cryptokities project? You probably have. They managed to collect $20 000 000 in round A. They are based exactly on this type of token. It is original and not interchangeable.
ERC827
This token is an add-on for ERC 20 and ERC223. It allows to transfer tokens from external services. For example, such a token can be used in crypto-exchangers, which do not have their own wallet, but they request access to your wallet.
More info about Ethereum token standards read in article
Programming languages for tokens creation
Originally, the GO-like programming language Mutant was used to create the ERC20 tokens. But gradually they move away from it, and its use is not favoured. Therefore, there are three languages that are more or less commonly used to work with ERC20 standard.
- LLL. Lisp-like language. Because of the high complexity, it is rarely used.
- Serpent. Python-like language. A fairly common option, but the Ethereum team recommends not to use it. Vitalik Buterin considers it unsafe.
- Solidity. Javascript-like language. The best solution for working with ERC20 tokens. It is quite simple, but at the same time working with it provides a high level of protection.
So, you can choose from three options to work with. Next, let’s see how to create a token actually.
Instruction on ERC20 token creation
The token development doesn’t take long, and if you know some of the languages mentioned above, you’ll be able to do everything in no more than 30 minutes. To perform the work, you need:
- Ethereum address in the Ropsten network;
- Ropsten-ether;
- Text editor;
- Smart contract on the chosen language.
As we have mentioned above, Solidity language is used more often. Thus, the instruction below is written for Solidity.
1. Register an address
Experts recommend to launch the token with the help of Ropsten. So you’ll not waste the additional ETH. First, create an address at MyEtherWallet. In the registration process, specify the Ropsten network. Then download the Keystore file and receive the private key.
2. Text editor and smart contracts
You’ll perform the work in the editor. The best editors for such tasks are Atom and Sublime Text. Also you need a smart contract created in the language on which the token will be developed.
3. Ropsten-ether
To get the needed amount of Ropsten-ether, you need to register on the https://faucet.bitfwd.xyz/ site. However, this should not be overdone. It is enough to register once.
4. Code development
The code from the smart-contract should be transferred to the editor, and you can start your work on the very creation of a new token. The most important thing is to perform the changes in the correct lines. In particular, you need to specify the contract name in line 4, and set the token designation in line 7. The full token name is to be specified in line 8, Also, in line 6, you should set the wallet address in the Ropsten network.
When you end working with the upper lines, move to line 102. Specify the token name there, and duplicate it in line 115. Also set it in 116 and 117 lines, but add the token symbol there, too. The last lines are 120 and 121 – there you should set your address. Save the changes.
5. Contract uploading
So, the code is done. The next step is the transition to http://remix.ethereum.org/. Search for the browser ballot.sol field, and then paste there the ready code. Next, go to the Compile tab and click on the Details button. You will see several fields from which you need to select ByteCode. Click “Copy” and the code will remain in the clipboard.
Now go to MyEtherWallet. Before you start uploading, you need to check again whether the Ropsten network is indeed selected. Then click on the “Contract” button and choose “Publish”. The code should be inserted in the required field. Sign the contract and upload it.
6. Registration
The last stage is registration. Go to Contact Overview and select Contact address. After that, find the Code item and select Verify and Publish.
Be careful, because it is impossible to correct the inaccuracies made at this step. Check the following aspects:
- correct address
- the correct name of the contract and a match with the name in line 102;
- compiler version;
Then select No in the Optimization field. The last thing you need before registering – Enter The Solidity Contract Code below. Copy the ready code from the Remix site. Choose Verify And Publish. That’s all. If you have done everything correctly, the network will confirm this with Successfully sign.
Congratulation! Your new ERC20 token is already created!
Read more articles about open source software and its developing