🔍 This plugin is designed to enable the creation of sub-DAOs within a parent DAO, effectively allowing one decentralized autonomous organization (DAO) to act as a sub-entity of another. It's built on the Aragon platform, leveraging its robust framework for DAO operations. This functionality is crucial for complex governance structures, enabling hierarchical management and modular organization of decentralized communities or projects.
🎥 Watch our tiny Demo Here: Watch the Demo
🔥 The Pattern SubDAO Plugin offers a range of functionalities tailored for efficient DAO management and integration. Key features include:
- Create New DAO: Facilitates the creation of new DAOs .
- SubDAO Integration: Enables one DAO to become a subdao of another.
- Compatibility with Plugins: Works in conjunction with both the official token voting plugin and the multisig plugin.
- Plugin Settings Management: Allows for the update and management of settings in the mentioned plugins.
- Integration Tests as Examples: Comes with integration tests that not only ensure reliability but also serve as practical examples for developers during coding.
👣 Follow these steps to install and set up the Pattern SubDAO Plugin:
-
Navigate to the Scripts Directory: Change your current directory to
./scripts
in your terminal.cd ./scripts
-
Environment Setup: Rename the
.env.example
file to.env
and update it with your specific details.mv .env.example .env # Edit the .env file with your detail
-
Install Dependencies: Use
bun
to install necessary dependencies.bun install
-
Run Plugin Installation: Execute the plugin installation command with the required parameters.
bun plugininstall -n [NETWORK] -c [CHILD_DAO_ADDRESS_OR_ENS] -p [PARENT_DAO_ADDRESS_OR_ENS]
Replace
[NETWORK]
,[CHILD_DAO_ADDRESS_OR_ENS]
, and[PARENT_DAO_ADDRESS_OR_ENS]
with the appropriate values for your setup. The pluginRepo has already been registered on Goerli, Mumbai and Polygon networks and you can use these network without any additonal steps.Network Plugin Repo Address goerli 0x44B7C01C5101bb94B4fA9A7f72c42bcAA87979Ca
polygon 0x927273f4a0f1eb268c6a11c63882a57ce404f1c0
polygonMumbai 0x1a8A1fcF888bB053da7baeF3F4c1C8129987CeCc
To use the contract on other networks take the following steps:
- Navigate to the subdao-plugin directory
- Run
yarn install
- Rename
.env.example
to.env
- Update the
.env
file with your credentials - Add hardhat config per your need
- Add your plugin repo and rpc details to
/src/lib/constants.ts
- Run
yarn deploy --network [NETWORK_NAME]
-
Creating a DAO: Find the test script that demonstrates how to create a new DAO or simply create your DAO through Aragon interface.
-
Making a DAO SubDAO of Another DAO: Run plugininstallation as mentioned in the Installation section.
-
Add Approver to Multisig Plugin:
bun changevotingsetting -c [CHILD_DAO_ADDRESS_OR_ENS] -p [PARENT_DAO_ADDRESS_OR_ENS] -n [NETWORK] -s [SUB_DAO_PLUGIN_ADDRESS] -f multisigAddAddresses '["NEW_MEMBER_ADDRESS_1","NEW_MEMBER_ADDRESS_2,...]'
-
Remove Approvers from Multisig Plugin:
bun changevotingsetting -c [CHILD_DAO_ADDRESS_OR_ENS] -p [PARENT_DAO_ADDRESS_OR_ENS] -n [NETWORK] -s [SUB_DAO_PLUGIN_ADDRESS] -f multisigRemoveAddresses '[NEW_MEMBER_ADDRESS_1,NEW_MEMBER_ADDRESS_2,...]'
Replace
[NETWORK]
,[CHILD_DAO_ADDRESS_OR_ENS]
,[PARENT_DAO_ADDRESS_OR_ENS]
,[SUB_DAO_PLUGIN_ADDRESS]
andNEW_MEMBER_ADDRESS_$
with the appropriate values for your setup. -
Add Approver to Token Voting Plugin:
bun changevotingsetting -c [CHILD_DAO_ADDRESS_OR_ENS] -p [PARENT_DAO_ADDRESS_OR_ENS] -n [NETWORK] -s [SUB_DAO_PLUGIN_ADDRESS] -f tokenVotingIncreaseAddressVotingPower '[NEW_MEMBER_ADDRESS_1,NEW_MEMBER_ADDRESS_2,...]' '[AMOUNT_1, AMOUNT_2,...]'
Replace
[NETWORK]
,[CHILD_DAO_ADDRESS_OR_ENS]
,[PARENT_DAO_ADDRESS_OR_ENS]
,[SUB_DAO_PLUGIN_ADDRESS]
,NEW_MEMBER_ADDRESS_$
andAMOUNT_$
with the appropriate values for your setup.
To understand how to interact with the contracts, navigate to the ./scripts/tests
directory. Each test script serves as a practical guide, providing real code examples for these operations. Make sure to read through these scripts to get a clear understanding of how to effectively use the Pattern SubDAO Plugin's contract functionalities.