In summary, this Ethereum smart contract is an implementation of a decentralized autonomous organization (DAO). The DAO is designed to allow participants to make proposals and vote on them to make decisions about the organization. The contract has several functions that allow users to create proposals, vote on existing proposals, execute approved proposals, and check various information about proposals and votes. The contract uses two interfaces: IFakeNFTMarketplace
and ICryptoDevsNFT
, which allow the contract to interact with a fake non-fungible token (NFT) marketplace and a specific NFT called "CryptoDevsNFT"
. The contract also has several modifiers that restrict certain functions to only be called by certain types of users or in certain circumstances.
- 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
You can see the smart contract on Etherscan: Project.
# Clone this project
$ git clone https://github.com/gab0071/DAO-BACKEND
# Access
$ cd DAO-BACKEND
# Install dependencies
$ npm install
- $
npx hardhat compile
- $
npx hardhat run scripts/deploy.js
- $
npx hardhat verify --constructor-args args.js DEPLOYED_CONTRACT_ADDRESS --network goerli
In the folder constants/index.js
:
// Replace the value with your NFT contract address
const CRYPTODEVS_NFT_CONTRACT_ADDRESS =
"YOUR_CRYPTODEVS_NFT_CONTRACT_ADDRESS_HERE";
module.exports = { CRYPTODEVS_NFT_CONTRACT_ADDRESS };
- Solidity
- Metamask
- OpenZeppelin
- Hardhat Framework
- Etherscan
This project is under license from MIT. For more details, see the LICENSE file.
Contributions are always welcome! Open a PR or an issue!
Made with ❤️ by catellaTech.