/* Generated by ts-generator ver. 0.0.8 */ /* tslint:disable */ import { Contract, ContractTransaction, EventFilter, Signer } from "ethers"; import { Listener, Provider } from "ethers/providers"; import { Arrayish, BigNumber, BigNumberish, Interface } from "ethers/utils"; import { TransactionOverrides, TypedEventDescription, TypedFunctionDescription } from "."; interface IColonyInterface extends Interface { functions: { approveExitRecovery: TypedFunctionDescription<{ encode([]: []): string }>; exitRecoveryMode: TypedFunctionDescription<{ encode([]: []): string }>; numRecoveryRoles: TypedFunctionDescription<{ encode([]: []): string }>; setStorageSlotRecovery: TypedFunctionDescription<{ encode([_slot, _value]: [BigNumberish, Arrayish]): string; }>; isInRecoveryMode: TypedFunctionDescription<{ encode([]: []): string }>; checkNotAdditionalProtectedVariable: TypedFunctionDescription<{ encode([_slot]: [BigNumberish]): string; }>; removeRecoveryRole: TypedFunctionDescription<{ encode([_user]: [string]): string; }>; setRecoveryRole: TypedFunctionDescription<{ encode([_user]: [string]): string; }>; enterRecoveryMode: TypedFunctionDescription<{ encode([]: []): string }>; authority: TypedFunctionDescription<{ encode([]: []): string }>; owner: TypedFunctionDescription<{ encode([]: []): string }>; version: TypedFunctionDescription<{ encode([]: []): string }>; upgrade: TypedFunctionDescription<{ encode([_newVersion]: [BigNumberish]): string; }>; finishUpgrade2To3: TypedFunctionDescription<{ encode([]: []): string }>; finishUpgrade: TypedFunctionDescription<{ encode([]: []): string }>; getColonyNetwork: TypedFunctionDescription<{ encode([]: []): string }>; getToken: TypedFunctionDescription<{ encode([]: []): string }>; setRootRole: TypedFunctionDescription<{ encode([_user, _setTo]: [string, boolean]): string; }>; setArbitrationRole: TypedFunctionDescription<{ encode([ _permissionDomainId, _childSkillIndex, _user, _domainId, _setTo ]: [BigNumberish, BigNumberish, string, BigNumberish, boolean]): string; }>; setArchitectureRole: TypedFunctionDescription<{ encode([ _permissionDomainId, _childSkillIndex, _user, _domainId, _setTo ]: [BigNumberish, BigNumberish, string, BigNumberish, boolean]): string; }>; setFundingRole: TypedFunctionDescription<{ encode([ _permissionDomainId, _childSkillIndex, _user, _domainId, _setTo ]: [BigNumberish, BigNumberish, string, BigNumberish, boolean]): string; }>; setAdministrationRole: TypedFunctionDescription<{ encode([ _permissionDomainId, _childSkillIndex, _user, _domainId, _setTo ]: [BigNumberish, BigNumberish, string, BigNumberish, boolean]): string; }>; hasUserRole: TypedFunctionDescription<{ encode([_user, _domainId, _role]: [ string, BigNumberish, BigNumberish ]): string; }>; initialiseColony: TypedFunctionDescription<{ encode([_colonyNetworkAddress, _token]: [string, string]): string; }>; bootstrapColony: TypedFunctionDescription<{ encode([_users, _amount]: [string[], BigNumberish[]]): string; }>; mintTokens: TypedFunctionDescription<{ encode([_wad]: [BigNumberish]): string; }>; registerColonyLabel: TypedFunctionDescription<{ encode([colonyName, orbitdb]: [string, string]): string; }>; updateColonyOrbitDB: TypedFunctionDescription<{ encode([orbitdb]: [string]): string; }>; addDomain: TypedFunctionDescription<{ encode([_permissionDomainId, _childSkillIndex, _parentDomainId]: [ BigNumberish, BigNumberish, BigNumberish ]): string; }>; getDomain: TypedFunctionDescription<{ encode([_id]: [BigNumberish]): string; }>; getDomainCount: TypedFunctionDescription<{ encode([]: []): string }>; verifyReputationProof: TypedFunctionDescription<{ encode([key, value, branchMask, siblings]: [ Arrayish, Arrayish, BigNumberish, Arrayish[] ]): string; }>; addPayment: TypedFunctionDescription<{ encode([ _permissionDomainId, _childSkillIndex, _recipient, _token, _amount, _domainId, _skillId ]: [ BigNumberish, BigNumberish, string, string, BigNumberish, BigNumberish, BigNumberish ]): string; }>; finalizePayment: TypedFunctionDescription<{ encode([_permissionDomainId, _childSkillIndex, _id]: [ BigNumberish, BigNumberish, BigNumberish ]): string; }>; setPaymentRecipient: TypedFunctionDescription<{ encode([_permissionDomainId, _childSkillIndex, _id, _recipient]: [ BigNumberish, BigNumberish, BigNumberish, string ]): string; }>; setPaymentDomain: TypedFunctionDescription<{ encode([_permissionDomainId, _childSkillIndex, _id, _domainId]: [ BigNumberish, BigNumberish, BigNumberish, BigNumberish ]): string; }>; setPaymentSkill: TypedFunctionDescription<{ encode([_permissionDomainId, _childSkillIndex, _id, _skillId]: [ BigNumberish, BigNumberish, BigNumberish, BigNumberish ]): string; }>; setPaymentPayout: TypedFunctionDescription<{ encode([_permissionDomainId, _childSkillIndex, _id, _token, _amount]: [ BigNumberish, BigNumberish, BigNumberish, string, BigNumberish ]): string; }>; getPayment: TypedFunctionDescription<{ encode([_id]: [BigNumberish]): string; }>; claimPayment: TypedFunctionDescription<{ encode([_id, _token]: [BigNumberish, string]): string; }>; getPaymentCount: TypedFunctionDescription<{ encode([]: []): string }>; makeTask: TypedFunctionDescription<{ encode([ _permissionDomainId, _childSkillIndex, _specificationHash, _domainId, _skillId, _dueDate ]: [ BigNumberish, BigNumberish, Arrayish, BigNumberish, BigNumberish, BigNumberish ]): string; }>; getTaskCount: TypedFunctionDescription<{ encode([]: []): string }>; getTaskChangeNonce: TypedFunctionDescription<{ encode([_id]: [BigNumberish]): string; }>; executeTaskChange: TypedFunctionDescription<{ encode([_sigV, _sigR, _sigS, _mode, _value, _data]: [ BigNumberish[], Arrayish[], Arrayish[], BigNumberish[], BigNumberish, Arrayish ]): string; }>; executeTaskRoleAssignment: TypedFunctionDescription<{ encode([_sigV, _sigR, _sigS, _mode, _value, _data]: [ BigNumberish[], Arrayish[], Arrayish[], BigNumberish[], BigNumberish, Arrayish ]): string; }>; submitTaskWorkRating: TypedFunctionDescription<{ encode([_id, _role, _ratingSecret]: [ BigNumberish, BigNumberish, Arrayish ]): string; }>; revealTaskWorkRating: TypedFunctionDescription<{ encode([_id, _role, _rating, _salt]: [ BigNumberish, BigNumberish, BigNumberish, Arrayish ]): string; }>; generateSecret: TypedFunctionDescription<{ encode([_salt, _value]: [Arrayish, BigNumberish]): string; }>; getTaskWorkRatingSecretsInfo: TypedFunctionDescription<{ encode([_id]: [BigNumberish]): string; }>; getTaskWorkRatingSecret: TypedFunctionDescription<{ encode([_id, _role]: [BigNumberish, BigNumberish]): string; }>; setTaskManagerRole: TypedFunctionDescription<{ encode([_id, _user, _permissionDomainId, _childSkillIndex]: [ BigNumberish, string, BigNumberish, BigNumberish ]): string; }>; setTaskEvaluatorRole: TypedFunctionDescription<{ encode([_id, _user]: [BigNumberish, string]): string; }>; setTaskWorkerRole: TypedFunctionDescription<{ encode([_id, _user]: [BigNumberish, string]): string; }>; removeTaskEvaluatorRole: TypedFunctionDescription<{ encode([_id]: [BigNumberish]): string; }>; removeTaskWorkerRole: TypedFunctionDescription<{ encode([_id]: [BigNumberish]): string; }>; setTaskSkill: TypedFunctionDescription<{ encode([_id, _skillId]: [BigNumberish, BigNumberish]): string; }>; setTaskDomain: TypedFunctionDescription<{ encode([_id, _domainId]: [BigNumberish, BigNumberish]): string; }>; setTaskBrief: TypedFunctionDescription<{ encode([_id, _specificationHash]: [BigNumberish, Arrayish]): string; }>; setTaskDueDate: TypedFunctionDescription<{ encode([_id, _dueDate]: [BigNumberish, BigNumberish]): string; }>; submitTaskDeliverable: TypedFunctionDescription<{ encode([_id, _deliverableHash]: [BigNumberish, Arrayish]): string; }>; submitTaskDeliverableAndRating: TypedFunctionDescription<{ encode([_id, _deliverableHash, _ratingSecret]: [ BigNumberish, Arrayish, Arrayish ]): string; }>; finalizeTask: TypedFunctionDescription<{ encode([_id]: [BigNumberish]): string; }>; cancelTask: TypedFunctionDescription<{ encode([_id]: [BigNumberish]): string; }>; completeTask: TypedFunctionDescription<{ encode([_id]: [BigNumberish]): string; }>; getTask: TypedFunctionDescription<{ encode([_id]: [BigNumberish]): string; }>; getTaskRole: TypedFunctionDescription<{ encode([_id, _role]: [BigNumberish, BigNumberish]): string; }>; setRewardInverse: TypedFunctionDescription<{ encode([_rewardInverse]: [BigNumberish]): string; }>; getRewardInverse: TypedFunctionDescription<{ encode([]: []): string }>; getTaskPayout: TypedFunctionDescription<{ encode([_id, _role, _token]: [ BigNumberish, BigNumberish, string ]): string; }>; setTaskManagerPayout: TypedFunctionDescription<{ encode([_id, _token, _amount]: [ BigNumberish, string, BigNumberish ]): string; }>; setTaskEvaluatorPayout: TypedFunctionDescription<{ encode([_id, _token, _amount]: [ BigNumberish, string, BigNumberish ]): string; }>; setTaskWorkerPayout: TypedFunctionDescription<{ encode([_id, _token, _amount]: [ BigNumberish, string, BigNumberish ]): string; }>; setAllTaskPayouts: TypedFunctionDescription<{ encode([_id, _token, _managerAmount, _evaluatorAmount, _workerAmount]: [ BigNumberish, string, BigNumberish, BigNumberish, BigNumberish ]): string; }>; claimTaskPayout: TypedFunctionDescription<{ encode([_id, _role, _token]: [ BigNumberish, BigNumberish, string ]): string; }>; startNextRewardPayout: TypedFunctionDescription<{ encode([_token, key, value, branchMask, siblings]: [ string, Arrayish, Arrayish, BigNumberish, Arrayish[] ]): string; }>; claimRewardPayout: TypedFunctionDescription<{ encode([_payoutId, _squareRoots, key, value, branchMask, siblings]: [ BigNumberish, BigNumberish[], Arrayish, Arrayish, BigNumberish, Arrayish[] ]): string; }>; getRewardPayoutInfo: TypedFunctionDescription<{ encode([_payoutId]: [BigNumberish]): string; }>; finalizeRewardPayout: TypedFunctionDescription<{ encode([_payoutId]: [BigNumberish]): string; }>; getFundingPot: TypedFunctionDescription<{ encode([_id]: [BigNumberish]): string; }>; getFundingPotCount: TypedFunctionDescription<{ encode([]: []): string }>; getFundingPotBalance: TypedFunctionDescription<{ encode([_potId, _token]: [BigNumberish, string]): string; }>; getFundingPotPayout: TypedFunctionDescription<{ encode([_potId, _token]: [BigNumberish, string]): string; }>; moveFundsBetweenPots: TypedFunctionDescription<{ encode([ _permissionDomainId, _fromChildSkillIndex, _toChildSkillIndex, _fromPot, _toPot, _amount, _token ]: [ BigNumberish, BigNumberish, BigNumberish, BigNumberish, BigNumberish, BigNumberish, string ]): string; }>; claimColonyFunds: TypedFunctionDescription<{ encode([_token]: [string]): string; }>; getNonRewardPotsTotal: TypedFunctionDescription<{ encode([_token]: [string]): string; }>; }; events: { ColonyInitialised: TypedEventDescription<{ encodeTopics([colonyNetwork, token]: [null, null]): string[]; }>; ColonyBootstrapped: TypedEventDescription<{ encodeTopics([users, amounts]: [null, null]): string[]; }>; ColonyUpgraded: TypedEventDescription<{ encodeTopics([oldVersion, newVersion]: [null, null]): string[]; }>; ColonyRoleSet: TypedEventDescription<{ encodeTopics([user, domainId, role, setTo]: [ string | null, BigNumberish | null, BigNumberish | null, null ]): string[]; }>; ColonyFundsMovedBetweenFundingPots: TypedEventDescription<{ encodeTopics([fromPot, toPot, amount, token]: [ BigNumberish | null, BigNumberish | null, null, null ]): string[]; }>; ColonyFundsClaimed: TypedEventDescription<{ encodeTopics([token, fee, payoutRemainder]: [null, null, null]): string[]; }>; RewardPayoutCycleStarted: TypedEventDescription<{ encodeTopics([rewardPayoutId]: [null]): string[]; }>; RewardPayoutCycleEnded: TypedEventDescription<{ encodeTopics([rewardPayoutId]: [null]): string[]; }>; RewardPayoutClaimed: TypedEventDescription<{ encodeTopics([rewardPayoutId, user, fee, rewardRemainder]: [ null, null, null, null ]): string[]; }>; ColonyRewardInverseSet: TypedEventDescription<{ encodeTopics([rewardInverse]: [null]): string[]; }>; PaymentAdded: TypedEventDescription<{ encodeTopics([paymentId]: [null]): string[]; }>; TaskAdded: TypedEventDescription<{ encodeTopics([taskId]: [null]): string[]; }>; TaskBriefSet: TypedEventDescription<{ encodeTopics([taskId, specificationHash]: [ BigNumberish | null, null ]): string[]; }>; TaskDueDateSet: TypedEventDescription<{ encodeTopics([taskId, dueDate]: [BigNumberish | null, null]): string[]; }>; TaskDomainSet: TypedEventDescription<{ encodeTopics([taskId, domainId]: [ BigNumberish | null, BigNumberish | null ]): string[]; }>; TaskSkillSet: TypedEventDescription<{ encodeTopics([taskId, skillId]: [ BigNumberish | null, BigNumberish | null ]): string[]; }>; TaskRoleUserSet: TypedEventDescription<{ encodeTopics([taskId, role, user]: [ BigNumberish | null, null, string | null ]): string[]; }>; TaskPayoutSet: TypedEventDescription<{ encodeTopics([taskId, role, token, amount]: [ BigNumberish | null, null, null, null ]): string[]; }>; TaskDeliverableSubmitted: TypedEventDescription<{ encodeTopics([taskId, deliverableHash]: [ BigNumberish | null, null ]): string[]; }>; TaskCompleted: TypedEventDescription<{ encodeTopics([taskId]: [BigNumberish | null]): string[]; }>; TaskWorkRatingRevealed: TypedEventDescription<{ encodeTopics([taskId, role, rating]: [ BigNumberish | null, null, null ]): string[]; }>; TaskFinalized: TypedEventDescription<{ encodeTopics([taskId]: [BigNumberish | null]): string[]; }>; PayoutClaimed: TypedEventDescription<{ encodeTopics([fundingPotId, token, amount]: [ BigNumberish | null, null, null ]): string[]; }>; TaskCanceled: TypedEventDescription<{ encodeTopics([taskId]: [BigNumberish | null]): string[]; }>; DomainAdded: TypedEventDescription<{ encodeTopics([domainId]: [null]): string[]; }>; FundingPotAdded: TypedEventDescription<{ encodeTopics([fundingPotId]: [null]): string[]; }>; }; } export class IColony extends Contract { connect(signerOrProvider: Signer | Provider | string): IColony; attach(addressOrName: string): IColony; deployed(): Promise; on(event: EventFilter | string, listener: Listener): IColony; once(event: EventFilter | string, listener: Listener): IColony; addListener(eventName: EventFilter | string, listener: Listener): IColony; removeAllListeners(eventName: EventFilter | string): IColony; removeListener(eventName: any, listener: Listener): IColony; interface: IColonyInterface; functions: { /** * Indicate approval to exit recovery mode. Can only be called by user with recovery role. */ approveExitRecovery( overrides?: TransactionOverrides ): Promise; /** * Exit recovery mode, can be called by anyone if enough whitelist approvals are given. */ exitRecoveryMode( overrides?: TransactionOverrides ): Promise; /** * Return number of recovery roles. * @returns numRoles Number of users with the recovery role. */ numRecoveryRoles(): Promise; /** * 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. * @param _slot Uint address of storage slot to be updated * @param _value word of data to be set */ setStorageSlotRecovery( _slot: BigNumberish, _value: Arrayish, overrides?: TransactionOverrides ): Promise; /** * Is colony network in recovery mode. * @returns inRecoveryMode Return true if recovery mode is active, false otherwise */ isInRecoveryMode(): Promise; /** * 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 * @param _slot The storage slot number to check. */ checkNotAdditionalProtectedVariable(_slot: BigNumberish): Promise; /** * Remove colony recovery role. Can only be called by root role. * @param _user User we want to remove recovery role from */ removeRecoveryRole( _user: string, overrides?: TransactionOverrides ): Promise; /** * Set new colony recovery role. Can be called by root. * @param _user User we want to give a recovery role to */ setRecoveryRole( _user: string, overrides?: TransactionOverrides ): Promise; /** * Put colony network mining into recovery mode. Can only be called by user with recovery role. */ enterRecoveryMode( overrides?: TransactionOverrides ): Promise; /** * Get the `ColonyAuthority` for the colony. * @returns colonyAuthority The `ColonyAuthority` contract address */ authority(): Promise; /** * Used for testing. * Get the colony `owner` address. This should be address(0x0) at all times. * @returns colonyOwner Address of the colony owner */ owner(): Promise; /** * Get the Colony contract version. Starts from 1 and is incremented with every deployed contract change. * @returns colonyVersion Version number */ version(): Promise; /** * 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`. * @param _newVersion The target version for the upgrade */ upgrade( _newVersion: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * Sets up the permission for those with root permission to be able to call updateColonyOrbitDB, which is new in v3Should be removed in v4, and only `finishUpgrade` should be used, introduced in v3. * A function to be called after an upgrade has been done from v2 to v3. */ finishUpgrade2To3( overrides?: TransactionOverrides ): Promise; /** * Can only be called by the colony itself, and only expected to be called as part of the `upgrade()` call. Required to be public so it can be an external call. * A function to be called after an upgrade has been done from v2 to v3. */ finishUpgrade( overrides?: TransactionOverrides ): Promise; /** * The colonyNetworkAddress we read here is set once, during `initialiseColony`. * Returns the colony network address set on the Colony. * @returns colonyNetwork The address of Colony Network instance */ getColonyNetwork(): Promise; /** * Get the colony token. * @returns tokenAddress Address of the token contract */ getToken(): Promise; /** * Set new colony root role. Can be called by root role only. * @param _setTo The state of the role permission (true assign the permission, false revokes it) * @param _user User we want to give an root role to */ setRootRole( _user: string, _setTo: boolean, overrides?: TransactionOverrides ): Promise; /** * Set new colony arbitration role. Can be called by root role or architecture role. * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId` * @param _domainId Domain in which we are giving user the role * @param _permissionDomainId Domain in which the caller has root role * @param _setTo The state of the role permission (true assign the permission, false revokes it) * @param _user User we want to give an arbitration role to */ setArbitrationRole( _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _user: string, _domainId: BigNumberish, _setTo: boolean, overrides?: TransactionOverrides ): Promise; /** * Set new colony architecture role. Can be called by root role or architecture role. * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId` * @param _domainId Domain in which we are giving user the role * @param _permissionDomainId Domain in which the caller has root/architecture role * @param _setTo The state of the role permission (true assign the permission, false revokes it) * @param _user User we want to give an architecture role to */ setArchitectureRole( _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _user: string, _domainId: BigNumberish, _setTo: boolean, overrides?: TransactionOverrides ): Promise; /** * Set new colony funding role. Can be called by root role or architecture role. * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId` * @param _domainId Domain in which we are giving user the role * @param _permissionDomainId Domain in which the caller has root/architecture role * @param _setTo The state of the role permission (true assign the permission, false revokes it) * @param _user User we want to give an funding role to */ setFundingRole( _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _user: string, _domainId: BigNumberish, _setTo: boolean, overrides?: TransactionOverrides ): Promise; /** * Set new colony admin role. Can be called by root role or architecture role. * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId` * @param _domainId Domain in which we are giving user the role * @param _permissionDomainId Domain in which the caller has root/architecture role * @param _setTo The state of the role permission (true assign the permission, false revokes it) * @param _user User we want to give an admin role to */ setAdministrationRole( _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _user: string, _domainId: BigNumberish, _setTo: boolean, overrides?: TransactionOverrides ): Promise; /** * 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. * @param _domainId The domain where we want to check for the role * @param _role The role we want to check for * @param _user The user whose role we want to check * @returns hasRole Boolean indicating whether the given user has the given role in domain */ hasUserRole( _user: string, _domainId: BigNumberish, _role: BigNumberish ): Promise; /** * Sets the reward inverse to the uint max 2**256 - 1. * Called once when the colony is created to initialise certain storage slot values. * @param _colonyNetworkAddress Address of the colony network * @param _token Address of the colony ERC20 Token */ initialiseColony( _colonyNetworkAddress: string, _token: string, overrides?: TransactionOverrides ): Promise; /** * 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. * @param _amount Amount of reputation/tokens for every address * @param _users Array of address to bootstrap with reputation */ bootstrapColony( _users: string[], _amount: BigNumberish[], overrides?: TransactionOverrides ): Promise; /** * Mint `_wad` amount of colony tokens. Secured function to authorised members. * @param _wad Amount to mint */ mintTokens( _wad: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * Register colony's ENS label. * @param colonyName The label to register. * @param orbitdb The path of the orbitDB database associated with the colony name */ registerColonyLabel( colonyName: string, orbitdb: string, overrides?: TransactionOverrides ): Promise; /** * Update a colony's orbitdb address. Can only be called by a colony with a registered subdomain * @param orbitdb The path of the orbitDB database to be associated with the colony */ updateColonyOrbitDB( orbitdb: string, overrides?: TransactionOverrides ): Promise; /** * 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. * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId` * @param _parentDomainId Id of the domain under which the new one will be added * @param _permissionDomainId The domainId in which I have the permission to take this action */ addDomain( _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _parentDomainId: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * Get a domain by id. * @param _id Id of the domain which details to get * @returns domain The domain */ getDomain( _id: BigNumberish ): Promise<{ skillId: BigNumber; fundingPotId: BigNumber; 0: BigNumber; 1: BigNumber; }>; /** * Get the number of domains in the colony. * @returns count The domain count. Min 1 as the root domain is created at the same time as the colony */ getDomainCount(): Promise; /** * 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. * @param branchMask The branchmask of the proof * @param key The key of the element the proof is for. * @param siblings The siblings of the proof * @param value The value of the element that the proof is for. * @returns isValid True if the proof is valid, false otherwise. */ verifyReputationProof( key: Arrayish, value: Arrayish, branchMask: BigNumberish, siblings: Arrayish[] ): Promise; /** * Add a new payment in the colony. Secured function to authorised members. * @param _amount Payout amount * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) * @param _domainId The domain where the payment belongs * @param _permissionDomainId The domainId in which I have the permission to take this action * @param _recipient Address of the payment recipient * @param _skillId The skill associated with the payment * @param _token Address of the token, `0x0` value indicates Ether * @returns paymentId Identifier of the newly created payment */ addPayment( _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _recipient: string, _token: string, _amount: BigNumberish, _domainId: BigNumberish, _skillId: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * Finalizes the payment and logs the reputation log updates. Allowed to be called once after payment is fully funded. Secured function to authorised members. * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId` * @param _id Payment identifier * @param _permissionDomainId The domainId in which I have the permission to take this action */ finalizePayment( _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _id: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * Sets the recipient on an existing payment. Secured function to authorised members. * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId` * @param _id Payment identifier * @param _permissionDomainId The domainId in which I have the permission to take this action * @param _recipient Address of the payment recipient */ setPaymentRecipient( _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _id: BigNumberish, _recipient: string, overrides?: TransactionOverrides ): Promise; /** * Sets the domain on an existing payment. Secured function to authorised members * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId` * @param _domainId Id of the new domain to set * @param _id Payment identifier * @param _permissionDomainId The domainId in which I have the permission to take this action. */ setPaymentDomain( _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _id: BigNumberish, _domainId: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * Sets the skill on an existing payment. Secured function to authorised members. * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId` * @param _id Payment identifier * @param _permissionDomainId The domainId in which I have the permission to take this action * @param _skillId Id of the new skill to set */ setPaymentSkill( _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _id: BigNumberish, _skillId: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * Sets the payout for a given token on an existing payment. Secured function to authorised members. * @param _amount Payout amount * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId` * @param _id Payment identifier * @param _permissionDomainId The domainId in which I have the permission to take this action * @param _token Address of the token, `0x0` value indicates Ether */ setPaymentPayout( _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _id: BigNumberish, _token: string, _amount: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * Returns an exiting payment. * @param _id Payment identifier * @returns payment The Payment data structure */ getPayment( _id: BigNumberish ): Promise<{ recipient: string; finalized: boolean; fundingPotId: BigNumber; domainId: BigNumber; skills: BigNumber[]; 0: string; 1: boolean; 2: BigNumber; 3: BigNumber; 4: BigNumber[]; }>; /** * 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. * @param _id Payment identifier * @param _token Address of the token, `0x0` value indicates Ether */ claimPayment( _id: BigNumberish, _token: string, overrides?: TransactionOverrides ): Promise; /** * Get the number of payments in the colony. * @returns count The payment count */ getPaymentCount(): Promise; /** * Make a new task in the colony. Secured function to authorised members. * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId` * @param _domainId The domain where the task belongs * @param _dueDate The due date of the task, can set to `0` for no-op * @param _permissionDomainId The domainId in which I have the permission to take this action * @param _skillId The skill associated with the task, can set to `0` for no-op * @param _specificationHash Database identifier where the task specification is stored */ makeTask( _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _specificationHash: Arrayish, _domainId: BigNumberish, _skillId: BigNumberish, _dueDate: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * Get the number of tasks in the colony. * @returns count The task count */ getTaskCount(): Promise; /** * Starts from 0 and is incremented on every co-reviewed task change via `executeTaskChange` call. * @param _id Id of the task * @returns nonce The current task change nonce value */ getTaskChangeNonce(_id: BigNumberish): Promise; /** * 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. * @param _data The transaction data * @param _mode How the signature was generated - 0 for Geth-style (usual), 1 for Trezor-style (only Trezor does this) * @param _sigR r output of the ECDSA signature of the transaction * @param _sigS s output of the ECDSA signature of the transaction * @param _sigV recovery id * @param _value 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 */ executeTaskChange( _sigV: BigNumberish[], _sigR: Arrayish[], _sigS: Arrayish[], _mode: BigNumberish[], _value: BigNumberish, _data: Arrayish, overrides?: TransactionOverrides ): Promise; /** * 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. * @param _data The transaction data * @param _mode How the signature was generated - 0 for Geth-style (usual), 1 for Trezor-style (only Trezor does this) * @param _sigR r output of the ECDSA signature of the transaction * @param _sigS s output of the ECDSA signature of the transaction * @param _sigV recovery id * @param _value 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 */ executeTaskRoleAssignment( _sigV: BigNumberish[], _sigR: Arrayish[], _sigS: Arrayish[], _mode: BigNumberish[], _value: BigNumberish, _data: Arrayish, overrides?: TransactionOverrides ): Promise; /** * 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. * @param _id Id of the task * @param _ratingSecret `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. * @param _role Id of the role, as defined in TaskRole enum */ submitTaskWorkRating( _id: BigNumberish, _role: BigNumberish, _ratingSecret: Arrayish, overrides?: TransactionOverrides ): Promise; /** * 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. * @param _id Id of the task * @param _rating 0-50 rating score (in increments of 10, .e.g 0, 10, 20, 30, 40 or 50) * @param _role Id of the role, as defined in TaskRole enum * @param _salt Salt value used to generate the rating secret */ revealTaskWorkRating( _id: BigNumberish, _role: BigNumberish, _rating: BigNumberish, _salt: Arrayish, overrides?: TransactionOverrides ): Promise; /** * Helper function used to generage consistently the rating secret using salt value `_salt` and value to hide `_value` * @param _salt Salt value * @param _value Value to hide * @returns secret `keccak256` hash of joint _salt and _value */ generateSecret(_salt: Arrayish, _value: BigNumberish): Promise; /** * Get the `ColonyStorage.RatingSecrets` information for task `_id`. * @param _id Id of the task * @returns nSecrets Number of secretslastSubmittedAt Timestamp of the last submitted rating secret */ getTaskWorkRatingSecretsInfo( _id: BigNumberish ): Promise<{ nSecrets: BigNumber; lastSubmittedAt: BigNumber; 0: BigNumber; 1: BigNumber; }>; /** * Get the rating secret submitted for role `_role` in task `_id` * @param _id Id of the task * @param _role Id of the role, as defined in TaskRole enum * @returns secret Rating secret `bytes32` value */ getTaskWorkRatingSecret( _id: BigNumberish, _role: BigNumberish ): Promise; /** * 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. * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId` * @param _id Id of the task * @param _permissionDomainId The domain ID in which _user has the Administration permission * @param _user Address of the user we want to give a manager role to */ setTaskManagerRole( _id: BigNumberish, _user: string, _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * 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. * @param _id Id of the task * @param _user Address of the user we want to give a evaluator role to */ setTaskEvaluatorRole( _id: BigNumberish, _user: string, overrides?: TransactionOverrides ): Promise; /** * 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. * @param _id Id of the task * @param _user Address of the user we want to give a worker role to */ setTaskWorkerRole( _id: BigNumberish, _user: string, overrides?: TransactionOverrides ): Promise; /** * Removing evaluator role. Agreed between manager and currently assigned evaluator. * @param _id Id of the task */ removeTaskEvaluatorRole( _id: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * Removing worker role. Agreed between manager and currently assigned worker. * @param _id Id of the task */ removeTaskWorkerRole( _id: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * 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`. * @param _id Id of the task * @param _skillId Id of the skill which has to be a global skill */ setTaskSkill( _id: BigNumberish, _skillId: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * Set the domain for task `_id`. * @param _domainId Id of the domain * @param _id Id of the task */ setTaskDomain( _id: BigNumberish, _domainId: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * 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. * @param _id Id of the task * @param _specificationHash Unique hash of the task brief in ddb */ setTaskBrief( _id: BigNumberish, _specificationHash: Arrayish, overrides?: TransactionOverrides ): Promise; /** * Set the due date on task `_id`. Allowed before a task is finalized. * @param _dueDate Due date as seconds since unix epoch * @param _id Id of the task */ setTaskDueDate( _id: BigNumberish, _dueDate: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * 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. * @param _deliverableHash Unique hash of the task deliverable content in ddb * @param _id Id of the task */ submitTaskDeliverable( _id: BigNumberish, _deliverableHash: Arrayish, overrides?: TransactionOverrides ): Promise; /** * Internally call `submitTaskDeliverable` and `submitTaskWorkRating` in sequence. * Submit the task deliverable for Worker and rating for Manager. * @param _deliverableHash Unique hash of the task deliverable content in ddb * @param _id Id of the task * @param _ratingSecret Rating secret for manager */ submitTaskDeliverableAndRating( _id: BigNumberish, _deliverableHash: Arrayish, _ratingSecret: Arrayish, overrides?: TransactionOverrides ): Promise; /** * 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. * @param _id Id of the task */ finalizeTask( _id: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * 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`. * @param _id Id of the task */ cancelTask( _id: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * 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. * @param _id Id of the task */ completeTask( _id: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * Get a task with id `_id` * @param _id Id of the task * @returns 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 */ getTask( _id: BigNumberish ): Promise<{ specificationHash: string; deliverableHash: string; status: number; dueDate: BigNumber; fundingPotId: BigNumber; completionTimestamp: BigNumber; domainId: BigNumber; skillIds: BigNumber[]; 0: string; 1: string; 2: number; 3: BigNumber; 4: BigNumber; 5: BigNumber; 6: BigNumber; 7: BigNumber[]; }>; /** * Get the `Role` properties back for role `_role` in task `_id`. * @param _id Id of the task * @param _role Id of the role, as defined in TaskRole enum * @returns role The Role */ getTaskRole( _id: BigNumberish, _role: BigNumberish ): Promise<{ user: string; rateFail: boolean; rating: number; 0: string; 1: boolean; 2: number; }>; /** * Set the reward inverse to pay out from revenue. e.g. if the fee is 1% (or 0.01), set 100. * @param _rewardInverse The inverse of the reward */ setRewardInverse( _rewardInverse: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * Return 1 / the reward to pay out from revenue. e.g. if the fee is 1% (or 0.01), return 100. * @returns rewardInverse The inverse of the reward */ getRewardInverse(): Promise; /** * Get payout amount in `_token` denomination for role `_role` in task `_id`. * @param _id Id of the task * @param _role Id of the role, as defined in TaskRole enum * @param _token Address of the token, `0x0` value indicates Ether * @returns amount Payout amount */ getTaskPayout( _id: BigNumberish, _role: BigNumberish, _token: string ): Promise; /** * Set `_token` payout for manager in task `_id` to `_amount`. * @param _amount Payout amount * @param _id Id of the task * @param _token Address of the token, `0x0` value indicates Ether */ setTaskManagerPayout( _id: BigNumberish, _token: string, _amount: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * Set `_token` payout for evaluator in task `_id` to `_amount`. * @param _amount Payout amount * @param _id Id of the task * @param _token Address of the token, `0x0` value indicates Ether */ setTaskEvaluatorPayout( _id: BigNumberish, _token: string, _amount: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * Set `_token` payout for worker in task `_id` to `_amount`. * @param _amount Payout amount * @param _id Id of the task * @param _token Address of the token, `0x0` value indicates Ether */ setTaskWorkerPayout( _id: BigNumberish, _token: string, _amount: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * 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. * @param _evaluatorAmount Payout amount for evaluator * @param _id Id of the task * @param _managerAmount Payout amount for manager * @param _token Address of the token, `0x0` value indicates Ether * @param _workerAmount Payout amount for worker */ setAllTaskPayouts( _id: BigNumberish, _token: string, _managerAmount: BigNumberish, _evaluatorAmount: BigNumberish, _workerAmount: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * 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. * @param _id Id of the task * @param _role Id of the role, as defined in TaskRole enum * @param _token Address of the token, `0x0` value indicates Ether */ claimTaskPayout( _id: BigNumberish, _role: BigNumberish, _token: string, overrides?: TransactionOverrides ): Promise; /** * 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`. * @param _token Address of the token used for reward payout * @param branchMask The branchmask of the proof * @param key Some Reputation hash tree key * @param siblings The siblings of the proof * @param value Reputation value */ startNextRewardPayout( _token: string, key: Arrayish, value: Arrayish, branchMask: BigNumberish, siblings: Arrayish[], overrides?: TransactionOverrides ): Promise; /** * 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. * @param _payoutId Id of the reward payout * @param _squareRoots 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. * @param branchMask The branchmask of the proof * @param key Some Reputation hash tree key * @param siblings The siblings of the proof * @param value Reputation value */ claimRewardPayout( _payoutId: BigNumberish, _squareRoots: BigNumberish[], key: Arrayish, value: Arrayish, branchMask: BigNumberish, siblings: Arrayish[], overrides?: TransactionOverrides ): Promise; /** * Get useful information about specific reward payout. * @param _payoutId Id of the reward payout * @returns 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. */ getRewardPayoutInfo( _payoutId: BigNumberish ): Promise<{ reputationState: string; colonyWideReputation: BigNumber; totalTokens: BigNumber; amount: BigNumber; tokenAddress: string; blockTimestamp: BigNumber; 0: string; 1: BigNumber; 2: BigNumber; 3: BigNumber; 4: string; 5: BigNumber; }>; /** * 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. * @param _payoutId Id of the reward payout */ finalizeRewardPayout( _payoutId: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * For the reward funding pot (e.g. id: 0) this returns (0, 0, 0). * Get the non-mapping properties of a pot by id. * @param _id Id of the pot which details to get * @returns 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 */ getFundingPot( _id: BigNumberish ): Promise<{ associatedType: number; associatedTypeId: BigNumber; payoutsWeCannotMake: BigNumber; 0: number; 1: BigNumber; 2: BigNumber; }>; /** * Get the number of funding pots in the colony. * @returns count The funding pots count */ getFundingPotCount(): Promise; /** * Get the `_token` balance of pot with id `_potId`. * @param _potId Id of the funding pot * @param _token Address of the token, `0x0` value indicates Ether * @returns balance Funding pot supply balance */ getFundingPotBalance( _potId: BigNumberish, _token: string ): Promise; /** * Get the assigned `_token` payouts of pot with id `_potId`. * @param _potId Id of the funding pot * @param _token Address of the token, `0x0` value indicates Ether * @returns payout Funding pot payout amount */ getFundingPotPayout( _potId: BigNumberish, _token: string ): Promise; /** * Move a given amount: `_amount` of `_token` funds from funding pot with id `_fromPot` to one with id `_toPot`. * @param _amount Amount of funds * @param _fromChildSkillIndex The child index in `_permissionDomainId` where we can find the domain for `_fromPotId` * @param _fromPot Funding pot id providing the funds * @param _permissionDomainId The domainId in which I have the permission to take this action * @param _toChildSkillIndex The child index in `_permissionDomainId` where we can find the domain for `_toPotId` * @param _toPot Funding pot id receiving the funds * @param _token Address of the token, `0x0` value indicates Ether */ moveFundsBetweenPots( _permissionDomainId: BigNumberish, _fromChildSkillIndex: BigNumberish, _toChildSkillIndex: BigNumberish, _fromPot: BigNumberish, _toPot: BigNumberish, _amount: BigNumberish, _token: string, overrides?: TransactionOverrides ): Promise; /** * 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. * @param _token Address of the token, `0x0` value indicates Ether */ claimColonyFunds( _token: string, overrides?: TransactionOverrides ): Promise; /** * Get the total amount of tokens `_token` minus amount reserved to be paid to the reputation and token holders as rewards. * @param _token Address of the token, `0x0` value indicates Ether * @returns amount Total amount of tokens in funding pots other than the rewards pot (id 0) */ getNonRewardPotsTotal(_token: string): Promise; }; /** * Indicate approval to exit recovery mode. Can only be called by user with recovery role. */ approveExitRecovery( overrides?: TransactionOverrides ): Promise; /** * Exit recovery mode, can be called by anyone if enough whitelist approvals are given. */ exitRecoveryMode( overrides?: TransactionOverrides ): Promise; /** * Return number of recovery roles. * @returns numRoles Number of users with the recovery role. */ numRecoveryRoles(): Promise; /** * 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. * @param _slot Uint address of storage slot to be updated * @param _value word of data to be set */ setStorageSlotRecovery( _slot: BigNumberish, _value: Arrayish, overrides?: TransactionOverrides ): Promise; /** * Is colony network in recovery mode. * @returns inRecoveryMode Return true if recovery mode is active, false otherwise */ isInRecoveryMode(): Promise; /** * 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 * @param _slot The storage slot number to check. */ checkNotAdditionalProtectedVariable(_slot: BigNumberish): Promise; /** * Remove colony recovery role. Can only be called by root role. * @param _user User we want to remove recovery role from */ removeRecoveryRole( _user: string, overrides?: TransactionOverrides ): Promise; /** * Set new colony recovery role. Can be called by root. * @param _user User we want to give a recovery role to */ setRecoveryRole( _user: string, overrides?: TransactionOverrides ): Promise; /** * Put colony network mining into recovery mode. Can only be called by user with recovery role. */ enterRecoveryMode( overrides?: TransactionOverrides ): Promise; /** * Get the `ColonyAuthority` for the colony. * @returns colonyAuthority The `ColonyAuthority` contract address */ authority(): Promise; /** * Used for testing. * Get the colony `owner` address. This should be address(0x0) at all times. * @returns colonyOwner Address of the colony owner */ owner(): Promise; /** * Get the Colony contract version. Starts from 1 and is incremented with every deployed contract change. * @returns colonyVersion Version number */ version(): Promise; /** * 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`. * @param _newVersion The target version for the upgrade */ upgrade( _newVersion: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * Sets up the permission for those with root permission to be able to call updateColonyOrbitDB, which is new in v3Should be removed in v4, and only `finishUpgrade` should be used, introduced in v3. * A function to be called after an upgrade has been done from v2 to v3. */ finishUpgrade2To3( overrides?: TransactionOverrides ): Promise; /** * Can only be called by the colony itself, and only expected to be called as part of the `upgrade()` call. Required to be public so it can be an external call. * A function to be called after an upgrade has been done from v2 to v3. */ finishUpgrade(overrides?: TransactionOverrides): Promise; /** * The colonyNetworkAddress we read here is set once, during `initialiseColony`. * Returns the colony network address set on the Colony. * @returns colonyNetwork The address of Colony Network instance */ getColonyNetwork(): Promise; /** * Get the colony token. * @returns tokenAddress Address of the token contract */ getToken(): Promise; /** * Set new colony root role. Can be called by root role only. * @param _setTo The state of the role permission (true assign the permission, false revokes it) * @param _user User we want to give an root role to */ setRootRole( _user: string, _setTo: boolean, overrides?: TransactionOverrides ): Promise; /** * Set new colony arbitration role. Can be called by root role or architecture role. * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId` * @param _domainId Domain in which we are giving user the role * @param _permissionDomainId Domain in which the caller has root role * @param _setTo The state of the role permission (true assign the permission, false revokes it) * @param _user User we want to give an arbitration role to */ setArbitrationRole( _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _user: string, _domainId: BigNumberish, _setTo: boolean, overrides?: TransactionOverrides ): Promise; /** * Set new colony architecture role. Can be called by root role or architecture role. * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId` * @param _domainId Domain in which we are giving user the role * @param _permissionDomainId Domain in which the caller has root/architecture role * @param _setTo The state of the role permission (true assign the permission, false revokes it) * @param _user User we want to give an architecture role to */ setArchitectureRole( _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _user: string, _domainId: BigNumberish, _setTo: boolean, overrides?: TransactionOverrides ): Promise; /** * Set new colony funding role. Can be called by root role or architecture role. * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId` * @param _domainId Domain in which we are giving user the role * @param _permissionDomainId Domain in which the caller has root/architecture role * @param _setTo The state of the role permission (true assign the permission, false revokes it) * @param _user User we want to give an funding role to */ setFundingRole( _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _user: string, _domainId: BigNumberish, _setTo: boolean, overrides?: TransactionOverrides ): Promise; /** * Set new colony admin role. Can be called by root role or architecture role. * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId` * @param _domainId Domain in which we are giving user the role * @param _permissionDomainId Domain in which the caller has root/architecture role * @param _setTo The state of the role permission (true assign the permission, false revokes it) * @param _user User we want to give an admin role to */ setAdministrationRole( _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _user: string, _domainId: BigNumberish, _setTo: boolean, overrides?: TransactionOverrides ): Promise; /** * 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. * @param _domainId The domain where we want to check for the role * @param _role The role we want to check for * @param _user The user whose role we want to check * @returns hasRole Boolean indicating whether the given user has the given role in domain */ hasUserRole( _user: string, _domainId: BigNumberish, _role: BigNumberish ): Promise; /** * Sets the reward inverse to the uint max 2**256 - 1. * Called once when the colony is created to initialise certain storage slot values. * @param _colonyNetworkAddress Address of the colony network * @param _token Address of the colony ERC20 Token */ initialiseColony( _colonyNetworkAddress: string, _token: string, overrides?: TransactionOverrides ): Promise; /** * 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. * @param _amount Amount of reputation/tokens for every address * @param _users Array of address to bootstrap with reputation */ bootstrapColony( _users: string[], _amount: BigNumberish[], overrides?: TransactionOverrides ): Promise; /** * Mint `_wad` amount of colony tokens. Secured function to authorised members. * @param _wad Amount to mint */ mintTokens( _wad: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * Register colony's ENS label. * @param colonyName The label to register. * @param orbitdb The path of the orbitDB database associated with the colony name */ registerColonyLabel( colonyName: string, orbitdb: string, overrides?: TransactionOverrides ): Promise; /** * Update a colony's orbitdb address. Can only be called by a colony with a registered subdomain * @param orbitdb The path of the orbitDB database to be associated with the colony */ updateColonyOrbitDB( orbitdb: string, overrides?: TransactionOverrides ): Promise; /** * 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. * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId` * @param _parentDomainId Id of the domain under which the new one will be added * @param _permissionDomainId The domainId in which I have the permission to take this action */ addDomain( _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _parentDomainId: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * Get a domain by id. * @param _id Id of the domain which details to get * @returns domain The domain */ getDomain( _id: BigNumberish ): Promise<{ skillId: BigNumber; fundingPotId: BigNumber; 0: BigNumber; 1: BigNumber; }>; /** * Get the number of domains in the colony. * @returns count The domain count. Min 1 as the root domain is created at the same time as the colony */ getDomainCount(): Promise; /** * 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. * @param branchMask The branchmask of the proof * @param key The key of the element the proof is for. * @param siblings The siblings of the proof * @param value The value of the element that the proof is for. * @returns isValid True if the proof is valid, false otherwise. */ verifyReputationProof( key: Arrayish, value: Arrayish, branchMask: BigNumberish, siblings: Arrayish[] ): Promise; /** * Add a new payment in the colony. Secured function to authorised members. * @param _amount Payout amount * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) * @param _domainId The domain where the payment belongs * @param _permissionDomainId The domainId in which I have the permission to take this action * @param _recipient Address of the payment recipient * @param _skillId The skill associated with the payment * @param _token Address of the token, `0x0` value indicates Ether * @returns paymentId Identifier of the newly created payment */ addPayment( _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _recipient: string, _token: string, _amount: BigNumberish, _domainId: BigNumberish, _skillId: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * Finalizes the payment and logs the reputation log updates. Allowed to be called once after payment is fully funded. Secured function to authorised members. * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId` * @param _id Payment identifier * @param _permissionDomainId The domainId in which I have the permission to take this action */ finalizePayment( _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _id: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * Sets the recipient on an existing payment. Secured function to authorised members. * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId` * @param _id Payment identifier * @param _permissionDomainId The domainId in which I have the permission to take this action * @param _recipient Address of the payment recipient */ setPaymentRecipient( _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _id: BigNumberish, _recipient: string, overrides?: TransactionOverrides ): Promise; /** * Sets the domain on an existing payment. Secured function to authorised members * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId` * @param _domainId Id of the new domain to set * @param _id Payment identifier * @param _permissionDomainId The domainId in which I have the permission to take this action. */ setPaymentDomain( _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _id: BigNumberish, _domainId: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * Sets the skill on an existing payment. Secured function to authorised members. * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId` * @param _id Payment identifier * @param _permissionDomainId The domainId in which I have the permission to take this action * @param _skillId Id of the new skill to set */ setPaymentSkill( _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _id: BigNumberish, _skillId: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * Sets the payout for a given token on an existing payment. Secured function to authorised members. * @param _amount Payout amount * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId` * @param _id Payment identifier * @param _permissionDomainId The domainId in which I have the permission to take this action * @param _token Address of the token, `0x0` value indicates Ether */ setPaymentPayout( _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _id: BigNumberish, _token: string, _amount: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * Returns an exiting payment. * @param _id Payment identifier * @returns payment The Payment data structure */ getPayment( _id: BigNumberish ): Promise<{ recipient: string; finalized: boolean; fundingPotId: BigNumber; domainId: BigNumber; skills: BigNumber[]; 0: string; 1: boolean; 2: BigNumber; 3: BigNumber; 4: BigNumber[]; }>; /** * 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. * @param _id Payment identifier * @param _token Address of the token, `0x0` value indicates Ether */ claimPayment( _id: BigNumberish, _token: string, overrides?: TransactionOverrides ): Promise; /** * Get the number of payments in the colony. * @returns count The payment count */ getPaymentCount(): Promise; /** * Make a new task in the colony. Secured function to authorised members. * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId` * @param _domainId The domain where the task belongs * @param _dueDate The due date of the task, can set to `0` for no-op * @param _permissionDomainId The domainId in which I have the permission to take this action * @param _skillId The skill associated with the task, can set to `0` for no-op * @param _specificationHash Database identifier where the task specification is stored */ makeTask( _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _specificationHash: Arrayish, _domainId: BigNumberish, _skillId: BigNumberish, _dueDate: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * Get the number of tasks in the colony. * @returns count The task count */ getTaskCount(): Promise; /** * Starts from 0 and is incremented on every co-reviewed task change via `executeTaskChange` call. * @param _id Id of the task * @returns nonce The current task change nonce value */ getTaskChangeNonce(_id: BigNumberish): Promise; /** * 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. * @param _data The transaction data * @param _mode How the signature was generated - 0 for Geth-style (usual), 1 for Trezor-style (only Trezor does this) * @param _sigR r output of the ECDSA signature of the transaction * @param _sigS s output of the ECDSA signature of the transaction * @param _sigV recovery id * @param _value 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 */ executeTaskChange( _sigV: BigNumberish[], _sigR: Arrayish[], _sigS: Arrayish[], _mode: BigNumberish[], _value: BigNumberish, _data: Arrayish, overrides?: TransactionOverrides ): Promise; /** * 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. * @param _data The transaction data * @param _mode How the signature was generated - 0 for Geth-style (usual), 1 for Trezor-style (only Trezor does this) * @param _sigR r output of the ECDSA signature of the transaction * @param _sigS s output of the ECDSA signature of the transaction * @param _sigV recovery id * @param _value 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 */ executeTaskRoleAssignment( _sigV: BigNumberish[], _sigR: Arrayish[], _sigS: Arrayish[], _mode: BigNumberish[], _value: BigNumberish, _data: Arrayish, overrides?: TransactionOverrides ): Promise; /** * 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. * @param _id Id of the task * @param _ratingSecret `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. * @param _role Id of the role, as defined in TaskRole enum */ submitTaskWorkRating( _id: BigNumberish, _role: BigNumberish, _ratingSecret: Arrayish, overrides?: TransactionOverrides ): Promise; /** * 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. * @param _id Id of the task * @param _rating 0-50 rating score (in increments of 10, .e.g 0, 10, 20, 30, 40 or 50) * @param _role Id of the role, as defined in TaskRole enum * @param _salt Salt value used to generate the rating secret */ revealTaskWorkRating( _id: BigNumberish, _role: BigNumberish, _rating: BigNumberish, _salt: Arrayish, overrides?: TransactionOverrides ): Promise; /** * Helper function used to generage consistently the rating secret using salt value `_salt` and value to hide `_value` * @param _salt Salt value * @param _value Value to hide * @returns secret `keccak256` hash of joint _salt and _value */ generateSecret(_salt: Arrayish, _value: BigNumberish): Promise; /** * Get the `ColonyStorage.RatingSecrets` information for task `_id`. * @param _id Id of the task * @returns nSecrets Number of secretslastSubmittedAt Timestamp of the last submitted rating secret */ getTaskWorkRatingSecretsInfo( _id: BigNumberish ): Promise<{ nSecrets: BigNumber; lastSubmittedAt: BigNumber; 0: BigNumber; 1: BigNumber; }>; /** * Get the rating secret submitted for role `_role` in task `_id` * @param _id Id of the task * @param _role Id of the role, as defined in TaskRole enum * @returns secret Rating secret `bytes32` value */ getTaskWorkRatingSecret( _id: BigNumberish, _role: BigNumberish ): Promise; /** * 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. * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId` * @param _id Id of the task * @param _permissionDomainId The domain ID in which _user has the Administration permission * @param _user Address of the user we want to give a manager role to */ setTaskManagerRole( _id: BigNumberish, _user: string, _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * 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. * @param _id Id of the task * @param _user Address of the user we want to give a evaluator role to */ setTaskEvaluatorRole( _id: BigNumberish, _user: string, overrides?: TransactionOverrides ): Promise; /** * 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. * @param _id Id of the task * @param _user Address of the user we want to give a worker role to */ setTaskWorkerRole( _id: BigNumberish, _user: string, overrides?: TransactionOverrides ): Promise; /** * Removing evaluator role. Agreed between manager and currently assigned evaluator. * @param _id Id of the task */ removeTaskEvaluatorRole( _id: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * Removing worker role. Agreed between manager and currently assigned worker. * @param _id Id of the task */ removeTaskWorkerRole( _id: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * 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`. * @param _id Id of the task * @param _skillId Id of the skill which has to be a global skill */ setTaskSkill( _id: BigNumberish, _skillId: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * Set the domain for task `_id`. * @param _domainId Id of the domain * @param _id Id of the task */ setTaskDomain( _id: BigNumberish, _domainId: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * 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. * @param _id Id of the task * @param _specificationHash Unique hash of the task brief in ddb */ setTaskBrief( _id: BigNumberish, _specificationHash: Arrayish, overrides?: TransactionOverrides ): Promise; /** * Set the due date on task `_id`. Allowed before a task is finalized. * @param _dueDate Due date as seconds since unix epoch * @param _id Id of the task */ setTaskDueDate( _id: BigNumberish, _dueDate: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * 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. * @param _deliverableHash Unique hash of the task deliverable content in ddb * @param _id Id of the task */ submitTaskDeliverable( _id: BigNumberish, _deliverableHash: Arrayish, overrides?: TransactionOverrides ): Promise; /** * Internally call `submitTaskDeliverable` and `submitTaskWorkRating` in sequence. * Submit the task deliverable for Worker and rating for Manager. * @param _deliverableHash Unique hash of the task deliverable content in ddb * @param _id Id of the task * @param _ratingSecret Rating secret for manager */ submitTaskDeliverableAndRating( _id: BigNumberish, _deliverableHash: Arrayish, _ratingSecret: Arrayish, overrides?: TransactionOverrides ): Promise; /** * 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. * @param _id Id of the task */ finalizeTask( _id: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * 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`. * @param _id Id of the task */ cancelTask( _id: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * 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. * @param _id Id of the task */ completeTask( _id: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * Get a task with id `_id` * @param _id Id of the task * @returns 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 */ getTask( _id: BigNumberish ): Promise<{ specificationHash: string; deliverableHash: string; status: number; dueDate: BigNumber; fundingPotId: BigNumber; completionTimestamp: BigNumber; domainId: BigNumber; skillIds: BigNumber[]; 0: string; 1: string; 2: number; 3: BigNumber; 4: BigNumber; 5: BigNumber; 6: BigNumber; 7: BigNumber[]; }>; /** * Get the `Role` properties back for role `_role` in task `_id`. * @param _id Id of the task * @param _role Id of the role, as defined in TaskRole enum * @returns role The Role */ getTaskRole( _id: BigNumberish, _role: BigNumberish ): Promise<{ user: string; rateFail: boolean; rating: number; 0: string; 1: boolean; 2: number; }>; /** * Set the reward inverse to pay out from revenue. e.g. if the fee is 1% (or 0.01), set 100. * @param _rewardInverse The inverse of the reward */ setRewardInverse( _rewardInverse: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * Return 1 / the reward to pay out from revenue. e.g. if the fee is 1% (or 0.01), return 100. * @returns rewardInverse The inverse of the reward */ getRewardInverse(): Promise; /** * Get payout amount in `_token` denomination for role `_role` in task `_id`. * @param _id Id of the task * @param _role Id of the role, as defined in TaskRole enum * @param _token Address of the token, `0x0` value indicates Ether * @returns amount Payout amount */ getTaskPayout( _id: BigNumberish, _role: BigNumberish, _token: string ): Promise; /** * Set `_token` payout for manager in task `_id` to `_amount`. * @param _amount Payout amount * @param _id Id of the task * @param _token Address of the token, `0x0` value indicates Ether */ setTaskManagerPayout( _id: BigNumberish, _token: string, _amount: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * Set `_token` payout for evaluator in task `_id` to `_amount`. * @param _amount Payout amount * @param _id Id of the task * @param _token Address of the token, `0x0` value indicates Ether */ setTaskEvaluatorPayout( _id: BigNumberish, _token: string, _amount: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * Set `_token` payout for worker in task `_id` to `_amount`. * @param _amount Payout amount * @param _id Id of the task * @param _token Address of the token, `0x0` value indicates Ether */ setTaskWorkerPayout( _id: BigNumberish, _token: string, _amount: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * 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. * @param _evaluatorAmount Payout amount for evaluator * @param _id Id of the task * @param _managerAmount Payout amount for manager * @param _token Address of the token, `0x0` value indicates Ether * @param _workerAmount Payout amount for worker */ setAllTaskPayouts( _id: BigNumberish, _token: string, _managerAmount: BigNumberish, _evaluatorAmount: BigNumberish, _workerAmount: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * 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. * @param _id Id of the task * @param _role Id of the role, as defined in TaskRole enum * @param _token Address of the token, `0x0` value indicates Ether */ claimTaskPayout( _id: BigNumberish, _role: BigNumberish, _token: string, overrides?: TransactionOverrides ): Promise; /** * 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`. * @param _token Address of the token used for reward payout * @param branchMask The branchmask of the proof * @param key Some Reputation hash tree key * @param siblings The siblings of the proof * @param value Reputation value */ startNextRewardPayout( _token: string, key: Arrayish, value: Arrayish, branchMask: BigNumberish, siblings: Arrayish[], overrides?: TransactionOverrides ): Promise; /** * 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. * @param _payoutId Id of the reward payout * @param _squareRoots 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. * @param branchMask The branchmask of the proof * @param key Some Reputation hash tree key * @param siblings The siblings of the proof * @param value Reputation value */ claimRewardPayout( _payoutId: BigNumberish, _squareRoots: BigNumberish[], key: Arrayish, value: Arrayish, branchMask: BigNumberish, siblings: Arrayish[], overrides?: TransactionOverrides ): Promise; /** * Get useful information about specific reward payout. * @param _payoutId Id of the reward payout * @returns 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. */ getRewardPayoutInfo( _payoutId: BigNumberish ): Promise<{ reputationState: string; colonyWideReputation: BigNumber; totalTokens: BigNumber; amount: BigNumber; tokenAddress: string; blockTimestamp: BigNumber; 0: string; 1: BigNumber; 2: BigNumber; 3: BigNumber; 4: string; 5: BigNumber; }>; /** * 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. * @param _payoutId Id of the reward payout */ finalizeRewardPayout( _payoutId: BigNumberish, overrides?: TransactionOverrides ): Promise; /** * For the reward funding pot (e.g. id: 0) this returns (0, 0, 0). * Get the non-mapping properties of a pot by id. * @param _id Id of the pot which details to get * @returns 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 */ getFundingPot( _id: BigNumberish ): Promise<{ associatedType: number; associatedTypeId: BigNumber; payoutsWeCannotMake: BigNumber; 0: number; 1: BigNumber; 2: BigNumber; }>; /** * Get the number of funding pots in the colony. * @returns count The funding pots count */ getFundingPotCount(): Promise; /** * Get the `_token` balance of pot with id `_potId`. * @param _potId Id of the funding pot * @param _token Address of the token, `0x0` value indicates Ether * @returns balance Funding pot supply balance */ getFundingPotBalance( _potId: BigNumberish, _token: string ): Promise; /** * Get the assigned `_token` payouts of pot with id `_potId`. * @param _potId Id of the funding pot * @param _token Address of the token, `0x0` value indicates Ether * @returns payout Funding pot payout amount */ getFundingPotPayout(_potId: BigNumberish, _token: string): Promise; /** * Move a given amount: `_amount` of `_token` funds from funding pot with id `_fromPot` to one with id `_toPot`. * @param _amount Amount of funds * @param _fromChildSkillIndex The child index in `_permissionDomainId` where we can find the domain for `_fromPotId` * @param _fromPot Funding pot id providing the funds * @param _permissionDomainId The domainId in which I have the permission to take this action * @param _toChildSkillIndex The child index in `_permissionDomainId` where we can find the domain for `_toPotId` * @param _toPot Funding pot id receiving the funds * @param _token Address of the token, `0x0` value indicates Ether */ moveFundsBetweenPots( _permissionDomainId: BigNumberish, _fromChildSkillIndex: BigNumberish, _toChildSkillIndex: BigNumberish, _fromPot: BigNumberish, _toPot: BigNumberish, _amount: BigNumberish, _token: string, overrides?: TransactionOverrides ): Promise; /** * 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. * @param _token Address of the token, `0x0` value indicates Ether */ claimColonyFunds( _token: string, overrides?: TransactionOverrides ): Promise; /** * Get the total amount of tokens `_token` minus amount reserved to be paid to the reputation and token holders as rewards. * @param _token Address of the token, `0x0` value indicates Ether * @returns amount Total amount of tokens in funding pots other than the rewards pot (id 0) */ getNonRewardPotsTotal(_token: string): Promise; filters: { ColonyInitialised(colonyNetwork: null, token: null): EventFilter; ColonyBootstrapped(users: null, amounts: null): EventFilter; ColonyUpgraded(oldVersion: null, newVersion: null): EventFilter; ColonyRoleSet( user: string | null, domainId: BigNumberish | null, role: BigNumberish | null, setTo: null ): EventFilter; ColonyFundsMovedBetweenFundingPots( fromPot: BigNumberish | null, toPot: BigNumberish | null, amount: null, token: null ): EventFilter; ColonyFundsClaimed( token: null, fee: null, payoutRemainder: null ): EventFilter; RewardPayoutCycleStarted(rewardPayoutId: null): EventFilter; RewardPayoutCycleEnded(rewardPayoutId: null): EventFilter; RewardPayoutClaimed( rewardPayoutId: null, user: null, fee: null, rewardRemainder: null ): EventFilter; ColonyRewardInverseSet(rewardInverse: null): EventFilter; PaymentAdded(paymentId: null): EventFilter; TaskAdded(taskId: null): EventFilter; TaskBriefSet( taskId: BigNumberish | null, specificationHash: null ): EventFilter; TaskDueDateSet(taskId: BigNumberish | null, dueDate: null): EventFilter; TaskDomainSet( taskId: BigNumberish | null, domainId: BigNumberish | null ): EventFilter; TaskSkillSet( taskId: BigNumberish | null, skillId: BigNumberish | null ): EventFilter; TaskRoleUserSet( taskId: BigNumberish | null, role: null, user: string | null ): EventFilter; TaskPayoutSet( taskId: BigNumberish | null, role: null, token: null, amount: null ): EventFilter; TaskDeliverableSubmitted( taskId: BigNumberish | null, deliverableHash: null ): EventFilter; TaskCompleted(taskId: BigNumberish | null): EventFilter; TaskWorkRatingRevealed( taskId: BigNumberish | null, role: null, rating: null ): EventFilter; TaskFinalized(taskId: BigNumberish | null): EventFilter; PayoutClaimed( fundingPotId: BigNumberish | null, token: null, amount: null ): EventFilter; TaskCanceled(taskId: BigNumberish | null): EventFilter; DomainAdded(domainId: null): EventFilter; FundingPotAdded(fundingPotId: null): EventFilter; }; estimate: { approveExitRecovery(): Promise; exitRecoveryMode(): Promise; numRecoveryRoles(): Promise; setStorageSlotRecovery( _slot: BigNumberish, _value: Arrayish ): Promise; isInRecoveryMode(): Promise; checkNotAdditionalProtectedVariable( _slot: BigNumberish ): Promise; removeRecoveryRole(_user: string): Promise; setRecoveryRole(_user: string): Promise; enterRecoveryMode(): Promise; authority(): Promise; owner(): Promise; version(): Promise; upgrade(_newVersion: BigNumberish): Promise; finishUpgrade2To3(): Promise; finishUpgrade(): Promise; getColonyNetwork(): Promise; getToken(): Promise; setRootRole(_user: string, _setTo: boolean): Promise; setArbitrationRole( _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _user: string, _domainId: BigNumberish, _setTo: boolean ): Promise; setArchitectureRole( _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _user: string, _domainId: BigNumberish, _setTo: boolean ): Promise; setFundingRole( _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _user: string, _domainId: BigNumberish, _setTo: boolean ): Promise; setAdministrationRole( _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _user: string, _domainId: BigNumberish, _setTo: boolean ): Promise; hasUserRole( _user: string, _domainId: BigNumberish, _role: BigNumberish ): Promise; initialiseColony( _colonyNetworkAddress: string, _token: string ): Promise; bootstrapColony( _users: string[], _amount: BigNumberish[] ): Promise; mintTokens(_wad: BigNumberish): Promise; registerColonyLabel( colonyName: string, orbitdb: string ): Promise; updateColonyOrbitDB(orbitdb: string): Promise; addDomain( _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _parentDomainId: BigNumberish ): Promise; getDomain(_id: BigNumberish): Promise; getDomainCount(): Promise; verifyReputationProof( key: Arrayish, value: Arrayish, branchMask: BigNumberish, siblings: Arrayish[] ): Promise; addPayment( _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _recipient: string, _token: string, _amount: BigNumberish, _domainId: BigNumberish, _skillId: BigNumberish ): Promise; finalizePayment( _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _id: BigNumberish ): Promise; setPaymentRecipient( _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _id: BigNumberish, _recipient: string ): Promise; setPaymentDomain( _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _id: BigNumberish, _domainId: BigNumberish ): Promise; setPaymentSkill( _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _id: BigNumberish, _skillId: BigNumberish ): Promise; setPaymentPayout( _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _id: BigNumberish, _token: string, _amount: BigNumberish ): Promise; getPayment(_id: BigNumberish): Promise; claimPayment(_id: BigNumberish, _token: string): Promise; getPaymentCount(): Promise; makeTask( _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish, _specificationHash: Arrayish, _domainId: BigNumberish, _skillId: BigNumberish, _dueDate: BigNumberish ): Promise; getTaskCount(): Promise; getTaskChangeNonce(_id: BigNumberish): Promise; executeTaskChange( _sigV: BigNumberish[], _sigR: Arrayish[], _sigS: Arrayish[], _mode: BigNumberish[], _value: BigNumberish, _data: Arrayish ): Promise; executeTaskRoleAssignment( _sigV: BigNumberish[], _sigR: Arrayish[], _sigS: Arrayish[], _mode: BigNumberish[], _value: BigNumberish, _data: Arrayish ): Promise; submitTaskWorkRating( _id: BigNumberish, _role: BigNumberish, _ratingSecret: Arrayish ): Promise; revealTaskWorkRating( _id: BigNumberish, _role: BigNumberish, _rating: BigNumberish, _salt: Arrayish ): Promise; generateSecret(_salt: Arrayish, _value: BigNumberish): Promise; getTaskWorkRatingSecretsInfo(_id: BigNumberish): Promise; getTaskWorkRatingSecret( _id: BigNumberish, _role: BigNumberish ): Promise; setTaskManagerRole( _id: BigNumberish, _user: string, _permissionDomainId: BigNumberish, _childSkillIndex: BigNumberish ): Promise; setTaskEvaluatorRole(_id: BigNumberish, _user: string): Promise; setTaskWorkerRole(_id: BigNumberish, _user: string): Promise; removeTaskEvaluatorRole(_id: BigNumberish): Promise; removeTaskWorkerRole(_id: BigNumberish): Promise; setTaskSkill(_id: BigNumberish, _skillId: BigNumberish): Promise; setTaskDomain( _id: BigNumberish, _domainId: BigNumberish ): Promise; setTaskBrief( _id: BigNumberish, _specificationHash: Arrayish ): Promise; setTaskDueDate( _id: BigNumberish, _dueDate: BigNumberish ): Promise; submitTaskDeliverable( _id: BigNumberish, _deliverableHash: Arrayish ): Promise; submitTaskDeliverableAndRating( _id: BigNumberish, _deliverableHash: Arrayish, _ratingSecret: Arrayish ): Promise; finalizeTask(_id: BigNumberish): Promise; cancelTask(_id: BigNumberish): Promise; completeTask(_id: BigNumberish): Promise; getTask(_id: BigNumberish): Promise; getTaskRole(_id: BigNumberish, _role: BigNumberish): Promise; setRewardInverse(_rewardInverse: BigNumberish): Promise; getRewardInverse(): Promise; getTaskPayout( _id: BigNumberish, _role: BigNumberish, _token: string ): Promise; setTaskManagerPayout( _id: BigNumberish, _token: string, _amount: BigNumberish ): Promise; setTaskEvaluatorPayout( _id: BigNumberish, _token: string, _amount: BigNumberish ): Promise; setTaskWorkerPayout( _id: BigNumberish, _token: string, _amount: BigNumberish ): Promise; setAllTaskPayouts( _id: BigNumberish, _token: string, _managerAmount: BigNumberish, _evaluatorAmount: BigNumberish, _workerAmount: BigNumberish ): Promise; claimTaskPayout( _id: BigNumberish, _role: BigNumberish, _token: string ): Promise; startNextRewardPayout( _token: string, key: Arrayish, value: Arrayish, branchMask: BigNumberish, siblings: Arrayish[] ): Promise; claimRewardPayout( _payoutId: BigNumberish, _squareRoots: BigNumberish[], key: Arrayish, value: Arrayish, branchMask: BigNumberish, siblings: Arrayish[] ): Promise; getRewardPayoutInfo(_payoutId: BigNumberish): Promise; finalizeRewardPayout(_payoutId: BigNumberish): Promise; getFundingPot(_id: BigNumberish): Promise; getFundingPotCount(): Promise; getFundingPotBalance( _potId: BigNumberish, _token: string ): Promise; getFundingPotPayout( _potId: BigNumberish, _token: string ): Promise; moveFundsBetweenPots( _permissionDomainId: BigNumberish, _fromChildSkillIndex: BigNumberish, _toChildSkillIndex: BigNumberish, _fromPot: BigNumberish, _toPot: BigNumberish, _amount: BigNumberish, _token: string ): Promise; claimColonyFunds(_token: string): Promise; getNonRewardPotsTotal(_token: string): Promise; }; }