Getting Started with Web3Task
Running Web3Task locally
In this tutorial, we'll go over how to:
Clone the necessary repositories from GitHub
Installing dependencies
Setting up a local blockchain
Deploying the smart contract to the local blockchain
Running the frontend
Prerequisites
Cloning the necessary repositories
Clone the web3task-contracts and web3task-frontend repositories from GitHub into a local directory
Install dependencies
Go to each directory and run the commands to install the dependencies
Setting Up Local Blockchain
Run a Hardhat node to start a local blockchain.
The node will generate some accounts. You can realize they are already set at .env.sample, you should just let it be.
Add the first one to Metamask to be the leader and the second to be the member. The account will be:
To add the localhost network to metamask, click on the network dropdown and select Custom RPC
. Fill in the following fields:
Network Name:
localhost
New RPC URL:
http://localhost:8545
Chain ID:
31337
Currency Symbol:
ETH
Deploying Smart Contracts in the Localhost
Makefile will set everything for us, just run:
Run the frontend
Go to the web3task-front
folder and run the commands below
Usage
If you are not using livenet, you should comment chain configurations at hardhat.config.ts
or mock the keys in the .env
file, otherwise you will get an error from hardhat.
To run all the unitary tests, run:
See the demo below to understand how to use the Web3Task
Last updated