Skip to content
Visualize your Aragon DAO Templates
JavaScript
Branch: master
Clone or download
Latest commit 216f8ef Nov 7, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples publish to npm Oct 25, 2019
src normalize entities Nov 5, 2019
templates rework structure Oct 11, 2019
.gitignore Initial commit Sep 9, 2019
LICENSE Initial commit Sep 9, 2019
README.md Update README.md Nov 7, 2019
package-lock.json publish to npm Oct 25, 2019
package.json prepare v0.0.3 Nov 5, 2019

README.md

get in touch with Consensys Diligence
[ 🌐 📩 🔥 ]

aragraph-logo

AraGraph

This blog post is a good introduction to AraGraph.

This tool generate permission relationship graphs from aragon template description files (yaml) or specifications in Markdown table format. Use Plantuml to render the generated the DAOs UML description.

aragraph

install

$ npm install -g aragraph

generate from yaml description

$ aragraph ./examples/company.yaml > dao.plantuml

generate from markdown

$ aragraph ./examples/aragon_company_README.md > dao.plantuml

Render

$ java -jar plantuml.jar dao.plantuml

Library

from DAO description files (yaml)

https://github.com/aragon/dao-templates/tree/master/descriptor

Example: https://github.com/aragon/dao-templates/blob/cc1eb1174a13c6d5ed0fcc1bbcc9d21bf9137a84/descriptor/examples/company.yaml

image

const AragonPermissions = require("./AragonPermissions.js");

console.log(new AragonPermissions().fromYaml('./examples/company.yaml').uml())

from markdown table

Example: https://github.com/aragon/dao-templates/blob/master/templates/company/README.md

image

const AragonPermissions = require("./AragonPermissions.js");

const input = `

| App               | Permission            | Grantee       | Manager |
|-------------------|-----------------------|---------------|---------|
| Kernel            | APP_MANAGER           | Voting        | Voting  |
| ACL               | CREATE_PERMISSIONS    | Voting        | Voting  |
| EVMScriptRegistry | REGISTRY_MANAGER      | Voting        | Voting  |
| EVMScriptRegistry | REGISTRY_ADD_EXECUTOR | Voting        | Voting  |
| Voting            | CREATE_VOTES          | Token Manager | Voting  |
| Voting            | MODIFY_QUORUM         | Voting        | Voting  |
| Voting            | MODIFY_SUPPORT        | Voting        | Voting  |
| Agent or Vault    | TRANSFER              | Finance       | Voting  |
| Finance           | CREATE_PAYMENTS       | Voting        | Voting  |
| Finance           | EXECUTE_PAYMENTS      | Voting        | Voting  |
| Finance           | MANAGE_PAYMENTS       | Voting        | Voting  |
| Token Manager     | MINT                  | Voting        | Voting  |
| Token Manager     | BURN                  | Voting        | Voting  |
| Agent             | RUN_SCRIPT            | Voting        | Voting  |
| Agent             | EXECUTE               | Voting        | Voting  |
| Finance             | CREATE_PAYMENTS            | Payroll             | Voting        |
| Payroll             | ADD_BONUS_ROLE             | EOA or Voting       | Voting        |
| Payroll             | ADD_EMPLOYEE_ROLE          | EOA or Voting       | Voting        |
| Payroll             | ADD_REIMBURSEMENT_ROLE     | EOA or Voting       | Voting        |
| Payroll             | TERMINATE_EMPLOYEE_ROLE    | EOA or Voting       | Voting        |
| Payroll             | SET_EMPLOYEE_SALARY_ROLE   | EOA or voting       | Voting        |
| Payroll             | MODIFY_PRICE_FEED_ROLE     | Voting              | Voting        |
| Payroll             | MODIFY_RATE_EXPIRY_ROLE    | Voting              | Voting        |
| Payroll             | MANAGE_ALLOWED_TOKENS_ROLE | Voting              | Voting        |`;



console.log(new AragonPermissions().fromMarkdownTable(input).uml())

You can’t perform that action at this time.