Aragon website • Developer Portal • Join our Developer Community • Contribute
The Aragon OSx protocol is the foundation layer of the new Aragon stack. It allows users to create, manage, and customize DAOs in a way that is lean, adaptable, and secure.
Within this monorepo, you will be able to find 3 individual packages:
The contents of this repository are distributed via 3 different NPM packages:
@aragon/osx
: The source files, including the protocol contracts and interfaces@aragon/osx-artifacts
: The contracts bytecode and ABI to use the protocol or deploy it@aragon/osx-ethers
: The TypeScript wrappers to use the protocol or deploy it using ethers.jsFor more information on the individual packages, please read the respective README.md
.
Our smart contracts undergo regular audits.
We'd love to hear what you think! If you want to build this with us, please find a detailed contribution guide in the CONTRIBUTION_GUIDE.md
file here.
If you believe you've found a security issue, we encourage you to notify us. We welcome working with you to resolve the issue promptly.
Security Contact Email: sirt@aragon.org
Please do not use the issue tracker for security issues.
Ensure you have Node and Yarn installed.
The latest Node version officially supported by OSx and Hardhat is 16. Node >=19 also works, but is technically unsupported by Hardhat. It's recommended to use a tool such as nvm to manage different node environments. Please see the relevant documentation for details.
Start by running yarn install
in the project root in your terminal.
Since the repo is set up as yarn workspace, all the linking is done automatically. When contributing, we recommend to cd
into each package, as this mirrors the workflow of the development team.
To review the contracts powering the Aragon OSx protocol, feel free to head to packages/contracts
.
The Aragon OSx protocol architecture is composed of two key sections:
Additionally to those two sections, we have developed several plugins DAOs can easily install upon creation. These are:
Let's dive into more detail on each of these sections.
The Core Contracts describe how every DAO generated by the Aragon OSx protocol will be set up. It is very lean by design and constitutes the most critical aspects of our architecture.
In a nutshell, each DAO is composed of 3 interconnecting components:
plugins
folder of the Core Contracts. Some examples of plugins that DAOs could install are:
The following graphic shows an exemplary DAO setup:
An examplary DAO setup showing interactions between the three core contract pieces triggered by different user groups: The DAO
and PermissionManager
contract in blue and red, respectively, as well as two Plugin
contracts in green. Bear in mind, the DAO
and Permission Manager
components both coexist within the same DAO
contract. Function calls are visualized as black arrows and require permission checks (red, dashed arrow). In this example, the permission manager determines whether the token voting plugin can execute actions on the DAO, a member can change its settings, or if an DeFi-related plugin is allowed to invest in a certain, external contract.
In contrast, the Framework Contracts are in charge of creating and registering DAOs and plugins. Additionally, these contracts contain the PluginSetupProcessor
which installs, uninstalls, and updates plugins into DAOs upon request.
PluginRepo
is the repository of versions for a given plugin. The PluginRepoFactory
contract creates a PluginRepo
instance for each plugin, so that plugins can update their versioning without complexity in a semantic way similar to the App Store.PluginRepo
addresses into our protocol so that DAOs can access all plugins published in the protocol.For a more detailed description of each of these components, please visit our Developer Portal.
Each plugin consists of two key components:
You can find all plugins built by the Aragon team here.
The Aragon OSx contracts emits events that get indexed within our subgraph
. This subgraph
, whose source code can be found here, is what then fuels the Aragon SDK.
The contract-ethers package is the NPM package that provides ethers.js
wrappers to use the Aragon OSx contracts.
To run tests, run these commands in the root folder in your terminal:
npx hardhat accounts
npx hardhat compile
npx hardhat clean
npx hardhat test
npx hardhat node
npx hardhat help
REPORT_GAS=true npx hardhat test
npx hardhat coverage
For faster runs of your tests and scripts, consider skipping ts-node
's type checking by setting the environment variable TS_NODE_TRANSPILE_ONLY
to 1
in hardhat's environment.
For more details see the documentation.
To deploy contracts, run these commands in your terminal:
npx hardhat run scripts/deploy.ts
TS_NODE_FILES=true npx ts-node scripts/deploy.ts
npx eslint '**/*.{js,ts}'
npx eslint '**/*.{js,ts}' --fix
npx prettier '**/*.{json,sol,md}' --check
npx prettier '**/*.{json,sol,md}' --write
npx solhint 'contracts/**/*.sol'
npx solhint 'contracts/**/*.sol' --fix
You can find more details about our deployment checklist here.
Follow our update checklist here.
Certain actions can be triggered via a command to a pull request. To issue a command just comment on a pull request with one of these commands.
Command | Description |
---|---|
/mythx partial (quick \| standard \| deep) |
Scans the changed files for this pull request |
/mythx full (quick \| standard \| deep) |
Scans the all files for this pull request |
/release (patch \| minor \| major) |
Adds the proper release label to this pull request |
/subgraph (patch \| minor \| major) |
Adds the proper subgraph release label to this pull request |