0

I want to create my own plugin for the aragonOSx framework, but I'm unsure whether I need to submit my plugin into Aragon's pluginRepo or if I can use a developed plugin from a personal repoRegistry contract?

1 Answer 1

0

You can build your own custom plugin!

Here's how: https://devs.aragon.org/docs/core/how-to-guides/plugin-development/implemention/

TLDR:

  1. you'll want to build your Plugin contract, which contains the logic of your plugin + build a PluginSetup contract which contains all the instructions regarding installing, uninstalling, updating a plugin for a DAO.
  2. then, you want to use the createPluginRepoWithFirstVersion function from the PluginRepoFactory.sol contract and pass it the address of your PluginSetup.sol contract. And you're done - your plugin will be published in the aragonOSx protocol for anyone to use!!

Here's an example of an Aragon Multisig plugin:

For some additional context on publishing:

The way it works is the PluginSetup contract holds a connection to your Plugin contract and any other Helper contracts. It is the one who sets the permissions for everything to work and presents the instructions on how to install this version of your Plugin in your DAO. So, what you're doing when you call on the createPluginRepoWithFirstVersion from the PluginRepoFactory.sol contract is that you're generating a PluginRepo for your plugin with this specific PluginSetup as your first version. That way, when you want to update your plugin, you can simply update the version in your PluginRepo contract and submit a new PluginSetup contract. The PluginRepo is your homebase for all versions of a given plugin and is an array filled with previous PluginSetup contract addresses from previous versions.

For additional context if needed:

  1. Here is the createPluginRepoWithFirstVersion from the PluginRepoFactory - which creates the first version of a plugin and adds it to the PluginRepoRegistry: https://github.com/aragon/core/blob/develop/packages/contracts/src/framework/plugin/repo/PluginRepoFactory.sol#L48
  2. This is how the PluginRepoFactory knows the PluginRepoRegistry: https://github.com/aragon/core/blob/da1278afd8263f7cc13973853bd3b58a352a1ec8/packages/contracts/src/framework/plugin/repo/PluginRepoFactory.sol#L15
  3. Once the PluginRepo with the initial version in it is created, subsequent versions are released through the PluginRepo contract for that plugin, which is registered in the PluginRepoRegistry after you call on the createPluginRepoWithFirstVersion: https://github.com/aragon/core/blob/da1278afd8263f7cc13973853bd3b58a352a1ec8/packages/contracts/src/framework/plugin/repo/PluginRepo.sol#L134

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.