This tutorial will guide you through the installation process of the ICON development environment and walk you through smart contract development on ICON. In this article, we will create an ERC20 Equivalent token for ICON blockchain. The token standard is known as IRC2 token.

For Prerequisites, you should have basic knowledge and installation of latest versions of —

Docker

Python3

Linux

Step1. Installation and Setup —

We will start by installing the T-Bears client for ICX blockchain.

Now let’s stop and exit the container and see the container in the docker containers list

We can start and attach to the container as —

Step2. Account and Balance —

Tbears container provides us with a test account hxe7af5fcfd8dfc67530a01a0e403882687528dfcb with prefilled balance on the t-bears private network we are running.

Step3. Getting started with Smart contracts —

Create your repo with tbears init sample SampleToken and create a sample python file in the sample DApp folder. Here, we are going to clone the sample token repo into the container to get started with it by using the command —

now you can open and modify the irc2 token contract.

The token contract is as follows —

Here If we look at the package.json file in this folder, we can find

Here the main_file is the name of the contract python file and main_score is the contract class name.

Now let’s go up a folder into our home contract folder by

cd ..

Here we will take a look into the deployment RPC call defined in the deploy.json file —

Now let’s deploy the token as follows —

Here the keystore password for the keystore_test1 file is “test1_Account”.

Now we can check the transaction details as follows —

Voila!!, your token is successfully deployed on the network and you are ready to make your next big DApp and change the world.

Go head over to The ICX SDK guide and start building!!