This repo contains coursework project from LearnWeb3 completed by 0xsenzel for LearnWeb3DAO-Sophomore lesson.
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.
Fig.1 - User with no NFT Create Proposal
Fig.2 - User with NFT Create Proposal
Fig.3 - View Proposal Tab
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_URLwith your own Ethereum Network APIPRIVATE_KEYwith your Ethereum wallet's private keyAPI_KEYwith 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"
Head to my-app folder:
npm install
Replace the variable inside this folder:
CRYPTODEVS_NFT_CONTRACT_ADDRESSwith compiled ABI of NFT-Collection contract.CRYPTODEVS_NFT_ABIwith deployed contract of NFT-Collection contract.CRYPTODEVS_DAO_ABIwith compiled ABI of this contractCRYPTODEVS_DAO_CONTRACT_ADDRESSwith deployed contract of this contract
To run the app locally:
npm run dev