Using Remix IDE for Issuing GRC20 Tokens on GODE

In this tutorial, we provide guidelines on how to create, compile, and deploy a smart contract for deploying GRC20 tokens on GODE using the Remix IDE.

Pre-requisites

There is no need for any local environment settings for deploying solidity smart contracts on GODE using the Remix IDE.

All you require is a browser-based Web3 wallet (e.g. MetaMask) to interact with the GODE Testnet and deployed contracts. If you are already using MetaMask, it is recommended to create a new account for testing with Replit. You can do this from the account menu, which appears when you click on the account avatar in the top right corner of MetaMask interface.

You must set up all of the following Pre-requisites to be able to deploy your solidity smart contract on GODE:

Setting Up Remix IDE

  • Remix is an online IDE to develop smart contracts.

  • You need to choose Solidity Compiler, Choose the appropriate compiler version. We used 0.8.4 for this tutorial.

Writing the Smart Contract

  • Create new file, name it as GRC20Token.sol and copy contract code from the GRC20 token template

  • Remember to modify “name”, “symbol”, “decimals” and “totalSupply” according to your requirements.

The first line, pragma solidity ^0.8.4 specifies that the source code is for a Solidity version greater than 0.8.4. Pragmas are common instructions for compilers about how to treat the source code (e.g., pragma once).

A contract in the sense of Solidity is a collection of code (its functions) and data (its state) that resides at a specific address on the Ethereum blockchain. Learn more about the constructor and memory in the docs.

Compile Smart Contract

  • Step1: Click button to switch to compile page.

  • Step2: Select the appropriate compiler version, 0.8.4 in our case.

  • Step3: Enable "Auto compile" and "Optimization" from Advanced Configurations.

  • Step4: Select "GRC20Token" from the contract drop-down menu.

  • Step5: Click "ABI" to copy the contract ABI and save it.

Configure MetaMask and Fund Your Account

Now, We have to deploy our smart contract on GODE Smart Chain Network. For that, we have to connect to Web3 world, this can be done by many services like MetaMask, Brave, Portis etc. We will be using MetaMask configuring the MetaMask wallet to use with GODE.

  • Open Metamask and select Custom RPC from the networks dropdown

  • Go to setting page

  • Add a new network

Deploy Smart Contract

Let's Deploy the Smart Contract on GODE Smart Chain Testnet.

  • Select Injected Web3 in the Environment dropdown and your contract

  • Accept the Connection Request!

  • Once Metamask is connected to Remix, the ‘Deploy’ transaction would generate another metamask popup that requires transaction confirmation.

Congratulations! You have successfully deployed a GRC20 Contract. Now you can interact with the Smart Contract. Check the deployment status here: https://explorertest.godechain.com

Conclusion

This tutorial guided you through the basics of creating and deploying a contract of GRC20 tokens using the Remix IDE and MetaMask Web Wallet. This tutorial uses testnet, however, the exact same instructions and sequence will work on the mainnet as well.

Last updated