Skip to main content

Creating a DAO

The DAO Creation Process

Two framework contracts manage the DAO contract creation process:

DAOFactory

The DAOFactory creates and sets up a DAO for you in four steps with the createDao function. The function requires the DAOSettings including

as well as an array of PluginSettings containing PluginSetup contract references and respective setup data for the initial set of plugins to be installed on the DAO.

The DAOFactory create the DAO in four steps and interacts with the DAORegistry and being also part of the Aragon OSx framework:

  1. Creates a new DAO by deploying an ERC-1967 proxy pointing to the latest Aragon OSx DAO implementation and becomes the initial owner.

  2. Registers the new contract in the DAORegistry.

  3. Installs the plugins using the PluginSetupProcessor (see also the section about the plugin setup process).

  4. Sets the native permissions of the DAO and revokes its own ownership.

For more details visit the DAOFactory reference guide entry.

DAORegistry

The DAORegistry is used by the DAOFactory and contains the register function

@aragon/framework/dao/DAORegistry.sol
function register(
IDAO dao,
address creator,
string calldata subdomain
) external auth(REGISTER_DAO_PERMISSION_ID);

requiring the REGISTER_DAO_PERMISSION_ID permission currently held only by the DAOFactory.

If the requested ENS subdomain name is valid and not taken, the DAORegistry registers the subdomain and adds the DAO contract address to the DAORegistry. If the subdomain parameter is non-empty (not "") and still available, the ENS name will be registered. If the registration was successful, the DAO name, contract and creator addresses are emitted in an event.

For more details visit the DAORegistry reference guide entry.

© 2024