Skip to main content

DAORegistry

Description

This contract provides the possibility to register a DAO.

Implementation

public variable REGISTER_DAO_PERMISSION_ID

The ID of the permission required to call the register function.

bytes32 REGISTER_DAO_PERMISSION_ID

public variable subdomainRegistrar

The ENS subdomain registrar registering the DAO subdomains.

contract ENSSubdomainRegistrar subdomainRegistrar

error InvalidDaoSubdomain

Thrown if the DAO subdomain doesn't match the regex [0-9a-z\-]

error InvalidDaoSubdomain(string subdomain)

event DAORegistered

Emitted when a new DAO is registered.

event DAORegistered(address dao, address creator, string subdomain)
InputTypeDescription
daoaddressThe address of the DAO contract.
creatoraddressThe address of the creator.
subdomainstringThe DAO subdomain.

public function constructor

constructor() public

Used to disallow initializing the implementation contract by an attacker for extra safety.

external function initialize

Initializes the contract.

function initialize(contract IDAO _managingDao, contract ENSSubdomainRegistrar _subdomainRegistrar) external
InputTypeDescription
_managingDaocontract IDAOthe managing DAO address.
_subdomainRegistrarcontract ENSSubdomainRegistrarThe ENSSubdomainRegistrar where ENS subdomain will be registered.

external function register

Registers a DAO by its address. If a non-empty subdomain name is provided that is not taken already, the DAO becomes the owner of the ENS name.

function register(contract IDAO dao, address creator, string subdomain) external
InputTypeDescription
daocontract IDAOThe address of the DAO contract.
creatoraddressThe address of the creator.
subdomainstringThe DAO subdomain.

A subdomain is unique within the Aragon DAO framework and can get stored here.

© 2024