Skip to content
takundachirema edited this page Apr 23, 2025 · 6 revisions

Local Environment Set Up

The Set Up is part of the assignment. These are steps we already covered during the tuts. You will just be using a different Git Repository.

  1. Navigate to a directory/folder of your choice using cd example/directory and run the following git command in your terminal:
git clone https://github.com/FinHubSA/EthereumClassAssignment-2025.git

You’ll find two main packages in the packages directory:

  • hardhat: This package contains the Hardhat framework, which is used for compiling, testing, and deploying smart contracts.
  • nextjs: This package holds the code for the frontend application built with Next.js. It includes everything related to the user interface that interacts with your deployed smart contracts.
  • These packages help separate the backend (smart contracts) and frontend (UI), streamlining the development process.
  1. Run yarn install to install the nodejs libraries
yarn install
  1. Open your VSCode and click on file then open folder. Find the folder you cloned your project into, click on it and then click open on the popup window.
  1. Open a terminal on you VSCode. Let’s start by running a local blockchain in a terminal with yarn chain.
yarn chain
  1. Open a second terminal and run the command yarn deploy, which will compile and deploy the YourContract.sol smart contract, located in the packages/hardhat/contracts folder, in the local blockchain.
yarn deploy
  1. In a third terminal, run yarn start to launch the frontend of your application.
yarn start
  1. Open your browser and enter the url http:localhost:3000

This is the home page of Scaffold-ETH that we find at localhost:3000:

  1. The submission for this assignment will be a github link to your own private repository.
  • On your github account create a new private repository called EthereumClassAssignment-2025. Please refer to Step 2 of the tutorials guide.

NOTE: Make your the assignment repository private

  • Add me email as a collaborator on your private repository so that I can view and mark your assignment when you are done.

Go to settings on your github account

Select collaborators

Select add people and add this email address to your repository takunda.chirema@alumni.uct.ac.za

  • Set your origin url to be your newly created repository. Please refer to Step 2 of the tutorials guide.
  • Set your upstream url to be FinHub's assignment repository. Please refer to Step 3 of the tutorials guide.

Clone this wiki locally