Skip to content

Instantly share code, notes, and snippets.

@cyborgshead
Last active November 25, 2021 13:28
Show Gist options
  • Save cyborgshead/4a186090dce2820176b664d0e2b254f9 to your computer and use it in GitHub Desktop.
Save cyborgshead/4a186090dce2820176b664d0e2b254f9 to your computer and use it in GitHub Desktop.
Aragon DAO bare setup

Prepare ~/.aragon/rinkeby_key.json

{
  "rpc": "https://<network>.infura.io",
  "keys": ["put-your-priv-key-here"]
}

Bootstrap

npx create-aragon-app cyber bare

Creating a blank organization

npx dao new --environment rinkeby
  ✔ Fetching template bare-kit.aragonpm.eth@latest
  ✔ Create new DAO from template
  ✔ Checking DAO
✔ Created DAO: 0x53B65C902627ae503A6cc28B6a2813CeDF6e55ff

Adding a Token and Token Manager instance

npx dao token new "cyber~Congress" "CC" 0 true --environment rinkeby
  ✔ Deploy the MiniMeToken contract
✔ Successfully deployed the token at 0x20daBd7Bf946290847786a4d96Fb0db5D4265834
npx dao install 0x53B65C902627ae503A6cc28B6a2813CeDF6e55ff token-manager --app-init none --environment rinkeby
✔ Check IPFS
  ✔ Fetching token-manager.aragonpm.eth@latest
  ↓ Checking installed version [skipped]
    → Installing the first instance of token-manager.aragonpm.eth in DAO
  ✔ Deploying app instance
  ✔ Fetching deployed app
ℹ Successfully executed: "Create a new upgradeable instance of 0x6b20a3010614eeebf2138ccec99f028a61c811b3b1a3343b6ff635985c75c91f app linked to the Kernel, setting its code to 0xE775468F3Ee275f740A22EB9DD7aDBa9b7933Aa0 ."
✔ Installed token-manager at: 0x3D744fFd8C7a2ebCb5913b65A7bf2Cd86536b85e
⚠ App could not be initialized, check the --app-init flag. Functions protected behind the ACL will not work until the app is initialized
npx dao apps 0x53B65C902627ae503A6cc28B6a2813CeDF6e55ff --all --environment rinkeby
  ✔ Inspecting DAO
  ✔ Fetching permissionless apps
✔ Successfully fetched DAO apps for 0x53B65C902627ae503A6cc28B6a2813CeDF6e55ff
┌────────┬────────────────────────────────────────────┬───────────────────┐
│ App    │ Proxy address                              │ Content           │
├────────┼────────────────────────────────────────────┼───────────────────┤
│ kernel │ 0x53B65C902627ae503A6cc28B6a2813CeDF6e55ff │ (No UI available) │
├────────┼────────────────────────────────────────────┼───────────────────┤
│ acl    │ 0xbb17cf18463535e195c1c85b582094866265f8dc │ (No UI available) │
├────────┼────────────────────────────────────────────┼───────────────────┤
│ evmreg │ 0x97bf32ee26853227fdfafa49735dc42a88176e1f │ (No UI available) │
└────────┴────────────────────────────────────────────┴───────────────────┘
┌────────────────────┬────────────────────────────────────────────┐
│ Permissionless app │ Proxy address                              │
├────────────────────┼────────────────────────────────────────────┤
│ token-manager      │ 0x3D744fFd8C7a2ebCb5913b65A7bf2Cd86536b85e │
└────────────────────┴────────────────────────────────────────────┘
npx dao token change-controller 0x20daBd7Bf946290847786a4d96Fb0db5D4265834 0x3D744fFd8C7a2ebCb5913b65A7bf2Cd86536b85e --environment rinkeby
  ✔ Changing the MiniMe token controller
✔ Successfully changed the controller of 0x20daBd7Bf946290847786a4d96Fb0db5D4265834 to 0x3D744fFd8C7a2ebCb5913b65A7bf2Cd86536b85e
ℹ Transaction hash: 0x71c0214f8f67fc88d5afcca0f7e0b7d1f477e3cd6305e34300ffde73d83e3cbe
npx dao acl create 0x53B65C902627ae503A6cc28B6a2813CeDF6e55ff 0x3D744fFd8C7a2ebCb5913b65A7bf2Cd86536b85e MINT_ROLE 0x86d2E649633026146958e0e00825bbEEC02F6859 0x86d2E649633026146958e0e00825bbEEC02F6859 --environment rinkeby
  ✔ Generating transaction
  ✔ Sending transaction
✔ Successfully executed: "Create a new permission granting 0x86d2E649633026146958e0e00825bbEEC02F6859 the ability to perform actions of role 0x154c00819833dac601ee5ddded6fda79d9d8b506b911b3dbd54cdb95fe6c3686 on 0x3D744fFd8C7a2ebCb5913b65A7bf2Cd86536b85e (setting 0x86d2E649633026146958e0e00825bbEEC02F6859 as the permission manager)"
npx dao exec 0x53B65C902627ae503A6cc28B6a2813CeDF6e55ff 0x3D744fFd8C7a2ebCb5913b65A7bf2Cd86536b85e initialize 0x20daBd7Bf946290847786a4d96Fb0db5D4265834 true 0 --environment rinkeby
  ✔ Check IPFS
  ✔ Generating transaction
  ✔ Sending transaction
✔ Successfully executed: "undefined"

Adding a Voting instance

npx dao install 0x53B65C902627ae503A6cc28B6a2813CeDF6e55ff voting --app-init-args 0x20daBd7Bf946290847786a4d96Fb0db5D4265834 510000000000000000 510000000000000000 259200 --environment rinkeby
  ✔ Check IPFS
  ✔ Fetching voting.aragonpm.eth@latest
  ↓ Checking installed version [skipped]
    → Installing the first instance of voting.aragonpm.eth in DAO
  ✔ Deploying app instance
  ✔ Fetching deployed app
ℹ Successfully executed: "Create a new upgradeable instance of 0x9fa3927f639745e587912d4b0fea7ef9013bf93fb907d29faeab57417ba6e1d4 app linked to the Kernel, setting its code to 0xb4fa71b3352D48AA93D34d085f87bb4aF0cE6Ab5 ."
✔ Installed voting at: 0xEf08a19DA3B2f157767da1A6127ecD77eFDc50E7
npx dao acl create 0x53B65C902627ae503A6cc28B6a2813CeDF6e55ff 0xEf08a19DA3B2f157767da1A6127ecD77eFDc50E7 CREATE_VOTES_ROLE 0x3d744ffd8c7a2ebcb5913b65a7bf2cd86536b85e 0xEf08a19DA3B2f157767da1A6127ecD77eFDc50E7 --environment rinkeby
  ✔ Generating transaction
  ✔ Sending transaction
✔ Successfully executed: "Create a new permission granting 'Tokens' the ability to perform actions of role 0xe7dcd7275292e064d090fbc5f3bd7995be23b502c1fed5cd94cfddbbdcd32bbc on 0xEf08a19DA3B2f157767da1A6127ecD77eFDc50E7 (setting 0xEf08a19DA3B2f157767da1A6127ecD77eFDc50E7 as the permission manager)"

Adding a Vault and Finance instance

npx dao install 0x53B65C902627ae503A6cc28B6a2813CeDF6e55ff vault --environment rinkeby
  ✔ Check IPFS
  ✔ Fetching vault.aragonpm.eth@latest
  ↓ Checking installed version [skipped]
    → Installing the first instance of vault.aragonpm.eth in DAO
  ✔ Deploying app instance
  ✔ Fetching deployed app
ℹ Successfully executed: "Create a new upgradeable instance of 0x7e852e0fcfce6551c13800f1e7476f982525c2b5277ba14b24339c68416336d1 app linked to the Kernel, setting its code to 0x35c5Abf253C873deE9ee4fe2687CD378Eff1263e ."
✔ Installed vault at: 0xb01dAFaC3722e3967d6F6cE824EeD311415Fde79
npx dao install 0x53B65C902627ae503A6cc28B6a2813CeDF6e55ff finance --app-init-args 0xb01dAFaC3722e3967d6F6cE824EeD311415Fde79 2592000 --environment rinkeby
  ✔ Check IPFS
  ✔ Fetching finance.aragonpm.eth@latest
  ↓ Checking installed version [skipped]
    → Installing the first instance of finance.aragonpm.eth in DAO
  ✔ Deploying app instance
  ✔ Fetching deployed app
ℹ Successfully executed: "Create a new upgradeable instance of 0xbf8491150dafc5dcaee5b861414dca922de09ccffa344964ae167212e8c673ae app linked to the Kernel, setting its code to 0x94D3013A8700E8B168f66529aD143590CC6b259d ."
✔ Installed finance at: 0xDb2A0379CFbB48e186f90027b8EdA5558f0d4646
npx dao acl create 0x53B65C902627ae503A6cc28B6a2813CeDF6e55ff 0xb01dAFaC3722e3967d6F6cE824EeD311415Fde79 TRANSFER_ROLE 0xDb2A0379CFbB48e186f90027b8EdA5558f0d4646 0xEf08a19DA3B2f157767da1A6127ecD77eFDc50E7 --environment rinkeby
  ✔ Generating transaction
  ✔ Sending transaction
✔ Successfully executed: "Create a new permission granting 0xDb2A0379CFbB48e186f90027b8EdA5558f0d4646 the ability to perform actions of role 0x8502233096d909befbda0999bb8ea2f3a6be3c138b9fbf003752a4c8bce86f6c on 0xb01dAFaC3722e3967d6F6cE824EeD311415Fde79 (setting 'Voting' as the permission manager)"
npx dao acl create 0x53B65C902627ae503A6cc28B6a2813CeDF6e55ff 0xb01dAFaC3722e3967d6F6cE824EeD311415Fde79 CREATE_PAYMENTS_ROLE 0xDb2A0379CFbB48e186f90027b8EdA5558f0d4646 0xEf08a19DA3B2f157767da1A6127ecD77eFDc50E7 --environment rinkeby
  ✔ Generating transaction
  ✔ Sending transaction
✔ Successfully executed: "Create a new permission granting 0xDb2A0379CFbB48e186f90027b8EdA5558f0d4646 the ability to perform actions of role 0x5de467a460382d13defdc02aacddc9c7d6605d6d4e0b8bd2f70732cae8ea17bc on 'Vault' (setting 'Voting' as the permission manager)"
npx dao acl create 0x53B65C902627ae503A6cc28B6a2813CeDF6e55ff 0xb01dAFaC3722e3967d6F6cE824EeD311415Fde79 EXECUTE_PAYMENTS_ROLE 0xDb2A0379CFbB48e186f90027b8EdA5558f0d4646 0xEf08a19DA3B2f157767da1A6127ecD77eFDc50E7 --environment rinkeby
  ✔ Generating transaction
  ✔ Sending transaction
✔ Successfully executed: "Create a new permission granting 0xDb2A0379CFbB48e186f90027b8EdA5558f0d4646 the ability to perform actions of role 0x563165d3eae48bcb0a092543ca070d989169c98357e9a1b324ec5da44bab75fd on 'Vault' (setting 'Voting' as the permission manager)"
npx dao acl create 0x53B65C902627ae503A6cc28B6a2813CeDF6e55ff 0xb01dAFaC3722e3967d6F6cE824EeD311415Fde79 MANAGE_PAYMENTS_ROLE 0xDb2A0379CFbB48e186f90027b8EdA5558f0d4646 0xEf08a19DA3B2f157767da1A6127ecD77eFDc50E7 --environment rinkeby
  ✔ Generating transaction
  ✔ Sending transaction
✔ Successfully executed: "Create a new permission granting 0xDb2A0379CFbB48e186f90027b8EdA5558f0d4646 the ability to perform actions of role 0x30597dd103acfaef0649675953d9cb22faadab7e9d9ed57acc1c429d04b80777 on 'Vault' (setting 'Voting' as the permission manager)"
npx dao acl 0x53B65C902627ae503A6cc28B6a2813CeDF6e55ff --environment rinkeby
  ✔ Inspecting DAO Permissions
✔ Successfully fetched DAO apps for 0x53B65C902627ae503A6cc28B6a2813CeDF6e55ff
┌────────────────────────┬─────────────────────────┬────────────────────────┬───────────────────────┐
│ App                    │ Action                  │ Allowed entities       │ Manager               │
├────────────────────────┼─────────────────────────┼────────────────────────┼───────────────────────┤
│ acl (0xbb17)           │ CREATE_PERMISSIONS_ROLE │ ✅  0x86d2E649633026... │   0x86d2E649633026... │
├────────────────────────┼─────────────────────────┼────────────────────────┼───────────────────────┤
│ 0x53b65c902627ae...    │ APP_MANAGER_ROLE        │ ✅  0x86d2E649633026... │   0x86d2E649633026... │
├────────────────────────┼─────────────────────────┼────────────────────────┼───────────────────────┤
│ token-manager (0x3d74) │ MINT_ROLE               │ ✅  0x86d2E649633026... │   0x86d2E649633026... │
├────────────────────────┼─────────────────────────┼────────────────────────┼───────────────────────┤
│ voting (0xef08)        │ CREATE_VOTES_ROLE       │ ✅  0x3D744fFd8C7a2e... │   0xEf08a19DA3B2f1... │
├────────────────────────┼─────────────────────────┼────────────────────────┼───────────────────────┤
│ vault (0xb01d)         │ TRANSFER_ROLE           │ ✅  0xDb2A0379CFbB48... │   0xEf08a19DA3B2f1... │
├────────────────────────┼─────────────────────────┼────────────────────────┼───────────────────────┤
│ vault (0xb01d)         │ CREATE_PAYMENTS_ROLE    │ ✅  0xDb2A0379CFbB48... │   0xEf08a19DA3B2f1... │
├────────────────────────┼─────────────────────────┼────────────────────────┼───────────────────────┤
│ vault (0xb01d)         │ EXECUTE_PAYMENTS_ROLE   │ ✅  0xDb2A0379CFbB48... │   0xEf08a19DA3B2f1... │
├────────────────────────┼─────────────────────────┼────────────────────────┼───────────────────────┤
│ vault (0xb01d)         │ MANAGE_PAYMENTS_ROLE    │ ✅  0xDb2A0379CFbB48... │   0xEf08a19DA3B2f1... │
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment