2

I have built my own custom plugin for Aragon OSx, but I'm unsure how to install it into my Aragon DAO.

2 Answers 2

0

In order to use your plugin, you want to install it in your DAO. Installation is done through a proposal action - so that when the proposal passes, executing the action installs the plugin. You can understand "installation" as calling on the prepareInstallation function from your plugin's PluginSetup contract and granting the required permissions to the DAO so it can connect with the plugin.

Here's how to do it:

1. Prepare the plugin installation item: In order to apply the installation, we will need to first prepare the plugin install item. We can do this through using the SDK function called prepareInstallation item. https://devs.aragon.org/docs/sdk/examples/client/prepare-installation

2. Encode the action to apply the installation: In order to create a proposal with the installation action, we need encode the prepareInstallation action. You can do this through using this SDK function. https://devs.aragon.org/docs/sdk/examples/encoders-decoders/apply-installation

2. Create a proposal with an action: Now that the action is encoded, we can use it to pass it when creating the proposal. The easiest way to do this is to use our createProposalWithAction SDK function. https://devs.aragon.org/docs/sdk/examples/tokenVoting-client/create-proposal-with-actions -- keep in mind, depending on the governance mechanism you're using, you may want to check out the multisig version of "create proposal with action" also found within the docs

3. Approve proposal: Getting proposal approved by DAO members is the next step after publishing the proposal. This can happen through the Aragon App.

4. Execute action: Once the proposal is approved by members, you'll be able to execute the action into the DAO and your plugin will be installed! You can execute it through the Aragon App as well.

5. Using the plugin: To use the plugin, you can call on it's Plugin contract's address using a tool like ethers.js or wagmi hooks.

-- updates coming on the developer experience side to streamline this process.

-1

As a reference, plugins consist of two key contracts:

  • the Plugin contract itself containing all the logic used to extend DAOs' functionalities
  • the PluginSetup contract which contains the installation/uninstallation logic for the plugin into the DAO

So - plugins can be installed in two different ways:

  1. When you create your DAO

  2. Via proposal when the DAO already exists

  3. If you want to install your plugin upon DAO creation, you will need to pass the params that you want your PluginSetup to receive. You can find detailed explanation about this here.

  4. If you want to install on an already existing DAO, you will need:

    • Run an unprivileged prepareInstallation() function (found in the PluginSetupProcessor contract) so that your PluginSetup deploys the needed stuff and adds the "installation request" to the PluginSetupProcessor.
    • Use an existing plugin on the DAO (multisig, token voting, etc) to create a proposal that executes applyInstallation(...) on the install you started before.

The concept of a Proposal, is something that every plugin decides to handle in its very own way. There is no DAO-level concept of a proposal. Plugin's have permissions, that's all the DAO knows.

So, if you want the DAO to execute something like applying the installation of a plugin, you'll need to ask a plugin with EXECUTE_PERMISSION to go and handle it (via proposal, via dictatorship, via calling whatever address, etc -- this is based on the governance plugin of your DAO).

Regarding the SDK, there are two types of scenarios:

  • The general purpose Client, which handles things that affect all DAOs
  • The plugin-specific Clients

Future versions of the UI will greatly improve and expand on the case of a plugin using another one to create proposals. But as of today, the use case of installing a plugin after a DAO is created requires some manual handling on the SDK side still.

2
  • In part 3 of your answer, the docs seems to be missing a critical part. The TokenVotingClient is coming from the sdk, but where do we import or define the specific plugin that has been custom built and deployed? May 8, 2023 at 12:34
  • Hey @YanDigilov, I'm not sure I'm following your question. You need to prepareInstallation of your custom plugin and then pass the encoded installation into the plugins attribute when creating your DAO. You can find an example of how we do this within the SDK for our own plugins: github.com/aragon/sdk/blob/develop/modules/client/src/… May 9, 2023 at 16:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.