Creating a DAO
The DAO Creation Process
Two framework contracts manage the DAO
contract creation process:
- The
DAOFactory
- The
DAORegistry
.
DAOFactory
The DAOFactory
creates and sets up a DAO
for you in four steps with the createDao
function. The function requires the DAOSettings
including
- The trusted forwarder address for future ERC-2771 (Meta Transaction) compatibility that is set to
address(0)
for now - The ENS name (to be registered under the
dao.eth
domain) - The ERC-4824 (Common Interfaces for DAOs)
daoURI
- Optional metadata
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:
-
Creates a new DAO by deploying an ERC-1967 proxy pointing to the latest Aragon OSx
DAO
implementation and becomes the initial owner. -
Registers the new contract in the
DAORegistry
. -
Installs the plugins using the
PluginSetupProcessor
(see also the section about the plugin setup process). -
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
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.