Starting Kits for a Web3.0 Developer

Starting Kits for a Web3.0 Developer

To start developing smart contracts, there are necessary tools or kits you need to get set up on your machine. I would say that the first thing is to choose your stack and decide which stack group you wish to work with. My intention is to break down the complex requirements of getting started into just two basic stacks. To build a smart contract, a popular language used widely is Solidity. So Solidity is common to any stack group you decide to belong to.

JavaScript Framework

There are several JavaScript frameworks available for building the client side of the application. I will discuss the few options and why you need to stick to one.

1. Truffle and Ganache

Ganache is like a local blockchain network which you can install locally without needing to setup a full Ethereum node while you develop your smart contract. The downside of manually installing Ganache is that you need to stop and restart it manually. Apart from that, Ganache is a great tool that you would love on your stack. You can download Ganache and set it up on your machine following this guide or the quick-start on their documentation.

To compile, run migrations and tests on your local machine, you need Truffle. You can install Truffle by using the node package manage

npm install -g truffle

After Truffle is installed, initialize a project directory:

truffle init

Follow the prompt and complete the steps and you are up and running!

Metamask

In web2.0, all you need to consume the services of any web application is to click through the links on the browser. But in web3.0, you need a bridge that can empower your regular browser to talk to the Blockchain. That is, Metamask. Metamask connects your browser to the Blockchain which enables you execute the smart contracts stored on the Blockchain. Install Metamask as an extension on the browser and you are ready to venture into the Web3.0 world.

One more thing, you need to connect your Ganache instance to Metamask. That is the only way your smart contract can be activated. So go ahead and connect the local Ganache instance to the Metamask network and pronto!

After making changes on your smart contract, run the following commands :

truffle compile

This produces the build artifacts of your smart contract with the deploy script.

truffle migrate --reset

The reset flag is to ensure that the smart contract is bearing the latest version of your deployed app. Else, the latest changes would not replace the existing ones. So ensure you always pass the reset flag while running migrations.

Web3.js or Ether.js

To develop the client side of your application, you need a library that can talk to Metamask. Metamask has removed the web3.js library as default. To connect to Metamask, kindly follow the instructions here

2. Hardhat

In order to avoid manually starting and stopping a local Ethereum network instance like Ganache and using Truffle to orchestrate your smart contract, Hardhat is here for simplicity. The Hardhat tutorial walks you through the process of setting up your local environment and running a local Ethereum network instance. It also comes bundled with a testing suite to ensure your smart contract is devoid of major flaws before deploying on the blockchain.

That is pretty much about the JavaScript framework for simplicity.

In the next update, I will talk about the Python framework stack.