
When it comes to creating tokens, most entrepreneurs choose to issue ERC-20 cryptocurrency units due to the high flexibility and security provided by the Ethereum blockchain. ERC-20 is one of the most significant Ethereum Request for Comments (ERCs) and has emerged as the technical standard for writing smart contracts on the Ethereum network, facilitating token implementation. Today, wallets and exchanges use the ERC-20 standard to integrate various standardized tokens onto their platforms, allowing for seamless and easy exchange between ERC-20 tokens and other tokens. This widespread adoption of the ERC-20 token standard has made interaction between tokens almost seamless and painless.
At the end of this post, you'll learn how to:
Before proceeding to this section, one must have basic knowledge of:
As mentioned earlier, we are going to create and deploy our new token’s smart contract inside the Ropsten Test network. But remember, if we want to monetize our token ever and have it listed in exchanges, we will have to do the same process in Ethereum main network. But, this is going to result in spending real ethers for token deployment and transaction fee.
I would recommend following all the steps mentioned here which has pretty much straightforward steps in creating your identity in MyEtherWallet and also having your new token up and running in the test network.
At this point, I hope you have the following components handy with you,
Now comes the more critical part. We are going to spend the actual tokens over the network in which we created the same.
For this we are going to use, Web3 JS - the official javascript API by ethereum to talk with the smart contract that we deployed earlier for our token.
This section is useful if you want to run a local node of the Ropsten test network. By doing this, you become a participating node of the Ropsten network, allowing you to sync a copy of the entire blockchain on your local machine and enabling you to submit transactions, mine blocks, etc. To achieve this, follow these steps:
Ethereum Client:
Setup:
This command starts geth in fast sync mode and connects to the --testnet, which implicitly connects to the Ropsten network. Adjust the cache memory value as per your system’s configuration.
The --rpc flag denotes that once the sync is completed, a new endpoint will be exposed, typically https://localhost:8545, for RPC connections from external applications.
Note:
<home>/.ethereum/testnet/geth/chaindata folder where your blocks will be downloaded. This space will increment over time as new blocks are added to the test network.
Now comes the actual transaction part. As mentioned earlier, we are going to use the Web3JS API to interact with the smart contract over the network.
For this, I will install the NodeJS implementation of Web3JS. However, you can choose other options like Yarn, Meteor, or even browser-based implementations as mentioned in their documentation.
Before copying the code, declare the following required variables at the top of the script:
Example Code:
Run this NodeJS script in your command prompt. Upon successful completion, you will see a transaction hash printed in the console.
This hash represents the actual transaction that took place. If you are running a local node, wait for a few seconds as the transaction needs to be submitted locally and then synced with the actual Ropsten network.
Navigate to Ropsten Etherscan and enter your transaction hash (<tHash>). Here, you can view the status of your transaction.
Go to your public address on Etherscan. You will see the number of tokens reduced from your wallet and added to the receiver's address.
Once you are comfortable with the process, you can repeat the same token creation and transaction steps on the Ethereum main network for real-time monetized trading. Ensure you have real ethers in your account ready to be spent for deployment and transaction fees.
By following these steps, you have completed creating and transacting with your own ERC-20 token.

