cover-img

Token Series: Build and Deploy ERC20 Token in 3 Steps

9 June, 2022

13

13

2

Approximately 90% of US and European banks have begun investigating blockchain's possibilities, with financial institutions alone investing $552 million in blockchain-based projects.
Apart from documenting financial transactions, blockchain may also store medical information, reach binding agreements, trace the flow of commodities, keep personal credit records, track the provenance of artwork, verify payments across a supply chain, and much more.
Cryptocurrencies have recently gained popularity, providing limitless opportunities for businesses, individuals, and DAOs.
This post will teach us how to build and deploy the ERC20 token in 3 steps.

What is ERC20 Token?

The ERC-20 token is one of the essential Ethereum tokens. ERC-20 has emerged as the technical standard for token implementation on the Ethereum blockchain; it contains a set of rules that all Ethereum-based tokens must follow.
The ERC-20 introduces a standard for Fungible Tokens, which means they have a characteristic that makes each token identical to another in terms of type and value.

An ERC-20 token, for example, functions similarly to ETH, meaning that one token is and will always be equal to all other Tokens... Eth Org

Step 1: Build an ERC20 Token Smart Contract with Solidity using the remix IDE

We'll learn how to utilize https://remix.ethereum.org/, a free, easy-to-use IDE with a solidity-compatible IntelliJ feature and decent compile-time errors, to build and deploy an ERC20 Token Smart Contract.
Next, we will navigate to the Remix site and create a new file called MyToken.sol as shown below.
img

Build and Deploy ERC20 Token in 3 Steps

Let's update the MyToken.sol file with the following code snippet.
In the code snippet above, we:

Import the OpenZeppelin ERC20 contract

Initialize the Token, inheriting from the ERC20.sol contract

Declare a new contract called OlanetsoftToken, using the Solidity keyword contract, while inheriting the ERC20 OpenZeppelin's contract using the is keyword.

Create an initial amount of tokens 500 for the deployer.

Give access to Privileged accounts to create more supply using the mint function.
Next, we will compile our contract and get it ready for deployment.
img

Build and Deploy ERC20 Token in 3 Steps

Step 2: Deploy ERC20 Token Smart Contract

In this step, we will deploy our smart contract to the Polygon Mumbai testnet. Deployment is not restricted to only Mumbai testnet, as we can deploy to any of our preferred chains.
img

Build and Deploy ERC20 Token in 3 Steps

Next, we will select the contract to deploy.
img

Build and Deploy ERC20 Token in 3 Steps

Finally, we can deploy our ERC20 token.
img

Build and Deploy ERC20 Token in 3 Steps

img

Build and Deploy ERC20 Token in 3 Steps

img

Build and Deploy ERC20 Token in 3 Steps

Step 3: Verify and Import Token using Metamask

Let us import and verify the token we just deployed. We will head over to Metamask or by just clicking on the icon as shown below.
img

Build and Deploy ERC20 Token in 3 Steps

img

Build and Deploy ERC20 Token in 3 Steps

View on the block explorer.
img

Build and Deploy ERC20 Token in 3 Steps

We will be redirected to the Mumbai Polygon site where we can verify the transaction with contract details.
Next, we will import our token.
img

Build and Deploy ERC20 Token in 3 Steps

img

Build and Deploy ERC20 Token in 3 Steps

Import token.
img

Build and Deploy ERC20 Token in 3 Steps

View token.
img

Build and Deploy ERC20 Token in 3 Steps

Conclusion

This post addresses how to build and deploy the ERC20 Token in 3 steps as part of the token series I created. Watch this space for the upcoming ones.
I'd love to connect with you on Twitter | LinkedIn | GitHub | and Portfolio
See you in my next blog article. Take care!!!

blockchain

web3

smart contracts

solidity

13

13

2

blockchain

web3

smart contracts

solidity

Idris Olubisi
Software Engineer | Technical Writer | Content Creator | Speaker

More Articles