DAO-Voting-System
所属分类:NFT
开发工具:JavaScript
文件大小:8KB
下载次数:0
上传日期:2022-02-24 01:55:02
上 传 者:
sh-1993
说明: 在这个项目中,您将为去中心化的自治组织(DAO)编写一个治理智能合约...
(In this project you re going to write a governance smart contract for a decentralized autonomous organization (DAO) aimed at buying valuable NFTs.)
文件列表:
contracts (0, 2022-02-24)
contracts\AcroDAO.sol (7913, 2022-02-24)
contracts\NftMarketplace.sol (1313, 2022-02-24)
contracts\Proposal.sol (900, 2022-02-24)
hardhat.config.js (572, 2022-02-24)
package.json (1121, 2022-02-24)
scripts (0, 2022-02-24)
scripts\script.js (688, 2022-02-24)
test (0, 2022-02-24)
test\ AcroDAO.js (10711, 2022-02-24)
# DAO Voting System
In this project you're going to write a governance smart contract for a decentralized autonomous organization (DAO) aimed at buying valuable NFTs. In doing so, you will:
- Implement a treasury contract that buys NFTs
- Implement a voting system with signature votes
- Implement a proposal system that calls arbitrary functions.
## Project Spec
You are writing a contract for Collector DAO, a DAO that aims to collect rare NFTs. This DAO wishes to have a contract that:
- Allows anyone to buy a membership for 1 ETH
- Allows a member to propose an NFT to buy
- Allows members to vote on proposals:
- With a 25% quorum
- If passed, have the contract purchase the NFT in a reasonably automated fashion.
Implementation requirements:
- Even though this DAO has one main purpose, write your proposal system to support calling arbitrary functions, then use this to implement the NFT-buying behavior.
- Write a function that accepts, validates, and writes vote signatures. Then write a function to do this in bulk.
Here is the interface you can assume exists for buying NFTs:
```
interface NftMarketplace {
function getPrice(address nftContract, uint nftId) external returns (uint price);
function buy(address nftContract, uint nftId) external payable returns (bool success);
}
```
近期下载者:
相关文件:
收藏者: