Skip to main content

Interface: ColonyClientV1

Hierarchy

  • AugmentedIColony<IColony>

  • AddDomainAugmentsA<IColony>

  • SetPaymentDomainAugments<IColony>

  • MoveFundsBetweenPotsAugmentsA<IColony>

    ColonyClientV1

Properties

_deployedPromise

_deployedPromise: Promise<Contract>

Inherited from

AugmentedIColony._deployedPromise


_runningEvents

_runningEvents: Object

Index signature

[eventTag: string]: RunningEvent

Inherited from

AugmentedIColony._runningEvents


_wrappedEmits

_wrappedEmits: Object

Index signature

[eventTag: string]: (...args: any[]) => void

Inherited from

AugmentedIColony._wrappedEmits


address

Readonly address: string

Inherited from

AugmentedIColony.address


clientType

clientType: ColonyClient

Inherited from

AugmentedIColony.clientType


clientVersion

clientVersion: 1

Overrides

AugmentedIColony.clientVersion


colonyEvents

colonyEvents: IColonyEvents

The colonyEvents contract supports all events across all versions. Isn't that amazing? It's an ethers contract with only events to filter

Inherited from

AugmentedIColony.colonyEvents


deployTransaction

Readonly deployTransaction: TransactionResponse

Inherited from

AugmentedIColony.deployTransaction


estimateGas

estimateGas: ColonyClientV1Estimate

Overrides

AugmentedIColony.estimateGas


filters

filters: Object

Type declaration

NameType
ColonyAdministrationRoleSet(user?: null, setTo?: null) => ColonyAdministrationRoleSetEventFilter
ColonyAdministrationRoleSet(address,bool)(user?: null, setTo?: null) => ColonyAdministrationRoleSetEventFilter
ColonyArchitectureRoleSet(user?: null, setTo?: null) => ColonyArchitectureRoleSetEventFilter
ColonyArchitectureRoleSet(address,bool)(user?: null, setTo?: null) => ColonyArchitectureRoleSetEventFilter
ColonyBootstrapped(users?: null, amounts?: null) => ColonyBootstrappedEventFilter
ColonyBootstrapped(address[],int256[])(users?: null, amounts?: null) => ColonyBootstrappedEventFilter
ColonyFundingRoleSet(user?: null, setTo?: null) => ColonyFundingRoleSetEventFilter
ColonyFundingRoleSet(address,bool)(user?: null, setTo?: null) => ColonyFundingRoleSetEventFilter
ColonyFundsClaimed(token?: null, fee?: null, payoutRemainder?: null) => ColonyFundsClaimedEventFilter
ColonyFundsClaimed(address,uint256,uint256)(token?: null, fee?: null, payoutRemainder?: null) => ColonyFundsClaimedEventFilter
ColonyFundsMovedBetweenFundingPots(fromPot?: null | PromiseOrValue<BigNumberish>, toPot?: null | PromiseOrValue<BigNumberish>, amount?: null, token?: null) => ColonyFundsMovedBetweenFundingPotsEventFilter
ColonyFundsMovedBetweenFundingPots(uint256,uint256,uint256,address)(fromPot?: null | PromiseOrValue<BigNumberish>, toPot?: null | PromiseOrValue<BigNumberish>, amount?: null, token?: null) => ColonyFundsMovedBetweenFundingPotsEventFilter
ColonyInitialised(colonyNetwork?: null, token?: null) => ColonyInitialisedEventFilter
ColonyInitialised(address,address)(colonyNetwork?: null, token?: null) => ColonyInitialisedEventFilter
ColonyRewardInverseSet(rewardInverse?: null) => ColonyRewardInverseSetEventFilter
ColonyRewardInverseSet(uint256)(rewardInverse?: null) => ColonyRewardInverseSetEventFilter
ColonyRootRoleSet(user?: null, setTo?: null) => ColonyRootRoleSetEventFilter
ColonyRootRoleSet(address,bool)(user?: null, setTo?: null) => ColonyRootRoleSetEventFilter
ColonyUpgraded(oldVersion?: null, newVersion?: null) => ColonyUpgradedEventFilter
ColonyUpgraded(uint256,uint256)(oldVersion?: null, newVersion?: null) => ColonyUpgradedEventFilter
DomainAdded(domainId?: null) => DomainAddedEventFilter
DomainAdded(uint256)(domainId?: null) => DomainAddedEventFilter
FundingPotAdded(fundingPotId?: null) => FundingPotAddedEventFilter
FundingPotAdded(uint256)(fundingPotId?: null) => FundingPotAddedEventFilter
PaymentAdded(paymentId?: null) => PaymentAddedEventFilter
PaymentAdded(uint256)(paymentId?: null) => PaymentAddedEventFilter
PayoutClaimed(fundingPotId?: null | PromiseOrValue<BigNumberish>, token?: null, amount?: null) => PayoutClaimedEventFilter
PayoutClaimed(uint256,address,uint256)(fundingPotId?: null | PromiseOrValue<BigNumberish>, token?: null, amount?: null) => PayoutClaimedEventFilter
RewardPayoutClaimed(rewardPayoutId?: null, user?: null, fee?: null, rewardRemainder?: null) => RewardPayoutClaimedEventFilter
RewardPayoutClaimed(uint256,address,uint256,uint256)(rewardPayoutId?: null, user?: null, fee?: null, rewardRemainder?: null) => RewardPayoutClaimedEventFilter
RewardPayoutCycleEnded(rewardPayoutId?: null) => RewardPayoutCycleEndedEventFilter
RewardPayoutCycleEnded(uint256)(rewardPayoutId?: null) => RewardPayoutCycleEndedEventFilter
RewardPayoutCycleStarted(rewardPayoutId?: null) => RewardPayoutCycleStartedEventFilter
RewardPayoutCycleStarted(uint256)(rewardPayoutId?: null) => RewardPayoutCycleStartedEventFilter
TaskAdded(taskId?: null) => TaskAddedEventFilter
TaskAdded(uint256)(taskId?: null) => TaskAddedEventFilter
TaskBriefSet(taskId?: null | PromiseOrValue<BigNumberish>, specificationHash?: null) => TaskBriefSetEventFilter
TaskBriefSet(uint256,bytes32)(taskId?: null | PromiseOrValue<BigNumberish>, specificationHash?: null) => TaskBriefSetEventFilter
TaskCanceled(taskId?: null | PromiseOrValue<BigNumberish>) => TaskCanceledEventFilter
TaskCanceled(uint256)(taskId?: null | PromiseOrValue<BigNumberish>) => TaskCanceledEventFilter
TaskCompleted(taskId?: null | PromiseOrValue<BigNumberish>) => TaskCompletedEventFilter
TaskCompleted(uint256)(taskId?: null | PromiseOrValue<BigNumberish>) => TaskCompletedEventFilter
TaskDeliverableSubmitted(taskId?: null | PromiseOrValue<BigNumberish>, deliverableHash?: null) => TaskDeliverableSubmittedEventFilter
TaskDeliverableSubmitted(uint256,bytes32)(taskId?: null | PromiseOrValue<BigNumberish>, deliverableHash?: null) => TaskDeliverableSubmittedEventFilter
TaskDomainSet(taskId?: null | PromiseOrValue<BigNumberish>, domainId?: null | PromiseOrValue<BigNumberish>) => TaskDomainSetEventFilter
TaskDomainSet(uint256,uint256)(taskId?: null | PromiseOrValue<BigNumberish>, domainId?: null | PromiseOrValue<BigNumberish>) => TaskDomainSetEventFilter
TaskDueDateSet(taskId?: null | PromiseOrValue<BigNumberish>, dueDate?: null) => TaskDueDateSetEventFilter
TaskDueDateSet(uint256,uint256)(taskId?: null | PromiseOrValue<BigNumberish>, dueDate?: null) => TaskDueDateSetEventFilter
TaskFinalized(taskId?: null | PromiseOrValue<BigNumberish>) => TaskFinalizedEventFilter
TaskFinalized(uint256)(taskId?: null | PromiseOrValue<BigNumberish>) => TaskFinalizedEventFilter
TaskPayoutSet(taskId?: null | PromiseOrValue<BigNumberish>, role?: null, token?: null, amount?: null) => TaskPayoutSetEventFilter
TaskPayoutSet(uint256,uint8,address,uint256)(taskId?: null | PromiseOrValue<BigNumberish>, role?: null, token?: null, amount?: null) => TaskPayoutSetEventFilter
TaskRoleUserSet(taskId?: null | PromiseOrValue<BigNumberish>, role?: null, user?: null | PromiseOrValue<string>) => TaskRoleUserSetEventFilter
TaskRoleUserSet(uint256,uint8,address)(taskId?: null | PromiseOrValue<BigNumberish>, role?: null, user?: null | PromiseOrValue<string>) => TaskRoleUserSetEventFilter
TaskSkillSet(taskId?: null | PromiseOrValue<BigNumberish>, skillId?: null | PromiseOrValue<BigNumberish>) => TaskSkillSetEventFilter
TaskSkillSet(uint256,uint256)(taskId?: null | PromiseOrValue<BigNumberish>, skillId?: null | PromiseOrValue<BigNumberish>) => TaskSkillSetEventFilter
TaskWorkRatingRevealed(taskId?: null | PromiseOrValue<BigNumberish>, role?: null, rating?: null) => TaskWorkRatingRevealedEventFilter
TaskWorkRatingRevealed(uint256,uint8,uint8)(taskId?: null | PromiseOrValue<BigNumberish>, role?: null, rating?: null) => TaskWorkRatingRevealedEventFilter

Inherited from

AugmentedIColony.filters


interface

interface: IColonyInterface

Inherited from

AugmentedIColony.interface


networkClient

networkClient: ColonyNetworkClient

An instance of the ColonyNetworkClient

Inherited from

AugmentedIColony.networkClient


off

off: OnEvent<ColonyClientV1>

Inherited from

AugmentedIColony.off


on

on: OnEvent<ColonyClientV1>

Inherited from

AugmentedIColony.on


once

once: OnEvent<ColonyClientV1>

Inherited from

AugmentedIColony.once


provider

Readonly provider: Provider

Inherited from

AugmentedIColony.provider


removeListener

removeListener: OnEvent<ColonyClientV1>

Inherited from

AugmentedIColony.removeListener


resolvedAddress

Readonly resolvedAddress: Promise<string>

Inherited from

AugmentedIColony.resolvedAddress


signer

Readonly signer: Signer

Inherited from

AugmentedIColony.signer


tokenClient

tokenClient: TokenClient

An instance of the TokenClient for the Colony's native token

Inherited from

AugmentedIColony.tokenClient

Methods

_checkRunningEvents

_checkRunningEvents(runningEvent): void

Parameters

NameType
runningEventRunningEvent

Returns

void

Inherited from

AugmentedIColony._checkRunningEvents


_deployed

_deployed(blockTag?): Promise<Contract>

Parameters

NameType
blockTag?BlockTag

Returns

Promise<Contract>

Inherited from

AugmentedIColony._deployed


_wrapEvent

_wrapEvent(runningEvent, log, listener): Event

Parameters

NameType
runningEventRunningEvent
logLog
listenerListener

Returns

Event

Inherited from

AugmentedIColony._wrapEvent


addDomain

addDomain(_permissionDomainId, _childSkillIndex, _parentDomainId, overrides?): Promise<ContractTransaction>

Adding new domains is currently retricted to one level only, i.e. _parentDomainId has to be the root domain id: 1 Add a colony domain, and its respective local skill under skill with id _parentSkillId New funding pot is created and associated with the domain here

Parameters

NameTypeDescription
_permissionDomainIdPromiseOrValue<BigNumberish>The domainId in which I have the permission to take this action
_childSkillIndexPromiseOrValue<BigNumberish>The index that the _domainId is relative to _permissionDomainId
_parentDomainIdPromiseOrValue<BigNumberish>Id of the domain under which the new one will be added
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.addDomain


addDomainWithProofs

addDomainWithProofs(_parentDomainId, overrides?): Promise<ContractTransaction>

Deprecated

Same as addDomain, but let colonyJS figure out the permission proofs for you. Always prefer this method, except when you have good reason not to.

Parameters

NameTypeDescription
_parentDomainIdBigNumberishId of the domain under which the new one will be added
overrides?TxOverrides-

Returns

Promise<ContractTransaction>

Inherited from

AddDomainAugmentsA.addDomainWithProofs


addPayment

addPayment(_permissionDomainId, _childSkillIndex, _recipient, _token, _amount, _domainId, _skillId, overrides?): Promise<ContractTransaction>

Add a new payment in the colony. Secured function to authorised members

Parameters

NameTypeDescription
_permissionDomainIdPromiseOrValue<BigNumberish>The domainId in which I have the permission to take this action
_childSkillIndexPromiseOrValue<BigNumberish>The index that the _domainId is relative to _permissionDomainId
_recipientPromiseOrValue<string>Address of the payment recipient
_tokenPromiseOrValue<string>Address of the token, 0x0 value indicates Ether
_amountPromiseOrValue<BigNumberish>Payout amount
_domainIdPromiseOrValue<BigNumberish>The domain where the payment belongs
_skillIdPromiseOrValue<BigNumberish>The skill associated with the payment
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

paymentId Identifier of the newly created payment

Inherited from

AugmentedIColony.addPayment


addPaymentWithProofs

addPaymentWithProofs(_recipient, _token, _amount, _domainId, _skillId, overrides?): Promise<ContractTransaction>

Same as addPayment, but let colonyJS figure out the permission proofs for you. Always prefer this method, except when you have good reason not to.

Parameters

NameTypeDescription
_recipientstringAddress of the payment recipient
_tokenstringAddress of the token, 0x0 value indicates Ether
_amountBigNumberishPayout amount
_domainIdBigNumberishThe domain where the payment belongs
_skillIdBigNumberishThe skill associated with the payment
overrides?TxOverrides-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.addPaymentWithProofs


approveExitRecovery

approveExitRecovery(overrides?): Promise<ContractTransaction>

Indicate approval to exit recovery mode. Can only be called by user with recovery role.

Parameters

NameType
overrides?Overrides & { from?: PromiseOrValue<string> }

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.approveExitRecovery


attach

attach(addressOrName): ColonyClientV1

Parameters

NameType
addressOrNamestring

Returns

ColonyClientV1

Inherited from

AugmentedIColony.attach


authority

authority(overrides?): Promise<string>

Get the ColonyAuthority for the colony

Parameters

NameType
overrides?CallOverrides

Returns

Promise<string>

colonyAuthority The ColonyAuthority contract address

Inherited from

AugmentedIColony.authority


bootstrapColony

bootstrapColony(_users, _amount, overrides?): Promise<ContractTransaction>

Only allowed to be called when taskCount is 0 by authorized addresses Allows the colony to bootstrap itself by having initial reputation and token _amount assigned to users _users This reputation is assigned in the colony-wide domain. Secured function to authorised members

Parameters

NameTypeDescription
_usersPromiseOrValue<string>[]Array of address to bootstrap with reputation
_amountPromiseOrValue<BigNumberish>[]Amount of reputation/tokens for every address
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.bootstrapColony


cancelTask

cancelTask(_id, overrides?): Promise<ContractTransaction>

Set the task.status property to 1 Cancel a task at any point before it is finalized. Secured function to authorised members Any funds assigned to its funding pot can be moved back to the domain via IColony.moveFundsBetweenPots

Parameters

NameTypeDescription
_idPromiseOrValue<BigNumberish>Id of the task
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.cancelTask


checkNotAdditionalProtectedVariable

checkNotAdditionalProtectedVariable(_slot, overrides?): Promise<void>

No return value, but should throw if protected.This is public, but is only expected to be called from ContractRecovery; no need toexpose this to any users. Check whether the supplied slot is a protected variable specific to this contract

Parameters

NameTypeDescription
_slotPromiseOrValue<BigNumberish>The storage slot number to check.
overrides?CallOverrides-

Returns

Promise<void>

Inherited from

AugmentedIColony.checkNotAdditionalProtectedVariable


claimColonyFunds

claimColonyFunds(_token, overrides?): Promise<ContractTransaction>

Move any funds received by the colony in _token denomination to the top-level domain pot, siphoning off a small amount to the reward pot. If called against a colony's own token, no fee is taken

Parameters

NameTypeDescription
_tokenPromiseOrValue<string>Address of the token, 0x0 value indicates Ether
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.claimColonyFunds


claimPayment

claimPayment(_id, _token, overrides?): Promise<ContractTransaction>

Claim the payout in _token denomination for payment _id. Here the network receives its fee from each payout. Same as for tasks, ether fees go straight to the Meta Colony whereas Token fees go to the Network to be auctioned off.

Parameters

NameTypeDescription
_idPromiseOrValue<BigNumberish>Payment identifier
_tokenPromiseOrValue<string>Address of the token, 0x0 value indicates Ether
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.claimPayment


claimRewardPayout

claimRewardPayout(_payoutId, _squareRoots, key, value, branchMask, siblings, overrides?): Promise<ContractTransaction>

Claim the reward payout at _payoutId. User needs to provide their reputation and colony-wide reputation which will be proven via Merkle proof inside this function. Can only be called if payout is active, i.e if 60 days have not passed from its creation. Can only be called if next in queue

Parameters

NameTypeDescription
_payoutIdPromiseOrValue<BigNumberish>Id of the reward payout
_squareRootsPromiseOrValue<BigNumberish>[]Square roots of values used in equation _squareRoots[0] - square root of user reputation _squareRoots[1] - square root of user tokens _squareRoots[2] - square root of total reputation _squareRoots[3] - square root of total tokens _squareRoots[4] - square root of numerator (user reputation user tokens) _squareRoots[5] - square root of denominator (total reputation total tokens) _squareRoots[6] - square root of payout amount
keyPromiseOrValue<BytesLike>Some Reputation hash tree key
valuePromiseOrValue<BytesLike>Reputation value
branchMaskPromiseOrValue<BigNumberish>The branchmask of the proof
siblingsPromiseOrValue<BytesLike>[]The siblings of the proof
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.claimRewardPayout


claimTaskPayout

claimTaskPayout(_id, _role, _token, overrides?): Promise<ContractTransaction>

Claim the payout in _token denomination for work completed in task _id by contributor with role _role Allowed only after task is finalized. Here the network receives its fee from each payout. Ether fees go straight to the Meta Colony whereas Token fees go to the Network to be auctioned off.

Parameters

NameTypeDescription
_idPromiseOrValue<BigNumberish>Id of the task
_rolePromiseOrValue<BigNumberish>Id of the role, as defined in TaskRole enum
_tokenPromiseOrValue<string>Address of the token, 0x0 value indicates Ether
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.claimTaskPayout


completeTask

completeTask(_id, overrides?): Promise<ContractTransaction>

Mark a task as complete after the due date has passed. This allows the task to be rated and finalized (and funds recovered) even in the presence of a worker who has disappeared. Note that if the due date was not set, then this function will throw.

Parameters

NameTypeDescription
_idPromiseOrValue<BigNumberish>Id of the task
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.completeTask


connect

connect(signerOrProvider): ColonyClientV1

Parameters

NameType
signerOrProviderstring | Provider | Signer

Returns

ColonyClientV1

Inherited from

AugmentedIColony.connect


deployed

deployed(): Promise<ColonyClientV1>

Returns

Promise<ColonyClientV1>

Inherited from

AugmentedIColony.deployed


emit

emit(eventName, ...args): boolean

Parameters

NameType
eventNamestring | EventFilter
...argsany[]

Returns

boolean

Inherited from

AugmentedIColony.emit


enterRecoveryMode

enterRecoveryMode(overrides?): Promise<ContractTransaction>

Put colony network mining into recovery mode. Can only be called by user with recovery role.

Parameters

NameType
overrides?Overrides & { from?: PromiseOrValue<string> }

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.enterRecoveryMode


executeTaskChange

executeTaskChange(_sigV, _sigR, _sigS, _mode, _value, _data, overrides?): Promise<ContractTransaction>

The Colony functions which require approval and the task roles to review these are set in IColony.initialiseColony at colony creation Upon successful execution the taskChangeNonces entry for the task is incremented Executes a task update transaction _data which is approved and signed by two of its roles (e.g. manager and worker) using the detached signatures for these users.

Parameters

NameTypeDescription
_sigVPromiseOrValue<BigNumberish>[]recovery id
_sigRPromiseOrValue<BytesLike>[]r output of the ECDSA signature of the transaction
_sigSPromiseOrValue<BytesLike>[]s output of the ECDSA signature of the transaction
_modePromiseOrValue<BigNumberish>[]How the signature was generated - 0 for Geth-style (usual), 1 for Trezor-style (only Trezor does this)
_valuePromiseOrValue<BigNumberish>The transaction value, i.e. number of wei to be sent when the transaction is executed Currently we only accept 0 value transactions but this is kept as a future option
_dataPromiseOrValue<BytesLike>The transaction data
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.executeTaskChange


executeTaskRoleAssignment

executeTaskRoleAssignment(_sigV, _sigR, _sigS, _mode, _value, _data, overrides?): Promise<ContractTransaction>

Executes a task role update transaction _data which is approved and signed by two of addresses depending of which function we are calling. Allowed functions are setTaskManagerRole, setTaskEvaluatorRole and setTaskWorkerRole. Upon successful execution the taskChangeNonces entry for the task is incremented

Parameters

NameTypeDescription
_sigVPromiseOrValue<BigNumberish>[]recovery id
_sigRPromiseOrValue<BytesLike>[]r output of the ECDSA signature of the transaction
_sigSPromiseOrValue<BytesLike>[]s output of the ECDSA signature of the transaction
_modePromiseOrValue<BigNumberish>[]How the signature was generated - 0 for Geth-style (usual), 1 for Trezor-style (only Trezor does this)
_valuePromiseOrValue<BigNumberish>The transaction value, i.e. number of wei to be sent when the transaction is executed Currently we only accept 0 value transactions but this is kept as a future option
_dataPromiseOrValue<BytesLike>The transaction data
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.executeTaskRoleAssignment


exitRecoveryMode

exitRecoveryMode(overrides?): Promise<ContractTransaction>

Exit recovery mode, can be called by anyone if enough whitelist approvals are given.

Parameters

NameType
overrides?Overrides & { from?: PromiseOrValue<string> }

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.exitRecoveryMode


fallback

fallback(overrides?): Promise<TransactionResponse>

Parameters

NameType
overrides?TransactionRequest

Returns

Promise<TransactionResponse>

Inherited from

AugmentedIColony.fallback


finalizePayment

finalizePayment(_permissionDomainId, _childSkillIndex, _id, overrides?): Promise<ContractTransaction>

Finalizes the payment and logs the reputation log updates Allowed to be called once after payment is fully funded. Secured function to authorised members

Parameters

NameTypeDescription
_permissionDomainIdPromiseOrValue<BigNumberish>The domainId in which I have the permission to take this action
_childSkillIndexPromiseOrValue<BigNumberish>The index that the _domainId is relative to _permissionDomainId
_idPromiseOrValue<BigNumberish>Payment identifier
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.finalizePayment


finalizePaymentWithProofs

finalizePaymentWithProofs(_id, overrides?): Promise<ContractTransaction>

Same as finalizePayment, but let colonyJS figure out the permission proofs for you. Always prefer this method, except when you have good reason not to.

Parameters

NameTypeDescription
_idBigNumberishPayment identifier
overrides?TxOverrides-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.finalizePaymentWithProofs


finalizeRewardPayout

finalizeRewardPayout(_payoutId, overrides?): Promise<ContractTransaction>

Finalises the reward payout. Allows creation of next reward payouts for token that has been used in _payoutId Can only be called when reward payout cycle is finished i.e when 60 days have passed from its creation

Parameters

NameTypeDescription
_payoutIdPromiseOrValue<BigNumberish>Id of the reward payout
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.finalizeRewardPayout


finalizeTask

finalizeTask(_id, overrides?): Promise<ContractTransaction>

Set the task.finalized property to true Called after task work rating is complete which closes the task and logs the respective reputation log updates Allowed to be called once per task. Secured function to authorised members

Parameters

NameTypeDescription
_idPromiseOrValue<BigNumberish>Id of the task
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.finalizeTask


generateSecret

generateSecret(_salt, _value, overrides?): Promise<string>

Helper function used to generage consistently the rating secret using salt value _salt and value to hide _value

Parameters

NameTypeDescription
_saltPromiseOrValue<BytesLike>Salt value
_valuePromiseOrValue<BigNumberish>Value to hide
overrides?CallOverrides-

Returns

Promise<string>

secret keccak256 hash of joint _salt and _value

Inherited from

AugmentedIColony.generateSecret


getColonyNetwork

getColonyNetwork(overrides?): Promise<string>

The colonyNetworkAddress we read here is set once, during initialiseColony Returns the colony network address set on the Colony

Parameters

NameType
overrides?CallOverrides

Returns

Promise<string>

colonyNetwork The address of Colony Network instance

Inherited from

AugmentedIColony.getColonyNetwork


getDomain

getDomain(_id, overrides?): Promise<[BigNumber, BigNumber] & { fundingPotId: BigNumber ; skillId: BigNumber }>

Get a domain by id

Parameters

NameTypeDescription
_idPromiseOrValue<BigNumberish>Id of the domain which details to get
overrides?CallOverrides-

Returns

Promise<[BigNumber, BigNumber] & { fundingPotId: BigNumber ; skillId: BigNumber }>

domain The domain

Inherited from

AugmentedIColony.getDomain


getDomainCount

getDomainCount(overrides?): Promise<BigNumber>

Get the number of domains in the colony

Parameters

NameType
overrides?CallOverrides

Returns

Promise<BigNumber>

count The domain count. Min 1 as the root domain is created at the same time as the colony

Inherited from

AugmentedIColony.getDomainCount


getExtensionClient

getExtensionClient<E>(extension): Promise<GetExtensionClientReturns[E]>

Get an instance of an extension client associated with this Colony.

Type parameters

NameType
Eextends Extension

Parameters

NameTypeDescription
extensionEAn Extension

Returns

Promise<GetExtensionClientReturns[E]>

An instance of an intialized extension client for the desired extension

Inherited from

AugmentedIColony.getExtensionClient


getFundingPot

getFundingPot(_id, overrides?): Promise<[number, BigNumber, BigNumber] & { associatedType: number ; associatedTypeId: BigNumber ; payoutsWeCannotMake: BigNumber }>

For the reward funding pot (e.g. id: 0) this returns (0, 0, 0) Get the non-mapping properties of a pot by id

Parameters

NameTypeDescription
_idPromiseOrValue<BigNumberish>Id of the pot which details to get
overrides?CallOverrides-

Returns

Promise<[number, BigNumber, BigNumber] & { associatedType: number ; associatedTypeId: BigNumber ; payoutsWeCannotMake: BigNumber }>

FundingPotAssociatedType The associated type of the current funding pot, e.g. Domain, Task, Payoutuint256 Id of the associated type, e.g. if associatedType = FundingPotAssociatedType.Domain, this refers to the domainIdpayoutsWeCannotMake Number of payouts that cannot be completed with the current funding

Inherited from

AugmentedIColony.getFundingPot


getFundingPotBalance

getFundingPotBalance(_potId, _token, overrides?): Promise<BigNumber>

Get the _token balance of pot with id _potId

Parameters

NameTypeDescription
_potIdPromiseOrValue<BigNumberish>Id of the funding pot
_tokenPromiseOrValue<string>Address of the token, 0x0 value indicates Ether
overrides?CallOverrides-

Returns

Promise<BigNumber>

balance Funding pot supply balance

Inherited from

AugmentedIColony.getFundingPotBalance


getFundingPotCount

getFundingPotCount(overrides?): Promise<BigNumber>

Get the number of funding pots in the colony

Parameters

NameType
overrides?CallOverrides

Returns

Promise<BigNumber>

count The funding pots count

Inherited from

AugmentedIColony.getFundingPotCount


getFundingPotPayout

getFundingPotPayout(_potId, _token, overrides?): Promise<BigNumber>

Get the assigned _token payouts of pot with id _potId

Parameters

NameTypeDescription
_potIdPromiseOrValue<BigNumberish>Id of the funding pot
_tokenPromiseOrValue<string>Address of the token, 0x0 value indicates Ether
overrides?CallOverrides-

Returns

Promise<BigNumber>

balance Funding pot payout amount

Inherited from

AugmentedIColony.getFundingPotPayout


getMembersReputation

getMembersReputation(skillId): Promise<{ addresses: string[] }>

Get all addresses that have reputation for a given skill. If you need the skillId for a certain domain you can use the getDomain function.

Parameters

NameTypeDescription
skillIdBigNumberishThe skill id to get the reputation in

Returns

Promise<{ addresses: string[] }>

All addresses that have a non-zero reputation for the given skill

Inherited from

AugmentedIColony.getMembersReputation


getNonRewardPotsTotal

getNonRewardPotsTotal(_token, overrides?): Promise<BigNumber>

Get the total amount of tokens _token minus amount reserved to be paid to the reputation and token holders as rewards

Parameters

NameTypeDescription
_tokenPromiseOrValue<string>Address of the token, 0x0 value indicates Ether
overrides?CallOverrides-

Returns

Promise<BigNumber>

amount Total amount of tokens in funding pots other than the rewards pot (id 0)

Inherited from

AugmentedIColony.getNonRewardPotsTotal


getPayment

getPayment(_id, overrides?): Promise<[string, boolean, BigNumber, BigNumber, BigNumber[]] & { domainId: BigNumber ; finalized: boolean ; fundingPotId: BigNumber ; recipient: string ; skills: BigNumber[] }>

Returns an exiting payment

Parameters

NameTypeDescription
_idPromiseOrValue<BigNumberish>Payment identifier
overrides?CallOverrides-

Returns

Promise<[string, boolean, BigNumber, BigNumber, BigNumber[]] & { domainId: BigNumber ; finalized: boolean ; fundingPotId: BigNumber ; recipient: string ; skills: BigNumber[] }>

payment The Payment data structure

Inherited from

AugmentedIColony.getPayment


getPaymentCount

getPaymentCount(overrides?): Promise<BigNumber>

Get the number of payments in the colony

Parameters

NameType
overrides?CallOverrides

Returns

Promise<BigNumber>

count The payment count

Inherited from

AugmentedIColony.getPaymentCount


getReputation

getReputation(skillId, address, customRootHash?): Promise<{ branchMask: string ; key: string ; reputationAmount: BigNumber ; siblings: string[] ; value: string }>

Get the reputation for an address and a certain skill. If you need the skillId for a certain domain you can use the getDomain function.

Remarks

This function also retrieves the proofs (branchMask, siblings) that are needed to verify the reputation on chain. If you don't need to do that (e.g. in order to proof the reputation when calling a contract method), you should probably just use the getReputationWithoutProofs method as it requires fewer computations

Parameters

NameTypeDescription
skillIdBigNumberishThe skill id to get the addresses reputation in
addressstringWallet address to retrieve the reputation of
customRootHash?stringThe customRootHash can be set to retrieve the reputation at a certain block time in the past

Returns

Promise<{ branchMask: string ; key: string ; reputationAmount: BigNumber ; siblings: string[] ; value: string }>

The reputation amount as well as the two proofs that are needed to verify the reputation on chain

Inherited from

AugmentedIColony.getReputation


getReputationAcrossDomains

getReputationAcrossDomains(address, customRootHash?): Promise<{ domainId: number ; reputationAmount?: BigNumberish ; skillId: number }[]>

Get the reputation for an address across all domains in a Colony.

Parameters

NameTypeDescription
addressstringWallet address to retrieve the reputation of
customRootHash?stringThe customRootHash can be set to retrieve the reputation at a certain block time in the past

Returns

Promise<{ domainId: number ; reputationAmount?: BigNumberish ; skillId: number }[]>

The reputation amount

Inherited from

AugmentedIColony.getReputationAcrossDomains


getReputationWithoutProofs

getReputationWithoutProofs(skillId, address, customRootHash?): Promise<{ key: string ; reputationAmount: BigNumber ; value: string }>

Get the reputation for an address and a certain skill. If you need the skillId for a certain domain you can use the getDomain function.

Parameters

NameTypeDescription
skillIdBigNumberishThe skill id to get the addresses reputation in
addressstringWallet address to retrieve the reputation of
customRootHash?stringThe customRootHash can be set to retrieve the reputation at a certain block time in the past

Returns

Promise<{ key: string ; reputationAmount: BigNumber ; value: string }>

The reputation amount

Inherited from

AugmentedIColony.getReputationWithoutProofs


getRewardInverse

getRewardInverse(overrides?): Promise<BigNumber>

Return 1 / the reward to pay out from revenue. e.g. if the fee is 1% (or 0.01), return 100

Parameters

NameType
overrides?CallOverrides

Returns

Promise<BigNumber>

rewardInverse The inverse of the reward

Inherited from

AugmentedIColony.getRewardInverse


getRewardPayoutInfo

getRewardPayoutInfo(_payoutId, overrides?): Promise<[string, BigNumber, BigNumber, BigNumber, string, BigNumber] & { amount: BigNumber ; blockTimestamp: BigNumber ; colonyWideReputation: BigNumber ; reputationState: string ; tokenAddress: string ; totalTokens: BigNumber }>

Get useful information about specific reward payout

Parameters

NameTypeDescription
_payoutIdPromiseOrValue<BigNumberish>Id of the reward payout
overrides?CallOverrides-

Returns

Promise<[string, BigNumber, BigNumber, BigNumber, string, BigNumber] & { amount: BigNumber ; blockTimestamp: BigNumber ; colonyWideReputation: BigNumber ; reputationState: string ; tokenAddress: string ; totalTokens: BigNumber }>

RewardPayoutCycle, containing propertes: reputationState Reputation root hash at the time of creation colonyWideReputation Colony wide reputation in reputationState totalTokens Total colony tokens at the time of creation amount Total amount of tokens taken aside for reward payout tokenAddress Token address blockTimestamp Block number at the time of creation

Inherited from

AugmentedIColony.getRewardPayoutInfo


getTask

getTask(_id, overrides?): Promise<[string, string, number, BigNumber, BigNumber, BigNumber, BigNumber, BigNumber[]] & { completionTimestamp: BigNumber ; deliverableHash: string ; domainId: BigNumber ; dueDate: BigNumber ; fundingPotId: BigNumber ; skillIds: BigNumber[] ; specificationHash: string ; status: number }>

Get a task with id _id

Parameters

NameTypeDescription
_idPromiseOrValue<BigNumberish>Id of the task
overrides?CallOverrides-

Returns

Promise<[string, string, number, BigNumber, BigNumber, BigNumber, BigNumber, BigNumber[]] & { completionTimestamp: BigNumber ; deliverableHash: string ; domainId: BigNumber ; dueDate: BigNumber ; fundingPotId: BigNumber ; skillIds: BigNumber[] ; specificationHash: string ; status: number }>

specificationHash Task brief hashdeliverableHash Task deliverable hashstatus TaskStatus property. 0 - Active. 1 - Cancelled. 2 - FinalizeddueDate Due datefundingPotId Id of funding pot for taskcompletionTimestamp Task completion timestampdomainId Task domain id, default is root colony domain with id 1skillIds Array of global skill ids assigned to task

Inherited from

AugmentedIColony.getTask


getTaskChangeNonce

getTaskChangeNonce(_id, overrides?): Promise<BigNumber>

Starts from 0 and is incremented on every co-reviewed task change via executeTaskChange call

Parameters

NameTypeDescription
_idPromiseOrValue<BigNumberish>Id of the task
overrides?CallOverrides-

Returns

Promise<BigNumber>

nonce The current task change nonce value

Inherited from

AugmentedIColony.getTaskChangeNonce


getTaskCount

getTaskCount(overrides?): Promise<BigNumber>

Get the number of tasks in the colony

Parameters

NameType
overrides?CallOverrides

Returns

Promise<BigNumber>

count The task count

Inherited from

AugmentedIColony.getTaskCount


getTaskPayout

getTaskPayout(_id, _role, _token, overrides?): Promise<BigNumber>

Get payout amount in _token denomination for role _role in task _id

Parameters

NameTypeDescription
_idPromiseOrValue<BigNumberish>Id of the task
_rolePromiseOrValue<BigNumberish>Id of the role, as defined in TaskRole enum
_tokenPromiseOrValue<string>Address of the token, 0x0 value indicates Ether
overrides?CallOverrides-

Returns

Promise<BigNumber>

amount Payout amount

Inherited from

AugmentedIColony.getTaskPayout


getTaskRole

getTaskRole(_id, _role, overrides?): Promise<[string, boolean, number] & { rateFail: boolean ; rating: number ; user: string }>

Get the Role properties back for role _role in task _id

Parameters

NameTypeDescription
_idPromiseOrValue<BigNumberish>Id of the task
_rolePromiseOrValue<BigNumberish>Id of the role, as defined in TaskRole enum
overrides?CallOverrides-

Returns

Promise<[string, boolean, number] & { rateFail: boolean ; rating: number ; user: string }>

role The Role

Inherited from

AugmentedIColony.getTaskRole


getTaskWorkRatingSecret

getTaskWorkRatingSecret(_id, _role, overrides?): Promise<string>

Get the rating secret submitted for role _role in task _id

Parameters

NameTypeDescription
_idPromiseOrValue<BigNumberish>Id of the task
_rolePromiseOrValue<BigNumberish>Id of the role, as defined in TaskRole enum
overrides?CallOverrides-

Returns

Promise<string>

secret Rating secret bytes32 value

Inherited from

AugmentedIColony.getTaskWorkRatingSecret


getTaskWorkRatingSecretsInfo

getTaskWorkRatingSecretsInfo(_id, overrides?): Promise<[BigNumber, BigNumber] & { lastSubmittedAt: BigNumber ; nSecrets: BigNumber }>

Get the ColonyStorage.RatingSecrets information for task _id

Parameters

NameTypeDescription
_idPromiseOrValue<BigNumberish>Id of the task
overrides?CallOverrides-

Returns

Promise<[BigNumber, BigNumber] & { lastSubmittedAt: BigNumber ; nSecrets: BigNumber }>

nSecrets Number of secretslastSubmittedAt Timestamp of the last submitted rating secret

Inherited from

AugmentedIColony.getTaskWorkRatingSecretsInfo


getToken

getToken(overrides?): Promise<string>

Get the colony token

Parameters

NameType
overrides?CallOverrides

Returns

Promise<string>

tokenAddress Address of the token contract

Inherited from

AugmentedIColony.getToken


hasUserRole

hasUserRole(_user, _domainId, _role, overrides?): Promise<boolean>

Check whether a given user has a given role for the colony. Calls the function of the same name on the colony's authority contract.

Parameters

NameTypeDescription
_userPromiseOrValue<string>The user whose role we want to check
_domainIdPromiseOrValue<BigNumberish>The domain where we want to check for the role
_rolePromiseOrValue<BigNumberish>The role we want to check for
overrides?CallOverrides-

Returns

Promise<boolean>

Inherited from

AugmentedIColony.hasUserRole


initialiseColony

initialiseColony(_colonyNetworkAddress, _token, overrides?): Promise<ContractTransaction>

Sets the reward inverse to the uint max 2**256 - 1 Called once when the colony is created to initialise certain storage slot values

Parameters

NameTypeDescription
_colonyNetworkAddressPromiseOrValue<string>Address of the colony network
_tokenPromiseOrValue<string>Address of the colony ERC20 Token
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.initialiseColony


isInRecoveryMode

isInRecoveryMode(overrides?): Promise<boolean>

Is colony network in recovery mode

Parameters

NameType
overrides?CallOverrides

Returns

Promise<boolean>

inRecoveryMode Return true if recovery mode is active, false otherwise

Inherited from

AugmentedIColony.isInRecoveryMode


listenerCount

listenerCount(eventName?): number

Parameters

NameType
eventName?string | EventFilter

Returns

number

Inherited from

AugmentedIColony.listenerCount


listeners

listeners<TEvent>(eventFilter?): TypedListener<TEvent>[]

Type parameters

NameType
TEventextends TypedEvent<any, any, TEvent>

Parameters

NameType
eventFilter?TypedEventFilter<TEvent>

Returns

TypedListener<TEvent>[]

Inherited from

AugmentedIColony.listeners

listeners(eventName?): Listener[]

Parameters

NameType
eventName?string

Returns

Listener[]

Inherited from

AugmentedIColony.listeners


makeTask

makeTask(_permissionDomainId, _childSkillIndex, _specificationHash, _domainId, _skillId, _dueDate, overrides?): Promise<ContractTransaction>

Make a new task in the colony. Secured function to authorised members

Parameters

NameTypeDescription
_permissionDomainIdPromiseOrValue<BigNumberish>The domainId in which I have the permission to take this action
_childSkillIndexPromiseOrValue<BigNumberish>The index that the _domainId is relative to _permissionDomainId
_specificationHashPromiseOrValue<BytesLike>Database identifier where the task specification is stored
_domainIdPromiseOrValue<BigNumberish>The domain where the task belongs
_skillIdPromiseOrValue<BigNumberish>The skill associated with the task, can set to 0 for no-op
_dueDatePromiseOrValue<BigNumberish>The due date of the task, can set to 0 for no-op
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.makeTask


makeTaskWithProofs

makeTaskWithProofs(_specificationHash, _domainId, _skillId, _dueDate, overrides?): Promise<ContractTransaction>

Same as makeTask, but let colonyJS figure out the permission proofs for you. Always prefer this method, except when you have good reason not to.

Parameters

NameTypeDescription
_specificationHashBytesLikeDatabase identifier where the task specification is stored
_domainIdBigNumberishThe domain where the task belongs
_skillIdBigNumberishThe skill associated with the task, can set to 0 for no-op
_dueDateBigNumberishThe due date of the task, can set to 0 for no-op
overrides?TxOverrides-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.makeTaskWithProofs


mintTokens

mintTokens(_wad, overrides?): Promise<ContractTransaction>

Mint _wad amount of colony tokens. Secured function to authorised members

Parameters

NameTypeDescription
_wadPromiseOrValue<BigNumberish>Amount to mint
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.mintTokens


moveFundsBetweenPots

moveFundsBetweenPots(_permissionDomainId, _fromChildSkillIndex, _toChildSkillIndex, _fromPot, _toPot, _amount, _token, overrides?): Promise<ContractTransaction>

Move a given amount: _amount of _token funds from funding pot with id _fromPot to one with id _toPot.

Parameters

NameTypeDescription
_permissionDomainIdPromiseOrValue<BigNumberish>The domainId in which I have the permission to take this action
_fromChildSkillIndexPromiseOrValue<BigNumberish>The child index in _permissionDomainId where we can find the domain for _fromPotId
_toChildSkillIndexPromiseOrValue<BigNumberish>The child index in _permissionDomainId where we can find the domain for _toPotId
_fromPotPromiseOrValue<BigNumberish>Funding pot id providing the funds
_toPotPromiseOrValue<BigNumberish>Funding pot id receiving the funds
_amountPromiseOrValue<BigNumberish>Amount of funds
_tokenPromiseOrValue<string>Address of the token, 0x0 value indicates Ether
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.moveFundsBetweenPots


moveFundsBetweenPotsWithProofs

moveFundsBetweenPotsWithProofs(_fromPot, _toPot, _amount, _token, overrides?): Promise<ContractTransaction>

Deprecated

Same as moveFundsBetweenPots, but let colonyJS figure out the permission proofs for you. Always prefer this method, except when you have good reason not to.

Parameters

NameTypeDescription
_fromPotBigNumberishFunding pot id providing the funds
_toPotBigNumberishFunding pot id receiving the funds
_amountBigNumberishAmount of funds
_tokenstringAddress of the token, 0x0 value indicates Ether
overrides?TxOverrides-

Returns

Promise<ContractTransaction>

Inherited from

MoveFundsBetweenPotsAugmentsA.moveFundsBetweenPotsWithProofs


numRecoveryRoles

numRecoveryRoles(overrides?): Promise<BigNumber>

Return number of recovery roles.

Parameters

NameType
overrides?CallOverrides

Returns

Promise<BigNumber>

numRoles Number of users with the recovery role.

Inherited from

AugmentedIColony.numRecoveryRoles


owner

owner(overrides?): Promise<string>

Used for testing. Get the colony owner address. This should be address(0x0) at all times

Parameters

NameType
overrides?CallOverrides

Returns

Promise<string>

colonyOwner Address of the colony owner

Inherited from

AugmentedIColony.owner


queryFilter

queryFilter<TEvent>(event, fromBlockOrBlockhash?, toBlock?): Promise<TEvent[]>

Type parameters

NameType
TEventextends TypedEvent<any, any, TEvent>

Parameters

NameType
eventTypedEventFilter<TEvent>
fromBlockOrBlockhash?string | number
toBlock?string | number

Returns

Promise<TEvent[]>

Inherited from

AugmentedIColony.queryFilter


registerColonyLabel

registerColonyLabel(colonyName, orbitdb, overrides?): Promise<ContractTransaction>

Register colony's ENS label

Parameters

NameTypeDescription
colonyNamePromiseOrValue<string>The label to register.
orbitdbPromiseOrValue<string>The path of the orbitDB database associated with the colony name
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.registerColonyLabel


removeAllListeners

removeAllListeners<TEvent>(eventFilter): ColonyClientV1

Type parameters

NameType
TEventextends TypedEvent<any, any, TEvent>

Parameters

NameType
eventFilterTypedEventFilter<TEvent>

Returns

ColonyClientV1

Inherited from

AugmentedIColony.removeAllListeners

removeAllListeners(eventName?): ColonyClientV1

Parameters

NameType
eventName?string

Returns

ColonyClientV1

Inherited from

AugmentedIColony.removeAllListeners


removeRecoveryRole

removeRecoveryRole(_user, overrides?): Promise<ContractTransaction>

Remove colony recovery role. Can only be called by root role.

Parameters

NameTypeDescription
_userPromiseOrValue<string>User we want to remove recovery role from
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.removeRecoveryRole


removeTaskEvaluatorRole

removeTaskEvaluatorRole(_id, overrides?): Promise<ContractTransaction>

Removing evaluator role Agreed between manager and currently assigned evaluator

Parameters

NameTypeDescription
_idPromiseOrValue<BigNumberish>Id of the task
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.removeTaskEvaluatorRole


removeTaskWorkerRole

removeTaskWorkerRole(_id, overrides?): Promise<ContractTransaction>

Removing worker role Agreed between manager and currently assigned worker

Parameters

NameTypeDescription
_idPromiseOrValue<BigNumberish>Id of the task
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.removeTaskWorkerRole


revealTaskWorkRating

revealTaskWorkRating(_id, _role, _rating, _salt, overrides?): Promise<ContractTransaction>

Compares the keccak256(_salt, _rating) output with the previously submitted rating secret and if they match, sets the task role properties rated to true and rating to _rating Reveal the secret rating submitted in IColony.submitTaskWorkRating for task _id and task role with id _role Allowed within 5 days period starting which whichever is first from either both rating secrets being submitted (via IColony.submitTaskWorkRating) or the 5 day rating period expiring

Parameters

NameTypeDescription
_idPromiseOrValue<BigNumberish>Id of the task
_rolePromiseOrValue<BigNumberish>Id of the role, as defined in TaskRole enum
_ratingPromiseOrValue<BigNumberish>0-50 rating score (in increments of 10, .e.g 0, 10, 20, 30, 40 or 50)
_saltPromiseOrValue<BytesLike>Salt value used to generate the rating secret
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.revealTaskWorkRating


setAdministrationRole

setAdministrationRole(_permissionDomainId, _childSkillIndex, _user, _domainId, _setTo, overrides?): Promise<ContractTransaction>

Set new colony admin role. Can be called by root role or architecture role.

Parameters

NameTypeDescription
_permissionDomainIdPromiseOrValue<BigNumberish>Domain in which the caller has root/architecture role
_childSkillIndexPromiseOrValue<BigNumberish>The index that the _domainId is relative to _permissionDomainId
_userPromiseOrValue<string>User we want to give an admin role to
_domainIdPromiseOrValue<BigNumberish>Domain in which we are giving user the role
_setToPromiseOrValue<boolean>The state of the role permission (true assign the permission, false revokes it)
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.setAdministrationRole


setAdministrationRoleWithProofs

setAdministrationRoleWithProofs(_user, _domainId, _setTo, overrides?): Promise<ContractTransaction>

Same as setAdministrationRole, but let colonyJS figure out the permission proofs for you. Always prefer this method, except when you have good reason not to.

Parameters

NameTypeDescription
_userstringUser we want to give an admin role to
_domainIdBigNumberishDomain in which we are giving user the role
_setTobooleanThe state of the role permission (true assign the permission, false revokes it)
overrides?TxOverrides-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.setAdministrationRoleWithProofs


setAllTaskPayouts

setAllTaskPayouts(_id, _token, _managerAmount, _evaluatorAmount, _workerAmount, overrides?): Promise<ContractTransaction>

Can only call if evaluator and worker are unassigned or manager, otherwise need signature Set _token payout for all roles in task _id to the respective amounts

Parameters

NameTypeDescription
_idPromiseOrValue<BigNumberish>Id of the task
_tokenPromiseOrValue<string>Address of the token, 0x0 value indicates Ether
_managerAmountPromiseOrValue<BigNumberish>Payout amount for manager
_evaluatorAmountPromiseOrValue<BigNumberish>Payout amount for evaluator
_workerAmountPromiseOrValue<BigNumberish>Payout amount for worker
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.setAllTaskPayouts


setArchitectureRole

setArchitectureRole(_permissionDomainId, _childSkillIndex, _user, _domainId, _setTo, overrides?): Promise<ContractTransaction>

Set new colony architecture role. Can be called by root role or architecture role.

Parameters

NameTypeDescription
_permissionDomainIdPromiseOrValue<BigNumberish>Domain in which the caller has root/architecture role
_childSkillIndexPromiseOrValue<BigNumberish>The index that the _domainId is relative to _permissionDomainId
_userPromiseOrValue<string>User we want to give an architecture role to
_domainIdPromiseOrValue<BigNumberish>Domain in which we are giving user the role
_setToPromiseOrValue<boolean>The state of the role permission (true assign the permission, false revokes it)
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.setArchitectureRole


setArchitectureRoleWithProofs

setArchitectureRoleWithProofs(_user, _domainId, _setTo, overrides?): Promise<ContractTransaction>

Same as setArchitectureRole, but let colonyJS figure out the permission proofs for you. Always prefer this method, except when you have good reason not to.

Parameters

NameTypeDescription
_userstringUser we want to give an architecture role to
_domainIdBigNumberishDomain in which we are giving user the role
_setTobooleanThe state of the role permission (true assign the permission, false revokes it)
overrides?TxOverrides-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.setArchitectureRoleWithProofs


setFundingRole

setFundingRole(_permissionDomainId, _childSkillIndex, _user, _domainId, _setTo, overrides?): Promise<ContractTransaction>

Set new colony funding role. Can be called by root role or architecture role.

Parameters

NameTypeDescription
_permissionDomainIdPromiseOrValue<BigNumberish>Domain in which the caller has root/architecture role
_childSkillIndexPromiseOrValue<BigNumberish>The index that the _domainId is relative to _permissionDomainId
_userPromiseOrValue<string>User we want to give an funding role to
_domainIdPromiseOrValue<BigNumberish>Domain in which we are giving user the role
_setToPromiseOrValue<boolean>The state of the role permission (true assign the permission, false revokes it)
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.setFundingRole


setFundingRoleWithProofs

setFundingRoleWithProofs(_user, _domainId, _setTo, overrides?): Promise<ContractTransaction>

Same as setFundingRole, but let colonyJS figure out the permission proofs for you. Always prefer this method, except when you have good reason not to.

Parameters

NameTypeDescription
_userstringUser we want to give an funding role to
_domainIdBigNumberishDomain in which we are giving user the role
_setTobooleanThe state of the role permission (true assign the permission, false revokes it)
overrides?TxOverrides-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.setFundingRoleWithProofs


setPaymentDomain

setPaymentDomain(_permissionDomainId, _childSkillIndex, _id, _domainId, overrides?): Promise<ContractTransaction>

Sets the domain on an existing payment. Secured function to authorised members

Parameters

NameTypeDescription
_permissionDomainIdPromiseOrValue<BigNumberish>The domainId in which I have the permission to take this action
_childSkillIndexPromiseOrValue<BigNumberish>The index that the _domainId is relative to _permissionDomainId
_idPromiseOrValue<BigNumberish>Payment identifier
_domainIdPromiseOrValue<BigNumberish>Id of the new domain to set
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.setPaymentDomain


setPaymentDomainWithProofs

setPaymentDomainWithProofs(_id, _domainId, overrides?): Promise<ContractTransaction>

Deprecated

Same as setPaymentDomain, but let colonyJS figure out the permission proofs for you. Always prefer this method, except when you have good reason not to.

Parameters

NameTypeDescription
_idBigNumberishPayment identifier
_domainIdBigNumberishId of the new domain to set
overrides?TxOverrides-

Returns

Promise<ContractTransaction>

Inherited from

SetPaymentDomainAugments.setPaymentDomainWithProofs


setPaymentPayout

setPaymentPayout(_permissionDomainId, _childSkillIndex, _id, _token, _amount, overrides?): Promise<ContractTransaction>

Sets the payout for a given token on an existing payment. Secured function to authorised members

Parameters

NameTypeDescription
_permissionDomainIdPromiseOrValue<BigNumberish>The domainId in which I have the permission to take this action
_childSkillIndexPromiseOrValue<BigNumberish>The index that the _domainId is relative to _permissionDomainId
_idPromiseOrValue<BigNumberish>Payment identifier
_tokenPromiseOrValue<string>Address of the token, 0x0 value indicates Ether
_amountPromiseOrValue<BigNumberish>Payout amount
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.setPaymentPayout


setPaymentPayoutWithProofs

setPaymentPayoutWithProofs(_id, _token, _amount, overrides?): Promise<ContractTransaction>

Same as setPaymentPayout, but let colonyJS figure out the permission proofs for you. Always prefer this method, except when you have good reason not to.

Parameters

NameTypeDescription
_idBigNumberishPayment identifier
_tokenBigNumberishAddress of the token, 0x0 value indicates Ether
_amountBigNumberishPayout amount
overrides?TxOverrides-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.setPaymentPayoutWithProofs


setPaymentRecipient

setPaymentRecipient(_permissionDomainId, _childSkillIndex, _id, _recipient, overrides?): Promise<ContractTransaction>

Sets the recipient on an existing payment. Secured function to authorised members

Parameters

NameTypeDescription
_permissionDomainIdPromiseOrValue<BigNumberish>The domainId in which I have the permission to take this action
_childSkillIndexPromiseOrValue<BigNumberish>The index that the _domainId is relative to _permissionDomainId
_idPromiseOrValue<BigNumberish>Payment identifier
_recipientPromiseOrValue<string>Address of the payment recipient
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.setPaymentRecipient


setPaymentRecipientWithProofs

setPaymentRecipientWithProofs(_id, _recipient, overrides?): Promise<ContractTransaction>

Same as setPaymentRecipient, but let colonyJS figure out the permission proofs for you. Always prefer this method, except when you have good reason not to.

Parameters

NameTypeDescription
_idBigNumberishPayment identifier
_recipientstringAddress of the payment recipient
overrides?TxOverrides-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.setPaymentRecipientWithProofs


setPaymentSkill

setPaymentSkill(_permissionDomainId, _childSkillIndex, _id, _skillId, overrides?): Promise<ContractTransaction>

Sets the skill on an existing payment. Secured function to authorised members

Parameters

NameTypeDescription
_permissionDomainIdPromiseOrValue<BigNumberish>The domainId in which I have the permission to take this action
_childSkillIndexPromiseOrValue<BigNumberish>The index that the _domainId is relative to _permissionDomainId
_idPromiseOrValue<BigNumberish>Payment identifier
_skillIdPromiseOrValue<BigNumberish>Id of the new skill to set
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.setPaymentSkill


setPaymentSkillWithProofs

setPaymentSkillWithProofs(_id, _skillId, overrides?): Promise<ContractTransaction>

Same as setPaymentSkill, but let colonyJS figure out the permission proofs for you. Always prefer this method, except when you have good reason not to.

Parameters

NameTypeDescription
_idBigNumberishPayment identifier
_skillIdBigNumberishId of the new skill to set
overrides?TxOverrides-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.setPaymentSkillWithProofs


setRecoveryRole

setRecoveryRole(_user, overrides?): Promise<ContractTransaction>

Set new colony recovery role. Can be called by root.

Parameters

NameTypeDescription
_userPromiseOrValue<string>User we want to give a recovery role to
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.setRecoveryRole


setRewardInverse

setRewardInverse(_rewardInverse, overrides?): Promise<ContractTransaction>

Set the reward inverse to pay out from revenue. e.g. if the fee is 1% (or 0.01), set 100

Parameters

NameTypeDescription
_rewardInversePromiseOrValue<BigNumberish>The inverse of the reward
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.setRewardInverse


setRootRole

setRootRole(_user, _setTo, overrides?): Promise<ContractTransaction>

Set new colony root role. Can be called by root role only.

Parameters

NameTypeDescription
_userPromiseOrValue<string>User we want to give an root role to
_setToPromiseOrValue<boolean>The state of the role permission (true assign the permission, false revokes it)
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.setRootRole


setStorageSlotRecovery

setStorageSlotRecovery(_slot, _value, overrides?): Promise<ContractTransaction>

certain critical variables are protected from editing in this function Update value of arbitrary storage variable. Can only be called by user with recovery role.

Parameters

NameTypeDescription
_slotPromiseOrValue<BigNumberish>Uint address of storage slot to be updated
_valuePromiseOrValue<BytesLike>Bytes32 word of data to be set
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.setStorageSlotRecovery


setTaskBrief

setTaskBrief(_id, _specificationHash, overrides?): Promise<ContractTransaction>

Set the hash for the task brief, aka task work specification, which identifies the task brief content in ddb Allowed before a task is finalized

Parameters

NameTypeDescription
_idPromiseOrValue<BigNumberish>Id of the task
_specificationHashPromiseOrValue<BytesLike>Unique hash of the task brief in ddb
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.setTaskBrief


setTaskDomain

setTaskDomain(_id, _domainId, overrides?): Promise<ContractTransaction>

Set the domain for task _id

Parameters

NameTypeDescription
_idPromiseOrValue<BigNumberish>Id of the task
_domainIdPromiseOrValue<BigNumberish>Id of the domain
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.setTaskDomain


setTaskDueDate

setTaskDueDate(_id, _dueDate, overrides?): Promise<ContractTransaction>

Set the due date on task _id. Allowed before a task is finalized

Parameters

NameTypeDescription
_idPromiseOrValue<BigNumberish>Id of the task
_dueDatePromiseOrValue<BigNumberish>Due date as seconds since unix epoch
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.setTaskDueDate


setTaskEvaluatorPayout

setTaskEvaluatorPayout(_id, _token, _amount, overrides?): Promise<ContractTransaction>

Set _token payout for evaluator in task _id to _amount

Parameters

NameTypeDescription
_idPromiseOrValue<BigNumberish>Id of the task
_tokenPromiseOrValue<string>Address of the token, 0x0 value indicates Ether
_amountPromiseOrValue<BigNumberish>Payout amount
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.setTaskEvaluatorPayout


setTaskEvaluatorRole

setTaskEvaluatorRole(_id, _user, overrides?): Promise<ContractTransaction>

This function can only be called through executeTaskRoleAssignment Assigning evaluator role Can only be set if there is no one currently assigned to be an evaluator Manager of the task and user we want to assign role to both need to agree Managers can assign themselves to this role, if there is no one currently assigned to it

Parameters

NameTypeDescription
_idPromiseOrValue<BigNumberish>Id of the task
_userPromiseOrValue<string>Address of the user we want to give a evaluator role to
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.setTaskEvaluatorRole


setTaskManagerPayout

setTaskManagerPayout(_id, _token, _amount, overrides?): Promise<ContractTransaction>

Set _token payout for manager in task _id to _amount

Parameters

NameTypeDescription
_idPromiseOrValue<BigNumberish>Id of the task
_tokenPromiseOrValue<string>Address of the token, 0x0 value indicates Ether
_amountPromiseOrValue<BigNumberish>Payout amount
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.setTaskManagerPayout


setTaskManagerRole

setTaskManagerRole(_id, _user, _permissionDomainId, _childSkillIndex, overrides?): Promise<ContractTransaction>

This function can only be called through executeTaskRoleAssignment Assigning manager role Current manager and user we want to assign role to both need to agree User we want to set here also needs to be an admin Note that the domain proof data comes at the end here to not interfere with the assembly argument unpacking

Parameters

NameTypeDescription
_idPromiseOrValue<BigNumberish>Id of the task
_userPromiseOrValue<string>Address of the user we want to give a manager role to
_permissionDomainIdPromiseOrValue<BigNumberish>The domain ID in which _user has the Administration permission
_childSkillIndexPromiseOrValue<BigNumberish>The index that the _domainId is relative to _permissionDomainId
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.setTaskManagerRole


setTaskSkill

setTaskSkill(_id, _skillId, overrides?): Promise<ContractTransaction>

Currently we only allow one skill per task although we have provisioned for an array of skills in Task struct Allowed before a task is finalized Set the skill for task _id

Parameters

NameTypeDescription
_idPromiseOrValue<BigNumberish>Id of the task
_skillIdPromiseOrValue<BigNumberish>Id of the skill which has to be a global skill
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.setTaskSkill


setTaskWorkerPayout

setTaskWorkerPayout(_id, _token, _amount, overrides?): Promise<ContractTransaction>

Set _token payout for worker in task _id to _amount

Parameters

NameTypeDescription
_idPromiseOrValue<BigNumberish>Id of the task
_tokenPromiseOrValue<string>Address of the token, 0x0 value indicates Ether
_amountPromiseOrValue<BigNumberish>Payout amount
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.setTaskWorkerPayout


setTaskWorkerRole

setTaskWorkerRole(_id, _user, overrides?): Promise<ContractTransaction>

This function can only be called through executeTaskRoleAssignment Assigning worker role Can only be set if there is no one currently assigned to be a worker Manager of the task and user we want to assign role to both need to agree

Parameters

NameTypeDescription
_idPromiseOrValue<BigNumberish>Id of the task
_userPromiseOrValue<string>Address of the user we want to give a worker role to
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.setTaskWorkerRole


startNextRewardPayout

startNextRewardPayout(_token, key, value, branchMask, siblings, overrides?): Promise<ContractTransaction>

Start next reward payout for _token. All funds in the reward pot for _token will become unavailable.Add a new payment in the colony. Can only be called by users with root permission. All tokens will be locked, and can be unlocked by calling waiveRewardPayout or claimRewardPayout.

Parameters

NameTypeDescription
_tokenPromiseOrValue<string>Address of the token used for reward payout
keyPromiseOrValue<BytesLike>Some Reputation hash tree key
valuePromiseOrValue<BytesLike>Reputation value
branchMaskPromiseOrValue<BigNumberish>The branchmask of the proof
siblingsPromiseOrValue<BytesLike>[]The siblings of the proof
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.startNextRewardPayout


submitTaskDeliverable

submitTaskDeliverable(_id, _deliverableHash, overrides?): Promise<ContractTransaction>

Set the task.deliverableHash and task.completionTimestamp properties Submit the task deliverable, i.e. the output of the work performed for task _id Submission is allowed only to the assigned worker before the task due date. Submissions cannot be overwritten

Parameters

NameTypeDescription
_idPromiseOrValue<BigNumberish>Id of the task
_deliverableHashPromiseOrValue<BytesLike>Unique hash of the task deliverable content in ddb
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.submitTaskDeliverable


submitTaskDeliverableAndRating

submitTaskDeliverableAndRating(_id, _deliverableHash, _ratingSecret, overrides?): Promise<ContractTransaction>

Internally call submitTaskDeliverable and submitTaskWorkRating in sequence Submit the task deliverable for Worker and rating for Manager

Parameters

NameTypeDescription
_idPromiseOrValue<BigNumberish>Id of the task
_deliverableHashPromiseOrValue<BytesLike>Unique hash of the task deliverable content in ddb
_ratingSecretPromiseOrValue<BytesLike>Rating secret for manager
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.submitTaskDeliverableAndRating


submitTaskWorkRating

submitTaskWorkRating(_id, _role, _ratingSecret, overrides?): Promise<ContractTransaction>

Submit a hashed secret of the rating for work in task _id which was performed by user with task role id _role Allowed within 5 days period starting which whichever is first from either the deliverable being submitted or the dueDate been reached Allowed only for evaluator to rate worker and for worker to rate manager performance Once submitted ratings can not be changed or overwritten

Parameters

NameTypeDescription
_idPromiseOrValue<BigNumberish>Id of the task
_rolePromiseOrValue<BigNumberish>Id of the role, as defined in TaskRole enum
_ratingSecretPromiseOrValue<BytesLike>keccak256 hash of a salt and 0-50 rating score (in increments of 10, .e.g 0, 10, 20, 30, 40 or 50) Can be generated via IColony.generateSecret helper function
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.submitTaskWorkRating


upgrade

upgrade(_newVersion, overrides?): Promise<ContractTransaction>

Downgrades are not allowed, i.e. _newVersion should be higher than the currect colony version Upgrades a colony to a new Colony contract version _newVersion

Parameters

NameTypeDescription
_newVersionPromiseOrValue<BigNumberish>The target version for the upgrade
overrides?Overrides & { from?: PromiseOrValue<string> }-

Returns

Promise<ContractTransaction>

Inherited from

AugmentedIColony.upgrade


verifyReputationProof

verifyReputationProof(key, value, branchMask, siblings, overrides?): Promise<boolean>

For more detail about branchMask and siblings, examine the PatriciaTree implementation While public, likely only to be used by the Colony contracts, as it checks that the user is proving their own reputation in the current colony. The verifyProof function can be used to verify any proof, though this function is not currently exposed on the Colony's EtherRouter. Helper function that can be used by a client to verify the correctness of a patricia proof they have been supplied with.

Parameters

NameTypeDescription
keyPromiseOrValue<BytesLike>The key of the element the proof is for.
valuePromiseOrValue<BytesLike>The value of the element that the proof is for.
branchMaskPromiseOrValue<BigNumberish>The branchmask of the proof
siblingsPromiseOrValue<BytesLike>[]The siblings of the proof
overrides?CallOverrides-

Returns

Promise<boolean>

isValid True if the proof is valid, false otherwise.

Inherited from

AugmentedIColony.verifyReputationProof


version

version(overrides?): Promise<BigNumber>

Get the Colony contract version Starts from 1 and is incremented with every deployed contract change

Parameters

NameType
overrides?CallOverrides

Returns

Promise<BigNumber>

colonyVersion Version number

Inherited from

AugmentedIColony.version