Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ColonyClientV2

Hierarchy

  • IColony & { awkwardRecoveryRoleEventClient: IColonyV4; clientType: ColonyClient; estimate: ExtendedEstimate<T>; networkClient: ColonyNetworkClient; oneTxPaymentClient?: OneTxPaymentClient; tokenClient: TokenClient; addDomainWithProofs: any; addPaymentWithProofs: any; deployTokenAuthority: any; finalizePaymentWithProofs: any; getReputation: any; makeTaskWithProofs: any; moveFundsBetweenPotsWithProofs: any; setAdministrationRoleWithProofs: any; setArchitectureRoleWithProofs: any; setFundingRoleWithProofs: any; setPaymentPayoutWithProofs: any; setPaymentRecipientWithProofs: any; setPaymentSkillWithProofs: any }
  • { estimate: T["estimate"] & SetPaymentDomainEstimate; setPaymentDomainWithProofs: any }
    • ColonyClientV2

Indexable

[name: string]: ContractFunction | any

Index

Constructors

Properties

Methods

Constructors

constructor

  • new ColonyClientV2(addressOrName: string, contractInterface: Array<string | FunctionFragment | EventFragment | ParamType> | string | Interface, signerOrProvider: Signer | Provider): ColonyClientV2
  • Parameters

    • addressOrName: string
    • contractInterface: Array<string | FunctionFragment | EventFragment | ParamType> | string | Interface
    • signerOrProvider: Signer | Provider

    Returns ColonyClientV2

Properties

address

address: string

addressPromise

addressPromise: Promise<string>

awkwardRecoveryRoleEventClient

awkwardRecoveryRoleEventClient: IColonyV4

clientType

clientType: ColonyClient

clientVersion

clientVersion: Glider

deployTransaction

deployTransaction: TransactionResponse

estimate

estimate: ExtendedIColony<IColony>["estimate"] & SetPaymentDomainEstimate

filters

filters: { ColonyBootstrapped: any; ColonyFundsClaimed: any; ColonyFundsMovedBetweenFundingPots: any; ColonyInitialised: any; ColonyRewardInverseSet: any; ColonyRoleSet: any; ColonyUpgraded: any; DomainAdded: any; FundingPotAdded: any; PaymentAdded: any; PayoutClaimed: any; RewardPayoutClaimed: any; RewardPayoutCycleEnded: any; RewardPayoutCycleStarted: any; TaskAdded: any; TaskBriefSet: any; TaskCanceled: any; TaskCompleted: any; TaskDeliverableSubmitted: any; TaskDomainSet: any; TaskDueDateSet: any; TaskFinalized: any; TaskPayoutSet: any; TaskRoleUserSet: any; TaskSkillSet: any; TaskWorkRatingRevealed: any }

Type declaration

  • ColonyBootstrapped: function
    • ColonyBootstrapped(users: null, amounts: null): EventFilter
  • ColonyFundsClaimed: function
    • ColonyFundsClaimed(token: null, fee: null, payoutRemainder: null): EventFilter
  • ColonyFundsMovedBetweenFundingPots: function
    • ColonyFundsMovedBetweenFundingPots(fromPot: BigNumberish | null, toPot: BigNumberish | null, amount: null, token: null): EventFilter
  • ColonyInitialised: function
    • ColonyInitialised(colonyNetwork: null, token: null): EventFilter
  • ColonyRewardInverseSet: function
    • ColonyRewardInverseSet(rewardInverse: null): EventFilter
  • ColonyRoleSet: function
    • ColonyRoleSet(user: string | null, domainId: BigNumberish | null, role: BigNumberish | null, setTo: null): EventFilter
    • Parameters

      • user: string | null
      • domainId: BigNumberish | null
      • role: BigNumberish | null
      • setTo: null

      Returns EventFilter

  • ColonyUpgraded: function
    • ColonyUpgraded(oldVersion: null, newVersion: null): EventFilter
  • DomainAdded: function
    • DomainAdded(domainId: null): EventFilter
  • FundingPotAdded: function
    • FundingPotAdded(fundingPotId: null): EventFilter
  • PaymentAdded: function
    • PaymentAdded(paymentId: null): EventFilter
  • PayoutClaimed: function
    • PayoutClaimed(fundingPotId: BigNumberish | null, token: null, amount: null): EventFilter
  • RewardPayoutClaimed: function
    • RewardPayoutClaimed(rewardPayoutId: null, user: null, fee: null, rewardRemainder: null): EventFilter
  • RewardPayoutCycleEnded: function
    • RewardPayoutCycleEnded(rewardPayoutId: null): EventFilter
  • RewardPayoutCycleStarted: function
    • RewardPayoutCycleStarted(rewardPayoutId: null): EventFilter
  • TaskAdded: function
    • TaskAdded(taskId: null): EventFilter
  • TaskBriefSet: function
    • TaskBriefSet(taskId: BigNumberish | null, specificationHash: null): EventFilter
  • TaskCanceled: function
    • TaskCanceled(taskId: BigNumberish | null): EventFilter
  • TaskCompleted: function
    • TaskCompleted(taskId: BigNumberish | null): EventFilter
  • TaskDeliverableSubmitted: function
    • TaskDeliverableSubmitted(taskId: BigNumberish | null, deliverableHash: null): EventFilter
  • TaskDomainSet: function
    • TaskDomainSet(taskId: BigNumberish | null, domainId: BigNumberish | null): EventFilter
  • TaskDueDateSet: function
    • TaskDueDateSet(taskId: BigNumberish | null, dueDate: null): EventFilter
  • TaskFinalized: function
    • TaskFinalized(taskId: BigNumberish | null): EventFilter
  • TaskPayoutSet: function
    • TaskPayoutSet(taskId: BigNumberish | null, role: null, token: null, amount: null): EventFilter
  • TaskRoleUserSet: function
    • TaskRoleUserSet(taskId: BigNumberish | null, role: null, user: string | null): EventFilter
  • TaskSkillSet: function
    • TaskSkillSet(taskId: BigNumberish | null, skillId: BigNumberish | null): EventFilter
  • TaskWorkRatingRevealed: function
    • TaskWorkRatingRevealed(taskId: BigNumberish | null, role: null, rating: null): EventFilter

functions

functions: { addDomain: any; addPayment: any; approveExitRecovery: any; authority: any; bootstrapColony: any; cancelTask: any; checkNotAdditionalProtectedVariable: any; claimColonyFunds: any; claimPayment: any; claimRewardPayout: any; claimTaskPayout: any; completeTask: any; enterRecoveryMode: any; executeTaskChange: any; executeTaskRoleAssignment: any; exitRecoveryMode: any; finalizePayment: any; finalizeRewardPayout: any; finalizeTask: any; generateSecret: any; getColonyNetwork: any; getDomain: any; getDomainCount: any; getFundingPot: any; getFundingPotBalance: any; getFundingPotCount: any; getFundingPotPayout: any; getNonRewardPotsTotal: any; getPayment: any; getPaymentCount: any; getRewardInverse: any; getRewardPayoutInfo: any; getTask: any; getTaskChangeNonce: any; getTaskCount: any; getTaskPayout: any; getTaskRole: any; getTaskWorkRatingSecret: any; getTaskWorkRatingSecretsInfo: any; getToken: any; hasUserRole: any; initialiseColony: any; isInRecoveryMode: any; makeTask: any; mintTokens: any; moveFundsBetweenPots: any; numRecoveryRoles: any; owner: any; registerColonyLabel: any; removeRecoveryRole: any; removeTaskEvaluatorRole: any; removeTaskWorkerRole: any; revealTaskWorkRating: any; setAdministrationRole: any; setAllTaskPayouts: any; setArchitectureRole: any; setFundingRole: any; setPaymentDomain: any; setPaymentPayout: any; setPaymentRecipient: any; setPaymentSkill: any; setRecoveryRole: any; setRewardInverse: any; setRootRole: any; setStorageSlotRecovery: any; setTaskBrief: any; setTaskDomain: any; setTaskDueDate: any; setTaskEvaluatorPayout: any; setTaskEvaluatorRole: any; setTaskManagerPayout: any; setTaskManagerRole: any; setTaskSkill: any; setTaskWorkerPayout: any; setTaskWorkerRole: any; startNextRewardPayout: any; submitTaskDeliverable: any; submitTaskDeliverableAndRating: any; submitTaskWorkRating: any; upgrade: any; verifyReputationProof: any; version: any }

Type declaration

  • addDomain: function
    • addDomain(_permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _parentDomainId: BigNumberish, overrides?: TransactionOverrides): 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

      • _permissionDomainId: BigNumberish

        The domainId in which I have the permission to take this action

      • _childSkillIndex: BigNumberish

        The index that the _domainId is relative to _permissionDomainId

      • _parentDomainId: BigNumberish

        Id of the domain under which the new one will be added

      • Optional overrides: TransactionOverrides

      Returns Promise<ContractTransaction>

  • addPayment: function
    • addPayment(_permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _recipient: string, _token: string, _amount: BigNumberish, _domainId: BigNumberish, _skillId: BigNumberish, overrides?: TransactionOverrides): Promise<ContractTransaction>
    • Add a new payment in the colony. Secured function to authorised members.

      Parameters

      • _permissionDomainId: BigNumberish

        The domainId in which I have the permission to take this action

      • _childSkillIndex: BigNumberish

        The index that the _domainId is relative to _permissionDomainId, (only used if _permissionDomainId is different to _domainId)

      • _recipient: string

        Address of the payment recipient

      • _token: string

        Address of the token, 0x0 value indicates Ether

      • _amount: BigNumberish

        Payout amount

      • _domainId: BigNumberish

        The domain where the payment belongs

      • _skillId: BigNumberish

        The skill associated with the payment

      • Optional overrides: TransactionOverrides

      Returns Promise<ContractTransaction>

      paymentId Identifier of the newly created payment

  • approveExitRecovery: function
  • authority: function
    • authority(): Promise<string>
    • Get the ColonyAuthority for the colony.

      Returns Promise<string>

      colonyAuthority The ColonyAuthority contract address

  • bootstrapColony: function
    • bootstrapColony(_users: string[], _amount: BigNumberish[], overrides?: TransactionOverrides): 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. This reputation is assigned in the colony-wide domain. Secured function to authorised members.

      Parameters

      • _users: string[]

        Array of address to bootstrap with reputation

      • _amount: BigNumberish[]

        Amount of reputation/tokens for every address

      • Optional overrides: TransactionOverrides

      Returns Promise<ContractTransaction>

  • cancelTask: function
    • 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

      Returns Promise<ContractTransaction>

  • checkNotAdditionalProtectedVariable: function
    • checkNotAdditionalProtectedVariable(_slot: BigNumberish): 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

      • _slot: BigNumberish

        The storage slot number to check.

      Returns Promise<void>

  • claimColonyFunds: function
    • 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

      • _token: string

        Address of the token, 0x0 value indicates Ether

      • Optional overrides: TransactionOverrides

      Returns Promise<ContractTransaction>

  • claimPayment: function
    • claimPayment(_id: BigNumberish, _token: string, overrides?: TransactionOverrides): 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

      • _id: BigNumberish

        Payment identifier

      • _token: string

        Address of the token, 0x0 value indicates Ether

      • Optional overrides: TransactionOverrides

      Returns Promise<ContractTransaction>

  • claimRewardPayout: function
    • claimRewardPayout(_payoutId: BigNumberish, _squareRoots: BigNumberish[], key: Arrayish, value: Arrayish, branchMask: BigNumberish, siblings: Arrayish[], overrides?: TransactionOverrides): 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

      • _payoutId: BigNumberish

        Id of the reward payout

      • _squareRoots: 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.

      • key: Arrayish

        Some Reputation hash tree key

      • value: Arrayish

        Reputation value

      • branchMask: BigNumberish

        The branchmask of the proof

      • siblings: Arrayish[]

        The siblings of the proof

      • Optional overrides: TransactionOverrides

      Returns Promise<ContractTransaction>

  • claimTaskPayout: function
    • claimTaskPayout(_id: BigNumberish, _role: BigNumberish, _token: string, overrides?: TransactionOverrides): 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

      • _id: BigNumberish

        Id of the task

      • _role: BigNumberish

        Id of the role, as defined in TaskRole enum

      • _token: string

        Address of the token, 0x0 value indicates Ether

      • Optional overrides: TransactionOverrides

      Returns Promise<ContractTransaction>

  • completeTask: function
    • 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

      Returns Promise<ContractTransaction>

  • enterRecoveryMode: function
  • executeTaskChange: function
    • executeTaskChange(_sigV: BigNumberish[], _sigR: Arrayish[], _sigS: Arrayish[], _mode: BigNumberish[], _value: BigNumberish, _data: Arrayish, overrides?: TransactionOverrides): 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

      • _sigV: BigNumberish[]

        recovery id

      • _sigR: Arrayish[]

        r output of the ECDSA signature of the transaction

      • _sigS: Arrayish[]

        s output of the ECDSA signature of the transaction

      • _mode: BigNumberish[]

        How the signature was generated - 0 for Geth-style (usual), 1 for Trezor-style (only Trezor does this)

      • _value: 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

      • _data: Arrayish

        The transaction data

      • Optional overrides: TransactionOverrides

      Returns Promise<ContractTransaction>

  • executeTaskRoleAssignment: function
    • executeTaskRoleAssignment(_sigV: BigNumberish[], _sigR: Arrayish[], _sigS: Arrayish[], _mode: BigNumberish[], _value: BigNumberish, _data: Arrayish, overrides?: TransactionOverrides): 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

      • _sigV: BigNumberish[]

        recovery id

      • _sigR: Arrayish[]

        r output of the ECDSA signature of the transaction

      • _sigS: Arrayish[]

        s output of the ECDSA signature of the transaction

      • _mode: BigNumberish[]

        How the signature was generated - 0 for Geth-style (usual), 1 for Trezor-style (only Trezor does this)

      • _value: 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

      • _data: Arrayish

        The transaction data

      • Optional overrides: TransactionOverrides

      Returns Promise<ContractTransaction>

  • exitRecoveryMode: function
  • finalizePayment: function
    • finalizePayment(_permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _id: BigNumberish, overrides?: TransactionOverrides): 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

      • _permissionDomainId: BigNumberish

        The domainId in which I have the permission to take this action

      • _childSkillIndex: BigNumberish

        The index that the _domainId is relative to _permissionDomainId

      • _id: BigNumberish

        Payment identifier

      • Optional overrides: TransactionOverrides

      Returns Promise<ContractTransaction>

  • finalizeRewardPayout: function
    • finalizeRewardPayout(_payoutId: BigNumberish, overrides?: TransactionOverrides): 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

      Returns Promise<ContractTransaction>

  • finalizeTask: function
    • 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

      Returns Promise<ContractTransaction>

  • generateSecret: function
    • generateSecret(_salt: Arrayish, _value: BigNumberish): Promise<string>
    • Helper function used to generage consistently the rating secret using salt value _salt and value to hide _value

      Parameters

      • _salt: Arrayish

        Salt value

      • _value: BigNumberish

        Value to hide

      Returns Promise<string>

      secret keccak256 hash of joint _salt and _value

  • getColonyNetwork: function
    • getColonyNetwork(): Promise<string>
    • The colonyNetworkAddress we read here is set once, during initialiseColony. Returns the colony network address set on the Colony.

      Returns Promise<string>

      colonyNetwork The address of Colony Network instance

  • getDomain: function
    • getDomain(_id: BigNumberish): Promise<{ 0: BigNumber; 1: BigNumber; fundingPotId: BigNumber; skillId: BigNumber }>
    • Get a domain by id.

      Parameters

      • _id: BigNumberish

        Id of the domain which details to get

      Returns Promise<{ 0: BigNumber; 1: BigNumber; fundingPotId: BigNumber; skillId: BigNumber }>

      domain The domain

  • getDomainCount: function
    • getDomainCount(): Promise<BigNumber>
    • Get the number of domains in the colony.

      Returns Promise<BigNumber>

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

  • getFundingPot: function
    • getFundingPot(_id: BigNumberish): Promise<{ 0: number; 1: BigNumber; 2: 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

      • _id: BigNumberish

        Id of the pot which details to get

      Returns Promise<{ 0: number; 1: BigNumber; 2: BigNumber; associatedType: number; associatedTypeId: BigNumber; payoutsWeCannotMake: BigNumber }>

      associatedType The FundingPotAssociatedType value of the current funding pot, e.g. Domain, Task, PayoutassociatedTypeId 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

  • getFundingPotBalance: function
    • getFundingPotBalance(_potId: BigNumberish, _token: string): Promise<BigNumber>
    • Get the _token balance of pot with id _potId.

      Parameters

      • _potId: BigNumberish

        Id of the funding pot

      • _token: string

        Address of the token, 0x0 value indicates Ether

      Returns Promise<BigNumber>

      balance Funding pot supply balance

  • getFundingPotCount: function
    • getFundingPotCount(): Promise<BigNumber>
  • getFundingPotPayout: function
    • getFundingPotPayout(_potId: BigNumberish, _token: string): Promise<BigNumber>
    • Get the assigned _token payouts of pot with id _potId.

      Parameters

      • _potId: BigNumberish

        Id of the funding pot

      • _token: string

        Address of the token, 0x0 value indicates Ether

      Returns Promise<BigNumber>

      payout Funding pot payout amount

  • getNonRewardPotsTotal: function
    • getNonRewardPotsTotal(_token: string): Promise<BigNumber>
    • Get the total amount of tokens _token minus amount reserved to be paid to the reputation and token holders as rewards.

      Parameters

      • _token: string

        Address of the token, 0x0 value indicates Ether

      Returns Promise<BigNumber>

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

  • getPayment: function
    • getPayment(_id: BigNumberish): Promise<{ 0: string; 1: boolean; 2: BigNumber; 3: BigNumber; 4: BigNumber[]; domainId: BigNumber; finalized: boolean; fundingPotId: BigNumber; recipient: string; skills: BigNumber[] }>
    • Returns an exiting payment.

      Parameters

      • _id: BigNumberish

        Payment identifier

      Returns Promise<{ 0: string; 1: boolean; 2: BigNumber; 3: BigNumber; 4: BigNumber[]; domainId: BigNumber; finalized: boolean; fundingPotId: BigNumber; recipient: string; skills: BigNumber[] }>

      payment The Payment data structure

  • getPaymentCount: function
    • getPaymentCount(): Promise<BigNumber>
  • getRewardInverse: function
    • getRewardInverse(): Promise<BigNumber>
    • Return 1 / the reward to pay out from revenue. e.g. if the fee is 1% (or 0.01), return 100.

      Returns Promise<BigNumber>

      rewardInverse The inverse of the reward

  • getRewardPayoutInfo: function
    • getRewardPayoutInfo(_payoutId: BigNumberish): Promise<{ 0: string; 1: BigNumber; 2: BigNumber; 3: BigNumber; 4: string; 5: BigNumber; amount: BigNumber; blockTimestamp: BigNumber; colonyWideReputation: BigNumber; reputationState: string; tokenAddress: string; totalTokens: BigNumber }>
    • Get useful information about specific reward payout.

      Parameters

      • _payoutId: BigNumberish

        Id of the reward payout

      Returns Promise<{ 0: string; 1: BigNumber; 2: BigNumber; 3: BigNumber; 4: string; 5: BigNumber; amount: BigNumber; blockTimestamp: BigNumber; colonyWideReputation: BigNumber; reputationState: string; tokenAddress: string; totalTokens: BigNumber }>

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

  • getTask: function
    • getTask(_id: BigNumberish): Promise<{ 0: string; 1: string; 2: number; 3: BigNumber; 4: BigNumber; 5: BigNumber; 6: BigNumber; 7: BigNumber[]; completionTimestamp: BigNumber; deliverableHash: string; domainId: BigNumber; dueDate: BigNumber; fundingPotId: BigNumber; skillIds: BigNumber[]; specificationHash: string; status: number }>
    • Get a task with id _id

      Parameters

      • _id: BigNumberish

        Id of the task

      Returns Promise<{ 0: string; 1: string; 2: number; 3: BigNumber; 4: BigNumber; 5: BigNumber; 6: BigNumber; 7: 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

  • getTaskChangeNonce: function
    • getTaskChangeNonce(_id: BigNumberish): Promise<BigNumber>
    • Starts from 0 and is incremented on every co-reviewed task change via executeTaskChange call.

      Parameters

      • _id: BigNumberish

        Id of the task

      Returns Promise<BigNumber>

      nonce The current task change nonce value

  • getTaskCount: function
    • getTaskCount(): Promise<BigNumber>
  • getTaskPayout: function
    • getTaskPayout(_id: BigNumberish, _role: BigNumberish, _token: string): Promise<BigNumber>
    • Get payout amount in _token denomination for role _role in task _id.

      Parameters

      • _id: BigNumberish

        Id of the task

      • _role: BigNumberish

        Id of the role, as defined in TaskRole enum

      • _token: string

        Address of the token, 0x0 value indicates Ether

      Returns Promise<BigNumber>

      amount Payout amount

  • getTaskRole: function
    • getTaskRole(_id: BigNumberish, _role: BigNumberish): Promise<{ 0: string; 1: boolean; 2: number; rateFail: boolean; rating: number; user: string }>
    • Get the Role properties back for role _role in task _id.

      Parameters

      • _id: BigNumberish

        Id of the task

      • _role: BigNumberish

        Id of the role, as defined in TaskRole enum

      Returns Promise<{ 0: string; 1: boolean; 2: number; rateFail: boolean; rating: number; user: string }>

      role The Role

  • getTaskWorkRatingSecret: function
    • getTaskWorkRatingSecret(_id: BigNumberish, _role: BigNumberish): Promise<string>
    • Get the rating secret submitted for role _role in task _id

      Parameters

      • _id: BigNumberish

        Id of the task

      • _role: BigNumberish

        Id of the role, as defined in TaskRole enum

      Returns Promise<string>

      secret Rating secret bytes32 value

  • getTaskWorkRatingSecretsInfo: function
    • getTaskWorkRatingSecretsInfo(_id: BigNumberish): Promise<{ 0: BigNumber; 1: BigNumber; lastSubmittedAt: BigNumber; nSecrets: BigNumber }>
    • Get the ColonyStorage.RatingSecrets information for task _id.

      Parameters

      • _id: BigNumberish

        Id of the task

      Returns Promise<{ 0: BigNumber; 1: BigNumber; lastSubmittedAt: BigNumber; nSecrets: BigNumber }>

      nSecrets Number of secretslastSubmittedAt Timestamp of the last submitted rating secret

  • getToken: function
    • getToken(): Promise<string>
  • hasUserRole: function
    • hasUserRole(_user: string, _domainId: BigNumberish, _role: BigNumberish): 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

      • _user: string

        The user whose role we want to check

      • _domainId: BigNumberish

        The domain where we want to check for the role

      • _role: BigNumberish

        The role we want to check for

      Returns Promise<boolean>

      hasRole Boolean indicating whether the given user has the given role in domain

  • initialiseColony: function
    • initialiseColony(_colonyNetworkAddress: string, _token: string, overrides?: TransactionOverrides): 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

      • _colonyNetworkAddress: string

        Address of the colony network

      • _token: string

        Address of the colony ERC20 Token

      • Optional overrides: TransactionOverrides

      Returns Promise<ContractTransaction>

  • isInRecoveryMode: function
    • isInRecoveryMode(): Promise<boolean>
    • Is colony network in recovery mode.

      Returns Promise<boolean>

      inRecoveryMode Return true if recovery mode is active, false otherwise

  • makeTask: function
    • makeTask(_permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _specificationHash: Arrayish, _domainId: BigNumberish, _skillId: BigNumberish, _dueDate: BigNumberish, overrides?: TransactionOverrides): Promise<ContractTransaction>
    • Make a new task in the colony. Secured function to authorised members.

      Parameters

      • _permissionDomainId: BigNumberish

        The domainId in which I have the permission to take this action

      • _childSkillIndex: BigNumberish

        The index that the _domainId is relative to _permissionDomainId

      • _specificationHash: Arrayish

        Database identifier where the task specification is stored

      • _domainId: BigNumberish

        The domain where the task belongs

      • _skillId: BigNumberish

        The skill associated with the task, can set to 0 for no-op

      • _dueDate: BigNumberish

        The due date of the task, can set to 0 for no-op

      • Optional overrides: TransactionOverrides

      Returns Promise<ContractTransaction>

  • mintTokens: function
  • moveFundsBetweenPots: function
    • moveFundsBetweenPots(_permissionDomainId: BigNumberish, _fromChildSkillIndex: BigNumberish, _toChildSkillIndex: BigNumberish, _fromPot: BigNumberish, _toPot: BigNumberish, _amount: BigNumberish, _token: string, overrides?: TransactionOverrides): Promise<ContractTransaction>
    • Move a given amount: _amount of _token funds from funding pot with id _fromPot to one with id _toPot.

      Parameters

      • _permissionDomainId: BigNumberish

        The domainId in which I have the permission to take this action

      • _fromChildSkillIndex: BigNumberish

        The child index in _permissionDomainId where we can find the domain for _fromPotId

      • _toChildSkillIndex: BigNumberish

        The child index in _permissionDomainId where we can find the domain for _toPotId

      • _fromPot: BigNumberish

        Funding pot id providing the funds

      • _toPot: BigNumberish

        Funding pot id receiving the funds

      • _amount: BigNumberish

        Amount of funds

      • _token: string

        Address of the token, 0x0 value indicates Ether

      • Optional overrides: TransactionOverrides

      Returns Promise<ContractTransaction>

  • numRecoveryRoles: function
    • numRecoveryRoles(): Promise<BigNumber>
  • owner: function
    • owner(): Promise<string>
    • Used for testing. Get the colony owner address. This should be address(0x0) at all times.

      Returns Promise<string>

      colonyOwner Address of the colony owner

  • registerColonyLabel: function
    • registerColonyLabel(colonyName: string, orbitdb: string, overrides?: TransactionOverrides): Promise<ContractTransaction>
    • Register colony's ENS label.

      Parameters

      • colonyName: string

        The label to register.

      • orbitdb: string

        The path of the orbitDB database associated with the colony name

      • Optional overrides: TransactionOverrides

      Returns Promise<ContractTransaction>

  • removeRecoveryRole: function
  • removeTaskEvaluatorRole: function
    • removeTaskEvaluatorRole(_id: BigNumberish, overrides?: TransactionOverrides): Promise<ContractTransaction>
  • removeTaskWorkerRole: function
    • removeTaskWorkerRole(_id: BigNumberish, overrides?: TransactionOverrides): Promise<ContractTransaction>
  • revealTaskWorkRating: function
    • revealTaskWorkRating(_id: BigNumberish, _role: BigNumberish, _rating: BigNumberish, _salt: Arrayish, overrides?: TransactionOverrides): 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

      • _id: BigNumberish

        Id of the task

      • _role: BigNumberish

        Id of the role, as defined in TaskRole enum

      • _rating: BigNumberish

        0-50 rating score (in increments of 10, .e.g 0, 10, 20, 30, 40 or 50)

      • _salt: Arrayish

        Salt value used to generate the rating secret

      • Optional overrides: TransactionOverrides

      Returns Promise<ContractTransaction>

  • setAdministrationRole: function
    • setAdministrationRole(_permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _user: string, _domainId: BigNumberish, _setTo: boolean, overrides?: TransactionOverrides): Promise<ContractTransaction>
    • Set new colony admin role. Can be called by root role or architecture role.

      Parameters

      • _permissionDomainId: BigNumberish

        Domain in which the caller has root/architecture role

      • _childSkillIndex: BigNumberish

        The index that the _domainId is relative to _permissionDomainId

      • _user: string

        User we want to give an admin role to

      • _domainId: BigNumberish

        Domain in which we are giving user the role

      • _setTo: boolean

        The state of the role permission (true assign the permission, false revokes it)

      • Optional overrides: TransactionOverrides

      Returns Promise<ContractTransaction>

  • setAllTaskPayouts: function
    • setAllTaskPayouts(_id: BigNumberish, _token: string, _managerAmount: BigNumberish, _evaluatorAmount: BigNumberish, _workerAmount: BigNumberish, overrides?: TransactionOverrides): 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

      • _id: BigNumberish

        Id of the task

      • _token: string

        Address of the token, 0x0 value indicates Ether

      • _managerAmount: BigNumberish

        Payout amount for manager

      • _evaluatorAmount: BigNumberish

        Payout amount for evaluator

      • _workerAmount: BigNumberish

        Payout amount for worker

      • Optional overrides: TransactionOverrides

      Returns Promise<ContractTransaction>

  • setArchitectureRole: function
    • setArchitectureRole(_permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _user: string, _domainId: BigNumberish, _setTo: boolean, overrides?: TransactionOverrides): Promise<ContractTransaction>
    • Set new colony architecture role. Can be called by root role or architecture role.

      Parameters

      • _permissionDomainId: BigNumberish

        Domain in which the caller has root/architecture role

      • _childSkillIndex: BigNumberish

        The index that the _domainId is relative to _permissionDomainId

      • _user: string

        User we want to give an architecture role to

      • _domainId: BigNumberish

        Domain in which we are giving user the role

      • _setTo: boolean

        The state of the role permission (true assign the permission, false revokes it)

      • Optional overrides: TransactionOverrides

      Returns Promise<ContractTransaction>

  • setFundingRole: function
    • setFundingRole(_permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _user: string, _domainId: BigNumberish, _setTo: boolean, overrides?: TransactionOverrides): Promise<ContractTransaction>
    • Set new colony funding role. Can be called by root role or architecture role.

      Parameters

      • _permissionDomainId: BigNumberish

        Domain in which the caller has root/architecture role

      • _childSkillIndex: BigNumberish

        The index that the _domainId is relative to _permissionDomainId

      • _user: string

        User we want to give an funding role to

      • _domainId: BigNumberish

        Domain in which we are giving user the role

      • _setTo: boolean

        The state of the role permission (true assign the permission, false revokes it)

      • Optional overrides: TransactionOverrides

      Returns Promise<ContractTransaction>

  • setPaymentDomain: function
    • setPaymentDomain(_permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _id: BigNumberish, _domainId: BigNumberish, overrides?: TransactionOverrides): Promise<ContractTransaction>
    • Sets the domain on an existing payment. Secured function to authorised members

      Parameters

      • _permissionDomainId: BigNumberish

        The domainId in which I have the permission to take this action.

      • _childSkillIndex: BigNumberish

        The index that the _domainId is relative to _permissionDomainId

      • _id: BigNumberish

        Payment identifier

      • _domainId: BigNumberish

        Id of the new domain to set

      • Optional overrides: TransactionOverrides

      Returns Promise<ContractTransaction>

  • setPaymentPayout: function
    • setPaymentPayout(_permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _id: BigNumberish, _token: string, _amount: BigNumberish, overrides?: TransactionOverrides): Promise<ContractTransaction>
    • Sets the payout for a given token on an existing payment. Secured function to authorised members.

      Parameters

      • _permissionDomainId: BigNumberish

        The domainId in which I have the permission to take this action

      • _childSkillIndex: BigNumberish

        The index that the _domainId is relative to _permissionDomainId

      • _id: BigNumberish

        Payment identifier

      • _token: string

        Address of the token, 0x0 value indicates Ether

      • _amount: BigNumberish

        Payout amount

      • Optional overrides: TransactionOverrides

      Returns Promise<ContractTransaction>

  • setPaymentRecipient: function
    • setPaymentRecipient(_permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _id: BigNumberish, _recipient: string, overrides?: TransactionOverrides): Promise<ContractTransaction>
    • Sets the recipient on an existing payment. Secured function to authorised members.

      Parameters

      • _permissionDomainId: BigNumberish

        The domainId in which I have the permission to take this action

      • _childSkillIndex: BigNumberish

        The index that the _domainId is relative to _permissionDomainId

      • _id: BigNumberish

        Payment identifier

      • _recipient: string

        Address of the payment recipient

      • Optional overrides: TransactionOverrides

      Returns Promise<ContractTransaction>

  • setPaymentSkill: function
    • setPaymentSkill(_permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _id: BigNumberish, _skillId: BigNumberish, overrides?: TransactionOverrides): Promise<ContractTransaction>
    • Sets the skill on an existing payment. Secured function to authorised members.

      Parameters

      • _permissionDomainId: BigNumberish

        The domainId in which I have the permission to take this action

      • _childSkillIndex: BigNumberish

        The index that the _domainId is relative to _permissionDomainId

      • _id: BigNumberish

        Payment identifier

      • _skillId: BigNumberish

        Id of the new skill to set

      • Optional overrides: TransactionOverrides

      Returns Promise<ContractTransaction>

  • setRecoveryRole: function
  • setRewardInverse: function
    • setRewardInverse(_rewardInverse: BigNumberish, overrides?: TransactionOverrides): Promise<ContractTransaction>
    • Set the reward inverse to pay out from revenue. e.g. if the fee is 1% (or 0.01), set 100.

      Parameters

      Returns Promise<ContractTransaction>

  • setRootRole: function
    • setRootRole(_user: string, _setTo: boolean, overrides?: TransactionOverrides): Promise<ContractTransaction>
    • Set new colony root role. Can be called by root role only.

      Parameters

      • _user: string

        User we want to give an root role to

      • _setTo: boolean

        The state of the role permission (true assign the permission, false revokes it)

      • Optional overrides: TransactionOverrides

      Returns Promise<ContractTransaction>

  • setStorageSlotRecovery: function
    • setStorageSlotRecovery(_slot: BigNumberish, _value: Arrayish, overrides?: TransactionOverrides): 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

      • _slot: BigNumberish

        Uint address of storage slot to be updated

      • _value: Arrayish

        word of data to be set

      • Optional overrides: TransactionOverrides

      Returns Promise<ContractTransaction>

  • setTaskBrief: function
    • setTaskBrief(_id: BigNumberish, _specificationHash: Arrayish, overrides?: TransactionOverrides): 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

      • _id: BigNumberish

        Id of the task

      • _specificationHash: Arrayish

        Unique hash of the task brief in ddb

      • Optional overrides: TransactionOverrides

      Returns Promise<ContractTransaction>

  • setTaskDomain: function
    • setTaskDomain(_id: BigNumberish, _domainId: BigNumberish, overrides?: TransactionOverrides): Promise<ContractTransaction>
  • setTaskDueDate: function
    • setTaskDueDate(_id: BigNumberish, _dueDate: BigNumberish, overrides?: TransactionOverrides): Promise<ContractTransaction>
    • Set the due date on task _id. Allowed before a task is finalized.

      Parameters

      • _id: BigNumberish

        Id of the task

      • _dueDate: BigNumberish

        Due date as seconds since unix epoch

      • Optional overrides: TransactionOverrides

      Returns Promise<ContractTransaction>

  • setTaskEvaluatorPayout: function
    • setTaskEvaluatorPayout(_id: BigNumberish, _token: string, _amount: BigNumberish, overrides?: TransactionOverrides): Promise<ContractTransaction>
    • Set _token payout for evaluator in task _id to _amount.

      Parameters

      • _id: BigNumberish

        Id of the task

      • _token: string

        Address of the token, 0x0 value indicates Ether

      • _amount: BigNumberish

        Payout amount

      • Optional overrides: TransactionOverrides

      Returns Promise<ContractTransaction>

  • setTaskEvaluatorRole: function
    • setTaskEvaluatorRole(_id: BigNumberish, _user: string, overrides?: TransactionOverrides): 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

      • _id: BigNumberish

        Id of the task

      • _user: string

        Address of the user we want to give a evaluator role to

      • Optional overrides: TransactionOverrides

      Returns Promise<ContractTransaction>

  • setTaskManagerPayout: function
    • setTaskManagerPayout(_id: BigNumberish, _token: string, _amount: BigNumberish, overrides?: TransactionOverrides): Promise<ContractTransaction>
    • Set _token payout for manager in task _id to _amount.

      Parameters

      • _id: BigNumberish

        Id of the task

      • _token: string

        Address of the token, 0x0 value indicates Ether

      • _amount: BigNumberish

        Payout amount

      • Optional overrides: TransactionOverrides

      Returns Promise<ContractTransaction>

  • setTaskManagerRole: function
    • setTaskManagerRole(_id: BigNumberish, _user: string, _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, overrides?: TransactionOverrides): 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

      • _id: BigNumberish

        Id of the task

      • _user: string

        Address of the user we want to give a manager role to

      • _permissionDomainId: BigNumberish

        The domain ID in which _user has the Administration permission

      • _childSkillIndex: BigNumberish

        The index that the _domainId is relative to _permissionDomainId

      • Optional overrides: TransactionOverrides

      Returns Promise<ContractTransaction>

  • setTaskSkill: function
    • setTaskSkill(_id: BigNumberish, _skillId: BigNumberish, overrides?: TransactionOverrides): 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

      • _id: BigNumberish

        Id of the task

      • _skillId: BigNumberish

        Id of the skill which has to be a global skill

      • Optional overrides: TransactionOverrides

      Returns Promise<ContractTransaction>

  • setTaskWorkerPayout: function
    • setTaskWorkerPayout(_id: BigNumberish, _token: string, _amount: BigNumberish, overrides?: TransactionOverrides): Promise<ContractTransaction>
    • Set _token payout for worker in task _id to _amount.

      Parameters

      • _id: BigNumberish

        Id of the task

      • _token: string

        Address of the token, 0x0 value indicates Ether

      • _amount: BigNumberish

        Payout amount

      • Optional overrides: TransactionOverrides

      Returns Promise<ContractTransaction>

  • setTaskWorkerRole: function
    • setTaskWorkerRole(_id: BigNumberish, _user: string, overrides?: TransactionOverrides): 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

      • _id: BigNumberish

        Id of the task

      • _user: string

        Address of the user we want to give a worker role to

      • Optional overrides: TransactionOverrides

      Returns Promise<ContractTransaction>

  • startNextRewardPayout: function
    • startNextRewardPayout(_token: string, key: Arrayish, value: Arrayish, branchMask: BigNumberish, siblings: Arrayish[], overrides?: TransactionOverrides): 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

      • _token: string

        Address of the token used for reward payout

      • key: Arrayish

        Some Reputation hash tree key

      • value: Arrayish

        Reputation value

      • branchMask: BigNumberish

        The branchmask of the proof

      • siblings: Arrayish[]

        The siblings of the proof

      • Optional overrides: TransactionOverrides

      Returns Promise<ContractTransaction>

  • submitTaskDeliverable: function
    • submitTaskDeliverable(_id: BigNumberish, _deliverableHash: Arrayish, overrides?: TransactionOverrides): 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

      • _id: BigNumberish

        Id of the task

      • _deliverableHash: Arrayish

        Unique hash of the task deliverable content in ddb

      • Optional overrides: TransactionOverrides

      Returns Promise<ContractTransaction>

  • submitTaskDeliverableAndRating: function
    • submitTaskDeliverableAndRating(_id: BigNumberish, _deliverableHash: Arrayish, _ratingSecret: Arrayish, overrides?: TransactionOverrides): Promise<ContractTransaction>
    • Internally call submitTaskDeliverable and submitTaskWorkRating in sequence. Submit the task deliverable for Worker and rating for Manager.

      Parameters

      • _id: BigNumberish

        Id of the task

      • _deliverableHash: Arrayish

        Unique hash of the task deliverable content in ddb

      • _ratingSecret: Arrayish

        Rating secret for manager

      • Optional overrides: TransactionOverrides

      Returns Promise<ContractTransaction>

  • submitTaskWorkRating: function
    • submitTaskWorkRating(_id: BigNumberish, _role: BigNumberish, _ratingSecret: Arrayish, overrides?: TransactionOverrides): 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

      • _id: BigNumberish

        Id of the task

      • _role: BigNumberish

        Id of the role, as defined in TaskRole enum

      • _ratingSecret: Arrayish

        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.

      • Optional overrides: TransactionOverrides

      Returns Promise<ContractTransaction>

  • upgrade: function
    • upgrade(_newVersion: BigNumberish, overrides?: TransactionOverrides): 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

      • _newVersion: BigNumberish

        The target version for the upgrade

      • Optional overrides: TransactionOverrides

      Returns Promise<ContractTransaction>

  • verifyReputationProof: function
    • verifyReputationProof(key: Arrayish, value: Arrayish, branchMask: BigNumberish, siblings: Arrayish[]): 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

      • key: Arrayish

        The key of the element the proof is for.

      • value: Arrayish

        The value of the element that the proof is for.

      • branchMask: BigNumberish

        The branchmask of the proof

      • siblings: Arrayish[]

        The siblings of the proof

      Returns Promise<boolean>

      isValid True if the proof is valid, false otherwise.

  • version: function
    • version(): Promise<BigNumber>
    • Get the Colony contract version. Starts from 1 and is incremented with every deployed contract change.

      Returns Promise<BigNumber>

      colonyVersion Version number

interface

interface: IColonyInterface

networkClient

networkClient: ColonyNetworkClient

Optional oneTxPaymentClient

oneTxPaymentClient: OneTxPaymentClient

provider

provider: Provider

signer

signer: Signer

tokenClient

tokenClient: TokenClient

Methods

_deployed

  • _deployed(blockTag?: BlockTag): Promise<Contract>
  • Parameters

    • Optional blockTag: BlockTag

    Returns Promise<Contract>

addDomain

  • addDomain(_permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _parentDomainId: BigNumberish, overrides?: TransactionOverrides): 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

    • _permissionDomainId: BigNumberish

      The domainId in which I have the permission to take this action

    • _childSkillIndex: BigNumberish

      The index that the _domainId is relative to _permissionDomainId

    • _parentDomainId: BigNumberish

      Id of the domain under which the new one will be added

    • Optional overrides: TransactionOverrides

    Returns Promise<ContractTransaction>

addDomainWithProofs

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

addListener

  • addListener(eventName: EventFilter | string, listener: Listener): IColony

addPayment

  • addPayment(_permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _recipient: string, _token: string, _amount: BigNumberish, _domainId: BigNumberish, _skillId: BigNumberish, overrides?: TransactionOverrides): Promise<ContractTransaction>
  • Add a new payment in the colony. Secured function to authorised members.

    Parameters

    • _permissionDomainId: BigNumberish

      The domainId in which I have the permission to take this action

    • _childSkillIndex: BigNumberish

      The index that the _domainId is relative to _permissionDomainId, (only used if _permissionDomainId is different to _domainId)

    • _recipient: string

      Address of the payment recipient

    • _token: string

      Address of the token, 0x0 value indicates Ether

    • _amount: BigNumberish

      Payout amount

    • _domainId: BigNumberish

      The domain where the payment belongs

    • _skillId: BigNumberish

      The skill associated with the payment

    • Optional overrides: TransactionOverrides

    Returns Promise<ContractTransaction>

    paymentId Identifier of the newly created payment

addPaymentWithProofs

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

approveExitRecovery

attach

  • attach(addressOrName: string): IColony

authority

  • authority(): Promise<string>

bootstrapColony

  • bootstrapColony(_users: string[], _amount: BigNumberish[], overrides?: TransactionOverrides): 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. This reputation is assigned in the colony-wide domain. Secured function to authorised members.

    Parameters

    • _users: string[]

      Array of address to bootstrap with reputation

    • _amount: BigNumberish[]

      Amount of reputation/tokens for every address

    • Optional overrides: TransactionOverrides

    Returns Promise<ContractTransaction>

cancelTask

  • 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

    Returns Promise<ContractTransaction>

checkNotAdditionalProtectedVariable

  • checkNotAdditionalProtectedVariable(_slot: BigNumberish): 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

    • _slot: BigNumberish

      The storage slot number to check.

    Returns Promise<void>

claimColonyFunds

  • 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

    • _token: string

      Address of the token, 0x0 value indicates Ether

    • Optional overrides: TransactionOverrides

    Returns Promise<ContractTransaction>

claimPayment

  • claimPayment(_id: BigNumberish, _token: string, overrides?: TransactionOverrides): 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

    • _id: BigNumberish

      Payment identifier

    • _token: string

      Address of the token, 0x0 value indicates Ether

    • Optional overrides: TransactionOverrides

    Returns Promise<ContractTransaction>

claimRewardPayout

  • claimRewardPayout(_payoutId: BigNumberish, _squareRoots: BigNumberish[], key: Arrayish, value: Arrayish, branchMask: BigNumberish, siblings: Arrayish[], overrides?: TransactionOverrides): 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

    • _payoutId: BigNumberish

      Id of the reward payout

    • _squareRoots: 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.

    • key: Arrayish

      Some Reputation hash tree key

    • value: Arrayish

      Reputation value

    • branchMask: BigNumberish

      The branchmask of the proof

    • siblings: Arrayish[]

      The siblings of the proof

    • Optional overrides: TransactionOverrides

    Returns Promise<ContractTransaction>

claimTaskPayout

  • claimTaskPayout(_id: BigNumberish, _role: BigNumberish, _token: string, overrides?: TransactionOverrides): 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

    • _id: BigNumberish

      Id of the task

    • _role: BigNumberish

      Id of the role, as defined in TaskRole enum

    • _token: string

      Address of the token, 0x0 value indicates Ether

    • Optional overrides: TransactionOverrides

    Returns Promise<ContractTransaction>

completeTask

  • 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

    Returns Promise<ContractTransaction>

connect

  • connect(signerOrProvider: Signer | Provider | string): IColony

deployTokenAuthority

  • deployTokenAuthority(tokenAddress: string, allowedToTransfer: string[]): Promise<ContractTransaction>

deployed

  • deployed(): Promise<IColony>

emit

  • emit(eventName: EventFilter | string, ...args: Array<any>): boolean
  • Parameters

    • eventName: EventFilter | string
    • Rest ...args: Array<any>

    Returns boolean

enterRecoveryMode

executeTaskChange

  • executeTaskChange(_sigV: BigNumberish[], _sigR: Arrayish[], _sigS: Arrayish[], _mode: BigNumberish[], _value: BigNumberish, _data: Arrayish, overrides?: TransactionOverrides): 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

    • _sigV: BigNumberish[]

      recovery id

    • _sigR: Arrayish[]

      r output of the ECDSA signature of the transaction

    • _sigS: Arrayish[]

      s output of the ECDSA signature of the transaction

    • _mode: BigNumberish[]

      How the signature was generated - 0 for Geth-style (usual), 1 for Trezor-style (only Trezor does this)

    • _value: 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

    • _data: Arrayish

      The transaction data

    • Optional overrides: TransactionOverrides

    Returns Promise<ContractTransaction>

executeTaskRoleAssignment

  • executeTaskRoleAssignment(_sigV: BigNumberish[], _sigR: Arrayish[], _sigS: Arrayish[], _mode: BigNumberish[], _value: BigNumberish, _data: Arrayish, overrides?: TransactionOverrides): 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

    • _sigV: BigNumberish[]

      recovery id

    • _sigR: Arrayish[]

      r output of the ECDSA signature of the transaction

    • _sigS: Arrayish[]

      s output of the ECDSA signature of the transaction

    • _mode: BigNumberish[]

      How the signature was generated - 0 for Geth-style (usual), 1 for Trezor-style (only Trezor does this)

    • _value: 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

    • _data: Arrayish

      The transaction data

    • Optional overrides: TransactionOverrides

    Returns Promise<ContractTransaction>

exitRecoveryMode

fallback

  • fallback(overrides?: TransactionRequest): Promise<TransactionResponse>
  • Parameters

    • Optional overrides: TransactionRequest

    Returns Promise<TransactionResponse>

finalizePayment

  • finalizePayment(_permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _id: BigNumberish, overrides?: TransactionOverrides): 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

    • _permissionDomainId: BigNumberish

      The domainId in which I have the permission to take this action

    • _childSkillIndex: BigNumberish

      The index that the _domainId is relative to _permissionDomainId

    • _id: BigNumberish

      Payment identifier

    • Optional overrides: TransactionOverrides

    Returns Promise<ContractTransaction>

finalizePaymentWithProofs

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

finalizeRewardPayout

  • finalizeRewardPayout(_payoutId: BigNumberish, overrides?: TransactionOverrides): 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

    Returns Promise<ContractTransaction>

finalizeTask

  • 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

    Returns Promise<ContractTransaction>

generateSecret

  • generateSecret(_salt: Arrayish, _value: BigNumberish): Promise<string>
  • Helper function used to generage consistently the rating secret using salt value _salt and value to hide _value

    Parameters

    • _salt: Arrayish

      Salt value

    • _value: BigNumberish

      Value to hide

    Returns Promise<string>

    secret keccak256 hash of joint _salt and _value

getColonyNetwork

  • getColonyNetwork(): Promise<string>

getDomain

  • getDomain(_id: BigNumberish): Promise<{ 0: BigNumber; 1: BigNumber; fundingPotId: BigNumber; skillId: BigNumber }>
  • Get a domain by id.

    Parameters

    • _id: BigNumberish

      Id of the domain which details to get

    Returns Promise<{ 0: BigNumber; 1: BigNumber; fundingPotId: BigNumber; skillId: BigNumber }>

    domain The domain

getDomainCount

  • getDomainCount(): Promise<BigNumber>

getFundingPot

  • getFundingPot(_id: BigNumberish): Promise<{ 0: number; 1: BigNumber; 2: 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

    • _id: BigNumberish

      Id of the pot which details to get

    Returns Promise<{ 0: number; 1: BigNumber; 2: BigNumber; associatedType: number; associatedTypeId: BigNumber; payoutsWeCannotMake: BigNumber }>

    associatedType The FundingPotAssociatedType value of the current funding pot, e.g. Domain, Task, PayoutassociatedTypeId 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

getFundingPotBalance

  • getFundingPotBalance(_potId: BigNumberish, _token: string): Promise<BigNumber>

getFundingPotCount

  • getFundingPotCount(): Promise<BigNumber>

getFundingPotPayout

  • getFundingPotPayout(_potId: BigNumberish, _token: string): Promise<BigNumber>

getNonRewardPotsTotal

  • getNonRewardPotsTotal(_token: string): Promise<BigNumber>
  • Get the total amount of tokens _token minus amount reserved to be paid to the reputation and token holders as rewards.

    Parameters

    • _token: string

      Address of the token, 0x0 value indicates Ether

    Returns Promise<BigNumber>

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

getPayment

  • getPayment(_id: BigNumberish): Promise<{ 0: string; 1: boolean; 2: BigNumber; 3: BigNumber; 4: BigNumber[]; domainId: BigNumber; finalized: boolean; fundingPotId: BigNumber; recipient: string; skills: BigNumber[] }>
  • Returns an exiting payment.

    Parameters

    • _id: BigNumberish

      Payment identifier

    Returns Promise<{ 0: string; 1: boolean; 2: BigNumber; 3: BigNumber; 4: BigNumber[]; domainId: BigNumber; finalized: boolean; fundingPotId: BigNumber; recipient: string; skills: BigNumber[] }>

    payment The Payment data structure

getPaymentCount

  • getPaymentCount(): Promise<BigNumber>

getReputation

  • getReputation(skillId: BigNumberish, address: string): Promise<ReputationOracleResponse>

getRewardInverse

  • getRewardInverse(): Promise<BigNumber>

getRewardPayoutInfo

  • getRewardPayoutInfo(_payoutId: BigNumberish): Promise<{ 0: string; 1: BigNumber; 2: BigNumber; 3: BigNumber; 4: string; 5: BigNumber; amount: BigNumber; blockTimestamp: BigNumber; colonyWideReputation: BigNumber; reputationState: string; tokenAddress: string; totalTokens: BigNumber }>
  • Get useful information about specific reward payout.

    Parameters

    • _payoutId: BigNumberish

      Id of the reward payout

    Returns Promise<{ 0: string; 1: BigNumber; 2: BigNumber; 3: BigNumber; 4: string; 5: BigNumber; amount: BigNumber; blockTimestamp: BigNumber; colonyWideReputation: BigNumber; reputationState: string; tokenAddress: string; totalTokens: BigNumber }>

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

getTask

  • getTask(_id: BigNumberish): Promise<{ 0: string; 1: string; 2: number; 3: BigNumber; 4: BigNumber; 5: BigNumber; 6: BigNumber; 7: BigNumber[]; completionTimestamp: BigNumber; deliverableHash: string; domainId: BigNumber; dueDate: BigNumber; fundingPotId: BigNumber; skillIds: BigNumber[]; specificationHash: string; status: number }>
  • Get a task with id _id

    Parameters

    • _id: BigNumberish

      Id of the task

    Returns Promise<{ 0: string; 1: string; 2: number; 3: BigNumber; 4: BigNumber; 5: BigNumber; 6: BigNumber; 7: 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

getTaskChangeNonce

  • getTaskChangeNonce(_id: BigNumberish): Promise<BigNumber>

getTaskCount

  • getTaskCount(): Promise<BigNumber>

getTaskPayout

  • getTaskPayout(_id: BigNumberish, _role: BigNumberish, _token: string): Promise<BigNumber>
  • Get payout amount in _token denomination for role _role in task _id.

    Parameters

    • _id: BigNumberish

      Id of the task

    • _role: BigNumberish

      Id of the role, as defined in TaskRole enum

    • _token: string

      Address of the token, 0x0 value indicates Ether

    Returns Promise<BigNumber>

    amount Payout amount

getTaskRole

  • getTaskRole(_id: BigNumberish, _role: BigNumberish): Promise<{ 0: string; 1: boolean; 2: number; rateFail: boolean; rating: number; user: string }>
  • Get the Role properties back for role _role in task _id.

    Parameters

    • _id: BigNumberish

      Id of the task

    • _role: BigNumberish

      Id of the role, as defined in TaskRole enum

    Returns Promise<{ 0: string; 1: boolean; 2: number; rateFail: boolean; rating: number; user: string }>

    role The Role

getTaskWorkRatingSecret

  • getTaskWorkRatingSecret(_id: BigNumberish, _role: BigNumberish): Promise<string>

getTaskWorkRatingSecretsInfo

  • getTaskWorkRatingSecretsInfo(_id: BigNumberish): Promise<{ 0: BigNumber; 1: BigNumber; lastSubmittedAt: BigNumber; nSecrets: BigNumber }>
  • Get the ColonyStorage.RatingSecrets information for task _id.

    Parameters

    • _id: BigNumberish

      Id of the task

    Returns Promise<{ 0: BigNumber; 1: BigNumber; lastSubmittedAt: BigNumber; nSecrets: BigNumber }>

    nSecrets Number of secretslastSubmittedAt Timestamp of the last submitted rating secret

getToken

  • getToken(): Promise<string>

hasUserRole

  • hasUserRole(_user: string, _domainId: BigNumberish, _role: BigNumberish): 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

    • _user: string

      The user whose role we want to check

    • _domainId: BigNumberish

      The domain where we want to check for the role

    • _role: BigNumberish

      The role we want to check for

    Returns Promise<boolean>

    hasRole Boolean indicating whether the given user has the given role in domain

initialiseColony

  • initialiseColony(_colonyNetworkAddress: string, _token: string, overrides?: TransactionOverrides): 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

    • _colonyNetworkAddress: string

      Address of the colony network

    • _token: string

      Address of the colony ERC20 Token

    • Optional overrides: TransactionOverrides

    Returns Promise<ContractTransaction>

isInRecoveryMode

  • isInRecoveryMode(): Promise<boolean>

listenerCount

  • listenerCount(eventName?: EventFilter | string): number
  • Parameters

    • Optional eventName: EventFilter | string

    Returns number

listeners

  • listeners(eventName: EventFilter | string): Array<Listener>
  • Parameters

    • eventName: EventFilter | string

    Returns Array<Listener>

makeTask

  • makeTask(_permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _specificationHash: Arrayish, _domainId: BigNumberish, _skillId: BigNumberish, _dueDate: BigNumberish, overrides?: TransactionOverrides): Promise<ContractTransaction>
  • Make a new task in the colony. Secured function to authorised members.

    Parameters

    • _permissionDomainId: BigNumberish

      The domainId in which I have the permission to take this action

    • _childSkillIndex: BigNumberish

      The index that the _domainId is relative to _permissionDomainId

    • _specificationHash: Arrayish

      Database identifier where the task specification is stored

    • _domainId: BigNumberish

      The domain where the task belongs

    • _skillId: BigNumberish

      The skill associated with the task, can set to 0 for no-op

    • _dueDate: BigNumberish

      The due date of the task, can set to 0 for no-op

    • Optional overrides: TransactionOverrides

    Returns Promise<ContractTransaction>

makeTaskWithProofs

  • makeTaskWithProofs(_specificationHash: Arrayish, _domainId: BigNumberish, _skillId: BigNumberish, _dueDate: BigNumberish, overrides?: TransactionOverrides): Promise<ContractTransaction>

mintTokens

moveFundsBetweenPots

  • moveFundsBetweenPots(_permissionDomainId: BigNumberish, _fromChildSkillIndex: BigNumberish, _toChildSkillIndex: BigNumberish, _fromPot: BigNumberish, _toPot: BigNumberish, _amount: BigNumberish, _token: string, overrides?: TransactionOverrides): Promise<ContractTransaction>
  • Move a given amount: _amount of _token funds from funding pot with id _fromPot to one with id _toPot.

    Parameters

    • _permissionDomainId: BigNumberish

      The domainId in which I have the permission to take this action

    • _fromChildSkillIndex: BigNumberish

      The child index in _permissionDomainId where we can find the domain for _fromPotId

    • _toChildSkillIndex: BigNumberish

      The child index in _permissionDomainId where we can find the domain for _toPotId

    • _fromPot: BigNumberish

      Funding pot id providing the funds

    • _toPot: BigNumberish

      Funding pot id receiving the funds

    • _amount: BigNumberish

      Amount of funds

    • _token: string

      Address of the token, 0x0 value indicates Ether

    • Optional overrides: TransactionOverrides

    Returns Promise<ContractTransaction>

moveFundsBetweenPotsWithProofs

  • moveFundsBetweenPotsWithProofs(_fromPot: BigNumberish, _toPot: BigNumberish, _amount: BigNumberish, _token: string, overrides?: TransactionOverrides): Promise<ContractTransaction>

numRecoveryRoles

  • numRecoveryRoles(): Promise<BigNumber>

on

  • on(event: EventFilter | string, listener: Listener): IColony

once

  • once(event: EventFilter | string, listener: Listener): IColony

owner

  • owner(): Promise<string>

registerColonyLabel

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

removeAllListeners

  • removeAllListeners(eventName: EventFilter | string): IColony

removeListener

  • removeListener(eventName: any, listener: Listener): IColony

removeRecoveryRole

removeTaskEvaluatorRole

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

removeTaskWorkerRole

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

revealTaskWorkRating

  • revealTaskWorkRating(_id: BigNumberish, _role: BigNumberish, _rating: BigNumberish, _salt: Arrayish, overrides?: TransactionOverrides): 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

    • _id: BigNumberish

      Id of the task

    • _role: BigNumberish

      Id of the role, as defined in TaskRole enum

    • _rating: BigNumberish

      0-50 rating score (in increments of 10, .e.g 0, 10, 20, 30, 40 or 50)

    • _salt: Arrayish

      Salt value used to generate the rating secret

    • Optional overrides: TransactionOverrides

    Returns Promise<ContractTransaction>

setAdministrationRole

  • setAdministrationRole(_permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _user: string, _domainId: BigNumberish, _setTo: boolean, overrides?: TransactionOverrides): Promise<ContractTransaction>
  • Set new colony admin role. Can be called by root role or architecture role.

    Parameters

    • _permissionDomainId: BigNumberish

      Domain in which the caller has root/architecture role

    • _childSkillIndex: BigNumberish

      The index that the _domainId is relative to _permissionDomainId

    • _user: string

      User we want to give an admin role to

    • _domainId: BigNumberish

      Domain in which we are giving user the role

    • _setTo: boolean

      The state of the role permission (true assign the permission, false revokes it)

    • Optional overrides: TransactionOverrides

    Returns Promise<ContractTransaction>

setAdministrationRoleWithProofs

  • setAdministrationRoleWithProofs(_user: string, _domainId: BigNumberish, _setTo: boolean, overrides?: TransactionOverrides): Promise<ContractTransaction>

setAllTaskPayouts

  • setAllTaskPayouts(_id: BigNumberish, _token: string, _managerAmount: BigNumberish, _evaluatorAmount: BigNumberish, _workerAmount: BigNumberish, overrides?: TransactionOverrides): 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

    • _id: BigNumberish

      Id of the task

    • _token: string

      Address of the token, 0x0 value indicates Ether

    • _managerAmount: BigNumberish

      Payout amount for manager

    • _evaluatorAmount: BigNumberish

      Payout amount for evaluator

    • _workerAmount: BigNumberish

      Payout amount for worker

    • Optional overrides: TransactionOverrides

    Returns Promise<ContractTransaction>

setArchitectureRole

  • setArchitectureRole(_permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _user: string, _domainId: BigNumberish, _setTo: boolean, overrides?: TransactionOverrides): Promise<ContractTransaction>
  • Set new colony architecture role. Can be called by root role or architecture role.

    Parameters

    • _permissionDomainId: BigNumberish

      Domain in which the caller has root/architecture role

    • _childSkillIndex: BigNumberish

      The index that the _domainId is relative to _permissionDomainId

    • _user: string

      User we want to give an architecture role to

    • _domainId: BigNumberish

      Domain in which we are giving user the role

    • _setTo: boolean

      The state of the role permission (true assign the permission, false revokes it)

    • Optional overrides: TransactionOverrides

    Returns Promise<ContractTransaction>

setArchitectureRoleWithProofs

  • setArchitectureRoleWithProofs(_user: string, _domainId: BigNumberish, _setTo: boolean, overrides?: TransactionOverrides): Promise<ContractTransaction>

setFundingRole

  • setFundingRole(_permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _user: string, _domainId: BigNumberish, _setTo: boolean, overrides?: TransactionOverrides): Promise<ContractTransaction>
  • Set new colony funding role. Can be called by root role or architecture role.

    Parameters

    • _permissionDomainId: BigNumberish

      Domain in which the caller has root/architecture role

    • _childSkillIndex: BigNumberish

      The index that the _domainId is relative to _permissionDomainId

    • _user: string

      User we want to give an funding role to

    • _domainId: BigNumberish

      Domain in which we are giving user the role

    • _setTo: boolean

      The state of the role permission (true assign the permission, false revokes it)

    • Optional overrides: TransactionOverrides

    Returns Promise<ContractTransaction>

setFundingRoleWithProofs

  • setFundingRoleWithProofs(_user: string, _domainId: BigNumberish, _setTo: boolean, overrides?: TransactionOverrides): Promise<ContractTransaction>

setPaymentDomain

  • setPaymentDomain(_permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _id: BigNumberish, _domainId: BigNumberish, overrides?: TransactionOverrides): Promise<ContractTransaction>
  • Sets the domain on an existing payment. Secured function to authorised members

    Parameters

    • _permissionDomainId: BigNumberish

      The domainId in which I have the permission to take this action.

    • _childSkillIndex: BigNumberish

      The index that the _domainId is relative to _permissionDomainId

    • _id: BigNumberish

      Payment identifier

    • _domainId: BigNumberish

      Id of the new domain to set

    • Optional overrides: TransactionOverrides

    Returns Promise<ContractTransaction>

setPaymentDomainWithProofs

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

setPaymentPayout

  • setPaymentPayout(_permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _id: BigNumberish, _token: string, _amount: BigNumberish, overrides?: TransactionOverrides): Promise<ContractTransaction>
  • Sets the payout for a given token on an existing payment. Secured function to authorised members.

    Parameters

    • _permissionDomainId: BigNumberish

      The domainId in which I have the permission to take this action

    • _childSkillIndex: BigNumberish

      The index that the _domainId is relative to _permissionDomainId

    • _id: BigNumberish

      Payment identifier

    • _token: string

      Address of the token, 0x0 value indicates Ether

    • _amount: BigNumberish

      Payout amount

    • Optional overrides: TransactionOverrides

    Returns Promise<ContractTransaction>

setPaymentPayoutWithProofs

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

setPaymentRecipient

  • setPaymentRecipient(_permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _id: BigNumberish, _recipient: string, overrides?: TransactionOverrides): Promise<ContractTransaction>
  • Sets the recipient on an existing payment. Secured function to authorised members.

    Parameters

    • _permissionDomainId: BigNumberish

      The domainId in which I have the permission to take this action

    • _childSkillIndex: BigNumberish

      The index that the _domainId is relative to _permissionDomainId

    • _id: BigNumberish

      Payment identifier

    • _recipient: string

      Address of the payment recipient

    • Optional overrides: TransactionOverrides

    Returns Promise<ContractTransaction>

setPaymentRecipientWithProofs

  • setPaymentRecipientWithProofs(_id: BigNumberish, _recipient: string, overrides?: TransactionOverrides): Promise<ContractTransaction>

setPaymentSkill

  • setPaymentSkill(_permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _id: BigNumberish, _skillId: BigNumberish, overrides?: TransactionOverrides): Promise<ContractTransaction>
  • Sets the skill on an existing payment. Secured function to authorised members.

    Parameters

    • _permissionDomainId: BigNumberish

      The domainId in which I have the permission to take this action

    • _childSkillIndex: BigNumberish

      The index that the _domainId is relative to _permissionDomainId

    • _id: BigNumberish

      Payment identifier

    • _skillId: BigNumberish

      Id of the new skill to set

    • Optional overrides: TransactionOverrides

    Returns Promise<ContractTransaction>

setPaymentSkillWithProofs

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

setRecoveryRole

setRewardInverse

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

setRootRole

  • setRootRole(_user: string, _setTo: boolean, overrides?: TransactionOverrides): Promise<ContractTransaction>

setStorageSlotRecovery

  • setStorageSlotRecovery(_slot: BigNumberish, _value: Arrayish, overrides?: TransactionOverrides): 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

    • _slot: BigNumberish

      Uint address of storage slot to be updated

    • _value: Arrayish

      word of data to be set

    • Optional overrides: TransactionOverrides

    Returns Promise<ContractTransaction>

setTaskBrief

  • setTaskBrief(_id: BigNumberish, _specificationHash: Arrayish, overrides?: TransactionOverrides): 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

    • _id: BigNumberish

      Id of the task

    • _specificationHash: Arrayish

      Unique hash of the task brief in ddb

    • Optional overrides: TransactionOverrides

    Returns Promise<ContractTransaction>

setTaskDomain

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

setTaskDueDate

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

setTaskEvaluatorPayout

  • setTaskEvaluatorPayout(_id: BigNumberish, _token: string, _amount: BigNumberish, overrides?: TransactionOverrides): Promise<ContractTransaction>

setTaskEvaluatorRole

  • setTaskEvaluatorRole(_id: BigNumberish, _user: string, overrides?: TransactionOverrides): 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

    • _id: BigNumberish

      Id of the task

    • _user: string

      Address of the user we want to give a evaluator role to

    • Optional overrides: TransactionOverrides

    Returns Promise<ContractTransaction>

setTaskManagerPayout

  • setTaskManagerPayout(_id: BigNumberish, _token: string, _amount: BigNumberish, overrides?: TransactionOverrides): Promise<ContractTransaction>

setTaskManagerRole

  • setTaskManagerRole(_id: BigNumberish, _user: string, _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, overrides?: TransactionOverrides): 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

    • _id: BigNumberish

      Id of the task

    • _user: string

      Address of the user we want to give a manager role to

    • _permissionDomainId: BigNumberish

      The domain ID in which _user has the Administration permission

    • _childSkillIndex: BigNumberish

      The index that the _domainId is relative to _permissionDomainId

    • Optional overrides: TransactionOverrides

    Returns Promise<ContractTransaction>

setTaskSkill

  • setTaskSkill(_id: BigNumberish, _skillId: BigNumberish, overrides?: TransactionOverrides): 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

    • _id: BigNumberish

      Id of the task

    • _skillId: BigNumberish

      Id of the skill which has to be a global skill

    • Optional overrides: TransactionOverrides

    Returns Promise<ContractTransaction>

setTaskWorkerPayout

  • setTaskWorkerPayout(_id: BigNumberish, _token: string, _amount: BigNumberish, overrides?: TransactionOverrides): Promise<ContractTransaction>

setTaskWorkerRole

  • setTaskWorkerRole(_id: BigNumberish, _user: string, overrides?: TransactionOverrides): 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

    • _id: BigNumberish

      Id of the task

    • _user: string

      Address of the user we want to give a worker role to

    • Optional overrides: TransactionOverrides

    Returns Promise<ContractTransaction>

startNextRewardPayout

  • startNextRewardPayout(_token: string, key: Arrayish, value: Arrayish, branchMask: BigNumberish, siblings: Arrayish[], overrides?: TransactionOverrides): 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

    • _token: string

      Address of the token used for reward payout

    • key: Arrayish

      Some Reputation hash tree key

    • value: Arrayish

      Reputation value

    • branchMask: BigNumberish

      The branchmask of the proof

    • siblings: Arrayish[]

      The siblings of the proof

    • Optional overrides: TransactionOverrides

    Returns Promise<ContractTransaction>

submitTaskDeliverable

  • submitTaskDeliverable(_id: BigNumberish, _deliverableHash: Arrayish, overrides?: TransactionOverrides): 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

    • _id: BigNumberish

      Id of the task

    • _deliverableHash: Arrayish

      Unique hash of the task deliverable content in ddb

    • Optional overrides: TransactionOverrides

    Returns Promise<ContractTransaction>

submitTaskDeliverableAndRating

  • submitTaskDeliverableAndRating(_id: BigNumberish, _deliverableHash: Arrayish, _ratingSecret: Arrayish, overrides?: TransactionOverrides): Promise<ContractTransaction>
  • Internally call submitTaskDeliverable and submitTaskWorkRating in sequence. Submit the task deliverable for Worker and rating for Manager.

    Parameters

    • _id: BigNumberish

      Id of the task

    • _deliverableHash: Arrayish

      Unique hash of the task deliverable content in ddb

    • _ratingSecret: Arrayish

      Rating secret for manager

    • Optional overrides: TransactionOverrides

    Returns Promise<ContractTransaction>

submitTaskWorkRating

  • submitTaskWorkRating(_id: BigNumberish, _role: BigNumberish, _ratingSecret: Arrayish, overrides?: TransactionOverrides): 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

    • _id: BigNumberish

      Id of the task

    • _role: BigNumberish

      Id of the role, as defined in TaskRole enum

    • _ratingSecret: Arrayish

      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.

    • Optional overrides: TransactionOverrides

    Returns Promise<ContractTransaction>

upgrade

  • upgrade(_newVersion: BigNumberish, overrides?: TransactionOverrides): 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

    • _newVersion: BigNumberish

      The target version for the upgrade

    • Optional overrides: TransactionOverrides

    Returns Promise<ContractTransaction>

verifyReputationProof

  • verifyReputationProof(key: Arrayish, value: Arrayish, branchMask: BigNumberish, siblings: Arrayish[]): 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

    • key: Arrayish

      The key of the element the proof is for.

    • value: Arrayish

      The value of the element that the proof is for.

    • branchMask: BigNumberish

      The branchmask of the proof

    • siblings: Arrayish[]

      The siblings of the proof

    Returns Promise<boolean>

    isValid True if the proof is valid, false otherwise.

version

  • version(): Promise<BigNumber>

Static isIndexed

  • isIndexed(value: any): value is Indexed
  • Parameters

    • value: any

    Returns value is Indexed

Generated using TypeDoc