返回
项目

DAO

What is DAO? A DAO is a decentralized autonomous organization. In the DAO course, we will learn to write a simplified contract for DAO proposal voting and execution.

语言solidity
难度简单
总时长1.7小时

目标学习者

这门课是给谁上的

  • Researchers who are interested in blockchain governance
  • Developers who are interested in decentralized autonomous organizations (DAOs)
  • Developers looking to delve deeper into Solidity programming applications

要求

  • Basic understanding of the concept of DAOs
  • Basic Solidity programming skills, with a recommendation to first complete foundational Solidity courses (at least Solidity 101 to 104)
  • Possess an Ethereum account, connected to both Mantle and a wallet, holding either Mantle tokens or test tokens (for those wishing to perform real on-chain operations, though deployment can also be done directly in a local environment if test tokens are not available)

你会学到什么

  • Writing projects in the contract language Solidity to implement the most simplified DAO organizational governance, including proposal creation, voting, and execution of proposals
  • How to use a wallet to initiate transactions to deploy projects on the blockchain and view corresponding information
createProposal
vote
executeProposal

课程安排

  • Define Contracts and Interface

    In this unit, we'll define the contract and design interface for DAOs.


  • Define Proposal Struct and Example Proposal

    In this unit, we'll define a DAO Proposal struct and create a sample proposal contract.


  • mockBalance

    In this unit, we'll implement the functionality to add members to our DAO and assign them voting power.


  • createProposal

    In this unit, we'll implement proposal creation and decentralized voting in the DAO contract.


  • vote (1)

    In this unit, we'll begin implementing the vote function for our DAO contract


  • vote (2)

    In this unit, we'll implement the voting mechanism and track members' votes in our DAO contract.


  • executeProposal (1)

    In this unit, we'll initiate the process to execute a passed proposal in our DAO contract


  • executeProposal (2)

    In this unit, we'll execute the proposal upon achieving a majority vote and update its status in the DAO contract.

practice

DAO

41 小节
移动和桌面设备访问