ColonyClient

The ColonyClient class is a standard interface for interactions with the methods and events described in IColony.sol and IMetaColony.sol. These interactions are generally concerned with actions within a colony, such as adding a new domain, creating a task, moving funds between pots, and managing permissions.

See Clients for more information about initializing ColonyClient.

See ContractClient for more information about the ContractClient superclass.

Callers

generateSecret

Generate a secret for task ratings. This function returns a keccak256 hash created from the input parameters.

await colonyClient.generateSecret.call({
  salt,
  value,
});

Input

NameTypeDescription
saltstringThe string that will be used to generate a secret.
valuenumberThe task rating that will be hidden (1, 2, or 3).

Response

A promise which resolves to an object containing the following properties:

NameTypeDescription
secrethex stringA keccak256 hash that keeps the task rating hidden.

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

getAuthorityAddress

Get the address of the authority contract associated with the colony contract.

await colonyClient.getAuthorityAddress.call();

Response

A promise which resolves to an object containing the following properties:

NameTypeDescription
addressaddressThe address of the authority contract associated with the colony contract.

Contract Information

Function: authority

Contract: auth.sol

Interface: IColony.sol

getColonyNetworkAddress

Get the address of the Colony Network contract.

await colonyClient.getColonyNetworkAddress.call();

Response

A promise which resolves to an object containing the following properties:

NameTypeDescription
addressaddressThe address of the Colony Network contract.

Contract Information

Function: getColonyNetwork

Interface: IColony.sol

getDomain

Get information about a domain.

await colonyClient.getDomain.call({
  domainId,
});

Input

NameTypeDescription
domainIdnumberThe ID of the domain.

Response

A promise which resolves to an object containing the following properties:

NameTypeDescription
skillIdnumberThe ID of the local skill.
potIdnumberThe ID of the funding pot.

Contract Information

Contract: Colony.sol

Interface: IColony.sol

getDomainCount

Get the total number of domains in the colony. The return value is also the ID of the last domain created.

await colonyClient.getDomainCount.call();

Response

A promise which resolves to an object containing the following properties:

NameTypeDescription
countnumberThe total number of domains.

Contract Information

Contract: Colony.sol

Interface: IColony.sol

getExtensionAddress

Get the address of an extension contract associated with the colony address.

await colonyClient.getExtensionAddress.call({
  contractName,
});

Input

NameTypeDescription
contractNamestringThe name of the extension contract.

Response

A promise which resolves to an object containing the following properties:

NameTypeDescription
addressaddressThe address of the extension contract.

Contract Information

getFundingPot

Get information about a funding pot.

await colonyClient.getFundingPot.call({
  potId,
});

Input

NameTypeDescription
potIdnumberThe ID of the funding pot.

Response

A promise which resolves to an object containing the following properties:

NameTypeDescription
typeundefinedThe associated type of the funding pot (DOMAIN, TASK, PAYMENT, or UNASSIGNED).
typeIdnumberThe id of the associated type (domainId, taskId, or paymentId).
payoutsWeCannotMakenumberThe total number of payouts that the funding pot cannot make.

Contract Information

Contract: ColonyFunding.sol

Interface: IColony.sol

getFundingPotBalance

Get the balance of a funding pot.

await colonyClient.getFundingPotBalance.call({
  potId,
  token,
});

Input

NameTypeDescription
potIdnumberThe ID of the funding pot.
tokenany addressThe address of the token contract (an empty address if Ether).

Response

A promise which resolves to an object containing the following properties:

NameTypeDescription
balancebig numberThe balance of tokens (or Ether) in the funding pot.

Contract Information

Contract: ColonyFunding.sol

Interface: IColony.sol

getFundingPotCount

Get the total number of funding pots.

await colonyClient.getFundingPotCount.call();

Response

A promise which resolves to an object containing the following properties:

NameTypeDescription
countnumberThe total number of funding pots.

Contract Information

Contract: ColonyFunding.sol

Interface: IColony.sol

getFundingPotPayout

Get the payout of a funding pot.

await colonyClient.getFundingPotPayout.call({
  potId,
  token,
});

Input

NameTypeDescription
potIdnumberThe ID of the funding pot.
tokenany addressThe address of the token contract (an empty address if Ether).

Response

A promise which resolves to an object containing the following properties:

NameTypeDescription
payoutbig numberThe payout of tokens (or Ether) for the funding pot.

Contract Information

Contract: ColonyFunding.sol

Interface: IColony.sol

getNonRewardPotsTotal

Get the total amount of funds that are not in the colony rewards pot. This is a value that keeps track of the total assets a colony has to work with, which may be split among several distinct pots associated with various domains and tasks.

await colonyClient.getNonRewardPotsTotal.call({
  token,
});

Input

NameTypeDescription
tokenany addressThe address of the token contract (an empty address if Ether).

Response

A promise which resolves to an object containing the following properties:

NameTypeDescription
totalbig numberThe total amount of funds that are not in the colony rewards pot.

Contract Information

Contract: ColonyFunding.sol

Interface: IColony.sol

getOwnerAddress

Get the address of the owner of the colony contract.

await colonyClient.getOwnerAddress.call();

Response

A promise which resolves to an object containing the following properties:

NameTypeDescription
addressaddressThe address of the owner of the colony contract.

Contract Information

Function: owner

Contract: auth.sol

Interface: IColony.sol

getPayment

Get information about a payment.

await colonyClient.getPayment.call({
  paymentId,
});

Input

NameTypeDescription
paymentIdnumberThe ID of the payment.

Response

A promise which resolves to an object containing the following properties:

NameTypeDescription
recipientaddressThe address of the assigned recipient.
finalizedbooleanA boolean indicating whether or not the payment has been finalized.
potIdnumberThe ID of the funding pot.
domainIdnumberThe ID of the domain.
skillsarrayAn array of skill IDs.

Contract Information

Contract: ColonyPayment.sol

Interface: IColony.sol

getPaymentCount

Get the total number of payments.

await colonyClient.getPaymentCount.call();

Response

A promise which resolves to an object containing the following properties:

NameTypeDescription
countnumberThe total number of payments.

Contract Information

Contract: ColonyPayment.sol

Interface: IColony.sol

getRecoveryRolesCount

Get the total number of addresses that are assigned the colony RECOVERY role.

await colonyClient.getRecoveryRolesCount.call();

Response

A promise which resolves to an object containing the following properties:

NameTypeDescription
countnumberThe total number of addresses that are assigned the colony RECOVERY role.

Contract Information

Function: numRecoveryRoles

Contract: ContractRecovery.sol

Interface: IRecovery.sol

getRewardInverse

Get the inverse amount of the reward. If the fee is 1% (or 0.01), the inverse amount will be 100.

await colonyClient.getRewardInverse.call();

Response

A promise which resolves to an object containing the following properties:

NameTypeDescription
rewardInversebig numberThe inverse amount of the reward.

Contract Information

Contract: ColonyFunding.sol

Interface: IColony.sol

getRewardPayoutInfo

Get information about a reward payout cycle.

await colonyClient.getRewardPayoutInfo.call({
  payoutId,
});

Input

NameTypeDescription
payoutIdnumberThe ID of the reward payout cycle.

Response

A promise which resolves to an object containing the following properties:

NameTypeDescription
reputationStatestringThe reputation root hash at the time the reward payout was created.
colonyWideReputationbig numberThe total reputation score throughout the colony.
totalTokensbig numberThe total amount of tokens at the time the reward payout was created.
amountbig numberThe total amount of tokens allocated for the reward payout.
tokenAddressany addressThe address of the token contract (an empty address if Ether).
blockTimestampdateThe timestamp at the time the reward payout was created.

Contract Information

Contract: ColonyFunding.sol

Interface: IColony.sol

getTask

Get information about a task.

await colonyClient.getTask.call({
  taskId,
});

Input

NameTypeDescription
taskIdnumberThe ID of the task.

Response

A promise which resolves to an object containing the following properties:

NameTypeDescription
specificationHashIPFS hashThe specification hash of the task (an IPFS hash).
deliverableHashIPFS hashThe deliverable hash of the task (an IPFS hash).
statustask statusThe task status (ACTIVE, CANCELLED or FINALIZED).
dueDatedateThe final date that the task deliverable can be submitted.
potIdnumberThe ID of the funding pot.
completionDatedateThe date when the task deliverable was submitted.
domainIdnumberThe ID of the domain.
skillIdnumberThe ID of the skill.

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

getTaskCount

Get the total number of tasks in the colony. The return value is also the ID of the last task created.

await colonyClient.getTaskCount.call();

Response

A promise which resolves to an object containing the following properties:

NameTypeDescription
countnumberThe total number of tasks.

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

getTaskPayout

Get the task payout amount assigned to a task role. Multiple tokens can be used for task payouts, therefore the token must be specified when calling this function. In order to get the task payout amount in Ether, token must be an empty address.

await colonyClient.getTaskPayout.call({
  taskId,
  role,
  token,
});

Input

NameTypeDescription
taskIdnumberThe ID of the task.
roletask roleThe task role (MANAGER, EVALUATOR, or WORKER).
tokenany addressThe address of the token contract (an empty address if Ether).

Response

A promise which resolves to an object containing the following properties:

NameTypeDescription
amountbig numberThe amount of tokens (or Ether) assigned to the task role as a payout.

Contract Information

Contract: ColonyFunding.sol

Interface: IColony.sol

getTaskRole

Get information about a task role.

await colonyClient.getTaskRole.call({
  taskId,
  role,
});

Input

NameTypeDescription
taskIdnumberThe ID of the task.
roletask roleThe role of the task (MANAGER, EVALUATOR, or WORKER).

Response

A promise which resolves to an object containing the following properties:

NameTypeDescription
addressaddressThe address that is assigned the task role.
rateFailbooleanA boolean indicating whether or not the assigned address failed to submit a rating.
ratingnumberThe rating that the assigned address received (1, 2, or 3).

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

getTaskWorkRatingSecret

Get the secret of a task work rating that has been submitted. If a task is in the commit period of the rating process, the work ratings are hidden in a keccak256 hash that was created from a salt and value. The rating secret can be retrieved but in order to reveal the secret, one would have to know both the salt and value used to generate the secret.

await colonyClient.getTaskWorkRatingSecret.call({
  taskId,
  role,
});

Input

NameTypeDescription
taskIdnumberThe ID of the task.
roletask roleThe role that submitted the rating (MANAGER, EVALUATOR, or WORKER).

Response

A promise which resolves to an object containing the following properties:

NameTypeDescription
secrethex stringA keccak256 hash that keeps the task rating hidden.

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

getTaskWorkRatingSecretsInfo

Get information about the secrets of the task work ratings.

await colonyClient.getTaskWorkRatingSecretsInfo.call({
  taskId,
});

Input

NameTypeDescription
taskIdnumberThe ID of the task.

Response

A promise which resolves to an object containing the following properties:

NameTypeDescription
countnumberThe total number of secrets.
lastSubmitteddateThe date when the last secret was submitted.

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

getTokenAddress

Get the address of the token contract that is the native token assigned to the colony. The native token is the token used to calculate reputation scores, i.e. 1 token earned for completing a task with a satisfactory rating (2) will result in 1 reputation point earned.

await colonyClient.getTokenAddress.call();

Response

A promise which resolves to an object containing the following properties:

NameTypeDescription
addressaddressThe address of the token contract assigned as the native token for the colony.

Contract Information

Contract: Colony.sol

Interface: IColony.sol

getVersion

Get the version number of the colony contract. The version number starts at 1 and is incremented by 1 with every new version.

await colonyClient.getVersion.call();

Response

A promise which resolves to an object containing the following properties:

NameTypeDescription
versionnumberThe version number of the colony contract.

Contract Information

Function: version

Contract: Colony.sol

Interface: IColony.sol

hasColonyRole

Check whether an address has a role assigned.

await colonyClient.hasColonyRole.call({
  address,
  domainId,
  role,
});

Input

NameTypeDescription
addressaddressThe address that will be checked for the role.
domainIdnumberThe ID of the domain that the role is assigned.
rolecolony roleThe role that will be checked (RECOVERY, ROOT, ARCHITECTURE, ARCHITECTURE_SUBDOMAIN, ADMINISTRATION, FUNDING).

Response

A promise which resolves to an object containing the following properties:

NameTypeDescription
hasRolebooleanA boolean indicating whether or not the address has the role assigned.

Contract Information

Function: hasUserRole

Contract: Colony.sol

Interface: IColony.sol

isInRecoveryMode

Check whether or not the colony is in recovery mode.

await colonyClient.isInRecoveryMode.call();

Response

A promise which resolves to an object containing the following properties:

NameTypeDescription
inRecoveryModebooleanA boolean indicating whether or not the colony is in recovery mode.

Contract Information

Contract: ContractRecovery.sol

Interface: IRecovery.sol

verifyReputationProof

Verify the correctness of a patricia proof associated with reputation.

await colonyClient.verifyReputationProof.call({
  key,
  value,
  branchMask,
  siblings,
});

Input

NameTypeDescription
keystringThe key of the element that the proof is for.
valuestringThe value of the element that the proof is for.
branchMasknumberThe branchmask of the proof.
siblingsarrayThe siblings of the proof.

Response

A promise which resolves to an object containing the following properties:

NameTypeDescription
isValidbooleanA boolean indicating whether ot not the proof is valid.

Contract Information

Contract: Colony.sol

Interface: IColony.sol

Senders

addNetworkColonyVersion

Add a colony contract version. This can only be called from the Meta Colony and only by the address assigned the colony ROOT role.

await colonyClient.addNetworkColonyVersion.send({
  version,
  resolver,
}, options);

Input

NameTypeDescription
versionnumberThe colony contract version that will be added.
resolvernumberThe address of the Resolver contract which will be used with the underlying EtherRouter contract.

Options

See Sender for more information about options.

Response

An instance of a ContractResponse which will eventually receive the following event data:

NameTypeDescription
versionnumberThe colony contract version that was added.
resolveraddressThe address of the Resolver contract which will be used with the underlying EtherRouter contract.
ColonyVersionAddedobjectContains the data defined in ColonyVersionAdded

See Sender for more information about ContractResponse.

Contract Information

Contract: Colony.sol

Interface: IMetaColony.sol

addDomain

Add a domain to the colony.

await colonyClient.addDomain.send({
  parentDomainId,
}, options);

Input

NameTypeDescription
parentDomainIdnumberThe ID of the parent domain.

Options

See Sender for more information about options.

Response

An instance of a ContractResponse which will eventually receive the following event data:

NameTypeDescription
skillIdnumberThe ID of the skill that was added.
parentSkillIdnumberThe ID of the parent skill.
domainIdnumberThe ID of the domain that was added.
potIdnumberThe ID of the pot that was added.
SkillAddedobjectContains the data defined in SkillAdded
DomainAddedobjectContains the data defined in DomainAdded
FundingPotAddedobjectContains the data defined in FundingPotAdded

See Sender for more information about ContractResponse.

Contract Information

Contract: Colony.sol

Interface: IColony.sol

addExtension

Add an extension contract.

await colonyClient.addExtension.send({
  contractName,
}, options);

Input

NameTypeDescription
contractNamestringThe name of the extension contract (OneTxPayment or OldRoles).

Options

See Sender for more information about options.

Response

An instance of a ContractResponse.

See Sender for more information about ContractResponse.

Contract Information

addGlobalSkill

Add a global skill. This can only be called from the Meta Colony and only by the address assigned the colony ROOT role.

await colonyClient.addGlobalSkill.send(options);

Options

See Sender for more information about options.

Response

An instance of a ContractResponse which will eventually receive the following event data:

NameTypeDescription
skillIdnumberThe ID of the skill that was added.
parentSkillIdnumberThe ID of the parent skill.
SkillAddedobjectContains the data defined in SkillAdded

See Sender for more information about ContractResponse.

Contract Information

Contract: Colony.sol

Interface: IMetaColony.sol

addPayment

Add a payment to the colony.

await colonyClient.addPayment.send({
  recipient,
  token,
  amount,
  domainId,
  skillId,
}, options);

Input

NameTypeDescription
recipientaddressThe address that will receive the payment.
tokenany addressThe address of the token contract (an empty address if Ether).
amountbig numberThe amount of tokens (or Ether) for the payment.
domainIdnumberThe ID of the domain.
skillIdnumberThe ID of the skill.

Options

See Sender for more information about options.

Response

An instance of a ContractResponse which will eventually receive the following event data:

NameTypeDescription
potIdnumberThe ID of the pot that was added.
paymentIdnumberThe ID of the payment that was added.
FundingPotAddedobjectContains the data defined in FundingPotAdded
PaymentAddedobjectContains the data defined in PaymentAdded

See Sender for more information about ContractResponse.

Contract Information

Contract: ColonyPayment.sol

Interface: IColony.sol

addTask

Add a new task within the colony.

await colonyClient.addTask.send({
  specificationHash,
  domainId,
  skillId,
  dueDate,
}, options);

Input

NameTypeDescription
specificationHashIPFS hashThe specification hash of the task (an IPFS hash).
domainIdnumber (optional)The ID of the domain (default value of 1).
skillIdnumber (optional)The ID of the skill (default value of null).
dueDatedate (optional)The due date of the task (default value of 30 days from creation).

Options

See Sender for more information about options.

Response

An instance of a ContractResponse which will eventually receive the following event data:

NameTypeDescription
taskIdnumberThe ID of the task that was modified.
skillIdnumberThe ID of the skill that was set.
dueDatedateThe due date that was set.
potIdnumberThe ID of the pot that was added.
TaskSkillSetobjectContains the data defined in TaskSkillSet
TaskDueDateSetobjectContains the data defined in TaskDueDateSet
FundingPotAddedobjectContains the data defined in FundingPotAdded
TaskAddedobjectContains the data defined in TaskAdded

See Sender for more information about ContractResponse.

Contract Information

Function: makeTask

Contract: ColonyTask.sol

Interface: IColony.sol

approveExitRecovery

Indicate approval to exit colony recovery mode. This function can only be called by an address assigned the colony RECOVERY role.

await colonyClient.approveExitRecovery.send(options);

Options

See Sender for more information about options.

Response

An instance of a ContractResponse.

See Sender for more information about ContractResponse.

Contract Information

Contract: ContractRecovery.sol

Interface: IRecovery.sol

bootstrapColony

Bootstrap the colony by giving an initial amount of tokens and reputation to selected addresses. This function can only be called by the address assigned the colony ROOT role when the taskCount for the colony is equal to 0.

await colonyClient.bootstrapColony.send({
  addresses,
  amounts,
}, options);

Input

NameTypeDescription
addressesarrayThe array of users that will recieve an initial amount of tokens and reputation.
amountsarrayThe array of corresponding token and reputation amounts each user will recieve.

Options

See Sender for more information about options.

Response

An instance of a ContractResponse which will eventually receive the following event data:

NameTypeDescription
addressesarrayThe array of users that received an initial amount of tokens and reputation.
amountsarrayThe array of corresponding token and reputation amounts each user recieved.
fromaddressThe address of the account that sent tokens.
toaddressThe address of the account that received tokens.
valuebig numberThe amount of tokens that were transferred.
ColonyBootstrappedobjectContains the data defined in ColonyBootstrapped
TransferobjectContains the data defined in Transfer

See Sender for more information about ContractResponse.

Contract Information

Contract: Colony.sol

Interface: IColony.sol

claimColonyFunds

Claim funds that the colony has received by adding them to the funding pot of the root domain. A set fee is deducted from the funds claimed and added to the colony rewards pot. No fee is deducted when tokens native to the colony are claimed.

await colonyClient.claimColonyFunds.send({
  token,
}, options);

Input

NameTypeDescription
tokenany addressThe address of the token contract (an empty address if Ether).

Options

See Sender for more information about options.

Response

An instance of a ContractResponse which will eventually receive the following event data:

NameTypeDescription
tokenany addressThe address of the token contract (an empty address if Ether).
feebig numberThe fee deducted from the claim and added to the colony rewards pot.
payoutRemainderbig numberThe remaining funds (after the fee) moved to the top-level domain pot.
ColonyFundsClaimedobjectContains the data defined in ColonyFundsClaimed

See Sender for more information about ContractResponse.

Contract Information

Contract: ColonyFunding.sol

Interface: IColony.sol

claimPayment

Claim a payment.

await colonyClient.claimPayment.send({
  paymentId,
  token,
}, options);

Input

NameTypeDescription
paymentIdnumberThe ID of the payment.
tokenany addressThe address of the token contract (an empty address if Ether).

Options

See Sender for more information about options.

Response

An instance of a ContractResponse which will eventually receive the following event data:

NameTypeDescription
potIdnumberThe ID of the pot that was modified.
tokenany addressThe address of the token contract (an empty address if Ether).
amountbig numberThe task payout amount that was claimed.
fromaddressThe address of the account that sent tokens.
toaddressThe address of the account that received tokens.
valuebig numberThe amount of tokens that were transferred.
PayoutClaimedobjectContains the data defined in PayoutClaimed
TransferobjectContains the data defined in Transfer

See Sender for more information about ContractResponse.

Contract Information

Contract: ColonyFunding.sol

Interface: IColony.sol

claimRewardPayout

Claim a reward payout.

await colonyClient.claimRewardPayout.send({
  payoutId,
  squareRoots,
  key,
  value,
  branchMask,
  siblings,
}, options);

Input

NameTypeDescription
payoutIdnumberThe ID of the payout.
squareRootsarrayThe square roots of values used in the equation.
keystringThe key of the element that the proof is for.
valuestringThe value of the element that the proof is for.
branchMasknumberThe branchmask of the proof.
siblingsarrayThe siblings of the proof.

Options

See Sender for more information about options.

Response

An instance of a ContractResponse which will eventually receive the following event data:

NameTypeDescription
rewardPayoutIdnumberThe ID of the reward payout cycle.
useraddressThe address of the user who claimed the reward payout.
feebig numberThe fee deducted from the claim and added to the colony rewards pot.
payoutRemainderbig numberThe remaining payout amount (after the fee) transferred to the user.
fromaddressThe address of the account that sent tokens.
toaddressThe address of the account that received tokens.
valuebig numberThe amount of tokens that were transferred.
RewardPayoutClaimedobjectContains the data defined in RewardPayoutClaimed
TransferobjectContains the data defined in Transfer

See Sender for more information about ContractResponse.

Contract Information

Contract: ColonyFunding.sol

Interface: IColony.sol

claimTaskPayout

Claim a payout assigned to a task role (MANAGER, EVALUATOR, or WORKER). This function can only be called by the address assigned the given task role after the task has been finalized.

await colonyClient.claimTaskPayout.send({
  taskId,
  role,
  token,
}, options);

Input

NameTypeDescription
taskIdnumberThe ID of the task.
roletask roleThe task role that is claiming the payout (MANAGER, EVALUATOR, or WORKER).
tokenany addressThe address of the token contract (an empty address if Ether).

Options

See Sender for more information about options.

Response

An instance of a ContractResponse which will eventually receive the following event data:

NameTypeDescription
potIdnumberThe ID of the pot that was modified.
tokenany addressThe address of the token contract (an empty address if Ether).
amountbig numberThe task payout amount that was claimed.
fromaddressThe address of the account that sent tokens.
toaddressThe address of the account that received tokens.
valuebig numberThe amount of tokens that were transferred.
PayoutClaimedobjectContains the data defined in PayoutClaimed
TransferobjectContains the data defined in Transfer

See Sender for more information about ContractResponse.

Contract Information

Contract: ColonyFunding.sol

Interface: IColony.sol

completeTask

Mark a task as complete. If the address assigned the task WORKER role fails to submit the task deliverable by the due date, this function must be called by the address assigned the task MANAGER role. This allows the task work to be rated and the task to be finalized.

await colonyClient.completeTask.send({
  taskId,
}, options);

Input

NameTypeDescription
taskIdnumberThe ID of the task.

Options

See Sender for more information about options.

Response

An instance of a ContractResponse which will eventually receive the following event data:

NameTypeDescription
taskIdnumberThe ID of the task that was completed.
TaskCompletedobjectContains the data defined in TaskCompleted

See Sender for more information about ContractResponse.

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

deprecateGlobalSkill

Deprecate a global skill. This can only be called from the Meta Colony and only by the address assigned the colony ROOT role.

await colonyClient.deprecateGlobalSkill.send({
  skillId,
}, options);

Input

NameTypeDescription
skillIdnumberThe ID of the skill that will be deprecated.

Options

See Sender for more information about options.

Response

An instance of a ContractResponse.

See Sender for more information about ContractResponse.

Contract Information

Contract: Colony.sol

Interface: IMetaColony.sol

enterRecoveryMode

Enter colony recovery mode. This function can only be called by a user assigned the colony RECOVERY role.

await colonyClient.enterRecoveryMode.send(options);

Options

See Sender for more information about options.

Response

An instance of a ContractResponse.

See Sender for more information about ContractResponse.

Contract Information

Contract: ContractRecovery.sol

Interface: IRecovery.sol

exitRecoveryMode

Exit colony recovery mode. This function can be called by anyone if enough whitelist approvals are given.

await colonyClient.exitRecoveryMode.send(options);

Options

See Sender for more information about options.

Response

An instance of a ContractResponse.

See Sender for more information about ContractResponse.

Contract Information

Contract: ContractRecovery.sol

Interface: IRecovery.sol

finalizePayment

Finalize a payment. Once a payment is finalized, no further changes to the payment can be made and the address that is assigned the payment can claim the payment.

await colonyClient.finalizePayment.send({
  paymentId,
}, options);

Input

NameTypeDescription
paymentIdnumberThe ID of the payment.

Options

See Sender for more information about options.

Response

An instance of a ContractResponse.

See Sender for more information about ContractResponse.

Contract Information

Contract: ColonyPayment.sol

Interface: IColony.sol

finalizeRewardPayout

Finalize a reward payout cycle. This function can only be called when the reward payout cycle has finished, i.e. 60 days have passed since the creation of the reward payout cycle.

await colonyClient.finalizeRewardPayout.send({
  payoutId,
}, options);

Input

NameTypeDescription
payoutIdnumberThe ID of the reward payout cycle.

Options

See Sender for more information about options.

Response

An instance of a ContractResponse which will eventually receive the following event data:

NameTypeDescription
payoutIdnumberThe ID of the payout cycle that ended.
RewardPayoutCycleEndedobjectContains the data defined in RewardPayoutCycleEnded

See Sender for more information about ContractResponse.

Contract Information

Contract: ColonyFunding.sol

Interface: IColony.sol

finalizeTask

Finalize a task. Once a task is finalized, no further changes to the task can be made and each user assigned a task role can claim the payout assigned to their role.

await colonyClient.finalizeTask.send({
  taskId,
}, options);

Input

NameTypeDescription
taskIdnumberThe ID of the task.

Options

See Sender for more information about options.

Response

An instance of a ContractResponse which will eventually receive the following event data:

NameTypeDescription
taskIdnumberThe ID of the task that was finalized.
TaskFinalizedobjectContains the data defined in TaskFinalized

See Sender for more information about ContractResponse.

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

makePayment

Make a payment in one transaction. This function is not included in the core contracts but instead it comes from the OneTxPayment extension contract. The OneTxPayment extension contract and the sender must both be assigned the colony ADMINISTRATION role.

await colonyClient.makePayment.send({
  recipient,
  token,
  amount,
  domainId,
  skillId,
}, options);

Input

NameTypeDescription
recipientaddressThe address that will receive the payment.
tokenany addressThe address of the token contract (an empty address if Ether).
amountbig numberThe amount of tokens (or Ether) for the payment.
domainIdnumberThe ID of the domain.
skillIdnumberThe ID of the skill.

Options

See Sender for more information about options.

Response

An instance of a ContractResponse which will eventually receive the following event data:

NameTypeDescription
potIdnumberThe ID of the pot that was added.
paymentIdnumberThe ID of the payment that was added.
fromPotnumberThe ID of the pot from which the funds were moved.
toPotnumberThe ID of the pot to which the funds were moved.
amountbig numberThe amount of funds that were moved between pots.
tokenany addressThe address of the token contract (an empty address if Ether).
fromaddressThe address of the account that sent tokens.
toaddressThe address of the account that received tokens.
valuebig numberThe amount of tokens that were transferred.
FundingPotAddedobjectContains the data defined in FundingPotAdded
PaymentAddedobjectContains the data defined in PaymentAdded
ColonyFundsMovedBetweenFundingPotsobjectContains the data defined in ColonyFundsMovedBetweenFundingPots
TransferobjectContains the data defined in Transfer
PayoutClaimedobjectContains the data defined in PayoutClaimed

See Sender for more information about ContractResponse.

Contract Information

Contract: OneTxPayment.sol

mintTokens

Mint new tokens. This function can only be called if the address of the colony contract is the owner of the token contract. If this is the case, then this function can only be called by the address assigned the colony ROOT role.

await colonyClient.mintTokens.send({
  amount,
}, options);

Input

NameTypeDescription
amountbig numberThe amount of new tokens that will be minted.

Options

See Sender for more information about options.

Response

An instance of a ContractResponse which will eventually receive the following event data:

NameTypeDescription
addressaddressThe address that initiated the mint event.
amountbig numberThe amount of tokens that were minted.
MintobjectContains the data defined in Mint

See Sender for more information about ContractResponse.

Contract Information

Contract: Colony.sol

Interface: IColony.sol

mintTokensForColonyNetwork

Mint tokens for the Colony Network. This can only be called from the Meta Colony and only by the address assigned the colony ROOT role.

await colonyClient.mintTokensForColonyNetwork.send({
  amount,
}, options);

Input

NameTypeDescription
amountbig numberThe amount of new tokens that will be minted.

Options

See Sender for more information about options.

Response

An instance of a ContractResponse which will eventually receive the following event data:

NameTypeDescription
addressaddressThe address that initiated the mint event.
amountbig numberThe amount of tokens that were minted.
fromaddressThe address of the account that sent tokens.
toaddressThe address of the account that received tokens.
valuebig numberThe amount of tokens that were transferred.
MintobjectContains the data defined in Mint
TransferobjectContains the data defined in Transfer

See Sender for more information about ContractResponse.

Contract Information

Contract: Colony.sol

Interface: IMetaColony.sol

moveFundsBetweenPots

Move funds from one pot to another.

await colonyClient.moveFundsBetweenPots.send({
  fromPot,
  toPot,
  amount,
  token,
}, options);

Input

NameTypeDescription
fromPotnumberThe ID of the pot from which funds will be moved.
toPotnumberThe ID of the pot to which funds will be moved.
amountbig numberThe amount of funds that will be moved between pots.
tokenany addressThe address of the token contract (an empty address if Ether).

Options

See Sender for more information about options.

Response

An instance of a ContractResponse which will eventually receive the following event data:

NameTypeDescription
fromPotnumberThe ID of the pot from which the funds were moved.
toPotnumberThe ID of the pot to which the funds were moved.
amountbig numberThe amount of funds that were moved between pots.
tokenany addressThe address of the token contract (an empty address if Ether).
ColonyFundsMovedBetweenFundingPotsobjectContains the data defined in ColonyFundsMovedBetweenFundingPots

See Sender for more information about ContractResponse.

Contract Information

Contract: ColonyFunding.sol

Interface: IColony.sol

registerColonyLabel

Register an ENS label for the colony.

await colonyClient.registerColonyLabel.send({
  colonyName,
  orbitDBPath,
}, options);

Input

NameTypeDescription
colonyNamestringThe ENS label that will be registered for the colony.
orbitDBPathstring (optional)The path of the OrbitDB database associated with the colony.

Options

See Sender for more information about options.

Response

An instance of a ContractResponse which will eventually receive the following event data:

NameTypeDescription
colonyaddressThe address of the colony that was modified.
labelstringThe label that was registered for the colony.
ColonyLabelRegisteredobjectContains the data defined in ColonyLabelRegistered

See Sender for more information about ContractResponse.

Contract Information

Contract: Colony.sol

Interface: IColony.sol

removeExtension

Remove an extension contract.

await colonyClient.removeExtension.send({
  contractName,
}, options);

Input

NameTypeDescription
contractNamestringThe name of the extension contract (OneTxPayment or OldRoles).

Options

See Sender for more information about options.

Response

An instance of a ContractResponse.

See Sender for more information about ContractResponse.

Contract Information

removeRecoveryRole

Remove the colony RECOVERY role from an address. This function can only be called by the colony ROOT role.

await colonyClient.removeRecoveryRole.send({
  address,
}, options);

Input

NameTypeDescription
addressaddressThe address that will be unassigned the colony RECOVERY role.

Options

See Sender for more information about options.

Response

An instance of a ContractResponse.

See Sender for more information about ContractResponse.

Contract Information

Contract: ContractRecovery.sol

Interface: IRecovery.sol

revealTaskWorkRating

Reveal a submitted work rating. In order to reveal a work rating, the same salt and value used to generate the secret when the task work rating was submitted must be provided again here to reveal the task work rating.

await colonyClient.revealTaskWorkRating.send({
  taskId,
  role,
  rating,
  salt,
}, options);

Input

NameTypeDescription
taskIdnumberThe ID of the task.
roletask roleThe role that received the rating (MANAGER or WORKER).
ratingnumberThe rating that was submitted (1, 2, or 3).
saltstringThe string that was used to generate the secret.

Options

See Sender for more information about options.

Response

An instance of a ContractResponse which will eventually receive the following event data:

NameTypeDescription
taskIdnumberThe ID of the task that was modified.
roletask roleThe role of the task that received the rating (MANAGER, EVALUATOR, or WORKER).
ratingnumberThe value of the rating that was revealed (1, 2, or 3).
TaskWorkRatingRevealedobjectContains the data defined in TaskWorkRatingRevealed

See Sender for more information about ContractResponse.

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

setAdminRole

Assign the colony ADMIN role to an address. This function is not included in the core contracts but instead it comes from the OldRoles extension contract. This function can only be called by an address assigned the colony ROOT (FOUNDER) role or an address assigned the colony ADMIN (ARCHITECTURE) role. There is no limit to the number of addresses that can be assigned the colony ADMIN role.

await colonyClient.setAdminRole.send({
  address,
  setTo,
}, options);

Input

NameTypeDescription
addressaddressThe address that will be assigned the colony ADMIN role.
setTobooleanA boolean indicating whether the address will be assigned or unassigned the colony ADMIN role.

Options

See Sender for more information about options.

Response

An instance of a ContractResponse which will eventually receive the following event data:

NameTypeDescription
addressaddressThe address for which the role was set.
domainIdnumberThe domain in which the role was set.
rolecolony roleThe role which was set, one of: ADMINISTRATION, ARBITRATION, ARCHITECTURE, ARCHITECTURE_SUBDOMAIN, FUNDING, RECOVERY or ROOT.
setTobooleanWhether the role was assigned (true) on unassigned (false).
ColonyRoleSetobjectContains the data defined in ColonyRoleSet

See Sender for more information about ContractResponse.

Contract Information

Contract: OldRoles.sol

setAdministrationRole

Assign the colony ADMINISTRATION role to an address. The address calling the method must have permission within the domain that permission is being granted or a parent domain to the domain that permission is being granted. The address calling the method must already be assigned either the colony ROOT or ARCHITECTURE role within the domain or parent domain.

await colonyClient.setAdministrationRole.send({
  address,
  domainId,
  setTo,
}, options);

Input

NameTypeDescription
addressaddressThe address that will be assigned or unassigned the colony ADMINISTRATION role.
domainIdnumberThe ID of the domain that the colony ADMINISTRATION role will be assigned or unassigned.
setTobooleanA boolean indicating whether the address will be assigned or unassigned the colony ADMINISTRATION role.

Options

See Sender for more information about options.

Response

An instance of a ContractResponse which will eventually receive the following event data:

NameTypeDescription
addressaddressThe address for which the role was set.
domainIdnumberThe domain in which the role was set.
rolecolony roleThe role which was set, one of: ADMINISTRATION, ARBITRATION, ARCHITECTURE, ARCHITECTURE_SUBDOMAIN, FUNDING, RECOVERY or ROOT.
setTobooleanWhether the role was assigned (true) on unassigned (false).
ColonyRoleSetobjectContains the data defined in ColonyRoleSet

See Sender for more information about ContractResponse.

Contract Information

Contract: Colony.sol

Interface: IColony.sol

setAllTaskPayouts

Set the payouts for all task roles. This can only be called by the address assigned the task MANAGER role and only if the task EVALUATOR role and WORKER task role are not assigned or they are assigned to the same address that is currently assigned the task MANAGER role.

await colonyClient.setAllTaskPayouts.send({
  taskId,
  token,
  managerAmount,
  evaluatorAmount,
  workerAmount,
}, options);

Input

NameTypeDescription
taskIdnumberThe ID of the task.
tokenany addressThe address of the token contract (an empty address if Ether).
managerAmountbig numberThe payout amount in tokens (or Ether) for the task MANAGER role.
evaluatorAmountbig numberThe payout amount in tokens (or Ether) for the task EVALUATOR role.
workerAmountbig numberThe payout amount in tokens (or Ether) for the task WORKER role.

Options

See Sender for more information about options.

Response

An instance of a ContractResponse which will eventually receive the following event data:

NameTypeDescription
taskIdnumberThe ID of the task that was modified.
roletask roleThe role of the task that was modified (MANAGER, EVALUATOR, or WORKER).
tokenany addressThe address of the token contract (an empty address if Ether).
amountbig numberThe task payout amount that was set.
TaskPayoutSetobjectContains the data defined in TaskPayoutSet

See Sender for more information about ContractResponse.

Contract Information

Contract: ColonyFunding.sol

Interface: IColony.sol

setArchitectureRole

Assign the colony ARCHITECTURE role to an address. The address calling the method must have permission within the domain that permission is being granted or a parent domain to the domain that permission is being granted. The address calling the method must already be assigned either the colony ROOT or ARCHITECTURE role within the domain or parent domain.

await colonyClient.setArchitectureRole.send({
  address,
  domainId,
  setTo,
}, options);

Input

NameTypeDescription
addressaddressThe address that will be assigned or unassigned the colony ARCHITECTURE role.
domainIdnumberThe ID of the domain that the colony ARCHITECTURE role will be assigned or unassigned.
setTobooleanA boolean indicating whether the address will be assigned or unassigned the colony ARCHITECTURE role.

Options

See Sender for more information about options.

Response

An instance of a ContractResponse which will eventually receive the following event data:

NameTypeDescription
addressaddressThe address for which the role was set.
domainIdnumberThe domain in which the role was set.
rolecolony roleThe role which was set, one of: ADMINISTRATION, ARBITRATION, ARCHITECTURE, ARCHITECTURE_SUBDOMAIN, FUNDING, RECOVERY or ROOT.
setTobooleanWhether the role was assigned (true) on unassigned (false).
ColonyRoleSetobjectContains the data defined in ColonyRoleSet

See Sender for more information about ContractResponse.

Contract Information

Contract: Colony.sol

Interface: IColony.sol

setFounderRole

Assign the colony FOUNDER role to an address. This function is not included in the core contracts but instead it comes from the OldRoles extension contract. This function can only be called by an address assigned the colony ROOT (FOUNDER) role. There can only be one address assigned to the colony ROOT (FOUNDER) role, therefore, the address currently assigned will forfeit the role.

await colonyClient.setFounderRole.send({
  address,
}, options);

Input

NameTypeDescription
addressaddressThe address that will be assigned the colony FOUNDER role.

Options

See Sender for more information about options.

Response

An instance of a ContractResponse which will eventually receive the following event data:

NameTypeDescription
addressaddressThe address for which the role was set.
domainIdnumberThe domain in which the role was set.
rolecolony roleThe role which was set, one of: ADMINISTRATION, ARBITRATION, ARCHITECTURE, ARCHITECTURE_SUBDOMAIN, FUNDING, RECOVERY or ROOT.
setTobooleanWhether the role was assigned (true) on unassigned (false).
ColonyRoleSetobjectContains the data defined in ColonyRoleSet

See Sender for more information about ContractResponse.

Contract Information

Contract: OldRoles.sol

setFundingRole

Assign the colony FUNDING role to an address. The address calling the method must have permission within the domain that permission is being granted or a parent domain to the domain that permission is being granted. The address calling the method must already be assigned either the colony ROOT or ARCHITECTURE role within the domain or parent domain.

await colonyClient.setFundingRole.send({
  address,
  domainId,
  setTo,
}, options);

Input

NameTypeDescription
addressaddressThe address that will be assigned or unassigned the colony FUNDING role.
domainIdnumberThe ID of the domain that the colony FUNDING role will be assigned or unassigned.
setTobooleanA boolean indicating whether the address will be assigned or unassigned the colony FUNDING role.

Options

See Sender for more information about options.

Response

An instance of a ContractResponse which will eventually receive the following event data:

NameTypeDescription
addressaddressThe address for which the role was set.
domainIdnumberThe domain in which the role was set.
rolecolony roleThe role which was set, one of: ADMINISTRATION, ARBITRATION, ARCHITECTURE, ARCHITECTURE_SUBDOMAIN, FUNDING, RECOVERY or ROOT.
setTobooleanWhether the role was assigned (true) on unassigned (false).
ColonyRoleSetobjectContains the data defined in ColonyRoleSet

See Sender for more information about ContractResponse.

Contract Information

Contract: Colony.sol

Interface: IColony.sol

setNetworkFeeInverse

Set the inverse amount of the reward. This can only be called from the Meta Colony and only by the address assigned the colony ROOT role. If the fee is 1% (or 0.01), the inverse amount will be 100.

await colonyClient.setNetworkFeeInverse.send({
  feeInverse,
}, options);

Input

NameTypeDescription
feeInversenumberThe inverse amount that will be set.

Options

See Sender for more information about options.

Response

An instance of a ContractResponse.

See Sender for more information about ContractResponse.

Contract Information

Contract: Colony.sol

Interface: IMetaColony.sol

setPaymentDomain

Set the payment domain.

await colonyClient.setPaymentDomain.send({
  paymentId,
  domainId,
}, options);

Input

NameTypeDescription
paymentIdnumberThe ID of the payment.
domainIdaddressThe ID of the domain.

Options

See Sender for more information about options.

Response

An instance of a ContractResponse.

See Sender for more information about ContractResponse.

Contract Information

Contract: ColonyPayment.sol

Interface: IColony.sol

setPaymentPayout

Set the payment payout.

await colonyClient.setPaymentPayout.send({
  paymentId,
  token,
  amount,
}, options);

Input

NameTypeDescription
paymentIdnumberThe ID of the payment.
tokenaddressThe address of the token contract (an empty address if Ether).
amountbig numberThe amount of the payment.

Options

See Sender for more information about options.

Response

An instance of a ContractResponse.

See Sender for more information about ContractResponse.

Contract Information

Contract: ColonyFunding.sol

Interface: IColony.sol

setPaymentRecipient

Set the payment recipient.

await colonyClient.setPaymentRecipient.send({
  paymentId,
  recipient,
}, options);

Input

NameTypeDescription
paymentIdnumberThe ID of the payment.
recipientaddressThe address that will receive the payment.

Options

See Sender for more information about options.

Response

An instance of a ContractResponse.

See Sender for more information about ContractResponse.

Contract Information

Contract: ColonyPayment.sol

Interface: IColony.sol

setPaymentSkill

Set the payment skill.

await colonyClient.setPaymentSkill.send({
  paymentId,
  skillId,
}, options);

Input

NameTypeDescription
paymentIdnumberThe ID of the payment.
skillIdaddressThe ID of the skill.

Options

See Sender for more information about options.

Response

An instance of a ContractResponse.

See Sender for more information about ContractResponse.

Contract Information

Contract: ColonyPayment.sol

Interface: IColony.sol

setRecoveryRole

Assign the colony RECOVERY role to an address. This function can only be called by the colony ROOT role.

await colonyClient.setRecoveryRole.send({
  address,
}, options);

Input

NameTypeDescription
addressaddressThe address that will be assigned the colony RECOVERY role.

Options

See Sender for more information about options.

Response

An instance of a ContractResponse.

See Sender for more information about ContractResponse.

Contract Information

Contract: ContractRecovery.sol

Interface: IRecovery.sol

setRewardInverse

Set the inverse amount of the reward. This function can only be called by the address currently assigned the colony ROOT role. If the fee is 1% (or 0.01), the inverse amount will be 100.

await colonyClient.setRewardInverse.send({
  rewardInverse,
}, options);

Input

NameTypeDescription
rewardInversebig numberThe inverse amount of the reward.

Options

See Sender for more information about options.

Response

An instance of a ContractResponse which will eventually receive the following event data:

NameTypeDescription
rewardInversebig numberThe reward inverse value that was set.
ColonyRewardInverseSetobjectContains the data defined in ColonyRewardInverseSet

See Sender for more information about ContractResponse.

Contract Information

Contract: ColonyFunding.sol

Interface: IColony.sol

setRootRole

Assign the colony ROOT role to an address. This function can only be called by an address currently assigned the colony ROOT role.

await colonyClient.setRootRole.send({
  address,
  setTo,
}, options);

Input

NameTypeDescription
addressaddressThe address that will either be assigned or unassigned the colony ROOT role.
setTobooleanA boolean indicating whether the address will be assigned or unassigned the colony ROOT role.

Options

See Sender for more information about options.

Response

An instance of a ContractResponse which will eventually receive the following event data:

NameTypeDescription
addressaddressThe address for which the role was set.
domainIdnumberThe domain in which the role was set.
rolecolony roleThe role which was set, one of: ADMINISTRATION, ARBITRATION, ARCHITECTURE, ARCHITECTURE_SUBDOMAIN, FUNDING, RECOVERY or ROOT.
setTobooleanWhether the role was assigned (true) on unassigned (false).
ColonyRoleSetobjectContains the data defined in ColonyRoleSet

See Sender for more information about ContractResponse.

Contract Information

Contract: Colony.sol

Interface: IColony.sol

setStorageSlotRecovery

Set the value for a storage slot while in recovery mode. This can only be called by a user assigned the colony RECOVERY role.

await colonyClient.setStorageSlotRecovery.send({
  slot,
  value,
}, options);

Input

NameTypeDescription
slotnumberThe ID of the storage slot that will be modified.
valuehex stringThe hex string of data that will be set as the value.

Options

See Sender for more information about options.

Response

An instance of a ContractResponse.

See Sender for more information about ContractResponse.

Contract Information

Contract: ContractRecovery.sol

Interface: IRecovery.sol

startNextRewardPayout

Start the next reward payout cycle. All the funds in the colony rewards pot for the given token will become locked until reputation holders have claimed their rewards payout using claimRewardPayout. Reputation holders can also waive their reward payout and unlock their tokens for past reward payout cycles by using incrementLockCounterTo.

await colonyClient.startNextRewardPayout.send({
  token,
  key,
  value,
  branchMask,
  siblings,
}, options);

Input

NameTypeDescription
tokenany addressThe address of the token contract (an empty address if Ether).
keystringThe key of the element that the proof is for.
valuestringThe value of the element that the proof is for.
branchMasknumberThe branchmask of the proof.
siblingsarrayThe siblings of the proof.

Options

See Sender for more information about options.

Response

An instance of a ContractResponse which will eventually receive the following event data:

NameTypeDescription
tokenany addressThe address of the token contract (an empty address if Ether).
lockCountnumberThe total lock count for the token.
payoutIdnumberThe ID of the payout cycle that started.
TokenLockedobjectContains the data defined in TokenLocked
RewardPayoutCycleStartedobjectContains the data defined in RewardPayoutCycleStarted

See Sender for more information about ContractResponse.

Contract Information

Contract: ColonyFunding.sol

Interface: IColony.sol

submitTaskDeliverable

Submit the task deliverable. This function can only be called by the address assigned the task WORKER role on or before the task due date. The submission cannot be overwritten, which means the deliverable cannot be changed once it has been submitted.

await colonyClient.submitTaskDeliverable.send({
  taskId,
  deliverableHash,
}, options);

Input

NameTypeDescription
taskIdnumberThe ID of the task.
deliverableHashIPFS hashThe deliverable hash of the task (an IPFS hash).

Options

See Sender for more information about options.

Response

An instance of a ContractResponse which will eventually receive the following event data:

NameTypeDescription
taskIdnumberThe ID of the task that was completed.
deliverableHashIPFS hashThe deliverable hash that was submitted (an IPFS hash).
TaskCompletedobjectContains the data defined in TaskCompleted
TaskDeliverableSubmittedobjectContains the data defined in TaskDeliverableSubmitted

See Sender for more information about ContractResponse.

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

submitTaskDeliverableAndRating

Submit the task deliverable and the work rating for the address assigned the task MANAGER role. This function can only be called by the address assigned the task WORKER role on or before the task due date. The submission cannot be overwritten, which means the deliverable cannot be changed once it has been submitted. In order to submit a rating, a secret must be generated using the generateSecret method, which keeps the rating hidden until all ratings have been submitted and revealed.

await colonyClient.submitTaskDeliverableAndRating.send({
  taskId,
  deliverableHash,
  secret,
}, options);

Input

NameTypeDescription
taskIdnumberThe ID of the task.
deliverableHashIPFS hashThe deliverable hash of the task (an IPFS hash).
secrethex stringA keccak256 hash that keeps the task rating hidden.

Options

See Sender for more information about options.

Response

An instance of a ContractResponse which will eventually receive the following event data:

NameTypeDescription
taskIdnumberThe ID of the task that was completed.
deliverableHashIPFS hashThe deliverable hash that was submitted (an IPFS hash).
TaskCompletedobjectContains the data defined in TaskCompleted
TaskDeliverableSubmittedobjectContains the data defined in TaskDeliverableSubmitted

See Sender for more information about ContractResponse.

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

submitTaskWorkRating

Submit a work rating for a task. This function can only be called by the address assigned the task EVALUATOR role, who is submitting a rating for the address assigned the task WORKER role, or the address assigned the task WORKER role, who is submitting a rating for the address assigned the task MANAGER role. In order to submit a rating, a secret must be generated using the generateSecret method, which keeps the rating hidden until all ratings have been submitted and revealed.

await colonyClient.submitTaskWorkRating.send({
  taskId,
  role,
  secret,
}, options);

Input

NameTypeDescription
taskIdnumberThe ID of the task.
roletask roleThe role that will receive the rating (MANAGER or WORKER).
secrethex stringA keccak256 hash that keeps the task rating hidden.

Options

See Sender for more information about options.

Response

An instance of a ContractResponse.

See Sender for more information about ContractResponse.

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

upgrade

Upgrade the colony to a new colony contract version. The new version must be higher than the current version. Downgrading to old versions is not permitted.

await colonyClient.upgrade.send({
  newVersion,
}, options);

Input

NameTypeDescription
newVersionnumberThe new colony contract version that will be applied to the colony.

Options

See Sender for more information about options.

Response

An instance of a ContractResponse which will eventually receive the following event data:

NameTypeDescription
oldVersionnumberThe old version number of the colony.
newVersionnumberThe new version number of the colony.
ColonyUpgradedobjectContains the data defined in ColonyUpgraded

See Sender for more information about ContractResponse.

Contract Information

Contract: Colony.sol

Interface: IColony.sol

MultiSigSenders

cancelTask

Cancel a task. Once a task is cancelled, no further changes to the task can be made.

await colonyClient.cancelTask.startOperation({
  taskId,
});

Input

NameTypeDescription
taskIdnumberThe ID of the task.

Response

An instance of a MultiSigOperation whose sender will eventually receive the following event data:

NameTypeDescription
taskIdnumberThe ID of the task that was canceled.
TaskCanceledobjectContains the data defined in TaskCanceled

See MutisigOperation for more information.

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

removeTaskEvaluatorRole

Remove the task EVALUATOR role from an address. This function can only be called before the task is complete, i.e. either before the deliverable has been submitted or the address assigned the task WORKER role has failed to meet the deadline and the address assigned the task MANAGER role has marked the task as complete.

await colonyClient.removeTaskEvaluatorRole.startOperation({
  taskId,
});

Input

NameTypeDescription
taskIdnumberThe ID of the task.

Response

An instance of a MultiSigOperation whose sender will eventually receive the following event data:

NameTypeDescription
taskIdnumberThe ID of the task that was modified.
roletask roleThe role of the task that was set (MANAGER, EVALUATOR, or WORKER).
useraddressThe user that was assigned the task role.
TaskRoleUserSetobjectContains the data defined in TaskRoleUserSet

See MutisigOperation for more information.

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

removeTaskWorkerRole

Remove the task WORKER role from an address. This function can only be called before the task is complete, i.e. either before the deliverable has been submitted or the address assigned the task WORKER role has failed to meet the deadline and the address assigned the task MANAGER role has marked the task as complete.

await colonyClient.removeTaskWorkerRole.startOperation({
  taskId,
});

Input

NameTypeDescription
taskIdnumberThe ID of the task.

Response

An instance of a MultiSigOperation whose sender will eventually receive the following event data:

NameTypeDescription
taskIdnumberThe ID of the task that was modified.
roletask roleThe role of the task that was set (MANAGER, EVALUATOR, or WORKER).
useraddressThe user that was assigned the task role.
TaskRoleUserSetobjectContains the data defined in TaskRoleUserSet

See MutisigOperation for more information.

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

setTaskBrief

Set the task specification. The task specification, or "task brief", is a description of the work that must be completed for the task. The description is hashed and stored with the task for future reference during the rating process or in the event of a dispute.

await colonyClient.setTaskBrief.startOperation({
  taskId,
  specificationHash,
});

Input

NameTypeDescription
taskIdnumberThe ID of the task.
specificationHashIPFS hashThe specification hash of the task (an IPFS hash).

Response

An instance of a MultiSigOperation whose sender will eventually receive the following event data:

NameTypeDescription
taskIdnumberThe ID of the task that was modified.
specificationHashIPFS hashThe specification hash that was set (an IPFS hash).
TaskBriefSetobjectContains the data defined in TaskBriefSet

See MutisigOperation for more information.

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

setTaskDomain

Set the domain of a task. Every task must belong to a domain. This function can only be called by the address assigned the task MANAGER role.

await colonyClient.setTaskDomain.startOperation({
  taskId,
  domainId,
});

Input

NameTypeDescription
taskIdnumberThe ID of the task.
domainIdnumberThe ID of the domain.

Response

An instance of a MultiSigOperation whose sender will eventually receive the following event data:

NameTypeDescription
taskIdnumberThe ID of the task that was modified.
domainIdnumberThe ID of the domain that was set.
TaskDomainSetobjectContains the data defined in TaskDomainSet

See MutisigOperation for more information.

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

setTaskDueDate

Set the due date of a task. The due date is the last day that the address assigned the task WORKER role can submit the task deliverable.

await colonyClient.setTaskDueDate.startOperation({
  taskId,
  dueDate,
});

Input

NameTypeDescription
taskIdnumberThe ID of the task.
dueDatedateThe due date of the task.

Response

An instance of a MultiSigOperation whose sender will eventually receive the following event data:

NameTypeDescription
taskIdnumberThe ID of the task that was modified.
dueDatedateThe due date that was set.
TaskDueDateSetobjectContains the data defined in TaskDueDateSet

See MutisigOperation for more information.

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

setTaskEvaluatorPayout

Set the payout amount for the task EVALUATOR role.

await colonyClient.setTaskEvaluatorPayout.startOperation({
  taskId,
  token,
  amount,
});

Input

NameTypeDescription
taskIdnumberThe ID of the task.
tokenany addressThe address of the token contract (an empty address if Ether).
amountbig numberThe payout amount in tokens (or Ether).

Response

An instance of a MultiSigOperation whose sender will eventually receive the following event data:

NameTypeDescription
taskIdnumberThe ID of the task that was modified.
roletask roleThe role of the task that was modified (MANAGER, EVALUATOR, or WORKER).
tokenany addressThe address of the token contract (an empty address if Ether).
amountbig numberThe task payout amount that was set.
TaskPayoutSetobjectContains the data defined in TaskPayoutSet

See MutisigOperation for more information.

Contract Information

Contract: ColonyFunding.sol

Interface: IColony.sol

setTaskEvaluatorRole

Assign the task EVALUATOR role to an address. This function can only be called before the task is finalized. The address assigned the task MANAGER role and the address being assigned the task EVALUATOR role must both sign the transaction before it can be executed.

await colonyClient.setTaskEvaluatorRole.startOperation({
  taskId,
  address,
});

Input

NameTypeDescription
taskIdnumberThe ID of the task.
addressaddressThe address that will be assigned the task EVALUATOR role.

Response

An instance of a MultiSigOperation whose sender will eventually receive the following event data:

NameTypeDescription
taskIdnumberThe ID of the task that was modified.
roletask roleThe role of the task that was set (MANAGER, EVALUATOR, or WORKER).
useraddressThe user that was assigned the task role.
TaskRoleUserSetobjectContains the data defined in TaskRoleUserSet

See MutisigOperation for more information.

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

setTaskManagerPayout

Set the payout amount for the task MANAGER role.

await colonyClient.setTaskManagerPayout.startOperation({
  taskId,
  token,
  amount,
});

Input

NameTypeDescription
taskIdnumberThe ID of the task.
tokenany addressThe address of the token contract (an empty address if Ether).
amountbig numberThe payout amount in tokens (or Ether).

Response

An instance of a MultiSigOperation whose sender will eventually receive the following event data:

NameTypeDescription
taskIdnumberThe ID of the task that was modified.
roletask roleThe role of the task that was modified (MANAGER, EVALUATOR, or WORKER).
tokenany addressThe address of the token contract (an empty address if Ether).
amountbig numberThe task payout amount that was set.
TaskPayoutSetobjectContains the data defined in TaskPayoutSet

See MutisigOperation for more information.

Contract Information

Contract: ColonyFunding.sol

Interface: IColony.sol

setTaskManagerRole

Assign the task MANAGER role to an address. This function can only be called before the task is finalized. The address currently assigned the task MANAGER role and the address being assigned the task MANAGER role must both sign the transaction before it can be executed.

await colonyClient.setTaskManagerRole.startOperation({
  taskId,
  address,
});

Input

NameTypeDescription
taskIdnumberThe ID of the task.
addressaddressThe address that will be assigned the task MANAGER role.

Response

An instance of a MultiSigOperation whose sender will eventually receive the following event data:

NameTypeDescription
taskIdnumberThe ID of the task that was modified.
roletask roleThe role of the task that was set (MANAGER, EVALUATOR, or WORKER).
useraddressThe user that was assigned the task role.
TaskRoleUserSetobjectContains the data defined in TaskRoleUserSet

See MutisigOperation for more information.

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

setTaskSkill

Set the skill of a task. Only one skill can be assigned per task. The user assigned the task MANAGER role and the address assigned the task WORKER role must both sign this transaction before it can be executed.

await colonyClient.setTaskSkill.startOperation({
  taskId,
  skillId,
});

Input

NameTypeDescription
taskIdnumberThe ID of the task.
skillIdnumberThe ID of the skill.

Response

An instance of a MultiSigOperation whose sender will eventually receive the following event data:

NameTypeDescription
taskIdnumberThe ID of the task that was modified.
skillIdnumberThe ID of the skill that was set.
TaskSkillSetobjectContains the data defined in TaskSkillSet

See MutisigOperation for more information.

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

setTaskWorkerPayout

Set the payout amount for the task WORKER role.

await colonyClient.setTaskWorkerPayout.startOperation({
  taskId,
  token,
  amount,
});

Input

NameTypeDescription
taskIdnumberThe ID of the task.
tokenany addressThe address of the token contract (an empty address if Ether).
amountbig numberThe payout amount in tokens (or Ether).

Response

An instance of a MultiSigOperation whose sender will eventually receive the following event data:

NameTypeDescription
taskIdnumberThe ID of the task that was modified.
roletask roleThe role of the task that was modified (MANAGER, EVALUATOR, or WORKER).
tokenany addressThe address of the token contract (an empty address if Ether).
amountbig numberThe task payout amount that was set.
TaskPayoutSetobjectContains the data defined in TaskPayoutSet

See MutisigOperation for more information.

Contract Information

Contract: ColonyFunding.sol

Interface: IColony.sol

setTaskWorkerRole

Assign the task WORKER role to an address. This function can only be called before the task is finalized. The address assigned the task MANAGER role and the address being assigned the task WORKER role must both sign the transaction before it can be executed.

await colonyClient.setTaskWorkerRole.startOperation({
  taskId,
  address,
});

Input

NameTypeDescription
taskIdnumberThe ID of the task.
addressaddressThe address that will be assigned the task WORKER role.

Response

An instance of a MultiSigOperation whose sender will eventually receive the following event data:

NameTypeDescription
taskIdnumberThe ID of the task that was modified.
roletask roleThe role of the task that was set (MANAGER, EVALUATOR, or WORKER).
useraddressThe user that was assigned the task role.
TaskRoleUserSetobjectContains the data defined in TaskRoleUserSet

See MutisigOperation for more information.

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

Events

ColonyAdministrationRoleSet

Event Handler

const eventHandler = ({
  address,
  setTo,
}) => {
  // perform an action using the event data
};

Add Listener

colonyClient.events.ColonyAdministrationRoleSet.addListener(eventHandler);

Remove Listener

colonyClient.events.ColonyAdministrationRoleSet.removeListener(eventHandler);

Event Data

NameTypeDescription
addressaddressThe address that was either assigned or unassigned the colony ADMINISTRATION role.
setTobooleanA boolean indicating whether the address was assigned or unassigned the colony ADMINISTRATION role.

ColonyArchitectureRoleSet

Event Handler

const eventHandler = ({
  address,
  setTo,
}) => {
  // perform an action using the event data
};

Add Listener

colonyClient.events.ColonyArchitectureRoleSet.addListener(eventHandler);

Remove Listener

colonyClient.events.ColonyArchitectureRoleSet.removeListener(eventHandler);

Event Data

NameTypeDescription
addressaddressThe address that was either assigned or unassigned the colony ARCHITECTURE role.
setTobooleanA boolean indicating whether the address was assigned or unassigned the colony ARCHITECTURE role.

ColonyBootstrapped

Event Handler

const eventHandler = ({
  addresses,
  amounts,
}) => {
  // perform an action using the event data
};

Add Listener

colonyClient.events.ColonyBootstrapped.addListener(eventHandler);

Remove Listener

colonyClient.events.ColonyBootstrapped.removeListener(eventHandler);

Event Data

NameTypeDescription
addressesarrayThe array of users that received an initial amount of tokens and reputation.
amountsarrayThe array of corresponding token and reputation amounts each user recieved.

ColonyFundingRoleSet

Event Handler

const eventHandler = ({
  address,
  setTo,
}) => {
  // perform an action using the event data
};

Add Listener

colonyClient.events.ColonyFundingRoleSet.addListener(eventHandler);

Remove Listener

colonyClient.events.ColonyFundingRoleSet.removeListener(eventHandler);

Event Data

NameTypeDescription
addressaddressThe address that was either assigned or unassigned the colony FUNDING role.
setTobooleanA boolean indicating whether the address was assigned or unassigned the colony FUNDING role.

ColonyFundsClaimed

Event Handler

const eventHandler = ({
  token,
  fee,
  payoutRemainder,
}) => {
  // perform an action using the event data
};

Add Listener

colonyClient.events.ColonyFundsClaimed.addListener(eventHandler);

Remove Listener

colonyClient.events.ColonyFundsClaimed.removeListener(eventHandler);

Event Data

NameTypeDescription
tokenany addressThe address of the token contract (an empty address if Ether).
feebig numberThe fee deducted from the claim and added to the colony rewards pot.
payoutRemainderbig numberThe remaining funds (after the fee) moved to the top-level domain pot.

ColonyFundsMovedBetweenFundingPots

Event Handler

const eventHandler = ({
  fromPot,
  toPot,
  amount,
  token,
}) => {
  // perform an action using the event data
};

Add Listener

colonyClient.events.ColonyFundsMovedBetweenFundingPots.addListener(eventHandler);

Remove Listener

colonyClient.events.ColonyFundsMovedBetweenFundingPots.removeListener(eventHandler);

Event Data

NameTypeDescription
fromPotnumberThe ID of the pot from which the funds were moved.
toPotnumberThe ID of the pot to which the funds were moved.
amountbig numberThe amount of funds that were moved between pots.
tokenany addressThe address of the token contract (an empty address if Ether).

ColonyInitialised

Event Handler

const eventHandler = ({
  colonyNetwork,
  token,
}) => {
  // perform an action using the event data
};

Add Listener

colonyClient.events.ColonyInitialised.addListener(eventHandler);

Remove Listener

colonyClient.events.ColonyInitialised.removeListener(eventHandler);

Event Data

NameTypeDescription
colonyNetworkaddressThe address of the Colony Network.
tokenany addressThe address of the token contract.

ColonyLabelRegistered

Event Handler

const eventHandler = ({
  colony,
  label,
}) => {
  // perform an action using the event data
};

Add Listener

colonyClient.events.ColonyLabelRegistered.addListener(eventHandler);

Remove Listener

colonyClient.events.ColonyLabelRegistered.removeListener(eventHandler);

Event Data

NameTypeDescription
colonyaddressThe address of the colony that was modified.
labelstringThe label that was registered for the colony.

ColonyRewardInverseSet

Event Handler

const eventHandler = ({
  rewardInverse,
}) => {
  // perform an action using the event data
};

Add Listener

colonyClient.events.ColonyRewardInverseSet.addListener(eventHandler);

Remove Listener

colonyClient.events.ColonyRewardInverseSet.removeListener(eventHandler);

Event Data

NameTypeDescription
rewardInversebig numberThe reward inverse value that was set.

ColonyRoleSet

Event Handler

const eventHandler = ({
  address,
  domainId,
  role,
  setTo,
}) => {
  // perform an action using the event data
};

Add Listener

colonyClient.events.ColonyRoleSet.addListener(eventHandler);

Remove Listener

colonyClient.events.ColonyRoleSet.removeListener(eventHandler);

Event Data

NameTypeDescription
addressaddressThe address for which the role was set.
domainIdnumberThe domain in which the role was set.
rolecolony roleThe role which was set, one of: ADMINISTRATION, ARBITRATION, ARCHITECTURE, ARCHITECTURE_SUBDOMAIN, FUNDING, RECOVERY or ROOT.
setTobooleanWhether the role was assigned (true) on unassigned (false).

ColonyRootRoleSet

Event Handler

const eventHandler = ({
  address,
  setTo,
}) => {
  // perform an action using the event data
};

Add Listener

colonyClient.events.ColonyRootRoleSet.addListener(eventHandler);

Remove Listener

colonyClient.events.ColonyRootRoleSet.removeListener(eventHandler);

Event Data

NameTypeDescription
addressaddressThe address that was either assigned or unassigned the colony ROOT role.
setTobooleanA boolean indicating whether the address was assigned or unassigned the colony ROOT role.

ColonyUpgraded

Event Handler

const eventHandler = ({
  oldVersion,
  newVersion,
}) => {
  // perform an action using the event data
};

Add Listener

colonyClient.events.ColonyUpgraded.addListener(eventHandler);

Remove Listener

colonyClient.events.ColonyUpgraded.removeListener(eventHandler);

Event Data

NameTypeDescription
oldVersionnumberThe old version number of the colony.
newVersionnumberThe new version number of the colony.

ColonyVersionAdded

Event Handler

const eventHandler = ({
  version,
  resolver,
}) => {
  // perform an action using the event data
};

Add Listener

colonyClient.events.ColonyVersionAdded.addListener(eventHandler);

Remove Listener

colonyClient.events.ColonyVersionAdded.removeListener(eventHandler);

Event Data

NameTypeDescription
versionnumberThe colony contract version that was added.
resolveraddressThe address of the Resolver contract which will be used with the underlying EtherRouter contract.

DomainAdded

Event Handler

const eventHandler = ({
  domainId,
}) => {
  // perform an action using the event data
};

Add Listener

colonyClient.events.DomainAdded.addListener(eventHandler);

Remove Listener

colonyClient.events.DomainAdded.removeListener(eventHandler);

Event Data

NameTypeDescription
domainIdnumberThe ID of the domain that was added.

FundingPotAdded

Event Handler

const eventHandler = ({
  potId,
}) => {
  // perform an action using the event data
};

Add Listener

colonyClient.events.FundingPotAdded.addListener(eventHandler);

Remove Listener

colonyClient.events.FundingPotAdded.removeListener(eventHandler);

Event Data

NameTypeDescription
potIdnumberThe ID of the pot that was added.

Mint

Event Handler

const eventHandler = ({
  address,
  amount,
}) => {
  // perform an action using the event data
};

Add Listener

colonyClient.events.Mint.addListener(eventHandler);

Remove Listener

colonyClient.events.Mint.removeListener(eventHandler);

Event Data

NameTypeDescription
addressaddressThe address that initiated the mint event.
amountbig numberThe amount of tokens that were minted.

PaymentAdded

Event Handler

const eventHandler = ({
  paymentId,
}) => {
  // perform an action using the event data
};

Add Listener

colonyClient.events.PaymentAdded.addListener(eventHandler);

Remove Listener

colonyClient.events.PaymentAdded.removeListener(eventHandler);

Event Data

NameTypeDescription
paymentIdnumberThe ID of the payment that was added.

PayoutClaimed

Event Handler

const eventHandler = ({
  potId,
  token,
  amount,
}) => {
  // perform an action using the event data
};

Add Listener

colonyClient.events.PayoutClaimed.addListener(eventHandler);

Remove Listener

colonyClient.events.PayoutClaimed.removeListener(eventHandler);

Event Data

NameTypeDescription
potIdnumberThe ID of the pot that was modified.
tokenany addressThe address of the token contract (an empty address if Ether).
amountbig numberThe task payout amount that was claimed.

RewardPayoutClaimed

Event Handler

const eventHandler = ({
  rewardPayoutId,
  user,
  fee,
  payoutRemainder,
}) => {
  // perform an action using the event data
};

Add Listener

colonyClient.events.RewardPayoutClaimed.addListener(eventHandler);

Remove Listener

colonyClient.events.RewardPayoutClaimed.removeListener(eventHandler);

Event Data

NameTypeDescription
rewardPayoutIdnumberThe ID of the reward payout cycle.
useraddressThe address of the user who claimed the reward payout.
feebig numberThe fee deducted from the claim and added to the colony rewards pot.
payoutRemainderbig numberThe remaining payout amount (after the fee) transferred to the user.

RewardPayoutCycleEnded

Event Handler

const eventHandler = ({
  payoutId,
}) => {
  // perform an action using the event data
};

Add Listener

colonyClient.events.RewardPayoutCycleEnded.addListener(eventHandler);

Remove Listener

colonyClient.events.RewardPayoutCycleEnded.removeListener(eventHandler);

Event Data

NameTypeDescription
payoutIdnumberThe ID of the payout cycle that ended.

RewardPayoutCycleStarted

Event Handler

const eventHandler = ({
  payoutId,
}) => {
  // perform an action using the event data
};

Add Listener

colonyClient.events.RewardPayoutCycleStarted.addListener(eventHandler);

Remove Listener

colonyClient.events.RewardPayoutCycleStarted.removeListener(eventHandler);

Event Data

NameTypeDescription
payoutIdnumberThe ID of the payout cycle that started.

SkillAdded

Event Handler

const eventHandler = ({
  skillId,
  parentSkillId,
}) => {
  // perform an action using the event data
};

Add Listener

colonyClient.events.SkillAdded.addListener(eventHandler);

Remove Listener

colonyClient.events.SkillAdded.removeListener(eventHandler);

Event Data

NameTypeDescription
skillIdnumberThe ID of the skill that was added.
parentSkillIdnumberThe ID of the parent skill.

TaskAdded

Event Handler

const eventHandler = ({
  taskId,
}) => {
  // perform an action using the event data
};

Add Listener

colonyClient.events.TaskAdded.addListener(eventHandler);

Remove Listener

colonyClient.events.TaskAdded.removeListener(eventHandler);

Event Data

NameTypeDescription
taskIdnumberThe ID of the task that was added.

TaskBriefSet

Event Handler

const eventHandler = ({
  taskId,
  specificationHash,
}) => {
  // perform an action using the event data
};

Add Listener

colonyClient.events.TaskBriefSet.addListener(eventHandler);

Remove Listener

colonyClient.events.TaskBriefSet.removeListener(eventHandler);

Event Data

NameTypeDescription
taskIdnumberThe ID of the task that was modified.
specificationHashIPFS hashThe specification hash that was set (an IPFS hash).

TaskCanceled

Event Handler

const eventHandler = ({
  taskId,
}) => {
  // perform an action using the event data
};

Add Listener

colonyClient.events.TaskCanceled.addListener(eventHandler);

Remove Listener

colonyClient.events.TaskCanceled.removeListener(eventHandler);

Event Data

NameTypeDescription
taskIdnumberThe ID of the task that was canceled.

TaskCompleted

Event Handler

const eventHandler = ({
  taskId,
}) => {
  // perform an action using the event data
};

Add Listener

colonyClient.events.TaskCompleted.addListener(eventHandler);

Remove Listener

colonyClient.events.TaskCompleted.removeListener(eventHandler);

Event Data

NameTypeDescription
taskIdnumberThe ID of the task that was completed.

TaskDeliverableSubmitted

Event Handler

const eventHandler = ({
  taskId,
  deliverableHash,
}) => {
  // perform an action using the event data
};

Add Listener

colonyClient.events.TaskDeliverableSubmitted.addListener(eventHandler);

Remove Listener

colonyClient.events.TaskDeliverableSubmitted.removeListener(eventHandler);

Event Data

NameTypeDescription
taskIdnumberThe ID of the task that was modified.
deliverableHashIPFS hashThe deliverable hash that was submitted (an IPFS hash).

TaskDomainSet

Event Handler

const eventHandler = ({
  taskId,
  domainId,
}) => {
  // perform an action using the event data
};

Add Listener

colonyClient.events.TaskDomainSet.addListener(eventHandler);

Remove Listener

colonyClient.events.TaskDomainSet.removeListener(eventHandler);

Event Data

NameTypeDescription
taskIdnumberThe ID of the task that was modified.
domainIdnumberThe ID of the domain that was set.

TaskDueDateSet

Event Handler

const eventHandler = ({
  taskId,
  dueDate,
}) => {
  // perform an action using the event data
};

Add Listener

colonyClient.events.TaskDueDateSet.addListener(eventHandler);

Remove Listener

colonyClient.events.TaskDueDateSet.removeListener(eventHandler);

Event Data

NameTypeDescription
taskIdnumberThe ID of the task that was modified.
dueDatedateThe due date that was set.

TaskFinalized

Event Handler

const eventHandler = ({
  taskId,
}) => {
  // perform an action using the event data
};

Add Listener

colonyClient.events.TaskFinalized.addListener(eventHandler);

Remove Listener

colonyClient.events.TaskFinalized.removeListener(eventHandler);

Event Data

NameTypeDescription
taskIdnumberThe ID of the task that was finalized.

TaskPayoutSet

Event Handler

const eventHandler = ({
  taskId,
  role,
  token,
  amount,
}) => {
  // perform an action using the event data
};

Add Listener

colonyClient.events.TaskPayoutSet.addListener(eventHandler);

Remove Listener

colonyClient.events.TaskPayoutSet.removeListener(eventHandler);

Event Data

NameTypeDescription
taskIdnumberThe ID of the task that was modified.
roletask roleThe role of the task that was modified (MANAGER, EVALUATOR, or WORKER).
tokenany addressThe address of the token contract (an empty address if Ether).
amountbig numberThe task payout amount that was set.

TaskRoleUserSet

Event Handler

const eventHandler = ({
  taskId,
  role,
  user,
}) => {
  // perform an action using the event data
};

Add Listener

colonyClient.events.TaskRoleUserSet.addListener(eventHandler);

Remove Listener

colonyClient.events.TaskRoleUserSet.removeListener(eventHandler);

Event Data

NameTypeDescription
taskIdnumberThe ID of the task that was modified.
roletask roleThe role of the task that was set (MANAGER, EVALUATOR, or WORKER).
useraddressThe user that was assigned the task role.

TaskSkillSet

Event Handler

const eventHandler = ({
  taskId,
  skillId,
}) => {
  // perform an action using the event data
};

Add Listener

colonyClient.events.TaskSkillSet.addListener(eventHandler);

Remove Listener

colonyClient.events.TaskSkillSet.removeListener(eventHandler);

Event Data

NameTypeDescription
taskIdnumberThe ID of the task that was modified.
skillIdnumberThe ID of the skill that was set.

TaskWorkRatingRevealed

Event Handler

const eventHandler = ({
  taskId,
  role,
  rating,
}) => {
  // perform an action using the event data
};

Add Listener

colonyClient.events.TaskWorkRatingRevealed.addListener(eventHandler);

Remove Listener

colonyClient.events.TaskWorkRatingRevealed.removeListener(eventHandler);

Event Data

NameTypeDescription
taskIdnumberThe ID of the task that was modified.
roletask roleThe role of the task that received the rating (MANAGER, EVALUATOR, or WORKER).
ratingnumberThe value of the rating that was revealed (1, 2, or 3).

TokenLocked

Event Handler

const eventHandler = ({
  token,
  lockCount,
}) => {
  // perform an action using the event data
};

Add Listener

colonyClient.events.TokenLocked.addListener(eventHandler);

Remove Listener

colonyClient.events.TokenLocked.removeListener(eventHandler);

Event Data

NameTypeDescription
tokenany addressThe address of the token contract (an empty address if Ether).
lockCountnumberThe total lock count for the token.

Transfer

Event Handler

const eventHandler = ({
  from,
  to,
  value,
}) => {
  // perform an action using the event data
};

Add Listener

colonyClient.events.Transfer.addListener(eventHandler);

Remove Listener

colonyClient.events.Transfer.removeListener(eventHandler);

Event Data

NameTypeDescription
fromaddressThe address of the account that sent tokens.
toaddressThe address of the account that received tokens.
valuebig numberThe amount of tokens that were transferred.

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.