Secure the networkBug Bounty 2019

ColonyClient

The ColonyClient class is a standard interface for interactions with the methods and events described in both 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 information about initializing ColonyClient.

Callers

All callers return promises which resolve to an object containing the given return values..

generateSecret.call({ salt, value })

Generate the rating secret used in task ratings. This function returns a keccak256 hash created from the salt and value.

Arguments

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

Return Values

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

Return ValueTypeDescription
secrethex stringA keccak256 hash that keeps the task rating hidden.

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

getAuthority.call()

Get the authority contract address associated with the colony.

Return Values

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

Return ValueTypeDescription
addressaddressThe address of the authority contract associated with the colony.

Contract Information

Function: authority

Contract: auth.sol

Interface: IColony.sol

getDomain.call({ domainId })

Get information about a domain.

Arguments

ArgumentTypeDescription
domainIdnumberThe ID of the domain.

Return Values

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

Return ValueTypeDescription
localSkillIdnumberThe ID of the local skill.
potIdnumberThe ID of the funding pot.

Contract Information

Contract: Colony.sol

Interface: IColony.sol

getDomainCount.call()

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

Return Values

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

Return ValueTypeDescription
countnumberThe total number of domains.

Contract Information

Contract: Colony.sol

Interface: IColony.sol

getNonRewardPotsTotal.call({ token })

Get the total amount of funds that are not in the colony rewards pot. The total amount of funds that are not in the colony rewards pot 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.

Arguments

ArgumentTypeDescription
tokenaddressThe address of the token contract (an empty address if Ether).

Return Values

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

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

Contract Information

Contract: ColonyFunding.sol

Interface: IColony.sol

getFundingPot.call({ potId })

Get information about a funding pot.

Arguments

ArgumentTypeDescription
potIdnumberThe numeric ID of the funding pot.

Return Values

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

Return ValueTypeDescription
associatedTypestringThe associated type of the funding pot ( domain or task ).
associatedTypeIdnumberThe id of the associated type ( domainId or taskId ).

Contract Information

Contract: ColonyFunding.sol

Interface: IColony.sol

getFundingPotBalance.call({ potId, token })

Get the balance of a funding pot.

Arguments

ArgumentTypeDescription
potIdnumberThe ID of the funding pot.
tokenaddressThe address of the token contract (an empty address if Ether).

Return Values

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

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

Contract Information

Contract: ColonyFunding.sol

Interface: IColony.sol

getFundingPotCount.call()

Get the total number of funding pots.

Return Values

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

Return ValueTypeDescription
countnumberThe total number of funding pots.

Contract Information

Contract: ColonyFunding.sol

Interface: IColony.sol

getRecoveryRolesCount.call()

Get the total number of users that are assigned a colony recovery role.

Return Values

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

Return ValueTypeDescription
countnumberThe total number of users that are assigned a colony recovery role.

Contract Information

Function: numRecoveryRoles

Contract: ContractRecovery.sol

Interface: IRecovery.sol

getRewardInverse.call()

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

Return Values

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

Return ValueTypeDescription
rewardInversebig numberThe inverse amount of the reward.

Contract Information

Contract: ColonyFunding.sol

Interface: IColony.sol

getRewardPayoutInfo.call({ payoutId })

Get information about a reward payout cycle.

Arguments

ArgumentTypeDescription
payoutIdnumberThe ID of the reward payout cycle.

Return Values

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

Return ValueTypeDescription
blockNumbernumberThe block number at the time the reward payout cycle started.
remainingTokenAmountbig numberThe remaining amount of unclaimed tokens (or Ether).
reputationRootHashstringThe reputation root hash at the time the reward payout cycle started.
tokenaddressThe address of the token contract (an empty address if Ether).
totalTokenAmountForRewardPayoutbig numberThe total amount of tokens set aside for the reward payout cycle.
totalTokensbig numberThe total amount of tokens at the time the reward payout cycle started.

Contract Information

Contract: ColonyFunding.sol

Interface: IColony.sol

getTask.call({ taskId })

Get information about a task.

Arguments

ArgumentTypeDescription
taskIdnumberThe ID of the task.

Return Values

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

Return ValueTypeDescription
completionDatedateThe date when the task deliverable was submitted.
deliverableHashIPFS hashThe deliverable hash of the task (an IPFS hash).
domainIdnumberThe ID of the domain.
dueDatedateThe final date that the task deliverable can be submitted.
idnumberThe ID of the task.
payoutsWeCannotMakenumberThe number of payouts that cannot be completed ( 0 or 1 ). If this value is 1 , it means that the funding pot associated with the task does not have enough funds to perform the task payouts, i.e. the total amount for the three task payouts is more than the total balance of the funding pot associated with the task.
potIdnumberThe ID of the funding pot.
skillIdnumberThe ID of the skill.
specificationHashIPFS hashThe specification hash of the task (an IPFS hash).
statustask statusThe task status ( ACTIVE , CANCELLED or FINALIZED ).

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

getTaskCount.call()

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

Return Values

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

Return ValueTypeDescription
countnumberThe total number of tasks.

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

getTaskPayout.call({ taskId, role, token })

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.

Arguments

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

Return Values

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

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

Contract Information

Contract: ColonyFunding.sol

Interface: IColony.sol

getTaskRole.call({ taskId, role })

Get information about a task role.

Arguments

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

Return Values

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

Return ValueTypeDescription
addressaddressThe address of the user that is assigned the task role.
rateFailbooleanA boolean indicating whether or not the user failed to rate their counterpart.
ratingnumberThe rating that the user received ( 1 , 2 , or 3 ).

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

getTaskWorkRatings.call({ taskId })

Get information about the ratings of a task.

Arguments

ArgumentTypeDescription
taskIdnumberThe ID of the task.

Return Values

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

Return ValueTypeDescription
countnumberThe total number of submitted ratings for a task.
datedateThe date that the last rating was submitted.

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

getTaskWorkRatingSecret.call({ taskId, role })

Get the secret of a rating that has been submitted. If a task is in the commit period of the rating process, the 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.

Arguments

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

Return Values

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

Return ValueTypeDescription
secrethex stringA keccak256 hash that keeps the task rating hidden.

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

getToken.call()

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 an adequate rating (2) will result in 1 reputation point earned.

Return Values

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

Return ValueTypeDescription
addressaddressThe address of the token contract.

Contract Information

Contract: Colony.sol

Interface: IColony.sol

getTotalTaskPayout.call({ taskId, token })

Get the total payout amount assigned to all task roles. 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.

Arguments

ArgumentTypeDescription
taskIdnumberThe ID of the task.
tokenaddressThe address of the token contract (an empty address if Ether).

Return Values

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

Return ValueTypeDescription
amountbig numberThe total amount of tokens (or Ether) assigned to all task roles as payouts.

Contract Information

Contract: ColonyFunding.sol

Interface: IColony.sol

getVersion.call()

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

Return Values

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

Return ValueTypeDescription
versionnumberThe version number of the colony contract.

Contract Information

Function: version

Contract: Colony.sol

Interface: IColony.sol

hasUserRole.call({ user, role })

Check whether a user has an authority role.

Arguments

ArgumentTypeDescription
useraddressThe address of the user that will be checked.
roleauthority roleThe authority role that will be checked ( FOUNDER or ADMIN ).

Return Values

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

Return ValueTypeDescription
hasRolebooleanA boolean indicating whether or not the user has the authority role.

Contract Information

Contract: Colony.sol

Interface: IColony.sol

isInRecoveryMode.call()

Check whether or not the colony is in recovery mode.

Return Values

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

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

Contract Information

Contract: ContractRecovery.sol

Interface: IRecovery.sol

Senders

All senders return an instance of a ContractResponse. Every send() method takes an options object as the second argument.

addDomain.send({ parentDomainId }, options)

Add a domain to the colony. Adding new domains is currently retricted to one level, i.e. the parentDomainId must be the id of the root domain 1, which represents the colony itself.

Arguments

ArgumentTypeDescription
parentDomainIdnumberThe ID of the parent domain.

Response

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

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

Contract Information

Contract: Colony.sol

Interface: IColony.sol

addGlobalSkill.send({ parentSkillId }, options)

Add a new global skill to the skills tree. This can only be called from the Meta Colony and only by the user assigned the FOUNDER role.

Arguments

ArgumentTypeDescription
parentSkillIdnumberThe ID of the skill under which the new skill will be added.

Response

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

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

Contract Information

Contract: Colony.sol

Interface: IMetaColony.sol

approveExitRecovery.send(options)

Indicate approval to exit colony recovery mode. This function can only be called by a user with a recovery role.

Response

An instance of a ContractResponse

Contract Information

Contract: ContractRecovery.sol

Interface: IRecovery.sol

bootstrapColony.send({ users, amounts }, options)

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

Arguments

ArgumentTypeDescription
usersarrayThe 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.

Response

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

Event DataTypeDescription
usersarrayThe array of users that received an initial amount of tokens and reputation.
amountsarrayThe array of corresponding token and reputation amounts each user recieved.
ColonyBootstrappedobjectContains the data defined in ColonyBootstrapped

Contract Information

Contract: Colony.sol

Interface: IColony.sol

claimColonyFunds.send({ token }, options)

Claim funds that the colony has received by adding them to the funding pot of the root domain. A small 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.

Arguments

ArgumentTypeDescription
tokenaddressThe address of the token contract (an empty address if Ether).

Response

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

Event DataTypeDescription
tokenaddressThe 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

Contract Information

Contract: ColonyFunding.sol

Interface: IColony.sol

claimPayout.send({ taskId, role, token }, options)

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

Arguments

ArgumentTypeDescription
taskIdnumberThe ID of the task.
roletask roleThe role that submitted the rating ( MANAGER , EVALUATOR , or WORKER ).
tokenaddressThe address of the token contract (an empty address if Ether).

Response

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

Event DataTypeDescription
taskIdnumberThe ID of the task that was modified.
roletask roleThe role of the task that was assigned the task payout ( MANAGER , EVALUATOR , or WORKER ).
tokenaddressThe 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.
TaskPayoutClaimedobjectContains the data defined in TaskPayoutClaimed
TransferobjectContains the data defined in Transfer

Contract Information

Contract: ColonyFunding.sol

Interface: IColony.sol

completeTask.send({ taskId }, options)

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

Arguments

ArgumentTypeDescription
taskIdnumberThe ID of the task.

Response

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

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

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

createTask.send({ specificationHash, domainId, skillId, dueDate }, options)

Create a new task within the colony.

Arguments

ArgumentTypeDescription
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).

Response

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

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

Contract Information

Function: makeTask

Contract: ColonyTask.sol

Interface: IColony.sol

enterRecoveryMode.send(options)

Enter colony recovery mode. This function can only be called by a user with a recovery role.

Response

An instance of a ContractResponse

Contract Information

Contract: ContractRecovery.sol

Interface: IRecovery.sol

exitRecoveryMode.send(options)

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

Response

An instance of a ContractResponse

Contract Information

Contract: ContractRecovery.sol

Interface: IRecovery.sol

finalizeRewardPayout.send({ payoutId }, options)

Finalize the 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.

Arguments

ArgumentTypeDescription
payoutIdnumberThe ID of the reward payout cycle.

Response

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

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

Contract Information

Contract: ColonyFunding.sol

Interface: IColony.sol

finalizeTask.send({ taskId }, options)

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

Arguments

ArgumentTypeDescription
taskIdnumberThe ID of the task.

Response

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

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

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

makePayment.send({ worker, token, amount, domainId, skillId }, options)

Make a payment. This function can only be called by the user assigned either the FOUNDER or ADMIN authority role.

Arguments

ArgumentTypeDescription
workeraddress
tokenaddress
amountbig number
domainIdnumber
skillIdnumber

Response

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

Event DataTypeDescription
potIdnumberThe numeric ID of the pot that was added.
taskIdnumberThe ID of the task that was added.
skillIdnumberThe ID of the skill that was set.
dueDatedateThe due date that was set.
roletask roleThe role of the task that was set ( MANAGER , EVALUATOR , or WORKER ).
useraddressThe user that was assigned the task role.
tokenaddressThe address of the token contract (an empty address if Ether).
amountbig numberThe task payout amount that was set.
fromPotnumberThe ID of the pot from which the funds were moved.
toPotnumberThe ID of the pot to which the funds were moved.
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
TaskAddedobjectContains the data defined in TaskAdded
TaskSkillSetobjectContains the data defined in TaskSkillSet
TaskDueDateSetobjectContains the data defined in TaskDueDateSet
TaskRoleUserSetobjectContains the data defined in TaskRoleUserSet
TaskPayoutSetobjectContains the data defined in TaskPayoutSet
ColonyFundsMovedBetweenFundingPotsobjectContains the data defined in ColonyFundsMovedBetweenFundingPots
TaskPayoutClaimedobjectContains the data defined in TaskPayoutClaimed
TransferobjectContains the data defined in Transfer

Contract Information

Contract: ContractRecovery.sol

Interface: IRecovery.sol

mintTokens.send({ amount }, options)

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 user assigned the FOUNDER authority role.

Arguments

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

Response

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

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

Contract Information

Contract: Colony.sol

Interface: IColony.sol

mintTokensForColonyNetwork.send({ amount }, options)

Mint tokens for the Colony Network. This can only be called from the Meta Colony and only by the user assigned the FOUNDER role.

Arguments

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

Response

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

Event DataTypeDescription
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

Contract Information

Contract: Colony.sol

Interface: IMetaColony.sol

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

Move funds from one pot to another.

Arguments

ArgumentTypeDescription
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.
tokenaddressThe address of the token contract (an empty address if Ether).

Response

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

Event DataTypeDescription
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.
tokenaddressThe address of the token contract (an empty address if Ether).
ColonyFundsMovedBetweenFundingPotsobjectContains the data defined in ColonyFundsMovedBetweenFundingPots

Contract Information

Contract: ColonyFunding.sol

Interface: IColony.sol

registerColonyLabel.send({ colonyName, orbitDBPath }, options)

Register an ENS label for the colony.

Arguments

ArgumentTypeDescription
colonyNamestringThe ENS label that will be registered for the colony.
orbitDBPathstringThe path of the OrbitDB database associated with the colony.

Response

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

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

Contract Information

Contract: Colony.sol

Interface: IColony.sol

removeAdminRole.send({ user }, options)

Remove the ADMIN authority role from a user. This function can only be called by the user assigned the FOUNDER authroity role.

Arguments

ArgumentTypeDescription
useraddressThe address that we will be unassigned the ADMIN authority role.

Response

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

Event DataTypeDescription
useraddressThe address that was unassigned the ADMIN authority role.
ColonyAdminRoleRemovedobjectContains the data defined in ColonyAdminRoleRemoved

Contract Information

Contract: Colony.sol

Interface: IColony.sol

removeRecoveryRole.send({ user }, options)

Remove the colony recovery role from a user. This function can only be called by the FOUNDER authority role.

Arguments

ArgumentTypeDescription
useraddressThe address that will be unassigned a colony recovery role.

Response

An instance of a ContractResponse

Contract Information

Contract: ContractRecovery.sol

Interface: IRecovery.sol

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

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.

Arguments

ArgumentTypeDescription
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.

Response

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

Event DataTypeDescription
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

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

setAdminRole.send({ user }, options)

Assign the ADMIN authority role to a user. This function can only be called by the user assigned the FOUNDER authority role or a user assigned the ADMIN authority role. There is no limit to the number of users that can be assigned the ADMIN authority role.

Arguments

ArgumentTypeDescription
useraddressThe address that will be assigned the ADMIN authroity role.

Response

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

Event DataTypeDescription
useraddressThe address that was assigned the ADMIN authority role.
ColonyAdminRoleSetobjectContains the data defined in ColonyAdminRoleSet

Contract Information

Contract: Colony.sol

Interface: IColony.sol

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

Set the payouts for all task roles (MANAGER, EVALUATOR, and WORKER). This can only be called by the user assigned the MANAGER task role and only if the EVALUATOR and WORKER task roles are either not assigned or assigned to the same user as the MANAGER task role.

Arguments

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

Response

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

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

Contract Information

Contract: ColonyFunding.sol

Interface: IColony.sol

setFounderRole.send({ user }, options)

Assign the FOUNDER authority role to a user. This function can only be called by the user currently assigned the FOUNDER authority role. There can only be one address assigned to the FOUNDER authority role, therefore, the user currently assigned will forfeit their role.

Arguments

ArgumentTypeDescription
useraddressThe address that will be assigned the FOUNDER authority role.

Response

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

Event DataTypeDescription
oldFounderaddressThe address that assigned the FOUNDER authority role (the old founder).
newFounderaddressThe address that was assigned the FOUNDER authority role (the new founder).
ColonyFounderRoleSetobjectContains the data defined in ColonyFounderRoleSet

Contract Information

Contract: Colony.sol

Interface: IColony.sol

setNetworkFeeInverse.send({ feeInverse }, options)

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

Arguments

ArgumentTypeDescription
feeInversenumberThe inverse amount that will be set.

Response

An instance of a ContractResponse

Contract Information

Contract: Colony.sol

Interface: IMetaColony.sol

setRecoveryRole.send({ user }, options)

Assign a colony recovery role to a user. This function can only be called by the FOUNDER authority role.

Arguments

ArgumentTypeDescription
useraddressThe address that will be assigned a colony recovery role.

Response

An instance of a ContractResponse

Contract Information

Contract: ContractRecovery.sol

Interface: IRecovery.sol

setRewardInverse.send({ rewardInverse }, options)

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

Arguments

ArgumentTypeDescription
rewardInversebig numberThe inverse amount of the reward.

Response

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

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

Contract Information

Contract: ColonyFunding.sol

Interface: IColony.sol

setStorageSlotRecovery.send({ slot, value }, options)

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

Arguments

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

Response

An instance of a ContractResponse

Contract Information

Contract: ContractRecovery.sol

Interface: IRecovery.sol

startNextRewardPayout.send({ token }, options)

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.

Arguments

ArgumentTypeDescription
tokenaddressThe address of the token contract (an empty address if Ether).

Response

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

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

Contract Information

Contract: ColonyFunding.sol

Interface: IColony.sol

submitTaskDeliverable.send({ taskId, deliverableHash }, options)

Submit the task deliverable. This function can only be called by the user assigned the WORKER task 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.

Arguments

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

Response

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

Event DataTypeDescription
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

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

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

Submit the task deliverable and the work rating for the user assigned the MANAGER task role. This function can only be called by the user assigned the WORKER task 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.

Arguments

ArgumentTypeDescription
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.

Response

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

Event DataTypeDescription
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

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

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

Submit a work rating for a task. This function can only be called by the user assigned the EVALUATOR task role, who is submitting a rating for the user assigned the WORKER task role, or the user assigned the WORKER task role, who is submitting a rating for the user assigned the MANAGER task 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.

Arguments

ArgumentTypeDescription
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.

Response

An instance of a ContractResponse

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

upgrade.send({ newVersion }, options)

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

Arguments

ArgumentTypeDescription
newVersionnumberThe version number of the colony contract.

Response

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

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

Contract Information

Contract: Colony.sol

Interface: IColony.sol

MultiSigSenders

All MultiSig functions return an instance of a MultiSigOperation.

cancelTask.startOperation({ taskId })

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

Arguments

ArgumentTypeDescription
taskIdnumberThe ID of the task.

Response

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

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

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

removeTaskEvaluatorRole.startOperation({ taskId })

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

Arguments

ArgumentTypeDescription
taskIdnumberThe ID of the task.

Response

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

Event DataTypeDescription
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

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

removeTaskWorkerRole.startOperation({ taskId })

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

Arguments

ArgumentTypeDescription
taskIdnumberThe ID of the task.

Response

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

Event DataTypeDescription
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

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

setTaskBrief.startOperation({ taskId, specificationHash })

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.

Arguments

ArgumentTypeDescription
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:

Event DataTypeDescription
taskIdnumberThe ID of the task that was modified.
specificationHashstringThe specification hash that was set (an IPFS hash).
TaskBriefSetobjectContains the data defined in TaskBriefSet

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

setTaskDomain.startOperation({ taskId, domainId })

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

Arguments

ArgumentTypeDescription
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:

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

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

setTaskDueDate.startOperation({ taskId, dueDate })

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

Arguments

ArgumentTypeDescription
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:

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

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

setTaskEvaluatorRole.startOperation({ taskId, user })

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

Arguments

ArgumentTypeDescription
taskIdnumberThe ID of the task.
useraddressThe address that will be assigned the EVALUATOR task role.

Response

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

Event DataTypeDescription
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

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

setTaskManagerRole.startOperation({ taskId, user })

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

Arguments

ArgumentTypeDescription
taskIdnumberThe ID of the task.
useraddressThe address that will be assigned the MANANAGER task role.

Response

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

Event DataTypeDescription
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

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

setTaskSkill.startOperation({ taskId, skillId })

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

Arguments

ArgumentTypeDescription
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:

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

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

setTaskWorkerRole.startOperation({ taskId, user })

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

Arguments

ArgumentTypeDescription
taskIdnumberThe ID of the task.
useraddressThe address that will be assigned the WORKER task role.

Response

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

Event DataTypeDescription
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

Contract Information

Contract: ColonyTask.sol

Interface: IColony.sol

setTaskManagerPayout.startOperation({ taskId, token, amount })

Set the payout amount for the MANAGER task role.

Arguments

ArgumentTypeDescription
taskIdnumberThe ID of the task.
tokenaddressThe 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:

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

Contract Information

Contract: ColonyFunding.sol

Interface: IColony.sol

setTaskEvaluatorPayout.startOperation({ taskId, token, amount })

Set the payout amount for the EVALUATOR task role.

Arguments

ArgumentTypeDescription
taskIdnumberThe ID of the task.
tokenaddressThe 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:

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

Contract Information

Contract: ColonyFunding.sol

Interface: IColony.sol

setTaskWorkerPayout.startOperation({ taskId, token, amount })

Set the payout amount for the WORKER task role.

Arguments

ArgumentTypeDescription
taskIdnumberThe ID of the task.
tokenaddressThe 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:

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

Contract Information

Contract: ColonyFunding.sol

Interface: IColony.sol

Events

events.ColonyAdminRoleRemoved.addListener(({ user }) => { /* ... */ })

Arguments

ArgumentTypeDescription
useraddressThe address that was unassigned the ADMIN authority role.

events.ColonyAdminRoleSet.addListener(({ user }) => { /* ... */ })

Arguments

ArgumentTypeDescription
useraddressThe address that was assigned the ADMIN authority role.

events.ColonyBootstrapped.addListener(({ users, amounts }) => { /* ... */ })

Arguments

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

events.ColonyFounderRoleSet.addListener(({ oldFounder, newFounder }) => { /* ... */ })

Arguments

ArgumentTypeDescription
oldFounderaddressThe address that assigned the FOUNDER authority role (the old founder).
newFounderaddressThe address that was assigned the FOUNDER authority role (the new founder).

events.ColonyFundsClaimed.addListener(({ token, fee, payoutRemainder }) => { /* ... */ })

Arguments

ArgumentTypeDescription
tokenaddressThe 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.

events.ColonyFundsMovedBetweenFundingPots.addListener(({ fromPot, toPot, amount, token }) => { /* ... */ })

Arguments

ArgumentTypeDescription
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.
tokenaddressThe address of the token contract (an empty address if Ether).

events.ColonyInitialised.addListener(({ colonyNetwork }) => { /* ... */ })

Arguments

ArgumentTypeDescription
colonyNetworkaddressThe address of the Colony Network.

events.ColonyLabelRegistered.addListener(({ colony, label }) => { /* ... */ })

Arguments

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

events.ColonyRewardInverseSet.addListener(({ rewardInverse }) => { /* ... */ })

Arguments

ArgumentTypeDescription
rewardInversebig numberThe reward inverse value that was set.

events.ColonyUpgraded.addListener(({ oldVersion, newVersion }) => { /* ... */ })

Arguments

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

events.DomainAdded.addListener(({ domainId }) => { /* ... */ })

Arguments

ArgumentTypeDescription
domainIdnumberThe ID of the domain that was added.

events.Mint.addListener(({ address, amount }) => { /* ... */ })

Arguments

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

events.FundingPotAdded.addListener(({ potId }) => { /* ... */ })

Arguments

ArgumentTypeDescription
potIdnumberThe numeric ID of the pot that was added.

events.RewardPayoutClaimed.addListener(({ rewardPayoutId, user, fee, payoutRemainder }) => { /* ... */ })

Arguments

ArgumentTypeDescription
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.

events.RewardPayoutCycleEnded.addListener(({ payoutId }) => { /* ... */ })

Arguments

ArgumentTypeDescription
payoutIdnumberThe ID of the payout cycle that ended.

events.RewardPayoutCycleStarted.addListener(({ payoutId }) => { /* ... */ })

Arguments

ArgumentTypeDescription
payoutIdnumberThe ID of the payout cycle that started.

events.SkillAdded.addListener(({ skillId, parentSkillId }) => { /* ... */ })

Arguments

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

events.TaskAdded.addListener(({ taskId }) => { /* ... */ })

Arguments

ArgumentTypeDescription
taskIdnumberThe ID of the task that was added.

events.TaskBriefSet.addListener(({ taskId, specificationHash }) => { /* ... */ })

Arguments

ArgumentTypeDescription
taskIdnumberThe ID of the task that was modified.
specificationHashstringThe specification hash that was set (an IPFS hash).

events.TaskCanceled.addListener(({ taskId }) => { /* ... */ })

Arguments

ArgumentTypeDescription
taskIdnumberThe ID of the task that was canceled.

events.TaskCompleted.addListener(({ taskId }) => { /* ... */ })

Arguments

ArgumentTypeDescription
taskIdnumberThe ID of the task that was completed.

events.TaskDeliverableSubmitted.addListener(({ taskId, deliverableHash }) => { /* ... */ })

Arguments

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

events.TaskDomainSet.addListener(({ taskId, domainId }) => { /* ... */ })

Arguments

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

events.TaskDueDateSet.addListener(({ taskId, dueDate }) => { /* ... */ })

Arguments

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

events.TaskFinalized.addListener(({ taskId }) => { /* ... */ })

Arguments

ArgumentTypeDescription
taskIdnumberThe ID of the task that was finalized.

events.TaskPayoutClaimed.addListener(({ taskId, role, token, amount }) => { /* ... */ })

Arguments

ArgumentTypeDescription
taskIdnumberThe ID of the task that was modified.
roletask roleThe role of the task that was assigned the task payout ( MANAGER , EVALUATOR , or WORKER ).
tokenaddressThe address of the token contract (an empty address if Ether).
amountbig numberThe task payout amount that was claimed.

events.TaskPayoutSet.addListener(({ taskId, role, token, amount }) => { /* ... */ })

Arguments

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

events.TaskRoleUserSet.addListener(({ taskId, role, user }) => { /* ... */ })

Arguments

ArgumentTypeDescription
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.

events.TaskSkillSet.addListener(({ taskId, skillId }) => { /* ... */ })

Arguments

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

events.TaskWorkRatingRevealed.addListener(({ taskId, role, rating }) => { /* ... */ })

Arguments

ArgumentTypeDescription
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 ).

events.TokenLocked.addListener(({ token, lockCount }) => { /* ... */ })

Arguments

ArgumentTypeDescription
tokenaddressThe address of the token contract (an empty address if Ether).
lockCountnumberThe total lock count for the token.

events.Transfer.addListener(({ from, to, value }) => { /* ... */ })

Arguments

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