Giter Site home page Giter Site logo

vincent_frontend_smart's Introduction

Member Role Assignment

This project comprises two folders.

.
├── contracts
├── frontend
└── README.md

2 directories, 1 file

contracts - Consists the MemberRole S.C (smart contract) and scripts/deploy.ts script to deploy the smart contract

frontend - contains the UI code written in React NextJS

Tech Stack / Tools Used

Contracts

Frontend

  • React NextJs
  • Material UI for the components
  • EthersJs - for web3 interactions
  • VScode

Install and Setup

Clone or download and unzip the project

and change directory into the root folder

cd assignment

Contracts

Install Contracts dependencies

cd contracts

yarn install

# start a new network instance
yarn chain

# on a new terminal tab; deploy smart contract to the network instance

yarn deploy:local

# copy the  contract address, it will be needed on the frontend

Frontend

Install Frontend dependencies

cd frontend

yarn install

# open .env.local
Set `NEXT_PUBLIC_CONTRACT_ADDRESS` value to the contract address you copied in the deployment step from contracts
# start frontend
yarn dev

Visit frontend at Localhost:3000

Metamask Account Setup

Ensure you have metamask installed On the network instance you created, copy the first account private Key and import it to metamask

#Note

Connect to localhost network on frontend

Change account to the one you imported

Misc

Here is how a complete setup looks like on vscode

Overview

Localhost Server

Frontend .env.local

Frontend Server

Metamask Wallet

Account 1

vincent_frontend_smart's People

Contributors

shieldex avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.