Framework Contracts API
The natspec generated API for the framework contracts. You can also find the contracts on the following repository.
Factories
DAOFactory
This contract is used to create a DAO.
constructor(contract DAORegistry _registry, contract PluginSetupProcessor _pluginSetupProcessor) public
supportsInterface(bytes4 _interfaceId) → bool public
Checks if this or the parent contract supports an interface by its ID.
PluginRepoFactory
This contract creates PluginRepo proxies and registers them on a PluginRepoRegistry contract.
supportsInterface(bytes4 _interfaceId) → bool public
Checks if this or the parent contract supports an interface by its ID.
createPluginRepo(string _subdomain, address _initialOwner) → contract PluginRepo external
Creates a plugin repository proxy pointing to the pluginRepoBase implementation and registers it in the Aragon plugin registry.
createPluginRepoWithFirstVersion(string _subdomain, address _pluginSetup, address _maintainer, bytes _releaseMetadata, bytes _buildMetadata) → contract PluginRepo pluginRepo external
Creates and registers a PluginRepo with an ENS subdomain and publishes an initial version 1.1.
After the creation of the PluginRepo and release of the first version by the factory, ownership is transferred to the _maintainer address.
Registries
DAORegistry
This contract provides the possibility to register a DAO.
InvalidDaoSubdomain(string subdomain) error
Thrown if the DAO subdomain doesn’t match the regex [0-9a-z\-]
PluginRepoRegistry
This contract maintains an address-based registry of plugin repositories in the Aragon App DAO framework.
PluginRepoRegistered(string subdomain, address pluginRepo) event
Emitted if a new plugin repository is registered.
MemberRegistry
The ENS registry and resolver are trusted, known mainnet contracts. No reentrancy guard is needed — the contract is the sole caller of its own ENS operations.
initialize(contract IDAO _managementDao, contract ENS _ens, string _domain, address _resolver) external
register(string subdomain) external
Register as a member by claiming a subdomain. Permissionless. One subdomain per address. Reverts if already registered (release first).
release() external
Voluntarily release your subdomain. Permissionless. Only releases the caller’s own subdomain. Reverts if not registered.
evict(string subdomain, address newController) external
Forcibly evict a subdomain, optionally re-assigning it to a new controller. Governed. Requires EVICT_SUBDOMAIN_PERMISSION_ID on this contract (OSx permission system). If newController is the zero address, the subdomain is fully released (records cleared, subnode released). If newController is non-zero, the same subdomain is re-assigned to it as if it had called register itself: ENS subnode re-created, addr record set to newController, per-node resolver approval granted to it. Reverts if the subdomain is unknown, if newController already controls it, or if newController is already registered with a different subdomain.
Framework
PluginRepo
The plugin repository contract required for managing and publishing different plugin versions within the Aragon DAO framework.
InvalidPluginSetupInterface() error
Thrown if a plugin setup contract does not inherit from PluginSetup.
InvalidReleaseIncrement(uint8 latestRelease, uint8 newRelease) error
Thrown if a release number is incremented by more than one.
PluginSetupAlreadyInPreviousRelease(uint8 release, uint16 build, address pluginSetup) error
Thrown if the same plugin setup contract exists already in a previous releases.
initialize(address initialOwner) external
Initializes the contract by - initializing the permission manager - granting the MAINTAINER_PERMISSION_ID permission to the initial owner.
This method is required to support [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822).
initializeFrom(uint8[3] _previousProtocolVersion, bytes _initData) external
Initializes the pluginRepo after an upgrade from a previous protocol version.
This function is a placeholder until we require reinitialization.
createVersion(uint8 _release, address _pluginSetup, bytes _buildMetadata, bytes _releaseMetadata) external
Creates a new plugin version as the latest build for an existing release number or the first build for a new release number for the provided PluginSetup contract address and metadata.
updateReleaseMetadata(uint8 _release, bytes _releaseMetadata) external
Updates the metadata for release with content @fromHex(_releaseMetadata).
getLatestVersion(uint8 _release) → struct PluginRepo.Version public
Returns the latest version for a given release number.
getLatestVersion(address _pluginSetup) → struct PluginRepo.Version public
Returns the latest version for a given plugin setup.
PluginSetupProcessor
This contract is temporarily granted the ROOT_PERMISSION_ID permission on the applying DAO and therefore is highly security critical.
SetupApplicationUnauthorized(address dao, address caller, bytes32 permissionId) error
Thrown if a setup is unauthorized and cannot be applied because of a missing permission of the associated DAO.
This is thrown if the APPLY_INSTALLATION_PERMISSION_ID, APPLY_UPDATE_PERMISSION_ID, or APPLY_UNINSTALLATION_PERMISSION_ID is missing.
PluginProxyUpgradeFailed(address proxy, address implementation, bytes initData) error
Thrown if the upgrade of an UUPSUpgradeable proxy contract (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)) failed.
IPluginNotSupported(address plugin) error
Thrown if a contract does not support the IPlugin interface.
PluginRepoNonexistent() error
Thrown if a plugin repository does not exist on the plugin repo registry.
SetupAlreadyPrepared(bytes32 preparedSetupId) error
Thrown if a plugin setup was already prepared indicated by the prepared setup ID.
SetupNotApplicable(bytes32 preparedSetupId) error
Thrown if a prepared setup ID is not eligible to be applied. This can happen if another setup has been already applied or if the setup wasn’t prepared in the first place.
InvalidUpdateVersion(struct PluginRepo.Tag currentVersionTag, struct PluginRepo.Tag newVersionTag) error
PluginAlreadyInstalled() error
Thrown if plugin is already installed and one tries to prepare or apply install on it.
InvalidAppliedSetupId(bytes32 currentAppliedSetupId, bytes32 appliedSetupId) error
Thrown if the applied setup ID resulting from the supplied setup payload does not match with the current applied setup ID.
InstallationPrepared(address sender, address dao, bytes32 preparedSetupId, contract PluginRepo pluginSetupRepo, struct PluginRepo.Tag versionTag, bytes data, address plugin, struct IPluginSetup.PreparedSetupData preparedSetupData) event
InstallationApplied(address dao, address plugin, bytes32 preparedSetupId, bytes32 appliedSetupId) event
Emitted after a plugin installation was applied.
UpdatePrepared(address sender, address dao, bytes32 preparedSetupId, contract PluginRepo pluginSetupRepo, struct PluginRepo.Tag versionTag, struct IPluginSetup.SetupPayload setupPayload, struct IPluginSetup.PreparedSetupData preparedSetupData, bytes initData) event
UpdateApplied(address dao, address plugin, bytes32 preparedSetupId, bytes32 appliedSetupId) event
Emitted after a plugin update was applied.
UninstallationPrepared(address sender, address dao, bytes32 preparedSetupId, contract PluginRepo pluginSetupRepo, struct PluginRepo.Tag versionTag, struct IPluginSetup.SetupPayload setupPayload, struct PermissionLib.MultiTargetPermission[] permissions) event
UninstallationApplied(address dao, address plugin, bytes32 preparedSetupId) event
Emitted after a plugin installation was applied.
prepareInstallation(address _dao, struct PluginSetupProcessor.PrepareInstallationParams _params) → address plugin, struct IPluginSetup.PreparedSetupData preparedSetupData external
applyInstallation(address _dao, struct PluginSetupProcessor.ApplyInstallationParams _params) external
prepareUpdate(address _dao, struct PluginSetupProcessor.PrepareUpdateParams _params) → bytes initData, struct IPluginSetup.PreparedSetupData preparedSetupData external
prepareUninstallation(address _dao, struct PluginSetupProcessor.PrepareUninstallationParams _params) → struct PermissionLib.MultiTargetPermission[] permissions external
applyUninstallation(address _dao, struct PluginSetupProcessor.ApplyUninstallationParams _params) external
validatePreparedSetupId(bytes32 pluginInstallationId, bytes32 preparedSetupId) public
Validates that a setup ID can be applied for applyInstallation, applyUpdate, or applyUninstallation.
If the block number stored in states[pluginInstallationId].blockNumber exceeds the one stored in pluginState.preparedSetupIdToBlockNumber[preparedSetupId], the prepared setup with preparedSetupId is outdated and not applicable anymore.