Working with DAOs
EVMcrispr provides the aragonos module for interacting with Aragon DAOs.
This guide covers the most common DAO operations.
Connecting to a DAO
Section titled “Connecting to a DAO”Use connect to establish a DAO context. All DAO commands run inside the
connect block:
load aragonos
aragonos:connect my-dao.aragonid.eth ( # DAO commands go here grant @me @app(voting) CREATE_VOTES_ROLE)You can connect by ENS name or by address:
aragonos:connect 0xb1f5...a84e ( # ...)Managing Permissions
Section titled “Managing Permissions”Granting Roles
Section titled “Granting Roles”# Grant a role to the connected walletgrant @me @app(voting) CREATE_VOTES_ROLE
# Grant with a specific permission managergrant @app(voting) @app(token-manager) MINT_ROLE @app(voting)
# Grant with an oracle contractgrant @app(voting) @app(finance) CREATE_PAYMENTS_ROLE --oracle 0xOracle...Revoking Roles
Section titled “Revoking Roles”# Revoke a permissionrevoke @app(voting) @app(acl) CREATE_PERMISSIONS_ROLE
# Revoke and remove the permission managerrevoke @app(voting) @app(acl) CREATE_PERMISSIONS_ROLE trueInstalling Apps
Section titled “Installing Apps”# Install a new agent appinstall $agent agent:new
# Install with initialization parametersinstall $tm token-manager:new @token(ANT) false 1e18
# Install a specific versioninstall $vault vault:new --version 2.0.0
# Use the installed appgrant @me $tm MINT_ROLEUpgrading Apps
Section titled “Upgrading Apps”# Upgrade to the latest versionupgrade token-manager.aragonpm.eth
# Upgrade to a specific versionupgrade token-manager.aragonpm.eth 2.0.0Executing Through an Agent
Section titled “Executing Through an Agent”Use act to call external contracts through the DAO’s agent:
# Transfer tokens from the DAO treasuryact @app(agent) @token(DAI) "transfer(address,uint256)" @me @token.amount(DAI 100)Forwarding Through Governance
Section titled “Forwarding Through Governance”Use forward to route actions through voting or other forwarder apps:
forward @app(voting) ( grant @app(voting) @app(finance) CREATE_PAYMENTS_ROLE @app(voting)) --context "Add payment permission"Resolving App Addresses
Section titled “Resolving App Addresses”# Get the address of a DAO appset $agent @app(agent)
# With index for multiple instancesset $agent2 @app(agent:1)
# Cross-DAO reference (in nested connect)set $otherAgent @app(_0xOtherDAO...:agent)Creating DAOs
Section titled “Creating DAOs”# Create a new DAOnew-dao $dao "my-new-dao"
# Create a token for the DAOnew-token $token "My Token" "MTK" 0xController...Combining with Simulation
Section titled “Combining with Simulation”Test DAO operations before executing them on-chain:
load aragonosload sim
sim:fork ( aragonos:connect my-dao.aragonid.eth ( grant @me @app(voting) CREATE_VOTES_ROLE install $agent agent:new sim:expect @bool(@app(agent:1) != 0x0000000000000000000000000000000000000000) ))