This Dapp is for the DAO. You want to launch a DAO for holders of your CryptoDevs NFTs. From the ETH that was gained through the ICO, you built up a DAO Treasury. The DAO now has a lot of ETH, but currently does nothing with it.
You want to allow your NFT holders to create and vote on proposals to use that ETH for purchasing other NFTs from an NFT marketplace, and speculate on price. Maybe in the future when you sell the NFT back, you split the profits among all members of the DAO.
Created as part of the Learn Web3 DAO Sophmore Tack.
This code was written for Decentralized Autonomous Organization Tutorial
- Anyone with a CryptoDevs NFT can create a proposal to purchase a different NFT from an NFT marketplace
- Everyone with a CryptoDevs NFT can vote for or against the active proposals
- Each NFT counts as one vote for each proposal
- Voter cannot vote multiple times on the same proposal with the same NFT
- If majority of the voters vote for the proposal by the deadline, the NFT purchase is automatically executed
- To be able to purchase NFTs automatically when a proposal is passed, you need an on-chain NFT marketplace that you can call a purchase() function on. There exist a lot of NFT marketplaces out there, but to avoid overcomplicating things, we will create a simplified fake NFT marketplace for this tutorial as the focus is on the DAO.
- We will also make the actual DAO smart contract using Hardhat.
- We will make the website using Next.js to allow users to create and vote on proposals
Let's start building 🚀
- This is a Next.js project bootstrapped with
create-next-app
.
- Chain: Ethereum
- Network: Rinkeby
- Languages: Solidity, JavaScript
- Deployed to Rinkeby FakeNFTMarketplace Contract:
0x1200Bf5714934fa2f0f9bD26294b8635116bc0C5
- Deployed to Rinkeby CryptoDevsDAO Contract:
0x94537461B3A951a9a1c07F223C7025fF6E6bA25c
- Rinkeby Contract Link on Etherscan: https://rinkeby.etherscan.io/address/0x1200Bf5714934fa2f0f9bD26294b8635116bc0C5
- Rinkeby Contract Link on Etherscan: https://rinkeby.etherscan.io/address/0x94537461B3A951a9a1c07F223C7025fF6E6bA25c
- Live Website:
https://ico-airdrop-mikexd-dev.vercel.app/
First, run the development server:
npm run dev
# or
yarn dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying pages/index.js
. The page auto-updates as you edit the file.
API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.js
.
The pages/api
directory is mapped to /api/*
. Files in this directory are treated as API routes instead of React pages.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.