Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fromDAO: extract apps, distinguish apps from actors, fix name generation #2

Merged
merged 6 commits into from
Dec 12, 2019

Conversation

tintinweb
Copy link
Member

@tintinweb tintinweb commented Dec 11, 2019

This PR is building on top of #1.

  • extracts apps from DAO
  • matches addresses against known apps and prints all unknown entities as actors
  • fixed getAppName missed to resolve some names because of case sensitive address check
  • added templates for standard Apps (config.json) (provide your own config.json or enable the default with --default-config)

fromDAO

fromDAO

from yaml

fromYaml

//the class design is a bit hacky but it does the job for now :)

Example

$ aragraph 0x2dE83b50Af29678774D5AbC4a7Cb2a588762f28C --chain-id 1 --default-config

dao

@startuml 
' -- options --
allowmixing
skinparam handwritten true
' -- tokens --
' -- apps --

class Kernel_0x2de8 {
    {abstract}Kernel

    
}


class ACL_0xa169 {
    {abstract}ACL

    
}


class EVM_Script_Registry_0xfefd {
    {abstract}EVM_Script_Registry

    
}


class Voting_0x277b {
    {abstract}Voting

    
}


class Voting_0xcfee {
    {abstract}Voting

    
}


class Vault_0xaacc {
    {abstract}Vault

    
}


class Finance_0xd970 {
    {abstract}Finance

    
}

actor Unknown_0xcafe
actor Unknown_0xe53c
' -- permissions --
Voting_0xcfee ...> ACL_0xa169: **ACL_0xa169.CREATE_PERMISSIONS_ROLE** (mgt by Voting_0xcfee)
Voting_0xcfee ...> Kernel_0x2de8: **Kernel_0x2de8.APP_MANAGER_ROLE** (mgt by Voting_0xcfee)
Unknown_0xcafe ...> Voting_0x277b: **Voting_0x277b.CREATE_VOTES_ROLE** (mgt by Unknown_0xcafe)
Unknown_0xe53c ...> Voting_0x277b: **Voting_0x277b.CREATE_VOTES_ROLE** (mgt by Unknown_0xcafe)
Voting_0xcfee ...> Voting_0x277b: **Voting_0x277b.MODIFY_QUORUM_ROLE** (mgt by Voting_0xcfee)\n**Voting_0x277b.MODIFY_SUPPORT_ROLE** (mgt by Voting_0xcfee)
Unknown_0xcafe ...> Voting_0xcfee: **Voting_0xcfee.CREATE_VOTES_ROLE** (mgt by Unknown_0xcafe)
Unknown_0xe53c ...> Voting_0xcfee: **Voting_0xcfee.CREATE_VOTES_ROLE** (mgt by Unknown_0xcafe)
Voting_0xcfee ...> Voting_0xcfee: **Voting_0xcfee.MODIFY_QUORUM_ROLE** (mgt by Voting_0xcfee)\n**Voting_0xcfee.MODIFY_SUPPORT_ROLE** (mgt by Voting_0xcfee)
Finance_0xd970 ...> Vault_0xaacc: **Vault_0xaacc.TRANSFER_ROLE** (mgt by Voting_0xcfee)
Voting_0x277b ...> Finance_0xd970: **Finance_0xd970.CREATE_PAYMENTS_ROLE** (mgt by Voting_0xcfee)\n**Finance_0xd970.EXECUTE_PAYMENTS_ROLE** (mgt by Voting_0xcfee)\n**Finance_0xd970.MANAGE_PAYMENTS_ROLE** (mgt by Voting_0xcfee)

@enduml

@tintinweb tintinweb added the enhancement New feature or request label Dec 11, 2019
@xuhcc
Copy link
Contributor

xuhcc commented Dec 11, 2019

Nice improvement, thanks!

add default app templates
propagate config to sub-objects
@tintinweb tintinweb merged commit 6362c90 into master Dec 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants