Offset on-chain emissions using HBAR (the native Hedera currency) and invest in on-ground carbon projects
See the project explanation video at: https://youtu.be/av83zaqHCIc
Check the deployed app at https://netzero-dao.vercel.app/
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.
Here's what the current architecture looks like
To get started with this project, clone this repo and follow the commands below
- 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 tosample.env
file. - Run
npx hardhat compile
to compile the smart contracts.
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
.
- Create a
api/.env
file referring to the sampleapi/sample.env
file. - Create a virtualenv (optional)
- Install the dependencies using
pip install -r requirements.txt
- 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.