Skip to content

0xSenzel/dao-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Build a DAO for your NFT holders

This repo contains coursework project from LearnWeb3 completed by 0xsenzel for LearnWeb3DAO-Sophomore lesson.

Project Info

DAO give NFT holders purchased from NFT Collection to create and vote on proposals to use DAO treasury to purchase other NFT from an NFT marketplace.

Each NFT owned counts as 1 vote. if majority of voters vote for the proposal by the deadline, NFT purchase is automatically executed.

Project Demo

demo1

Fig.1 - User with no NFT Create Proposal


demo1

Fig.2 - User with NFT Create Proposal


demo1

Fig.3 - View Proposal Tab

Project Setup

Hardhat

Head to hardhat-tutorial folder:

Install dependencies

npm install

Compile smart contract

npx hardhat compile

To deploy smart contracts:
Head to hardhat.config.js file, change the value of:

  • ALCHEMY_HTTP_URL with your own Ethereum Network API
  • PRIVATE_KEY with your Ethereum wallet's private key
  • API_KEY with your Etherscan's API Key

Then run the following command.

npx hardhat run scripts/deploy.js --network goerli
npx hardhat verify --network goerli YOUR_SMARTCONTRACT_ADDRESS "CONSTRUCTOR ARG1" "CONSTRUCTOR ARG2"

React & Next Js

Head to my-app folder:

npm install

Replace the variable inside this folder:

  • CRYPTODEVS_NFT_CONTRACT_ADDRESS with compiled ABI of NFT-Collection contract.
  • CRYPTODEVS_NFT_ABI with deployed contract of NFT-Collection contract.
  • CRYPTODEVS_DAO_ABI with compiled ABI of this contract
  • CRYPTODEVS_DAO_CONTRACT_ADDRESS with deployed contract of this contract

To run the app locally:

npm run dev

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors