Skip to content
ホーム » Simplified DAO construction

Simplified DAO construction

A basic and technical explanation of DAO construction using Solidity. The process of proposing, voting, and executing will be explained in an easy-to-understand manner."

Simple DAO built with Ethereum smart contracts using Solidity

Table of Contents

Introduction.

The University of Tokyo's "Blockchain Innovation Endowed Program", where students can learn the basics of building a DAO (Decentralized Autonomous Organization) using Solidity, the most suitable language for developing smart contracts for Ethereum, will be explained. The following is an overview of the University of Tokyo's "Blockchain Innovation Endowed Program".

A DAO is a self-sustaining decentralized organization, a decentralized decision-making system designed to bridge the blockchain. Students will learn the basic technology for implementing this system through actual contract development.

Refurbishment of DAO construction using Solidity


DAO construction realized with Solidity

DAO construction flow

  1. Building a Development Environment Foundry" and "Visual Studio Code" are recommended for Solidity development. These tools are used to develop the development environment.
  2. Basic Structure Implementation This DAO is constructed with the following basic flow
    • Propose Function for DAO members to develop new proposals.
    • Vote: Vote Ability to vote Yes/No on proposals.
    • Tally (aggregate):. Voting results are tallied by majority vote.
    • Execute:. Function to be performed if the proposal is approved.
  3. Meta Contract implementation The Meta Contract framework simplifies data structures and improves deployment efficiency in DAO development.
  4. Design of data structures and state transitions
    • ER Diagram:. Created a model that formalizes the proposed data structure.
    • State Transition Diagrams:. Analyzes a series of DAO operation flows and maps element states.
DAO construction realized with Solidity

Technical Explanation

Smart Contract Structure

DAO is implemented based on the following structure

  • GlobalState:. A data structure that manages the status of proposals and votes.
  • Proposal:. More information about the proposal.
    • Include proposer, start time, voting results, etc.
  • Vote: Vote for the Stores individual voting information.

DAO state transition

DAO activities are carried out through the following state transitions

  1. Initial condition: 1 State that no proposal has been made.
  2. Proposal Submission:. DAO members submit proposals.
  3. Polling state:. A vote will be taken on the proposal.
  4. Executable status: "Executable The state in which the proposal was approved.

Testing and Deployment Process

After DAO development, it must be tested and deployed to the network.

  1. Testing Basics: 1. Find bugs and ensure proper operation through automated testing.
    • Fuzzy and combinatorial testing using Foundry.
  2. Deployment flow:. Deploy to a local network and verify operation on a test net or production environment.
  3. Using Meta Contract DevKit:. Using the basic operations of Meta Contract, simple deployment of contracts is achieved.
    • mc.init():. Prepare a new bundle
    • mc.use():. Register features in bundles
    • mc.deploy():. Perform compilation of information for deployment
Test and deploy smart contracts

Glossary of Technical Terms

  • DAO (Decentralized Autonomous Organization) Self-supporting and decentralized organization.
  • Solidity: Solidity Programming language for developing smart contracts for Ethereum.
  • Foundry:. A framework for Solidity development.
  • TDD (Test-Driven Development) Test-driven development.
  • Meta Contract: The A framework that simplifies contracts and provides precise management of data structures.

DAO development is a major area of Web3 and one that is full of promise. We hope that this article will serve as inspiration for those interested in DAO to take on the challenge of development.

Related Links

Development Environment and Tools

Solidity related

Test and Deploy

Related article (Blockchain Public Lecture Series):

Leave a Reply

Your email address will not be published. Required fields are marked *

en_USEnglish