Colony Roles

In the current implementation of the colonyNetwork smart contracts, certain actions within a colony can only be performed by addresses assigned specific "colony roles".

Note: In the future, colonyNetwork will support the option to mediate which addresses can perform which actions based on reputation as described in the White Paper.

There are seven colony roles:

  1. RECOVERY
  2. ROOT
  3. ARBITRATION (currently not in use)
  4. ARCHITECTURE
  5. ARCHITECTURE_SUBDOMAIN
  6. FUNDING
  7. ADMINISTRATION

Note: The colony roles are enumerated in the colonyNetwork smart contracts. The number value associated with each role corresponds with the value used in the colonyNetwork smart contracts.

Permissions

The permissions for calling client methods are as follows.

Colony Client

0123456
addDomainXX
addPaymentXX
addTaskXX
approveExitRecoveryXX
bootstrapColonyX
enterRecoveryModeXX
exitRecoveryModeXX
finalizePaymentXX
mintTokensX
moveFundsBetweenPotsXX
registerColonyLabelX
removeRecoveryRoleX
setAdministrationRoleXX
setArchitectureRoleXX
setFundingRoleXX
setPaymentDomainXX
setPaymentPayoutXX
setPaymentRecipientXX
setPaymentSkillXX
setRecoveryRoleX
setRewardInverseX
setRootRoleX
setStorageSlotRecoveryXX
setTokenX
startNextRewardPayoutX
upgradeX

See ColonyClient for more information about each method.

Colony Client (Meta Colony)

0123456
addGlobalSkillX
addNetworkColonyVersionX
deprecateGlobalSkillX
setNetworkFeeInverseX

See ColonyClient for more information about each method.

Colony Network Client

0123456
approveExitRecoveryXX
enterRecoveryModeXX
exitRecoveryModeXX
removeRecoveryRoleX
setRecoveryRoleX
setStorageSlotRecoveryXX

See ColonyNetworkClient for more information about each method.

Managing Roles

Managing colony roles can be done with an instance of ColonyClient.

Recovery Role

Assigning the RECOVERY role to an address:

// Set recovery role
await colonyClient.setRecoveryRole.send({
  address: '0x0...',
});

Removing the RECOVERY role from an address:

// Remove recovery role
await colonyClient.removeRecoveryRole.send({
  address: '0x0...',
});

Root Role

Assigning the ROOT role to an address:

// Set root role
await colonyClient.setRootRole.send({
  address: '0x0...',
  setTo: true,
});

Removing the ROOT role from an address:

// Remove root role
await colonyClient.setRootRole.send({
  address: '0x0...',
  setTo: false,
});

Architecture Roles

Assigning the ARCHITECTURE and ARCHITECTURE_SUBDOMAIN roles to an address:

// Set architecture role
await colonyClient.setArchitectureRole.send({
  address: '0x0...',
  domainId: 1,
  setTo: true,
});

Removing the ARCHITECTURE and ARCHITECTURE_SUBDOMAIN roles from an address:

// Remove architecture role
await colonyClient.setArchitectureRole.send({
  address: '0x0...',
  domainId: 1,
  setTo: false,
});

Funding Role

Assigning the FUNDING role to an address:

// Set funding role
await colonyClient.setFundingRole.send({
  address: '0x0...',
  domainId: 1,
  setTo: true,
});

Removing the FUNDING role from an address:

// Remove funding role
await colonyClient.setFundingRole.send({
  address: '0x0...',
  domainId: 1,
  setTo: false,
});

Administration Role

Assigning the ADMINISTRATION role to an address:

// Set administration role
await colonyClient.setAdministrationRole.send({
  address: '0x0...',
  domainId: 1,
  setTo: true,
});

Removing the ADMINISTRATION role from an address:

// Remove administration role
await colonyClient.setAdministrationRole.send({
  address: '0x0...',
  domainId: 1,
  setTo: false,
});

Checking Roles

Checking whether an address is assigned a colony role:

// Check colony role
await colonyClient.hasColonyRole.call({
  address: '0x0...',
  domainId: 1,
  role: 'ADMINISTRATION',
});

Support

Questions? Problems? Existential dilemmas? We’re here to help!

Improve this doc.

All improvements to documentation are welcome and encouraged. Submit a PR for documentation on GitHub.