Skip to content

johnsmith0212/netzero-backend-master

Repository files navigation

NetZero DAO (by team HoraFeliz)

Offset on-chain emissions using HBAR (the native Hedera currency) and invest in on-ground carbon projects

image

Try it out

See the project explanation video at: https://youtu.be/av83zaqHCIc

NetZero Demo

Check the deployed app at https://netzero-dao.vercel.app/

About the code

This repo contains the Backend-end for the project. The code primarily has two parts; the smart contracts, and the API server. The smart contract part predominantly uses Hardhat framework and hashgraph-sdk. The API server part uses FastAPI and requires Redis for storage.

The frontend code can be accessed in a different repo here.

Architecture

Here's what the current architecture looks like

image

Instructions to run

To get started with this project, clone this repo and follow the commands below

Smart contracts

One-time setup

  • Run npm install at the root of your directory to install the dependencies. It is recommended you use node v18 or higher.
  • Create a .env referring to sample.env file.
  • Run npx hardhat compile to compile the smart contracts.

Recurring Instructions

We've used different scripts for different purposes. Feel free to check those and run them using hardhat. For example, for deploying DAO using the deployDAO.js script you can run npx hardhat run scripts/deployDAO.js --network hedera.

API server

One-time setup

  • Create a api/.env file referring to the sample api/sample.env file.
  • Create a virtualenv (optional)
  • Install the dependencies using pip install -r requirements.txt

Recurring Instructions

  • API server can be run using ./start_api.bash 7777 command. Where 7777 is the local port on which the server would be listening to.

PS: This is our submission for Beyond Blockchain: Hashgraph Hackathon, we intend to take this project further post-hackathon.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published