Here to write about tech and web3.
Here to write about tech and web3.

Subscribe to kennkoncept

Subscribe to kennkoncept
Share Dialog
Share Dialog
<100 subscribers
<100 subscribers


We will be creating an ERC20 TOKEN using Openzepplin.
STEPS:
Go to the openzepplin . You will see the image below. I will be making reference to this image, feel free to revisit anytime.

Click on the ERC20 icon to highlight it.
Input the token name and symbol you want in the “Name” and “Symbol” box. In my case, name is Genz and symbol is GZ.
Input the total token supply you wish to deploy in the “Premint” box. for me, I will deploy 10000 Tokens.
The next is to choose the features you want for your token. I want mine to be Mintable (here, privileged accounts can create more supplies), and PERMITABLE (without paying gas fee, allow token holders to be give third party access to transfer tokens.) I will check the “Mint” and “Permit” square boxes[see image above].
Make the token ownable by checking the “Ownable” radio box. This is to give privileged access only to the creator.

Our actions so far generated the following codes shown below in the codes window.

Then, lets deploy our token. We do so by clicking on the “Remix” icon at the top right-hand corner of the page.

At the launch of Remix, you will see the screenshot below in the remix environment.

Click on the compile button shown:

What shows the compilation success is the green tick next to the “Solidity compiler“ page as shown.

DEPLOYING TO REAL BLOCKCHAIN
To deploy to a real blockchain, there are many Testnets one can use. For this tutorial, let us use Sepolia as our deployment blockchain network. You need to have some Sepolia for the deployment to happen. The good thing is we can get some free Sepolia online in the address: https://cloud.google.com/application/web3/faucet/ethereum/sepolia. Add your Sepolia wallet address from Metamask, click on “Receive 0.05 Sepolia ETH,“ to get free Sepolia ETH delivered to your wallet.
Note: You will need to have at least 0.001 ETH Mainnet for this free Sepolia to be sent to your wallet.

Back to Remix
From “Environment”, click on “Connect Wallet,” Make sure your Metamask network is switched to Sepolia testnet. See the screen shot below.

If you cannot see the Sepolia Testnet on Metamask, you can bring it up by going to the settings tab of your metamask, then click on advanced, turn on the “Show Testnet icon.“ Sepolia should be visible in your wallet after the above action.
Copy the Sepolia wallet address in your account and from the “Deploy and Run Transaction” page, past the copied address in both the “RECIPIENT“ and “INITIALOWNER“ box and click transact

If you have Metamask extension installed, Metamask will pop up, prompting you to “Confirm” the deployment as shown below:

When you click “Confirm”, your token will be deployed to the blockchain. To check, Open your Metamask and navigate to the Sepolia Testnet network, you will see “Contract deployment confirmed‘ as shown below.

Click on “Contract deployment confirmed,” you will see the picture below:

Click “View on Block Explorer“ and you will be taken to Etherscan. Here, you will see the creation date, the token name, symbol, total supply, etc, of your smart contract. A prove your token is now in the blockchain.

Congratulation!
We will be creating an ERC20 TOKEN using Openzepplin.
STEPS:
Go to the openzepplin . You will see the image below. I will be making reference to this image, feel free to revisit anytime.

Click on the ERC20 icon to highlight it.
Input the token name and symbol you want in the “Name” and “Symbol” box. In my case, name is Genz and symbol is GZ.
Input the total token supply you wish to deploy in the “Premint” box. for me, I will deploy 10000 Tokens.
The next is to choose the features you want for your token. I want mine to be Mintable (here, privileged accounts can create more supplies), and PERMITABLE (without paying gas fee, allow token holders to be give third party access to transfer tokens.) I will check the “Mint” and “Permit” square boxes[see image above].
Make the token ownable by checking the “Ownable” radio box. This is to give privileged access only to the creator.

Our actions so far generated the following codes shown below in the codes window.

Then, lets deploy our token. We do so by clicking on the “Remix” icon at the top right-hand corner of the page.

At the launch of Remix, you will see the screenshot below in the remix environment.

Click on the compile button shown:

What shows the compilation success is the green tick next to the “Solidity compiler“ page as shown.

DEPLOYING TO REAL BLOCKCHAIN
To deploy to a real blockchain, there are many Testnets one can use. For this tutorial, let us use Sepolia as our deployment blockchain network. You need to have some Sepolia for the deployment to happen. The good thing is we can get some free Sepolia online in the address: https://cloud.google.com/application/web3/faucet/ethereum/sepolia. Add your Sepolia wallet address from Metamask, click on “Receive 0.05 Sepolia ETH,“ to get free Sepolia ETH delivered to your wallet.
Note: You will need to have at least 0.001 ETH Mainnet for this free Sepolia to be sent to your wallet.

Back to Remix
From “Environment”, click on “Connect Wallet,” Make sure your Metamask network is switched to Sepolia testnet. See the screen shot below.

If you cannot see the Sepolia Testnet on Metamask, you can bring it up by going to the settings tab of your metamask, then click on advanced, turn on the “Show Testnet icon.“ Sepolia should be visible in your wallet after the above action.
Copy the Sepolia wallet address in your account and from the “Deploy and Run Transaction” page, past the copied address in both the “RECIPIENT“ and “INITIALOWNER“ box and click transact

If you have Metamask extension installed, Metamask will pop up, prompting you to “Confirm” the deployment as shown below:

When you click “Confirm”, your token will be deployed to the blockchain. To check, Open your Metamask and navigate to the Sepolia Testnet network, you will see “Contract deployment confirmed‘ as shown below.

Click on “Contract deployment confirmed,” you will see the picture below:

Click “View on Block Explorer“ and you will be taken to Etherscan. Here, you will see the creation date, the token name, symbol, total supply, etc, of your smart contract. A prove your token is now in the blockchain.

Congratulation!
No activity yet