Skip to content

antazoey/ethdenver2025-chairman-dao

Repository files navigation

ETH Denver 2025 Chairman DAO Project

Brought to you by the Snek-oil Shillers.

Project Idea

Chairman DAO is a DAO framework for worker-owned cooperatives built on ICP.

Prerequisites

  • dfx tool: follow this guide
  • Rust, including wasm32-unknown-unknown:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup default stable
rustup target add wasm32-unknown-unknown
  • NPM and typescript

Install

Once all prerequisites are installed, install the project by doing:

npm install

Running a DAO

First, ensure you have the canisters created for your instance by running:

npm run setup

All the canister should have been created. Next, you can build the service by doing:

npm run build

NOTE: For some reason, at this point I have to edit the src/declarations/chairman_dao/index.js declaration file to hardcode the canister ID in the `process.env:

const process = {
  env: {
    CANISTER_ID_CHAIRMAN_DAO: "<CANISTER_ID>",
    DFX_NETWORK: "local",
  }
}

If you are using the local ICP network, run:

dfx start --background --clean

Now that the service is built and the canisters are created, you can deploy the code to the canisters by running:

dfx deploy

NOTE: To deploy a demo coffee-shop DAO, run the deploy_demo script:

# First, create the Alice, Bob, and Chris identities if you need to.
dfx identity get-principal --identity Alice
dfx identity get-principal --identity Bob
dfx identity get-principal --identity Chris

# Then, run the deploy demo script
npm run deploy-demo

# NOTE: On certain systems (windows), you may just need to run the script manually:
./deploy_demo.sh

Launch the development server to see your DAO:

npm start

To teardown your development network, run:

dfx stop

Developing

If you make changes to the server, you will need to re-generate the candid files. First, build the service:

cargo build --release --target wasm32-unknown-unknown --package chairman_dao

Then, update the candid file:

candid-extractor target/wasm32-unknown-unknown/release/chairman_dao.wasm > src/chairman_dao/src/chairman_dao.did

If needing to generate the declarations files for the frontend, run:

dfx generate

Attribution

Much inspiration for the smart-contract came from the official ICP example DAO.

About

The Chairman DAO project from the Snekoil Shillers for ETHDenver 2025

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors