Plugin Repositories
As mentioned earlier, plugins built by Aragon and third-party developers can be added and removed from your DAO to adapt it to your needs.
The management of these plugins is handled for you by the Aragon OSx protocol so that the process of releasing new plugins as well as installing, updating, and uninstalling them to your DAO becomes as streamlined as possible.
What Does a Plugin Consist Of?
An Aragon OSx Plugin consists of:
-
The
PluginSetup
contract-
referencing the
Plugin
implementation internally -
containing the setup instruction to install, update, and uninstall it to an existing DAO
-
-
A metadata URI pointing to a
JSON
file containing the-
AragonApp frontend information
-
Information needed for the setup ABI
-
-
A version tag consisting of a
-
Release number
-
Build number
-
A detailed explanation of the build and release versioning is found in the Guides sections in our developer portal.
The PluginSetup
is written by you, the plugin developer. The processing of the setup is managed by the PluginSetupProcessor
, the central component of the setup process in the Aragon OSx framework, which is explained in the section The Plugin Setup Process.
Each plugin with its different builds and releases is versioned inside its own plugin repositories in a PluginRepo
contract.
Plugin Repositories
Each plugin has its own Plugin Repository, unique ENS name, and on-chain repository contract, the PluginRepo
, in which different versions of the plugin are stored for reference using version tags constituted by a release and build number.
Different versions might contain:
-
bug fixes
-
new features
-
breaking changes
PluginRepo
contracts themselves, each associated with a different plugin, are registered in the Aragon OSx PluginRepoRegistry
and carry their own ENS name that the creator chooses. The PluginRepoRegistry
contract is described in the upcoming subsection.
Overview of the plugin versioning and registry in the Aragon OSx protocol. The PluginRepoRegistry
contract, which is a curated list of ENS named PluginRepo
contracts, is shown on the left. Each PluginRepo
contract maintains a list of versions of the PluginSetup
contract (internally referencing the Plugin
implementation contract) and the associated UI building blocks as a URI, exemplarily shown on the right.
The PluginRepo
Contract
The PluginRepo
contract versions the releases of a Plugin
. The first version of a plugin is always published as release 1 and build 1 (version tag 1.1
).
When you publish the first plugin version, a new plugin repository is automatically created for you by the Aragon OSx protocol in which you
are the maintainer. The creation process is described in the plugin repo creation process section.
The PluginRepo
contract is UUPS upgradeable, inherits from the PermissionManager
and allows the maintainer of the repository to create new versions with the createVersion
function:
/// @notice 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.
/// @param _release The release number.
/// @param _pluginSetupAddress The address of the plugin setup contract.
/// @param _buildMetadata The build metadata URI.
/// @param _releaseMetadata The release metadata URI.
function createVersion(
uint8 _release,
address _pluginSetup,
bytes calldata _buildMetadata,
bytes calldata _releaseMetadata
) external auth(address(this), MAINTAINER_PERMISSION_ID);
The function receives four input arguments:
-
The
_release
number to create the build for. If the release number exists already (e.g., release1
), it is registered as the latest build (e.g.,1.3
if the previous build was1.2
). If it is a new release number, the build number is1
(e.g.,2.1
). -
The address of
PluginSetup
contract internally referencing the implementation contract (to copy, proxy, or clone from it) and taking care of installing, updating to, and uninstalling this specific version. -
The
_buildMetadata
URI pointing to a JSON file containing the UI data, setup data, and change description for this specific version. -
The
_releaseMetadata
URI pointing to a JSON file containing the plugin name, description, as well as optional data such as images to be shown in the aragonApp frontend.
Other functions present in the contract allow you to query previous versions and to update the release metadata. The PluginRepo
is created for you when you publish the PluginSetup
contract of your first version to the Aragon OSx protocol, which is explained in the next section: The Plugin Repo Creation Process.
For more details visit the PluginRepo reference guide entry.
|