diff --git a/README.md b/README.md index bb78fceaa..73c92a6d9 100644 --- a/README.md +++ b/README.md @@ -154,18 +154,14 @@ Done 🎊 ### To upgrade to a new colonyNetwork version -1) Add the version to `constants.ts` in `ColonyVersion` -2) Change the `CurrentVersion` variable to the one you just added +1) Add the version to `versions.ts` in `ColonyVersion` as well as the network git tag to `releaseMaps` 3) Add the git tag to `src/constants.ts` release map 4) _Optional:_ If you are tracking a development branch instead of a static tag or commit, make sure to pull the latest changes, otherwise the contracts generated will be exactly the same as your last ones -- _this is a step often forgotten when using a dev version_ 5) If needed: add new contracts that need clients to the `contractsToBuild` array in `scripts/build-contracts.ts` 6) Run ```shell -DISABLE_DOCKER=true npm run build-contracts -- -V=X +npm run build-contracts ``` - -where `X` is the version number you just added (the incremental integer of the `ColonyVersion` enum). - This will create a new folder: `src/contracts/X` containing all the type definitions you'll need to implement the new colony client. 7) Update the following lines in `ColonyNetworkClient.ts` to reflect the new version: @@ -178,6 +174,18 @@ import { IColonyNetwork } from '../contracts/X/IColonyNetwork'; 8) Update all the other contract imports in the non-colony clients, even if they haven't been upgraded (just in case). Then make adjustments to the clients to reflect the contract changes (typescript will tell you, where to make changes). Also add necessary helper functions (e.g. `withProofs` functions) for newly added methods. The newly added methods and their required roles can be found in [this file](https://github.com/JoinColony/colonyNetwork/blob/develop/contracts/colony/ColonyAuthority.sol) (and by diffing the generated interface files). +### To add new extension contract versions: +1. Add the new version and corresponding git tag for one or more extesions inside `versions.ts` +2. Run `npm run build-contracts` _-- this will build the network contracts for the extensions using `typechain`_ +3. Run `npm run build-clients` _-- this will build basic clients and addon files for your new extension versions_ +4. If you need extra methods added to your client _(helpers like `withProofs`)_, add them inside the `Addon` file that you'll find in the client's folder _(don't forget to also add the estimate method)_ + +Eg: +```js +'/src/clients/Extensions/OneTxPayment/1/OneTxPaymentClient.ts' // the OneTxPayment extension client +'/src/clients/Extensions/OneTxPayment/1/OneTxPaymentClientAddons.ts' // the OneTxPayment extension client addons +``` + ## License GPL-3.0 diff --git a/package-lock.json b/package-lock.json index 88b090e82..0f6373539 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@colony/colony-js", - "version": "3.1.2", + "version": "v4.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -303,6 +303,12 @@ "resolve-from": "^5.0.0" }, "dependencies": { + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, "find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -1579,9 +1585,9 @@ "dev": true }, "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", + "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", "dev": true }, "capture-exit": { @@ -1915,6 +1921,14 @@ "requires": { "camelcase": "^5.0.0", "decamelize": "^1.2.0" + }, + "dependencies": { + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + } } } } @@ -4854,6 +4868,12 @@ "color-convert": "^2.0.1" } }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, "chalk": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", @@ -7767,6 +7787,14 @@ "requires": { "camelcase": "^5.0.0", "decamelize": "^1.2.0" + }, + "dependencies": { + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + } } }, "yn": { diff --git a/package.json b/package.json index 2e63aff1d..d46ecdc0c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@colony/colony-js", - "version": "3.1.2", + "version": "v4.0.0", "main": "lib/index.js", "module": "lib-esm/index.js", "license": "GPL-3.0-only", @@ -14,7 +14,9 @@ "compile-esm": "tsc -p tsconfig.build.json -m es6 --outDir lib-esm", "copy-declarations": "copyfiles -u 1 src/contracts/**/*.d.ts lib && copyfiles -u 1 src/contracts/**/*.d.ts lib-esm", "build-docs": "typedoc --out docs src/index.ts", - "build-contracts": "ts-node -P scripts/tsconfig-scripts.json scripts/build-contracts.ts", + "build-contracts": "DISABLE_DOCKER=true npm run build-contracts:docker", + "build-contracts:docker": "ts-node -P scripts/tsconfig-scripts.json scripts/build-contracts.ts", + "build-clients": "ts-node -P scripts/tsconfig-scripts.json scripts/build-clients.ts", "prepublishOnly": "npm test && npm run build" }, "devDependencies": { @@ -26,6 +28,7 @@ "@types/yargs": "^15.0.4", "@typescript-eslint/eslint-plugin": "^2.24.0", "@typescript-eslint/parser": "^2.24.0", + "camelcase": "^6.2.0", "copyfiles": "^2.2.0", "eslint": "^6.8.0", "eslint-config-airbnb-base": "^14.1.0", diff --git a/scripts/build-clients.ts b/scripts/build-clients.ts new file mode 100644 index 000000000..d6b63406b --- /dev/null +++ b/scripts/build-clients.ts @@ -0,0 +1,89 @@ +/* + * - Get clients and versions + * - Check if they exist + * - Generate client for version + */ +import { resolve as resolvePath } from 'path'; +import { existsSync, mkdirSync, writeFileSync } from 'fs'; + +import { Extension } from '../src/clients/Extensions/colonyContractExtensions'; +import { + CurrentCoinMachineVersion, + CurrentOneTxPaymentVersion, + CurrentVotingReputationVersion, +} from '../src/versions'; +import getClientTemplate from './client-templates/extension-client-generator'; +import getClientAddonTemplate from './client-templates/extension-client-addons-generator'; + +const extensionContracts = [ + Extension.OneTxPayment, + Extension.CoinMachine, + Extension.VotingReputation, +]; + +const currentExtensionsVersions = { + [Extension.OneTxPayment]: CurrentOneTxPaymentVersion, + [Extension.CoinMachine]: CurrentCoinMachineVersion, + [Extension.VotingReputation]: CurrentVotingReputationVersion, +}; + +const getExtensionVersionedPath = ( + extensionName: Extension, + extensionVersion: number, +): string => + resolvePath( + __dirname, + '../src/clients/Extensions', + extensionName, + String(extensionVersion), + ); + +const checkClientVersionExistance = ( + extensionName: Extension, + extensionVersion: number, +): boolean => { + const extensionPath = getExtensionVersionedPath( + extensionName, + extensionVersion, + ); + return existsSync(`${extensionPath}/${extensionName}Client.ts`); +}; + +const generateExtensionClient = async ( + extensionName: Extension, + extensionVersion: number, +): Promise => { + const extensionPath = getExtensionVersionedPath( + extensionName, + extensionVersion, + ); + const client = getClientTemplate(extensionName, extensionVersion); + const addons = getClientAddonTemplate(extensionName, extensionVersion); + + mkdirSync(extensionPath, { recursive: true }); + + writeFileSync(`${extensionPath}/${extensionName}Client.ts`, client, { + encoding: 'utf8', + }); + writeFileSync(`${extensionPath}/${extensionName}ClientAddons.ts`, addons, { + encoding: 'utf8', + }); +}; + +const orchestrateBuild = async (): Promise => { + await Promise.all( + extensionContracts.map(async (extensionContract) => { + const extensionVersion = currentExtensionsVersions[extensionContract]; + const clientExists = checkClientVersionExistance( + extensionContract, + extensionVersion, + ); + + if (!clientExists) { + await generateExtensionClient(extensionContract, extensionVersion); + } + }), + ); +}; + +orchestrateBuild(); diff --git a/scripts/build-contracts.ts b/scripts/build-contracts.ts index 26712e18f..33fc2e4c7 100644 --- a/scripts/build-contracts.ts +++ b/scripts/build-contracts.ts @@ -1,12 +1,23 @@ import { resolve as resolvePath } from 'path'; import { copyFileSync } from 'fs'; import { promisify } from 'util'; - -import { options } from 'yargs'; +import * as camelcase from 'camelcase'; import * as execute from 'execa'; import * as rimraf from 'rimraf'; -import { ColonyVersion, CurrentVersion, releaseMap } from '../src/constants'; +import { + CurrentColonyVersion, + releaseMap, + CurrentCoinMachineVersion, + CurrentOneTxPaymentVersion, + CurrentVotingReputationVersion, +} from '../src/versions'; +import { Extension } from '../src/clients/Extensions/colonyContractExtensions'; + +/* + * State Vars + */ +let currentNetworkTag: string; const rimrafPromise = promisify(rimraf); @@ -19,7 +30,17 @@ const vendorTokenDir = resolvePath(__dirname, '../vendor/tokens'); const contractsToBuild = ['IColony', 'IColonyNetwork', 'TokenLocking']; -const extensionContracts = ['OneTxPayment', 'CoinMachine']; +const extensionContracts = [ + Extension.OneTxPayment, + Extension.CoinMachine, + Extension.VotingReputation, +]; + +const currentExtensionsVersions = { + [Extension.OneTxPayment]: CurrentOneTxPaymentVersion, + [Extension.CoinMachine]: CurrentCoinMachineVersion, + [Extension.VotingReputation]: CurrentVotingReputationVersion, +}; const tokenContracts = [ // ERC20 tokens @@ -27,23 +48,20 @@ const tokenContracts = [ 'TokenERC20', 'TokenSAI', ]; - -const args = options({ - V: { type: 'number', alias: 'contract-version', demandOption: true }, -}).argv; - -const version = args.V as ColonyVersion; +const version = CurrentColonyVersion; const outRoot = resolvePath(__dirname, '../src/contracts'); -const outDir = `${outRoot}/${version}`; +const colonyContractsOutDir = `${outRoot}/colony/${version}`; const deployDir = `${outRoot}/deploy`; -if (!releaseMap[version]) { - throw new Error(`Version ${version} of colonyNetwork doesn't seem to exist`); -} +const provisionNetworkVendor = async (tag: string): Promise => { + if (!tag) { + throw new Error( + `Version ${version} of colonyNetwork doesn't seem to exist`, + ); + } -const buildContracts = async (): Promise => { - console.info(`Checking out network tag ${releaseMap[version]}`); - const git = execute('git', ['checkout', releaseMap[version]], { + console.info(`Checking out network tag ${tag}`); + const git = execute('git', ['checkout', tag], { cwd: networkDir, }); if (git.stdout) git.stdout.pipe(process.stdout); @@ -68,23 +86,19 @@ const buildContracts = async (): Promise => { }); if (truffle.stdout) truffle.stdout.pipe(process.stdout); await truffle; +}; - if (version === CurrentVersion) { - // Copy contract json files of latest version for deployment purposes - copyFileSync(`${tokenBuildDir}/Token.json`, `${deployDir}/Token.json`); - copyFileSync( - `${tokenBuildDir}/TokenAuthority.json`, - `${deployDir}/TokenAuthority.json`, - ); - - /* - * Add extensions contracts to be built - */ - contractsToBuild.push(...extensionContracts); +const buildColonyContracts = async (): Promise => { + // @ts-ignore + const releaseTag: string = releaseMap.colony[version]; - // Just build token contracts for the latest version - contractsToBuild.push(...tokenContracts); + if (currentNetworkTag !== releaseTag) { + await provisionNetworkVendor(releaseTag); + currentNetworkTag = releaseTag; } + + // Just build token contracts for the latest version + contractsToBuild.push(...tokenContracts); const contractGlobs = `{${contractsToBuild .map((c) => `${c}.json`) .join(',')}}`; @@ -93,11 +107,45 @@ const buildContracts = async (): Promise => { '--target', 'ethers-v4', '--outDir', - outDir, + colonyContractsOutDir, `{${networkDir}/{${relativeBuildDir},${relativeTokenDir}}/${contractGlobs},${vendorTokenDir}/${contractGlobs}}`, ]); if (typechain.stdout) typechain.stdout.pipe(process.stdout); await typechain; }; -buildContracts(); +const buildExtensionContracts = async (): Promise => { + await Promise.all( + extensionContracts.map(async (extensionContract) => { + const extensionVersion = currentExtensionsVersions[extensionContract]; + const releaseTag: string = + // @ts-ignore + releaseMap.extension[camelcase(extensionContract)][extensionVersion]; + + if (currentNetworkTag !== releaseTag) { + await provisionNetworkVendor(releaseTag); + currentNetworkTag = releaseTag; + } + + const extensionOutDir = `${outRoot}/extensions/${camelcase( + extensionContract, + )}/${currentExtensionsVersions[extensionContract]}`; + const typechain = execute('typechain', [ + '--target', + 'ethers-v4', + '--outDir', + extensionOutDir, + `${networkDir}/${relativeBuildDir}/${extensionContract}.json`, + ]); + if (typechain.stdout) typechain.stdout.pipe(process.stdout); + await typechain; + }), + ); +}; + +const orchestrateBuild = async (): Promise => { + await buildColonyContracts(); + await buildExtensionContracts(); +}; + +orchestrateBuild(); diff --git a/scripts/client-templates/extension-client-addons-generator.ts b/scripts/client-templates/extension-client-addons-generator.ts new file mode 100644 index 000000000..aa245e587 --- /dev/null +++ b/scripts/client-templates/extension-client-addons-generator.ts @@ -0,0 +1,131 @@ +/* eslint-disable import/no-extraneous-dependencies, max-len */ + +import * as camelcase from 'camelcase'; +import { execSync } from 'child_process'; + +import { name, version } from '../../package.json'; +import { Extension } from '../../src/clients/Extensions/colonyContractExtensions'; +import { getExtensionClientRelativePaths } from '../scriptUtils'; + +const getHeader = ( + extensionName: Extension, + extensionVersion: number, +): string => { + const currentNetworkTag = execSync('git describe --tags', { + cwd: 'vendor/colonyNetwork', + }); + return `/* + * ${camelcase(extensionName, { + pascalCase: true, + })} Client Version ${extensionVersion} Addons autogenerated by + * ${name} version ${version} from colonyNetwork tag '${String( + currentNetworkTag, + ).trim()}' + * + * Feel free to modify as needed! + */`; +}; + +const getClientImports = ( + extensionName: Extension, + extensionVersion: number, +): string => { + const { commonExtensions } = getExtensionClientRelativePaths( + extensionName, + extensionVersion, + ); + return `import { ExtendedIColony } from '${commonExtensions}'; + +import { ${camelcase(extensionName, { + pascalCase: true, + })}Client } from './${camelcase(extensionName, { + pascalCase: true, + })}Client';`; +}; + +const getClientContents = (extensionName: Extension): string => `/* + * Extra client methods + */ +export const get${camelcase(extensionName, { + pascalCase: true, +})}ClientAddons = ( + ${camelcase(extensionName)}Client: ${camelcase(extensionName, { + pascalCase: true, +})}Client, + colonyClient: ExtendedIColony, +): Record => ({ + /* + * Example withProofs method + * + * contractCallWithProofs: async ( + * _domainId: BigNumberish, + * overrides?: TransactionOverrides, + * ): Promise => { + * const [extensionPDID, extensionCSI] = await getExtensionPermissionProofs( + * colonyClient, + * _domainId, + * ${camelcase(extensionName)}Client.address, + * ); + * return ${camelcase( + extensionName, + )}Client.contractCall(extensionPDID, extensionCSI, _domainId, overrides); + * }, + */ +}); + +/* + * Extra client methods estimates + * + * These are needed! Don't skip them! + */ +export const get${camelcase(extensionName, { + pascalCase: true, +})}ClientEstimateAddons = ( + ${camelcase(extensionName)}Client: ${camelcase(extensionName, { + pascalCase: true, +})}Client, + colonyClient: ExtendedIColony, +): Record => ({ + /* + * Example withProofs estimate method + * (Mostly the same as the actual method, just that it calls the client + * estimate contract call and doesn't pass in the transaction overrides) + * + * contractCallWithProofs: async ( + * _domainId: BigNumberish, + * ): Promise => { + * const [extensionPDID, extensionCSI] = await getExtensionPermissionProofs( + * colonyClient, + * _domainId, + * ${camelcase(extensionName)}Client.address, + * ); + * return ${camelcase( + extensionName, + )}Client.estimate.contractCall(extensionPDID, extensionCSI, _domainId); + * }, + */ +});`; + +const getTemplate = ( + extensionName: Extension, + extensionVersion: number, +): string => { + const header = getHeader(extensionName, extensionVersion); + const imports = getClientImports(extensionName, extensionVersion); + const content = getClientContents(extensionName); + + return `${header} + +/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any */ + +${imports} + +${content} + +/* eslint-enable */ +`; +}; + +export default getTemplate; + +/* eslint-enable */ diff --git a/scripts/client-templates/extension-client-generator.ts b/scripts/client-templates/extension-client-generator.ts new file mode 100644 index 000000000..10dcdd089 --- /dev/null +++ b/scripts/client-templates/extension-client-generator.ts @@ -0,0 +1,153 @@ +/* eslint-disable import/no-extraneous-dependencies */ + +import * as camelcase from 'camelcase'; +import { execSync } from 'child_process'; + +import { name, version } from '../../package.json'; +import { Extension } from '../../src/clients/Extensions/colonyContractExtensions'; +import { getExtensionClientRelativePaths } from '../scriptUtils'; + +const getHeader = ( + extensionName: Extension, + extensionVersion: number, +): string => { + const currentNetworkTag = execSync('git describe --tags', { + cwd: 'vendor/colonyNetwork', + }); + return `/* + * ${camelcase(extensionName, { + pascalCase: true, + })} Client Version ${extensionVersion} autogenerated by + * ${name} version ${version} from colonyNetwork tag '${String( + currentNetworkTag, + ).trim()}' + * + * Feel free to modify as needed! + */`; +}; + +const getClientImports = ( + extensionName: Extension, + extensionVersion: number, +): string => { + const { + constants, + contracts, + commonExtensions, + factories, + } = getExtensionClientRelativePaths(extensionName, extensionVersion); + return `import { ClientType } from '${constants}'; +import { ${camelcase(extensionName, { + pascalCase: true, + })}__factory as ${camelcase(extensionName, { + pascalCase: true, + })}Factory } from '${factories}'; +import { ${camelcase(extensionName, { + pascalCase: true, + })} } from '${contracts}'; +import { ExtendedIColony } from '${commonExtensions}'; + +import { + get${camelcase(extensionName, { pascalCase: true })}ClientAddons, + get${camelcase(extensionName, { pascalCase: true })}ClientEstimateAddons, +} from './${camelcase(extensionName, { pascalCase: true })}ClientAddons';`; +}; + +const getClientContents = ( + extensionName: Extension, +): string => `type ${camelcase(extensionName, { + pascalCase: true, +})}Estimate = ${camelcase(extensionName, { pascalCase: true })}['estimate']; +interface ${camelcase(extensionName, { + pascalCase: true, +})}EstimateWithAddons extends ${camelcase(extensionName, { + pascalCase: true, +})}Estimate { + /* + * @TODO These needs to be specifically determined once we can integrate + * static code analysis into this lib + */ + [key: string]: any; +} + +export interface ${camelcase(extensionName, { + pascalCase: true, +})}Client extends ${camelcase(extensionName, { pascalCase: true })} { + clientType: ClientType.${camelcase(extensionName, { + pascalCase: true, + })}Client; + estimate: ${camelcase(extensionName, { pascalCase: true })}EstimateWithAddons; + /* + * @TODO These needs to be specifically determined once we can integrate + * static code analysis into this lib + */ + [key: string]: any; +} + +const get${camelcase(extensionName, { pascalCase: true })}Client = ( + address: string, + colonyClient: ExtendedIColony, +): ${camelcase(extensionName, { pascalCase: true })}Client => { + const ${camelcase(extensionName)}Client = ${camelcase(extensionName, { + pascalCase: true, +})}Factory.connect( + address, + colonyClient.signer || colonyClient.provider, + ) as ${camelcase(extensionName, { pascalCase: true })}Client; + ${camelcase(extensionName)}Client.clientType = ClientType.${camelcase( + extensionName, + { + pascalCase: true, + }, +)}Client; + + const addons = get${camelcase(extensionName, { + pascalCase: true, + })}ClientAddons(${camelcase(extensionName)}Client, colonyClient); + const addonsEstimate = get${camelcase(extensionName, { + pascalCase: true, + })}ClientEstimateAddons( + ${camelcase(extensionName)}Client, + colonyClient, + ); + + Object.keys(addons).map((addonName) => { + ${camelcase(extensionName)}Client[addonName] = addons[addonName]; + return null; + }); + + Object.keys(addonsEstimate).map((addonName) => { + ${camelcase( + extensionName, + )}Client.estimate[addonName] = addonsEstimate[addonName]; + return null; + }); + + return ${camelcase(extensionName)}Client; +}; + +export default get${camelcase(extensionName, { pascalCase: true })}Client;`; + +const getTemplate = ( + extensionName: Extension, + extensionVersion: number, +): string => { + const header = getHeader(extensionName, extensionVersion); + const imports = getClientImports(extensionName, extensionVersion); + const content = getClientContents(extensionName); + + return `${header} + +/* eslint-disable @typescript-eslint/no-explicit-any */ + +${imports} + +${content} + +/* eslint-enable */ +`; +}; + +export default getTemplate; + +/* eslint-enable */ diff --git a/scripts/scriptUtils.ts b/scripts/scriptUtils.ts new file mode 100644 index 000000000..03efca752 --- /dev/null +++ b/scripts/scriptUtils.ts @@ -0,0 +1,39 @@ +import { relative as relativePath, resolve as resolvePath } from 'path'; +import * as camelcase from 'camelcase'; +import { Extension } from '../src/clients/Extensions/colonyContractExtensions'; + +const extensionsBasePath = resolvePath(__dirname, '../src/clients/Extensions'); + +interface RelativePaths { + base: string; + constants: string; + commonExtensions: string; + contracts: string; + factories: string; +} + +export const getExtensionClientRelativePaths = ( + extensionName: Extension, + extensionVersion: number, +): RelativePaths => { + return { + base: extensionsBasePath, + constants: relativePath(extensionsBasePath, '../constants'), + commonExtensions: relativePath( + extensionsBasePath, + '../clients/Colony/extensions/commonExtensions', + ), + contracts: relativePath( + extensionsBasePath, + `../contracts/extensions/${camelcase( + extensionName, + )}/${extensionVersion}/${camelcase(extensionName, { pascalCase: true })}`, + ), + factories: relativePath( + extensionsBasePath, + `../contracts/extensions/${camelcase( + extensionName, + )}/${extensionVersion}/factories/${extensionName}__factory`, + ), + }; +}; diff --git a/scripts/tsconfig-scripts.json b/scripts/tsconfig-scripts.json index 97df68ced..48610a17f 100644 --- a/scripts/tsconfig-scripts.json +++ b/scripts/tsconfig-scripts.json @@ -1,4 +1,3 @@ { "extends": "../tsconfig.json", - "include": ["../versions.ts"] } diff --git a/src/clients/Colony/ColonyClientV1.ts b/src/clients/Colony/ColonyClientV1.ts index 9e22a0bed..a11af4553 100644 --- a/src/clients/Colony/ColonyClientV1.ts +++ b/src/clients/Colony/ColonyClientV1.ts @@ -3,7 +3,7 @@ import { Provider } from 'ethers/providers'; import { IColonyFactory } from '../../contracts/1/IColonyFactory'; import { IColony } from '../../contracts/1/IColony'; -import { ColonyVersion } from '../../constants'; +import { ColonyVersion } from '../../versions'; import { ColonyNetworkClient } from '../ColonyNetworkClient'; import { addExtensions, ExtendedIColony } from './extensions/commonExtensions'; import { diff --git a/src/clients/Colony/ColonyClientV2.ts b/src/clients/Colony/ColonyClientV2.ts index 17a6484fb..e67d5f944 100644 --- a/src/clients/Colony/ColonyClientV2.ts +++ b/src/clients/Colony/ColonyClientV2.ts @@ -3,7 +3,7 @@ import { Provider } from 'ethers/providers'; import { IColonyFactory } from '../../contracts/2/IColonyFactory'; import { IColony } from '../../contracts/2/IColony'; -import { ColonyVersion } from '../../constants'; +import { ColonyVersion } from '../../versions'; import { ColonyNetworkClient } from '../ColonyNetworkClient'; import { addExtensions, ExtendedIColony } from './extensions/commonExtensions'; import { diff --git a/src/clients/Colony/ColonyClientV3.ts b/src/clients/Colony/ColonyClientV3.ts index 4aa726f8c..97e50c9f3 100644 --- a/src/clients/Colony/ColonyClientV3.ts +++ b/src/clients/Colony/ColonyClientV3.ts @@ -3,7 +3,7 @@ import { Provider } from 'ethers/providers'; import { IColonyFactory } from '../../contracts/3/IColonyFactory'; import { IColony } from '../../contracts/3/IColony'; -import { ColonyVersion } from '../../constants'; +import { ColonyVersion } from '../../versions'; import { ColonyNetworkClient } from '../ColonyNetworkClient'; import { ExtendedIColony } from './extensions/commonExtensions'; import { diff --git a/src/clients/Colony/ColonyClientV4.ts b/src/clients/Colony/ColonyClientV4.ts index 9c8c8258b..c800a43fd 100644 --- a/src/clients/Colony/ColonyClientV4.ts +++ b/src/clients/Colony/ColonyClientV4.ts @@ -13,7 +13,7 @@ import { ExtendedEstimateV4, } from './extensions/extensionsV4'; import { getAllAbiEvents, getAbiFunctions } from '../../utils'; -import { ColonyVersion } from '../../constants'; +import { ColonyVersion } from '../../versions'; export interface ColonyClientV4 extends ExtendedIColony, diff --git a/src/clients/Colony/ColonyClientV5.ts b/src/clients/Colony/ColonyClientV5.ts index 2c6dc2e6f..156d78611 100644 --- a/src/clients/Colony/ColonyClientV5.ts +++ b/src/clients/Colony/ColonyClientV5.ts @@ -15,7 +15,7 @@ import { ExtendedEstimateV5, } from './extensions/extensionsV5'; import { getAllAbiEvents, getAbiFunctions } from '../../utils'; -import { ColonyVersion } from '../../constants'; +import { ColonyVersion } from '../../versions'; type ColonyExtensions = Omit, 'addDomainWithProofs'> & ColonyExtensionsV3 & diff --git a/src/clients/Colony/ColonyClientV6.ts b/src/clients/Colony/ColonyClientV6.ts index 1db65b399..ab4049c64 100644 --- a/src/clients/Colony/ColonyClientV6.ts +++ b/src/clients/Colony/ColonyClientV6.ts @@ -4,8 +4,8 @@ import { Provider } from 'ethers/providers'; import { IColonyFactory as IColonyFactoryV3 } from '../../contracts/3/IColonyFactory'; import { IColonyFactory as IColonyFactoryV4 } from '../../contracts/4/IColonyFactory'; import { IColony__factory as IColonyFactoryV5 } from '../../contracts/5/factories/IColony__factory'; -import { IColony__factory as IColonyFactoryV6 } from '../../contracts/6/factories/IColony__factory'; -import { IColony } from '../../contracts/6/IColony'; +import { IColony__factory as IColonyFactoryV6 } from '../../contracts/colony/6/factories/IColony__factory'; +import { IColony } from '../../contracts/colony/6/IColony'; import { ColonyNetworkClient } from '../ColonyNetworkClient'; import { ExtendedIColony } from './extensions/commonExtensions'; import { ColonyExtensionsV3 } from './extensions/extensionsV3'; @@ -17,7 +17,7 @@ import { ExtendedEstimateV6, } from './extensions/extensionsV6'; import { getAllAbiEvents, getAbiFunctions } from '../../utils'; -import { ColonyVersion } from '../../constants'; +import { ColonyVersion } from '../../versions'; type ColonyExtensions = ExtendedIColony & ColonyExtensionsV3 & diff --git a/src/clients/Colony/ColonyClientV7.ts b/src/clients/Colony/ColonyClientV7.ts new file mode 100644 index 000000000..a3862702b --- /dev/null +++ b/src/clients/Colony/ColonyClientV7.ts @@ -0,0 +1,79 @@ +import { Contract, Signer } from 'ethers'; +import { Provider } from 'ethers/providers'; + +import { IColonyFactory as IColonyFactoryV3 } from '../../contracts/3/IColonyFactory'; +import { IColonyFactory as IColonyFactoryV4 } from '../../contracts/4/IColonyFactory'; +import { IColony__factory as IColonyFactoryV5 } from '../../contracts/5/factories/IColony__factory'; +import { IColony__factory as IColonyFactoryV6 } from '../../contracts/colony/6/factories/IColony__factory'; +import { IColony__factory as IColonyFactoryV7 } from '../../contracts/colony/7/factories/IColony__factory'; +import { IColony } from '../../contracts/colony/7/IColony'; +import { IColony as PreviousIColony } from '../../contracts/colony/6/IColony'; +import { ColonyNetworkClient } from '../ColonyNetworkClient'; +import { ExtendedIColony } from './extensions/commonExtensions'; +import { ColonyExtensionsV3 } from './extensions/extensionsV3'; +import { ColonyExtensionsV4 } from './extensions/extensionsV4'; +import { ColonyExtensionsV5 } from './extensions/extensionsV5'; +import { ColonyExtensionsV6 } from './extensions/extensionsV6'; +import { + addExtensions, + ColonyExtensionsV7, + ExtendedEstimateV7, +} from './extensions/extensionsV7'; +import { getAllAbiEvents, getAbiFunctions } from '../../utils'; +import { ColonyVersion } from '../../versions'; + +type ColonyExtensions = Omit< + ExtendedIColony, + 'moveFundsBetweenPotsWithProofs' +> & + ColonyExtensionsV3 & + ColonyExtensionsV4 & + ColonyExtensionsV5 & + ColonyExtensionsV6 & + ColonyExtensionsV7; + +export type ColonyClientV7 = ColonyExtensions & { + clientVersion: ColonyVersion.DandelionLightweightSpaceship; + estimate: ExtendedIColony['estimate'] & ExtendedEstimateV7; +}; + +export default function getColonyClient( + this: ColonyNetworkClient, + address: string, + signerOrProvider: Signer | Provider, +): ColonyClientV7 { + const abiFunctions = getAbiFunctions( + IColonyFactoryV7, + address, + signerOrProvider, + ); + /* + * Get all events, including the ones from v3, as well as the current ones + */ + const abiEvents = getAllAbiEvents( + [ + IColonyFactoryV7, + IColonyFactoryV6, + IColonyFactoryV5, + IColonyFactoryV4, + IColonyFactoryV3, + ], + address, + signerOrProvider, + ); + + /* + * For this to work we have to create our own instance of the contract, so + * that we can pass in the merged abi events + */ + const colonyClientV7 = (new Contract( + address, + [...abiFunctions, ...abiEvents], + signerOrProvider, + ) as unknown) as ColonyClientV7; + + colonyClientV7.clientVersion = ColonyVersion.DandelionLightweightSpaceship; + addExtensions(colonyClientV7, this); + + return colonyClientV7 as ColonyClientV7; +} diff --git a/src/clients/Colony/extensions/commonExtensions.ts b/src/clients/Colony/extensions/commonExtensions.ts index 8986b05fb..c9e2298aa 100644 --- a/src/clients/Colony/extensions/commonExtensions.ts +++ b/src/clients/Colony/extensions/commonExtensions.ts @@ -6,10 +6,10 @@ import { isAddress } from '../../../utils'; import { ClientType, ColonyRole, - ColonyVersion, FundingPotAssociatedType, ROOT_DOMAIN_ID, } from '../../../constants'; +import { ColonyVersion } from '../../../versions'; import { ReputationOracleResponse, ReputationOracleAllMembersResponse, @@ -20,14 +20,16 @@ import { IColony as IColonyV2 } from '../../../contracts/2/IColony'; import { IColony as IColonyV3 } from '../../../contracts/3/IColony'; import { IColony as IColonyV4 } from '../../../contracts/4/IColony'; import { IColony as IColonyV5 } from '../../../contracts/5/IColony'; -import { IColony as IColonyV6 } from '../../../contracts/6/IColony'; +import { IColony as IColonyV6 } from '../../../contracts/colony/6/IColony'; +import { IColony as IColonyV7 } from '../../../contracts/colony/7/IColony'; import { TransactionOverrides } from '../../../contracts/1'; import { IColonyFactory } from '../../../contracts/4/IColonyFactory'; import { - extensionFactoryMap, ExtensionClient, -} from '../colonyContractExtensions'; + Extension, +} from '../../Extensions/colonyContractExtensions'; +import getExtensionVersionClient from '../../Extensions/ExtensionVersionClient'; import { ColonyNetworkClient } from '../../ColonyNetworkClient'; import { TokenClient } from '../../TokenClient'; @@ -43,7 +45,8 @@ type AnyIColony = | IColonyV3 | IColonyV4 | IColonyV5 - | IColonyV6; + | IColonyV6 + | IColonyV7; // This is exposed to type the awkward recovery event client which is basically // just an IColonyV4 @@ -121,7 +124,7 @@ export type ExtendedIColony = T & { getExtensionClient( this: ExtendedIColony, - extensionName: keyof typeof extensionFactoryMap, + extensionName: Extension, ): Promise; deployTokenAuthority( @@ -245,6 +248,9 @@ export const getChildIndex = async ( parentDomainId: BigNumberish, domainId: BigNumberish, ): Promise => { + if (bigNumberify(parentDomainId).eq(bigNumberify(domainId))) { + return MaxUint256; + } const { skillId: parentSkillId } = await contract.getDomain(parentDomainId); const { skillId } = await contract.getDomain(domainId); const { children } = await contract.networkClient.getSkill(parentSkillId); @@ -359,9 +365,39 @@ export const getMoveFundsPermissionProofs = async ( return [fromPermissionDomainId, fromChildSkillIndex, toChildSkillIndex]; }; +export const getExtensionPermissionProofs = async ( + colonyClient: ExtendedIColony, + domainId: BigNumberish, + address?: string, +): Promise<[BigNumberish, BigNumberish]> => { + const [fundingPDID, fundingCSI] = await getPermissionProofs( + colonyClient, + domainId, + ColonyRole.Funding, + address, + ); + const [adminPDID, adminCSI] = await getPermissionProofs( + colonyClient, + domainId, + ColonyRole.Administration, + address, + ); + + if (!fundingPDID.eq(adminPDID) || !fundingCSI.eq(adminCSI)) { + // @TODO: this can surely be improved + throw new Error( + `${ + address || 'User' + } has to have the funding and administration role in the same domain`, + ); + } + + return [adminPDID, adminCSI]; +}; + async function getExtensionClient( this: ExtendedIColony, - extensionName: keyof typeof extensionFactoryMap, + extensionName: Extension, ): Promise { const extensionAddress = await this.networkClient.getExtensionInstallation( getExtensionHash(extensionName), @@ -372,7 +408,17 @@ async function getExtensionClient( `${extensionName} extension is not installed for this colony`, ); } - return extensionFactoryMap[extensionName](extensionAddress, this); + const extensionVersionClient = getExtensionVersionClient( + extensionAddress, + this.signer || this.provider, + ); + const versionBN = await extensionVersionClient.version(); + const version = versionBN.toNumber() as ColonyVersion; + const { + default: getVersionedExtensionClient, + // eslint-disable-next-line import/no-dynamic-require, global-require, @typescript-eslint/no-var-requires, max-len + } = require(`../../Extensions/${extensionName}/${version}/${extensionName}Client`); + return getVersionedExtensionClient(extensionAddress, this); } async function setArchitectureRoleWithProofs( @@ -628,7 +674,9 @@ async function moveFundsBetweenPotsWithProofs( toChildSkillIndex, ] = await getMoveFundsPermissionProofs(this, _fromPot, _toPot); - return this.moveFundsBetweenPots( + return this[ + `moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,address)` + ]( permissionDomainId, fromChildSkillIndex, toChildSkillIndex, @@ -851,7 +899,9 @@ async function estimateMoveFundsBetweenPotsWithProofs( toChildSkillIndex, ] = await getMoveFundsPermissionProofs(this, _fromPot, _toPot); - return this.estimate.moveFundsBetweenPots( + return (this as IColonyV5).estimate[ + `moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,address)` + ]( permissionDomainId, fromChildSkillIndex, toChildSkillIndex, @@ -876,7 +926,8 @@ async function getReputation( const skillIdString = bigNumberify(skillId).toString(); - const rootHash = customRootHash ? customRootHash : await this.networkClient.getReputationRootHash(); + const rootHash = + customRootHash || (await this.networkClient.getReputationRootHash()); const response = await fetch( `${reputationOracleEndpoint}/${network}/${rootHash}/${this.address}/${skillIdString}/${address}`, diff --git a/src/clients/Colony/extensions/extensionsV6.ts b/src/clients/Colony/extensions/extensionsV6.ts index e758cc0ef..82e1843fa 100644 --- a/src/clients/Colony/extensions/extensionsV6.ts +++ b/src/clients/Colony/extensions/extensionsV6.ts @@ -1,4 +1,4 @@ -import { IColony as IColonyV6 } from '../../../contracts/6/IColony'; +import { IColony as IColonyV6 } from '../../../contracts/colony/6/IColony'; import { ColonyNetworkClient } from '../../ColonyNetworkClient'; import { ExtendedIColony } from './commonExtensions'; import { ColonyExtensionsV3 } from './extensionsV3'; diff --git a/src/clients/Colony/extensions/extensionsV7.ts b/src/clients/Colony/extensions/extensionsV7.ts new file mode 100644 index 000000000..ac4bc2fe3 --- /dev/null +++ b/src/clients/Colony/extensions/extensionsV7.ts @@ -0,0 +1,211 @@ +import { ContractTransaction } from 'ethers'; +import { BigNumber, BigNumberish } from 'ethers/utils'; +import { MaxUint256 } from 'ethers/constants'; + +import { TransactionOverrides } from '../../../contracts/3'; +import { IColony as IColonyV7 } from '../../../contracts/colony/7/IColony'; +import { IColony as PreviousIColony } from '../../../contracts/colony/6/IColony'; +import { ColonyNetworkClient } from '../../ColonyNetworkClient'; +import { + ExtendedIColony, + getMoveFundsPermissionProofs, +} from './commonExtensions'; +import { ColonyExtensionsV3 } from './extensionsV3'; +import { ColonyExtensionsV4 } from './extensionsV4'; +import { ColonyExtensionsV5 } from './extensionsV5'; +import { + addExtensions as addExtensionsV6, + ColonyExtensionsV6, + ExtendedEstimateV6, +} from './extensionsV6'; + +type ValidColony = IColonyV7; + +type PreviousVersionsExtensions = Omit< + ExtendedIColony, + 'moveFundsBetweenPotsWithProofs' +> & + ColonyExtensionsV3 & + ColonyExtensionsV4 & + ColonyExtensionsV5 & + ColonyExtensionsV6; + +/* + * Estimates + */ +export interface ExtendedEstimateV7 extends ExtendedEstimateV6 { + moveFundsBetweenPotsWithProofs( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + _fromChildSkillIndex: BigNumberish, + _toChildSkillIndex: BigNumberish, + _fromPot: BigNumberish, + _toPot: BigNumberish, + _amount: BigNumberish, + _token: string, + ): Promise; + // eslint-disable-next-line max-len + 'moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)'( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + _fromChildSkillIndex: BigNumberish, + _toChildSkillIndex: BigNumberish, + _fromPot: BigNumberish, + _toPot: BigNumberish, + _amount: BigNumberish, + _token: string, + ): Promise; + // eslint-disable-next-line max-len + 'moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,address)'( + _permissionDomainId: BigNumberish, + _fromChildSkillIndex: BigNumberish, + _toChildSkillIndex: BigNumberish, + _fromPot: BigNumberish, + _toPot: BigNumberish, + _amount: BigNumberish, + _token: string, + ): Promise; +} + +/* + * Extension Methods + */ +export type ColonyExtensionsV7 = { + moveFundsBetweenPotsWithProofs( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + _fromChildSkillIndex: BigNumberish, + _toChildSkillIndex: BigNumberish, + _fromPot: BigNumberish, + _toPot: BigNumberish, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides, + ): Promise; + // eslint-disable-next-line max-len + 'moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)'( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + _fromChildSkillIndex: BigNumberish, + _toChildSkillIndex: BigNumberish, + _fromPot: BigNumberish, + _toPot: BigNumberish, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides, + ): Promise; + // eslint-disable-next-line max-len + 'moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,address)'( + _permissionDomainId: BigNumberish, + _fromChildSkillIndex: BigNumberish, + _toChildSkillIndex: BigNumberish, + _fromPot: BigNumberish, + _toPot: BigNumberish, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides, + ): Promise; + + estimate: T['estimate'] & ExtendedEstimateV7; +} & PreviousVersionsExtensions; + +/* + * Extension Methods + */ +async function moveFundsBetweenPotsWithProofs( + this: ExtendedIColony, + _fromPot: BigNumberish, + _toPot: BigNumberish, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides, +): Promise { + const [ + permissionDomainId, + fromChildSkillIndex, + toChildSkillIndex, + ] = await getMoveFundsPermissionProofs(this, _fromPot, _toPot); + + return this.moveFundsBetweenPots( + permissionDomainId, + MaxUint256, + permissionDomainId, + fromChildSkillIndex, + toChildSkillIndex, + _fromPot, + _toPot as string, + _amount, + _token, + overrides, + ); +} + +/* + * Estimates + */ +async function estimateMoveFundsBetweenPotsWithProofs( + this: ExtendedIColony, + _fromPot: BigNumberish, + _toPot: BigNumberish, + _amount: BigNumberish, + _token: string, +): Promise { + const [ + permissionDomainId, + fromChildSkillIndex, + toChildSkillIndex, + ] = await getMoveFundsPermissionProofs(this, _fromPot, _toPot); + + return (this as IColonyV7).estimate.moveFundsBetweenPots( + permissionDomainId, + MaxUint256, + permissionDomainId, + fromChildSkillIndex, + toChildSkillIndex, + _fromPot, + _toPot as string, + _amount, + _token, + ); +} + +/* + * Bindings + */ +export const addExtensions = ( + instance: PreviousVersionsExtensions, + networkClient: ColonyNetworkClient, +): ColonyExtensionsV7 => { + // Add all extensions from v6, because these are also still valid + const extendedInstance = addExtensionsV6( + instance, + networkClient, + ) as ColonyExtensionsV7; + /* + * We basically disable the signature type of the initial (pre V7) method + * + * This is because we overload the method, but not in a way that TS likes, as we + * add the overloaded argument in the middle, and not at the end. + */ + // eslint-disable-next-line max-len + (extendedInstance.moveFundsBetweenPotsWithProofs as unknown) = moveFundsBetweenPotsWithProofs.bind( + extendedInstance, + ); + /* + * We basically disable the signature type of the initial (pre V7) method + * + * This is because we overload the method, but not in a way that TS likes, as we + * add the overloaded argument in the middle, and not at the end. + */ + // eslint-disable-next-line prettier/prettier + (extendedInstance.estimate + // eslint-disable-next-line max-len + .moveFundsBetweenPotsWithProofs as unknown) = estimateMoveFundsBetweenPotsWithProofs.bind( + extendedInstance, + ); + return extendedInstance; +}; diff --git a/src/clients/ColonyNetworkClient.ts b/src/clients/ColonyNetworkClient.ts index 5a91e73c8..2fb813d89 100644 --- a/src/clients/ColonyNetworkClient.ts +++ b/src/clients/ColonyNetworkClient.ts @@ -5,19 +5,19 @@ import { BigNumber } from 'ethers/utils'; import { ColonyClient } from '../types'; import { - ColonyVersion, ClientType, Network, colonyNetworkAddresses, REPUTATION_ORACLE_ENDPOINT, } from '../constants'; +import { ColonyVersion } from '../versions'; // @TODO this _HAS_ to be the newest version _ALWAYS_. Let's try to figure out a way to make sure of this import { IColonyNetwork__factory as IColonyNetworkFactory } from '../contracts/6/factories/IColonyNetwork__factory'; import { IColonyNetwork } from '../contracts/6/IColonyNetwork'; import { abi as tokenAbi, bytecode as tokenBytecode, -} from '../contracts/deploy/Token.json'; +} from '../contracts/deploy/MetaTxToken.json'; import getColonyVersionClient from './Colony/ColonyVersionClient'; import getColonyClientV1 from './Colony/ColonyClientV1'; import getColonyClientV2 from './Colony/ColonyClientV2'; @@ -25,6 +25,7 @@ import getColonyClientV3 from './Colony/ColonyClientV3'; import getColonyClientV4 from './Colony/ColonyClientV4'; import getColonyClientV5 from './Colony/ColonyClientV5'; import getColonyClientV6 from './Colony/ColonyClientV6'; +import getColonyClientV7 from './Colony/ColonyClientV7'; import getTokenClient from './TokenClient'; import getTokenLockingClient, { TokenLockingClient, @@ -228,6 +229,14 @@ const getColonyNetworkClient = ( ); break; } + case ColonyVersion.DandelionLightweightSpaceship: { + colonyClient = getColonyClientV7.call( + networkClient, + colonyAddress, + signerOrProvider, + ); + break; + } default: { throw new Error('Colony version not supported'); } diff --git a/src/clients/Extensions/CoinMachine/1/CoinMachineClient.ts b/src/clients/Extensions/CoinMachine/1/CoinMachineClient.ts new file mode 100644 index 000000000..a4cb58543 --- /dev/null +++ b/src/clients/Extensions/CoinMachine/1/CoinMachineClient.ts @@ -0,0 +1,70 @@ +/* + * CoinMachine Client Version 1 autogenerated by + * @colony/colony-js version 4.0.0-beta.0 from colonyNetwork tag 'clwss' + * + * Feel free to modify as needed! + */ + +/* eslint-disable @typescript-eslint/no-explicit-any */ + +import { ClientType } from '../../../../constants'; +import { CoinMachine__factory as CoinMachineFactory } from '../../../../contracts/extensions/coinMachine/1/factories/CoinMachine__factory'; +import { CoinMachine } from '../../../../contracts/extensions/coinMachine/1/CoinMachine'; +import { ExtendedIColony } from '../../../../clients/Colony/extensions/commonExtensions'; + +import { + getCoinMachineClientAddons, + getCoinMachineClientEstimateAddons, +} from './CoinMachineClientAddons'; + +type CoinMachineEstimate = CoinMachine['estimate']; +interface CoinMachineEstimateWithAddons extends CoinMachineEstimate { + /* + * @TODO These needs to be specifically determined once we can integrate + * static code analysis into this lib + */ + [key: string]: any; +} + +export interface CoinMachineClient extends CoinMachine { + clientType: ClientType.CoinMachineClient; + estimate: CoinMachineEstimateWithAddons; + /* + * @TODO These needs to be specifically determined once we can integrate + * static code analysis into this lib + */ + [key: string]: any; +} + +const getCoinMachineClient = ( + address: string, + colonyClient: ExtendedIColony, +): CoinMachineClient => { + const coinMachineClient = CoinMachineFactory.connect( + address, + colonyClient.signer || colonyClient.provider, + ) as CoinMachineClient; + coinMachineClient.clientType = ClientType.CoinMachineClient; + + const addons = getCoinMachineClientAddons(coinMachineClient, colonyClient); + const addonsEstimate = getCoinMachineClientEstimateAddons( + coinMachineClient, + colonyClient, + ); + + Object.keys(addons).map((addonName) => { + coinMachineClient[addonName] = addons[addonName]; + return null; + }); + + Object.keys(addonsEstimate).map((addonName) => { + coinMachineClient.estimate[addonName] = addonsEstimate[addonName]; + return null; + }); + + return coinMachineClient; +}; + +export default getCoinMachineClient; + +/* eslint-enable */ diff --git a/src/clients/Extensions/CoinMachine/1/CoinMachineClientAddons.ts b/src/clients/Extensions/CoinMachine/1/CoinMachineClientAddons.ts new file mode 100644 index 000000000..b006f2cd6 --- /dev/null +++ b/src/clients/Extensions/CoinMachine/1/CoinMachineClientAddons.ts @@ -0,0 +1,65 @@ +/* + * CoinMachine Client Version 1 Addons autogenerated by + * @colony/colony-js version 4.0.0-beta.0 from colonyNetwork tag 'clwss' + * + * Feel free to modify as needed! + */ + +/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any */ + +import { ExtendedIColony } from '../../../../clients/Colony/extensions/commonExtensions'; + +import { CoinMachineClient } from './CoinMachineClient'; + +/* + * Extra client methods + */ +export const getCoinMachineClientAddons = ( + coinMachineClient: CoinMachineClient, + colonyClient: ExtendedIColony, +): Record => ({ + /* + * Example withProofs method + * + * contractCallWithProofs: async ( + * _domainId: BigNumberish, + * overrides?: TransactionOverrides, + * ): Promise => { + * const [extensionPDID, extensionCSI] = await getExtensionPermissionProofs( + * colonyClient, + * _domainId, + * coinMachineClient.address, + * ); + * return coinMachineClient.contractCall(extensionPDID, extensionCSI, _domainId, overrides); + * }, + */ +}); + +/* + * Extra client methods estimates + * + * These are needed! Don't skip them! + */ +export const getCoinMachineClientEstimateAddons = ( + coinMachineClient: CoinMachineClient, + colonyClient: ExtendedIColony, +): Record => ({ + /* + * Example withProofs estimate method + * (Mostly the same as the actual method, just that it calls the client + * estimate contract call and doesn't pass in the transaction overrides) + * + * contractCallWithProofs: async ( + * _domainId: BigNumberish, + * ): Promise => { + * const [extensionPDID, extensionCSI] = await getExtensionPermissionProofs( + * colonyClient, + * _domainId, + * coinMachineClient.address, + * ); + * return coinMachineClient.estimate.contractCall(extensionPDID, extensionCSI, _domainId); + * }, + */ +}); + +/* eslint-enable */ diff --git a/src/clients/Extensions/CoinMachine/2/CoinMachineClient.ts b/src/clients/Extensions/CoinMachine/2/CoinMachineClient.ts new file mode 100644 index 000000000..9bec7adbe --- /dev/null +++ b/src/clients/Extensions/CoinMachine/2/CoinMachineClient.ts @@ -0,0 +1,70 @@ +/* + * CoinMachine Client Version 2 autogenerated by + * @colony/colony-js version 4.0.0-beta.1 from colonyNetwork tag 'lwss-18-g840e378c' + * + * Feel free to modify as needed! + */ + +/* eslint-disable @typescript-eslint/no-explicit-any */ + +import { ClientType } from '../../../../constants'; +import { CoinMachine__factory as CoinMachineFactory } from '../../../../contracts/extensions/coinMachine/2/factories/CoinMachine__factory'; +import { CoinMachine } from '../../../../contracts/extensions/coinMachine/2/CoinMachine'; +import { ExtendedIColony } from '../../../../clients/Colony/extensions/commonExtensions'; + +import { + getCoinMachineClientAddons, + getCoinMachineClientEstimateAddons, +} from './CoinMachineClientAddons'; + +type CoinMachineEstimate = CoinMachine['estimate']; +interface CoinMachineEstimateWithAddons extends CoinMachineEstimate { + /* + * @TODO These needs to be specifically determined once we can integrate + * static code analysis into this lib + */ + [key: string]: any; +} + +export interface CoinMachineClient extends CoinMachine { + clientType: ClientType.CoinMachineClient; + estimate: CoinMachineEstimateWithAddons; + /* + * @TODO These needs to be specifically determined once we can integrate + * static code analysis into this lib + */ + [key: string]: any; +} + +const getCoinMachineClient = ( + address: string, + colonyClient: ExtendedIColony, +): CoinMachineClient => { + const coinMachineClient = CoinMachineFactory.connect( + address, + colonyClient.signer || colonyClient.provider, + ) as CoinMachineClient; + coinMachineClient.clientType = ClientType.CoinMachineClient; + + const addons = getCoinMachineClientAddons(coinMachineClient, colonyClient); + const addonsEstimate = getCoinMachineClientEstimateAddons( + coinMachineClient, + colonyClient, + ); + + Object.keys(addons).map((addonName) => { + coinMachineClient[addonName] = addons[addonName]; + return null; + }); + + Object.keys(addonsEstimate).map((addonName) => { + coinMachineClient.estimate[addonName] = addonsEstimate[addonName]; + return null; + }); + + return coinMachineClient; +}; + +export default getCoinMachineClient; + +/* eslint-enable */ diff --git a/src/clients/Extensions/CoinMachine/2/CoinMachineClientAddons.ts b/src/clients/Extensions/CoinMachine/2/CoinMachineClientAddons.ts new file mode 100644 index 000000000..fbd868303 --- /dev/null +++ b/src/clients/Extensions/CoinMachine/2/CoinMachineClientAddons.ts @@ -0,0 +1,65 @@ +/* + * CoinMachine Client Version 2 Addons autogenerated by + * @colony/colony-js version 4.0.0-beta.1 from colonyNetwork tag 'lwss-18-g840e378c' + * + * Feel free to modify as needed! + */ + +/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any */ + +import { ExtendedIColony } from '../../../../clients/Colony/extensions/commonExtensions'; + +import { CoinMachineClient } from './CoinMachineClient'; + +/* + * Extra client methods + */ +export const getCoinMachineClientAddons = ( + coinMachineClient: CoinMachineClient, + colonyClient: ExtendedIColony, +): Record => ({ + /* + * Example withProofs method + * + * contractCallWithProofs: async ( + * _domainId: BigNumberish, + * overrides?: TransactionOverrides, + * ): Promise => { + * const [extensionPDID, extensionCSI] = await getExtensionPermissionProofs( + * colonyClient, + * _domainId, + * coinMachineClient.address, + * ); + * return coinMachineClient.contractCall(extensionPDID, extensionCSI, _domainId, overrides); + * }, + */ +}); + +/* + * Extra client methods estimates + * + * These are needed! Don't skip them! + */ +export const getCoinMachineClientEstimateAddons = ( + coinMachineClient: CoinMachineClient, + colonyClient: ExtendedIColony, +): Record => ({ + /* + * Example withProofs estimate method + * (Mostly the same as the actual method, just that it calls the client + * estimate contract call and doesn't pass in the transaction overrides) + * + * contractCallWithProofs: async ( + * _domainId: BigNumberish, + * ): Promise => { + * const [extensionPDID, extensionCSI] = await getExtensionPermissionProofs( + * colonyClient, + * _domainId, + * coinMachineClient.address, + * ); + * return coinMachineClient.estimate.contractCall(extensionPDID, extensionCSI, _domainId); + * }, + */ +}); + +/* eslint-enable */ diff --git a/src/clients/CoinMachineClient.ts b/src/clients/Extensions/CoinMachineClient.ts similarity index 62% rename from src/clients/CoinMachineClient.ts rename to src/clients/Extensions/CoinMachineClient.ts index a9857ff07..b8fc95dfd 100644 --- a/src/clients/CoinMachineClient.ts +++ b/src/clients/Extensions/CoinMachineClient.ts @@ -1,7 +1,7 @@ -import { ClientType } from '../constants'; -import { CoinMachine__factory as CoinMachineFactory } from '../contracts/6/factories/CoinMachine__factory'; -import { CoinMachine } from '../contracts/6/CoinMachine'; -import { ExtendedIColony } from './Colony/extensions/commonExtensions'; +import { ClientType } from '../../constants'; +import { CoinMachine__factory as CoinMachineFactory } from '../../contracts/6/factories/CoinMachine__factory'; +import { CoinMachine } from '../../contracts/6/CoinMachine'; +import { ExtendedIColony } from '../Colony/extensions/commonExtensions'; export interface CoinMachineClient extends CoinMachine { clientType: ClientType.CoinMachineClient; diff --git a/src/clients/Extensions/ExtensionVersionClient.ts b/src/clients/Extensions/ExtensionVersionClient.ts new file mode 100644 index 000000000..e8f5eb442 --- /dev/null +++ b/src/clients/Extensions/ExtensionVersionClient.ts @@ -0,0 +1,33 @@ +// A minimal version of the Colony Extension contract that only supports the `version` method + +import { Contract, Signer } from 'ethers'; +import { Provider } from 'ethers/providers'; + +import { BigNumber } from 'ethers/utils'; + +interface ExtensionVersionClient extends Contract { + version(): Promise; +} + +const abi = [ + { + inputs: [], + name: 'version', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'pure', + type: 'function', + }, +]; + +export default function getExtensionVersionClient( + address: string, + signerOrProvider: Signer | Provider, +): ExtensionVersionClient { + return new Contract(address, abi, signerOrProvider) as ExtensionVersionClient; +} diff --git a/src/clients/Extensions/OneTxPayment/1/OneTxPaymentClient.ts b/src/clients/Extensions/OneTxPayment/1/OneTxPaymentClient.ts new file mode 100644 index 000000000..63bb5894b --- /dev/null +++ b/src/clients/Extensions/OneTxPayment/1/OneTxPaymentClient.ts @@ -0,0 +1,70 @@ +/* + * OneTxPayment Client Version 1 autogenerated by + * @colony/colony-js version 4.0.0-beta.0 from colonyNetwork tag 'clwss' + * + * Feel free to modify as needed! + */ + +/* eslint-disable @typescript-eslint/no-explicit-any */ + +import { ClientType } from '../../../../constants'; +import { OneTxPayment__factory as OneTxPaymentFactory } from '../../../../contracts/extensions/oneTxPayment/1/factories/OneTxPayment__factory'; +import { OneTxPayment } from '../../../../contracts/extensions/oneTxPayment/1/OneTxPayment'; +import { ExtendedIColony } from '../../../../clients/Colony/extensions/commonExtensions'; + +import { + getOneTxPaymentClientAddons, + getOneTxPaymentClientEstimateAddons, +} from './OneTxPaymentClientAddons'; + +type OneTxPaymentEstimate = OneTxPayment['estimate']; +interface OneTxPaymentEstimateWithAddons extends OneTxPaymentEstimate { + /* + * @TODO These needs to be specifically determined once we can integrate + * static code analysis into this lib + */ + [key: string]: any; +} + +export interface OneTxPaymentClient extends OneTxPayment { + clientType: ClientType.OneTxPaymentClient; + estimate: OneTxPaymentEstimateWithAddons; + /* + * @TODO These needs to be specifically determined once we can integrate + * static code analysis into this lib + */ + [key: string]: any; +} + +const getOneTxPaymentClient = ( + address: string, + colonyClient: ExtendedIColony, +): OneTxPaymentClient => { + const oneTxPaymentClient = OneTxPaymentFactory.connect( + address, + colonyClient.signer || colonyClient.provider, + ) as OneTxPaymentClient; + oneTxPaymentClient.clientType = ClientType.OneTxPaymentClient; + + const addons = getOneTxPaymentClientAddons(oneTxPaymentClient, colonyClient); + const addonsEstimate = getOneTxPaymentClientEstimateAddons( + oneTxPaymentClient, + colonyClient, + ); + + Object.keys(addons).map((addonName) => { + oneTxPaymentClient[addonName] = addons[addonName]; + return null; + }); + + Object.keys(addonsEstimate).map((addonName) => { + oneTxPaymentClient.estimate[addonName] = addonsEstimate[addonName]; + return null; + }); + + return oneTxPaymentClient; +}; + +export default getOneTxPaymentClient; + +/* eslint-enable */ diff --git a/src/clients/Extensions/OneTxPayment/1/OneTxPaymentClientAddons.ts b/src/clients/Extensions/OneTxPayment/1/OneTxPaymentClientAddons.ts new file mode 100644 index 000000000..64ba6594a --- /dev/null +++ b/src/clients/Extensions/OneTxPayment/1/OneTxPaymentClientAddons.ts @@ -0,0 +1,161 @@ +/* + * OneTxPayment Client Version 1 Addons autogenerated by + * @colony/colony-js version 4.0.0-beta.0 from colonyNetwork tag 'clwss' + * + * Feel free to modify as needed! + */ + +/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any */ + +import { BigNumberish, BigNumber } from 'ethers/utils'; +import { ContractTransaction } from 'ethers'; + +import { + ExtendedIColony, + getExtensionPermissionProofs, +} from '../../../../clients/Colony/extensions/commonExtensions'; +import { TransactionOverrides } from '../../../../contracts/6'; + +import { OneTxPaymentClient } from './OneTxPaymentClient'; + +/* + * Extra client methods + */ +export const getOneTxPaymentClientAddons = ( + oneTxPaymentClient: OneTxPaymentClient, + colonyClient: ExtendedIColony, +): Record => ({ + makePaymentWithProofs: async ( + _workers: string[], + _tokens: string[], + _amounts: BigNumberish[], + _domainId: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides, + ): Promise => { + const [extensionPDID, extensionCSI] = await getExtensionPermissionProofs( + colonyClient, + _domainId, + oneTxPaymentClient.address, + ); + const [userPDID, userCSI] = await getExtensionPermissionProofs( + colonyClient, + _domainId, + ); + + return oneTxPaymentClient.makePayment( + extensionPDID, + extensionCSI, + userPDID, + userCSI, + _workers, + _tokens, + _amounts, + _domainId, + _skillId, + overrides, + ); + }, + makePaymentFundedFromDomainWithProofs: async ( + _workers: string[], + _tokens: string[], + _amounts: BigNumberish[], + _domainId: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides, + ): Promise => { + const [extensionPDID, extensionCSI] = await getExtensionPermissionProofs( + colonyClient, + _domainId, + oneTxPaymentClient.address, + ); + const [userPDID, userCSI] = await getExtensionPermissionProofs( + colonyClient, + _domainId, + ); + + return oneTxPaymentClient.makePaymentFundedFromDomain( + extensionPDID, + extensionCSI, + userPDID, + userCSI, + _workers, + _tokens, + _amounts, + _domainId, + _skillId, + overrides, + ); + }, +}); + +/* + * Extra client methods estimates + * + * These are needed! Don't skip them! + */ +export const getOneTxPaymentClientEstimateAddons = ( + oneTxPaymentClient: OneTxPaymentClient, + colonyClient: ExtendedIColony, +): Record => ({ + makePaymentWithProofs: async ( + _workers: string[], + _tokens: string[], + _amounts: BigNumberish[], + _domainId: BigNumberish, + _skillId: BigNumberish, + ): Promise => { + const [extensionPDID, extensionCSI] = await getExtensionPermissionProofs( + colonyClient, + _domainId, + oneTxPaymentClient.address, + ); + const [userPDID, userCSI] = await getExtensionPermissionProofs( + colonyClient, + _domainId, + ); + + return oneTxPaymentClient.estimate.makePayment( + extensionPDID, + extensionCSI, + userPDID, + userCSI, + _workers, + _tokens, + _amounts, + _domainId, + _skillId, + ); + }, + makePaymentFundedFromDomainWithProofs: async ( + _workers: string[], + _tokens: string[], + _amounts: BigNumberish[], + _domainId: BigNumberish, + _skillId: BigNumberish, + ): Promise => { + const [extensionPDID, extensionCSI] = await getExtensionPermissionProofs( + colonyClient, + _domainId, + oneTxPaymentClient.address, + ); + const [userPDID, userCSI] = await getExtensionPermissionProofs( + colonyClient, + _domainId, + ); + + return oneTxPaymentClient.estimate.makePaymentFundedFromDomain( + extensionPDID, + extensionCSI, + userPDID, + userCSI, + _workers, + _tokens, + _amounts, + _domainId, + _skillId, + ); + }, +}); + +/* eslint-enable */ diff --git a/src/clients/Extensions/OneTxPayment/2/OneTxPaymentClient.ts b/src/clients/Extensions/OneTxPayment/2/OneTxPaymentClient.ts new file mode 100644 index 000000000..1be4cbf9f --- /dev/null +++ b/src/clients/Extensions/OneTxPayment/2/OneTxPaymentClient.ts @@ -0,0 +1,80 @@ +/* + * OneTxPayment Client Version 2 autogenerated by + * @colony/colony-js version v4.0.0-rc.6 from colonyNetwork tag 'clwss-127-gb39461e5' + * + * Feel free to modify as needed! + */ + +/* eslint-disable @typescript-eslint/no-explicit-any */ + +import { ClientType } from '../../../../constants'; +import { OneTxPayment__factory as OneTxPaymentFactory } from '../../../../contracts/extensions/oneTxPayment/2/factories/OneTxPayment__factory'; +import { OneTxPayment } from '../../../../contracts/extensions/oneTxPayment/2/OneTxPayment'; +import { ExtendedIColony } from '../../../../clients/Colony/extensions/commonExtensions'; + +import * as currentVersion from './OneTxPaymentClientAddons'; +import * as version1 from '../1/OneTxPaymentClientAddons'; + +type OneTxPaymentEstimate = OneTxPayment['estimate']; +interface OneTxPaymentEstimateWithAddons extends OneTxPaymentEstimate { + /* + * @TODO These needs to be specifically determined once we can integrate + * static code analysis into this lib + */ + [key: string]: any; +} + +export interface OneTxPaymentClient extends OneTxPayment { + clientType: ClientType.OneTxPaymentClient; + estimate: OneTxPaymentEstimateWithAddons; + /* + * @TODO These needs to be specifically determined once we can integrate + * static code analysis into this lib + */ + [key: string]: any; +} + +const getOneTxPaymentClient = ( + address: string, + colonyClient: ExtendedIColony, +): OneTxPaymentClient => { + const oneTxPaymentClient = OneTxPaymentFactory.connect( + address, + colonyClient.signer || colonyClient.provider, + ) as OneTxPaymentClient; + oneTxPaymentClient.clientType = ClientType.OneTxPaymentClient; + + const addons = { + ...currentVersion.getOneTxPaymentClientAddons( + oneTxPaymentClient, + colonyClient, + ), + ...version1.getOneTxPaymentClientAddons(oneTxPaymentClient, colonyClient), + }; + const addonsEstimate = { + ...currentVersion.getOneTxPaymentClientEstimateAddons( + oneTxPaymentClient, + colonyClient, + ), + ...version1.getOneTxPaymentClientEstimateAddons( + oneTxPaymentClient, + colonyClient, + ), + }; + + Object.keys(addons).map((addonName) => { + oneTxPaymentClient[addonName] = addons[addonName]; + return null; + }); + + Object.keys(addonsEstimate).map((addonName) => { + oneTxPaymentClient.estimate[addonName] = addonsEstimate[addonName]; + return null; + }); + + return oneTxPaymentClient; +}; + +export default getOneTxPaymentClient; + +/* eslint-enable */ diff --git a/src/clients/Extensions/OneTxPayment/2/OneTxPaymentClientAddons.ts b/src/clients/Extensions/OneTxPayment/2/OneTxPaymentClientAddons.ts new file mode 100644 index 000000000..fd4976ead --- /dev/null +++ b/src/clients/Extensions/OneTxPayment/2/OneTxPaymentClientAddons.ts @@ -0,0 +1,65 @@ +/* + * OneTxPayment Client Version 2 Addons autogenerated by + * @colony/colony-js version v4.0.0-rc.6 from colonyNetwork tag 'clwss-127-gb39461e5' + * + * Feel free to modify as needed! + */ + +/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any */ + +import { ExtendedIColony } from '../../../../clients/Colony/extensions/commonExtensions'; + +import { OneTxPaymentClient } from './OneTxPaymentClient'; + +/* + * Extra client methods + */ +export const getOneTxPaymentClientAddons = ( + oneTxPaymentClient: OneTxPaymentClient, + colonyClient: ExtendedIColony, +): Record => ({ + /* + * Example withProofs method + * + * contractCallWithProofs: async ( + * _domainId: BigNumberish, + * overrides?: TransactionOverrides, + * ): Promise => { + * const [extensionPDID, extensionCSI] = await getExtensionPermissionProofs( + * colonyClient, + * _domainId, + * oneTxPaymentClient.address, + * ); + * return oneTxPaymentClient.contractCall(extensionPDID, extensionCSI, _domainId, overrides); + * }, + */ +}); + +/* + * Extra client methods estimates + * + * These are needed! Don't skip them! + */ +export const getOneTxPaymentClientEstimateAddons = ( + oneTxPaymentClient: OneTxPaymentClient, + colonyClient: ExtendedIColony, +): Record => ({ + /* + * Example withProofs estimate method + * (Mostly the same as the actual method, just that it calls the client + * estimate contract call and doesn't pass in the transaction overrides) + * + * contractCallWithProofs: async ( + * _domainId: BigNumberish, + * ): Promise => { + * const [extensionPDID, extensionCSI] = await getExtensionPermissionProofs( + * colonyClient, + * _domainId, + * oneTxPaymentClient.address, + * ); + * return oneTxPaymentClient.estimate.contractCall(extensionPDID, extensionCSI, _domainId); + * }, + */ +}); + +/* eslint-enable */ diff --git a/src/clients/OneTxPaymentClient.ts b/src/clients/Extensions/OneTxPaymentClient.ts similarity index 95% rename from src/clients/OneTxPaymentClient.ts rename to src/clients/Extensions/OneTxPaymentClient.ts index 4c9580b1f..316dd08d4 100644 --- a/src/clients/OneTxPaymentClient.ts +++ b/src/clients/Extensions/OneTxPaymentClient.ts @@ -1,14 +1,14 @@ import { ContractTransaction } from 'ethers'; import { BigNumberish, BigNumber } from 'ethers/utils'; -import { ClientType, ColonyRole } from '../constants'; -import { OneTxPayment__factory as OneTxPaymentFactory } from '../contracts/6/factories/OneTxPayment__factory'; -import { OneTxPayment } from '../contracts/6/OneTxPayment'; -import { TransactionOverrides } from '../contracts/6'; +import { ClientType, ColonyRole } from '../../constants'; +import { OneTxPayment__factory as OneTxPaymentFactory } from '../../contracts/6/factories/OneTxPayment__factory'; +import { OneTxPayment } from '../../contracts/6/OneTxPayment'; +import { TransactionOverrides } from '../../contracts/6'; import { getPermissionProofs, ExtendedIColony, -} from '../clients/Colony/extensions/commonExtensions'; +} from '../../clients/Colony/extensions/commonExtensions'; type OneTxPaymentEstimate = OneTxPayment['estimate']; diff --git a/src/clients/Extensions/VotingReputation/1/VotingReputationClient.ts b/src/clients/Extensions/VotingReputation/1/VotingReputationClient.ts new file mode 100644 index 000000000..5bda37305 --- /dev/null +++ b/src/clients/Extensions/VotingReputation/1/VotingReputationClient.ts @@ -0,0 +1,73 @@ +/* + * VotingReputation Client Version 1 autogenerated by + * @colony/colony-js version 4.0.0-beta.0 from colonyNetwork tag 'clwss' + * + * Feel free to modify as needed! + */ + +/* eslint-disable @typescript-eslint/no-explicit-any */ + +import { ClientType } from '../../../../constants'; +import { VotingReputation__factory as VotingReputationFactory } from '../../../../contracts/extensions/votingReputation/1/factories/VotingReputation__factory'; +import { VotingReputation } from '../../../../contracts/extensions/votingReputation/1/VotingReputation'; +import { ExtendedIColony } from '../../../../clients/Colony/extensions/commonExtensions'; + +import { + getVotingReputationClientAddons, + getVotingReputationClientEstimateAddons, +} from './VotingReputationClientAddons'; + +type VotingReputationEstimate = VotingReputation['estimate']; +interface VotingReputationEstimateWithAddons extends VotingReputationEstimate { + /* + * @TODO These needs to be specifically determined once we can integrate + * static code analysis into this lib + */ + [key: string]: any; +} + +export interface VotingReputationClient extends VotingReputation { + clientType: ClientType.VotingReputationClient; + estimate: VotingReputationEstimateWithAddons; + /* + * @TODO These needs to be specifically determined once we can integrate + * static code analysis into this lib + */ + [key: string]: any; +} + +const getVotingReputationClient = ( + address: string, + colonyClient: ExtendedIColony, +): VotingReputationClient => { + const votingReputationClient = VotingReputationFactory.connect( + address, + colonyClient.signer || colonyClient.provider, + ) as VotingReputationClient; + votingReputationClient.clientType = ClientType.VotingReputationClient; + + const addons = getVotingReputationClientAddons( + votingReputationClient, + colonyClient, + ); + const addonsEstimate = getVotingReputationClientEstimateAddons( + votingReputationClient, + colonyClient, + ); + + Object.keys(addons).map((addonName) => { + votingReputationClient[addonName] = addons[addonName]; + return null; + }); + + Object.keys(addonsEstimate).map((addonName) => { + votingReputationClient.estimate[addonName] = addonsEstimate[addonName]; + return null; + }); + + return votingReputationClient; +}; + +export default getVotingReputationClient; + +/* eslint-enable */ diff --git a/src/clients/Extensions/VotingReputation/1/VotingReputationClientAddons.ts b/src/clients/Extensions/VotingReputation/1/VotingReputationClientAddons.ts new file mode 100644 index 000000000..eac4298ee --- /dev/null +++ b/src/clients/Extensions/VotingReputation/1/VotingReputationClientAddons.ts @@ -0,0 +1,268 @@ +/* + * VotingReputation Client Version 1 Addons autogenerated by + * @colony/colony-js version 4.0.0-beta.0 from colonyNetwork tag 'clwss' + * + * Feel free to modify as needed! + */ + +/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any */ + +import { ContractTransaction } from 'ethers'; +import { BigNumberish, BigNumber, Arrayish, bigNumberify } from 'ethers/utils'; +import { MaxUint256 } from 'ethers/constants'; + +import { + ExtendedIColony, + getPermissionProofs, + getChildIndex, +} from '../../../Colony/extensions/commonExtensions'; +import { TransactionOverrides } from '../../../../contracts/6'; +import { ColonyRole } from '../../../../constants'; + +import { VotingReputationClient } from './VotingReputationClient'; + +/* + * Extra client methods + */ +export const getVotingReputationClientAddons = ( + votingReputationClient: VotingReputationClient, + colonyClient: ExtendedIColony, +): Record => ({ + createDomainMotionWithProofs: async ( + _domainId: BigNumberish, // Domain in which the voting will take place in + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides, + ): Promise => { + let childSkillIdex = MaxUint256; + const votingDomain = bigNumberify(_domainId); + const decodedDomain = bigNumberify(`0x${_action.toString().slice(10, 74)}`); // Domain in which we have permissions + if (!decodedDomain.eq(votingDomain)) { + const domainSkillIdIndex = await getChildIndex( + colonyClient, + decodedDomain, + votingDomain, + ); + if (!domainSkillIdIndex.eq(bigNumberify(-1))) { + childSkillIdex = bigNumberify(domainSkillIdIndex); + } else { + throw new Error('Child skill index could not be found'); + } + } + return votingReputationClient.createDomainMotion( + votingDomain, + childSkillIdex, + _action, + _key, + _value, + _branchMask, + _siblings, + overrides, + ); + }, + stakeMotionWithProofs: async ( + _motionId: BigNumberish, + _vote: BigNumberish, + _amount: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides, + ): Promise => { + const { domainId } = await votingReputationClient.getMotion(_motionId); + const [permissionDomainId, childSkillIndex] = await getPermissionProofs( + colonyClient, + domainId, + ColonyRole.Arbitration, + votingReputationClient.address, + ); + return votingReputationClient.stakeMotion( + _motionId, + permissionDomainId, + childSkillIndex, + _vote, + _amount, + _key, + _value, + _branchMask, + _siblings, + overrides, + ); + }, + escalateMotionWithProofs: async ( + _motionId: BigNumberish, + _newDomainId: BigNumberish, // parent, or ancestor, domain id + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides, + ): Promise => { + const { domainId } = await votingReputationClient.getMotion(_motionId); + const motionDomainChildSkillIdIndex = await getChildIndex( + colonyClient, + bigNumberify(_newDomainId), + domainId, + ); + if (motionDomainChildSkillIdIndex.toNumber() === -1) { + throw new Error('Child skill index could not be found'); + } + return votingReputationClient.escalateMotion( + _motionId, + _newDomainId, + motionDomainChildSkillIdIndex, + _key, + _value, + _branchMask, + _siblings, + overrides, + ); + }, + claimRewardWithProofs: async ( + _motionId: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides, + ): Promise => { + const { domainId } = await votingReputationClient.getMotion(_motionId); + const [permissionDomainId, childSkillIndex] = await getPermissionProofs( + colonyClient, + domainId, + ColonyRole.Arbitration, + votingReputationClient.address, + ); + return votingReputationClient.claimReward( + _motionId, + permissionDomainId, + childSkillIndex, + _staker, + _vote, + overrides, + ); + }, +}); + +/* + * Extra client methods estimates + * + * These are needed! Don't skip them! + */ +export const getVotingReputationClientEstimateAddons = ( + votingReputationClient: VotingReputationClient, + colonyClient: ExtendedIColony, +): Record => ({ + createDomainMotionWithProofs: async ( + _domainId: BigNumberish, // Domain in which the voting will take place in + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + ): Promise => { + let childSkillIdex = MaxUint256; + const votingDomain = bigNumberify(_domainId); + const decodedDomain = bigNumberify(`0x${_action.toString().slice(10, 74)}`); // Domain in which we have permissions + if (!decodedDomain.eq(votingDomain)) { + const domainSkillIdIndex = await getChildIndex( + colonyClient, + decodedDomain, + votingDomain, + ); + if (!domainSkillIdIndex.eq(bigNumberify(-1))) { + childSkillIdex = bigNumberify(domainSkillIdIndex); + } else { + throw new Error('Child skill index could not be found'); + } + } + return votingReputationClient.estimate.createDomainMotion( + votingDomain, + childSkillIdex, + _action, + _key, + _value, + _branchMask, + _siblings, + ); + }, + stakeMotionWithProofs: async ( + _motionId: BigNumberish, + _vote: BigNumberish, + _amount: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + ): Promise => { + const { domainId } = await votingReputationClient.getMotion(_motionId); + const [permissionDomainId, childSkillIndex] = await getPermissionProofs( + colonyClient, + domainId, + ColonyRole.Arbitration, + votingReputationClient.address, + ); + return votingReputationClient.estimate.stakeMotion( + _motionId, + permissionDomainId, + childSkillIndex, + _vote, + _amount, + _key, + _value, + _branchMask, + _siblings, + ); + }, + escalateMotionWithProofs: async ( + _motionId: BigNumberish, + _newDomainId: BigNumberish, // parent, or ancestor, domain id + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + ): Promise => { + const { domainId } = await votingReputationClient.getMotion(_motionId); + const motionDomainChildSkillIdIndex = await getChildIndex( + colonyClient, + bigNumberify(_newDomainId), + domainId, + ); + if (motionDomainChildSkillIdIndex.toNumber() === -1) { + throw new Error('Child skill index could not be found'); + } + return votingReputationClient.estimate.escalateMotion( + _motionId, + _newDomainId, + motionDomainChildSkillIdIndex, + _key, + _value, + _branchMask, + _siblings, + ); + }, + claimRewardWithProofs: async ( + _motionId: BigNumberish, + _staker: string, + _vote: BigNumberish, + ): Promise => { + const { domainId } = await votingReputationClient.getMotion(_motionId); + const [permissionDomainId, childSkillIndex] = await getPermissionProofs( + colonyClient, + domainId, + ColonyRole.Arbitration, + votingReputationClient.address, + ); + return votingReputationClient.estimate.claimReward( + _motionId, + permissionDomainId, + childSkillIndex, + _staker, + _vote, + ); + }, +}); + +/* eslint-enable */ diff --git a/src/clients/Extensions/VotingReputation/2/VotingReputationClient.ts b/src/clients/Extensions/VotingReputation/2/VotingReputationClient.ts new file mode 100644 index 000000000..721576dc6 --- /dev/null +++ b/src/clients/Extensions/VotingReputation/2/VotingReputationClient.ts @@ -0,0 +1,83 @@ +/* + * VotingReputation Client Version 2 autogenerated by + * @colony/colony-js version 4.0.0-beta.1 from colonyNetwork tag 'lwss-18-g840e378c' + * + * Feel free to modify as needed! + */ + +/* eslint-disable @typescript-eslint/no-explicit-any */ + +import { ClientType } from '../../../../constants'; +import { VotingReputation__factory as VotingReputationFactory } from '../../../../contracts/extensions/votingReputation/2/factories/VotingReputation__factory'; +import { VotingReputation } from '../../../../contracts/extensions/votingReputation/2/VotingReputation'; +import { ExtendedIColony } from '../../../../clients/Colony/extensions/commonExtensions'; + +import * as currentVersion from './VotingReputationClientAddons'; +import * as version1 from '../1/VotingReputationClientAddons'; + +type VotingReputationEstimate = VotingReputation['estimate']; +interface VotingReputationEstimateWithAddons extends VotingReputationEstimate { + /* + * @TODO These needs to be specifically determined once we can integrate + * static code analysis into this lib + */ + [key: string]: any; +} + +export interface VotingReputationClient extends VotingReputation { + clientType: ClientType.VotingReputationClient; + estimate: VotingReputationEstimateWithAddons; + /* + * @TODO These needs to be specifically determined once we can integrate + * static code analysis into this lib + */ + [key: string]: any; +} + +const getVotingReputationClient = ( + address: string, + colonyClient: ExtendedIColony, +): VotingReputationClient => { + const votingReputationClient = VotingReputationFactory.connect( + address, + colonyClient.signer || colonyClient.provider, + ) as VotingReputationClient; + votingReputationClient.clientType = ClientType.VotingReputationClient; + + const addons = { + ...currentVersion.getVotingReputationClientAddons( + votingReputationClient, + colonyClient, + ), + ...version1.getVotingReputationClientAddons( + votingReputationClient, + colonyClient, + ), + }; + const addonsEstimate = { + ...currentVersion.getVotingReputationClientEstimateAddons( + votingReputationClient, + colonyClient, + ), + ...version1.getVotingReputationClientEstimateAddons( + votingReputationClient, + colonyClient, + ), + }; + + Object.keys(addons).map((addonName) => { + votingReputationClient[addonName] = addons[addonName]; + return null; + }); + + Object.keys(addonsEstimate).map((addonName) => { + votingReputationClient.estimate[addonName] = addonsEstimate[addonName]; + return null; + }); + + return votingReputationClient; +}; + +export default getVotingReputationClient; + +/* eslint-enable */ diff --git a/src/clients/Extensions/VotingReputation/2/VotingReputationClientAddons.ts b/src/clients/Extensions/VotingReputation/2/VotingReputationClientAddons.ts new file mode 100644 index 000000000..89adf23c9 --- /dev/null +++ b/src/clients/Extensions/VotingReputation/2/VotingReputationClientAddons.ts @@ -0,0 +1,65 @@ +/* + * VotingReputation Client Version 2 Addons autogenerated by + * @colony/colony-js version 4.0.0-beta.1 from colonyNetwork tag 'lwss-18-g840e378c' + * + * Feel free to modify as needed! + */ + +/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any */ + +import { ExtendedIColony } from '../../../../clients/Colony/extensions/commonExtensions'; + +import { VotingReputationClient } from './VotingReputationClient'; + +/* + * Extra client methods + */ +export const getVotingReputationClientAddons = ( + votingReputationClient: VotingReputationClient, + colonyClient: ExtendedIColony, +): Record => ({ + /* + * Example withProofs method + * + * contractCallWithProofs: async ( + * _domainId: BigNumberish, + * overrides?: TransactionOverrides, + * ): Promise => { + * const [extensionPDID, extensionCSI] = await getExtensionPermissionProofs( + * colonyClient, + * _domainId, + * votingReputationClient.address, + * ); + * return votingReputationClient.contractCall(extensionPDID, extensionCSI, _domainId, overrides); + * }, + */ +}); + +/* + * Extra client methods estimates + * + * These are needed! Don't skip them! + */ +export const getVotingReputationClientEstimateAddons = ( + votingReputationClient: VotingReputationClient, + colonyClient: ExtendedIColony, +): Record => ({ + /* + * Example withProofs estimate method + * (Mostly the same as the actual method, just that it calls the client + * estimate contract call and doesn't pass in the transaction overrides) + * + * contractCallWithProofs: async ( + * _domainId: BigNumberish, + * ): Promise => { + * const [extensionPDID, extensionCSI] = await getExtensionPermissionProofs( + * colonyClient, + * _domainId, + * votingReputationClient.address, + * ); + * return votingReputationClient.estimate.contractCall(extensionPDID, extensionCSI, _domainId); + * }, + */ +}); + +/* eslint-enable */ diff --git a/src/clients/Extensions/VotingReputationClient.ts b/src/clients/Extensions/VotingReputationClient.ts new file mode 100644 index 000000000..fe936636c --- /dev/null +++ b/src/clients/Extensions/VotingReputationClient.ts @@ -0,0 +1,24 @@ +import { ClientType } from '../../constants'; +import { VotingReputation__factory as VotingReputationFactory } from '../../contracts/6/factories/VotingReputation__factory'; +import { VotingReputation } from '../../contracts/6/VotingReputation'; +import { ExtendedIColony } from '../Colony/extensions/commonExtensions'; + +export interface VotingReputationClient extends VotingReputation { + clientType: ClientType.VotingReputationClient; +} + +const getVotingReputationClient = ( + address: string, + colonyClient: ExtendedIColony, +): VotingReputationClient => { + const votingReputationClient = VotingReputationFactory.connect( + address, + colonyClient.signer || colonyClient.provider, + ) as VotingReputationClient; + + votingReputationClient.clientType = ClientType.VotingReputationClient; + + return votingReputationClient; +}; + +export default getVotingReputationClient; diff --git a/src/clients/Colony/colonyContractExtensions.ts b/src/clients/Extensions/colonyContractExtensions.ts similarity index 65% rename from src/clients/Colony/colonyContractExtensions.ts rename to src/clients/Extensions/colonyContractExtensions.ts index d7b27bc5c..486768356 100644 --- a/src/clients/Colony/colonyContractExtensions.ts +++ b/src/clients/Extensions/colonyContractExtensions.ts @@ -1,19 +1,23 @@ -import getCoinMachineClient, { CoinMachineClient } from '../CoinMachineClient'; +import getCoinMachineClient, { CoinMachineClient } from './CoinMachineClient'; import getOneTxPaymentClient, { OneTxPaymentClient, -} from '../OneTxPaymentClient'; +} from './OneTxPaymentClient'; +import getVotingReputationClient, { + VotingReputationClient, +} from './VotingReputationClient'; export enum Extension { CoinMachine = 'CoinMachine', // FundingQueue = 'FundingQueue', OneTxPayment = 'OneTxPayment', - // VotingReputation = 'VotingReputation', + VotingReputation = 'VotingReputation', } // All of the valid extensions export type ExtensionClients = { [Extension.CoinMachine]: CoinMachineClient; [Extension.OneTxPayment]: OneTxPaymentClient; + [Extension.VotingReputation]: VotingReputationClient; }; export type ExtensionClient = ExtensionClients[keyof ExtensionClients]; @@ -22,6 +26,7 @@ export type ExtensionClient = ExtensionClients[keyof ExtensionClients]; export const extensionFactoryMap = { [Extension.CoinMachine]: getCoinMachineClient, [Extension.OneTxPayment]: getOneTxPaymentClient, + [Extension.VotingReputation]: getVotingReputationClient, }; export const extensions = Object.keys(extensionFactoryMap); diff --git a/src/constants.ts b/src/constants.ts index 06847a32f..0e16f7aae 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,35 +1,3 @@ -export { - extensions, - Extension, -} from './clients/Colony/colonyContractExtensions'; - -/** - * Available versions for colonies that could be deployed. When a new version for a colony needs to be supported, it should be added here. The versions are incremented integers. - */ -export enum ColonyVersion { - /** Only deployed to Goerli, hence not present on mainnet deployments */ - GoerliGlider = 1, // glider-rc.1 - Glider = 2, - AuburnGlider = 3, - BurgundyGlider = 4, - LightweightSpaceship = 5, - CeruleanLightweightSpaceship = 6, -} - -// These are the corresponding git release tags for the deployed versions of the Colony Network -export const releaseMap = { - [ColonyVersion.GoerliGlider]: 'glider-rc.1', - [ColonyVersion.Glider]: 'glider', - [ColonyVersion.AuburnGlider]: 'auburn-glider', - [ColonyVersion.BurgundyGlider]: 'burgundy-glider', - [ColonyVersion.LightweightSpaceship]: 'lwss', - [ColonyVersion.CeruleanLightweightSpaceship]: `clwss`, -}; - -/** - * The newest colony version. This will be used when deploying new colonies */ -export const CurrentVersion = ColonyVersion.CeruleanLightweightSpaceship; - /** * Supported Ethereum networks. Local refers to the locally deployed contracts when developing. */ @@ -88,6 +56,7 @@ export enum ClientType { OneTxPaymentClient = 'OneTxPaymentClient', TokenClient = 'TokenClient', TokenLockingClient = 'TokenLockingClient', + VotingReputationClient = 'VotingReputationClient', } /** @@ -162,3 +131,17 @@ export const REPUTATION_ORACLE_ENDPOINT = 'https://colony.io/reputation'; export const tokenAddresses = { SAI: '0x89d24A6b4CcB1B6fAA2625fE562bDD9a23260359', }; + +/* + * The various states a Motion might find itself in + */ +export enum MotionState { + Null = 0, + Staking = 1, + Submit = 2, + Reveal = 3, + Closed = 4, + Finalizable = 5, + Finalized = 6, + Failed = 7, +} diff --git a/src/contracts/6/VotingReputation.d.ts b/src/contracts/6/VotingReputation.d.ts new file mode 100644 index 000000000..033fd4c17 --- /dev/null +++ b/src/contracts/6/VotingReputation.d.ts @@ -0,0 +1,2667 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-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 VotingReputationInterface extends Interface { + functions: { + authority: TypedFunctionDescription<{ encode([]: []): string }>; + + getColony: TypedFunctionDescription<{ encode([]: []): string }>; + + getDeprecated: TypedFunctionDescription<{ encode([]: []): string }>; + + owner: TypedFunctionDescription<{ encode([]: []): string }>; + + setAuthority: TypedFunctionDescription<{ + encode([authority_]: [string]): string; + }>; + + setOwner: TypedFunctionDescription<{ encode([owner_]: [string]): string }>; + + identifier: TypedFunctionDescription<{ encode([]: []): string }>; + + version: TypedFunctionDescription<{ encode([]: []): string }>; + + install: TypedFunctionDescription<{ encode([_colony]: [string]): string }>; + + initialise: TypedFunctionDescription<{ + encode([ + _totalStakeFraction, + _voterRewardFraction, + _userMinStakeFraction, + _maxVoteFraction, + _stakePeriod, + _submitPeriod, + _revealPeriod, + _escalationPeriod, + ]: [ + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish + ]): string; + }>; + + finishUpgrade: TypedFunctionDescription<{ encode([]: []): string }>; + + deprecate: TypedFunctionDescription<{ + encode([_deprecated]: [boolean]): string; + }>; + + uninstall: TypedFunctionDescription<{ encode([]: []): string }>; + + createRootMotion: TypedFunctionDescription<{ + encode([_altTarget, _action, _key, _value, _branchMask, _siblings]: [ + string, + Arrayish, + Arrayish, + Arrayish, + BigNumberish, + Arrayish[] + ]): string; + }>; + + createDomainMotion: TypedFunctionDescription<{ + encode([ + _domainId, + _childSkillIndex, + _action, + _key, + _value, + _branchMask, + _siblings, + ]: [ + BigNumberish, + BigNumberish, + Arrayish, + Arrayish, + Arrayish, + BigNumberish, + Arrayish[] + ]): string; + }>; + + stakeMotion: TypedFunctionDescription<{ + encode([ + _motionId, + _permissionDomainId, + _childSkillIndex, + _vote, + _amount, + _key, + _value, + _branchMask, + _siblings, + ]: [ + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + Arrayish, + Arrayish, + BigNumberish, + Arrayish[] + ]): string; + }>; + + submitVote: TypedFunctionDescription<{ + encode([_motionId, _voteSecret, _key, _value, _branchMask, _siblings]: [ + BigNumberish, + Arrayish, + Arrayish, + Arrayish, + BigNumberish, + Arrayish[] + ]): string; + }>; + + revealVote: TypedFunctionDescription<{ + encode([_motionId, _salt, _vote, _key, _value, _branchMask, _siblings]: [ + BigNumberish, + Arrayish, + BigNumberish, + Arrayish, + Arrayish, + BigNumberish, + Arrayish[] + ]): string; + }>; + + escalateMotion: TypedFunctionDescription<{ + encode([ + _motionId, + _newDomainId, + _childSkillIndex, + _key, + _value, + _branchMask, + _siblings, + ]: [ + BigNumberish, + BigNumberish, + BigNumberish, + Arrayish, + Arrayish, + BigNumberish, + Arrayish[] + ]): string; + }>; + + finalizeMotion: TypedFunctionDescription<{ + encode([_motionId]: [BigNumberish]): string; + }>; + + claimReward: TypedFunctionDescription<{ + encode([ + _motionId, + _permissionDomainId, + _childSkillIndex, + _staker, + _vote, + ]: [ + BigNumberish, + BigNumberish, + BigNumberish, + string, + BigNumberish + ]): string; + }>; + + getTotalStakeFraction: TypedFunctionDescription<{ encode([]: []): string }>; + + getVoterRewardFraction: TypedFunctionDescription<{ + encode([]: []): string; + }>; + + getUserMinStakeFraction: TypedFunctionDescription<{ + encode([]: []): string; + }>; + + getMaxVoteFraction: TypedFunctionDescription<{ encode([]: []): string }>; + + getStakePeriod: TypedFunctionDescription<{ encode([]: []): string }>; + + getSubmitPeriod: TypedFunctionDescription<{ encode([]: []): string }>; + + getRevealPeriod: TypedFunctionDescription<{ encode([]: []): string }>; + + getEscalationPeriod: TypedFunctionDescription<{ encode([]: []): string }>; + + getMotionCount: TypedFunctionDescription<{ encode([]: []): string }>; + + getMotion: TypedFunctionDescription<{ + encode([_motionId]: [BigNumberish]): string; + }>; + + getStake: TypedFunctionDescription<{ + encode([_motionId, _staker, _vote]: [ + BigNumberish, + string, + BigNumberish + ]): string; + }>; + + getExpenditureMotionCount: TypedFunctionDescription<{ + encode([_structHash]: [Arrayish]): string; + }>; + + getExpenditurePastVote: TypedFunctionDescription<{ + encode([_actionHash]: [Arrayish]): string; + }>; + + getMotionState: TypedFunctionDescription<{ + encode([_motionId]: [BigNumberish]): string; + }>; + + getVoterReward: TypedFunctionDescription<{ + encode([_motionId, _voterRep]: [BigNumberish, BigNumberish]): string; + }>; + + getStakerReward: TypedFunctionDescription<{ + encode([_motionId, _staker, _vote]: [ + BigNumberish, + string, + BigNumberish + ]): string; + }>; + + createClaimDelayAction: TypedFunctionDescription<{ + encode([action, value]: [Arrayish, BigNumberish]): string; + }>; + }; + + events: { + ExtensionInitialised: TypedEventDescription<{ + encodeTopics([]: []): string[]; + }>; + + LogSetAuthority: TypedEventDescription<{ + encodeTopics([authority]: [string | null]): string[]; + }>; + + LogSetOwner: TypedEventDescription<{ + encodeTopics([owner]: [string | null]): string[]; + }>; + + MotionCreated: TypedEventDescription<{ + encodeTopics([motionId, creator, domainId]: [ + BigNumberish | null, + null, + BigNumberish | null + ]): string[]; + }>; + + MotionEscalated: TypedEventDescription<{ + encodeTopics([motionId, escalator, domainId, newDomainId]: [ + BigNumberish | null, + null, + BigNumberish | null, + BigNumberish | null + ]): string[]; + }>; + + MotionEventSet: TypedEventDescription<{ + encodeTopics([motionId, eventIndex]: [ + BigNumberish | null, + null + ]): string[]; + }>; + + MotionFinalized: TypedEventDescription<{ + encodeTopics([motionId, action, executed]: [ + BigNumberish | null, + null, + null + ]): string[]; + }>; + + MotionRewardClaimed: TypedEventDescription<{ + encodeTopics([motionId, staker, vote, amount]: [ + BigNumberish | null, + string | null, + BigNumberish | null, + null + ]): string[]; + }>; + + MotionStaked: TypedEventDescription<{ + encodeTopics([motionId, staker, vote, amount]: [ + BigNumberish | null, + string | null, + BigNumberish | null, + null + ]): string[]; + }>; + + MotionVoteRevealed: TypedEventDescription<{ + encodeTopics([motionId, voter, vote]: [ + BigNumberish | null, + string | null, + BigNumberish | null + ]): string[]; + }>; + + MotionVoteSubmitted: TypedEventDescription<{ + encodeTopics([motionId, voter]: [ + BigNumberish | null, + string | null + ]): string[]; + }>; + }; +} + +export class VotingReputation extends Contract { + connect(signerOrProvider: Signer | Provider | string): VotingReputation; + attach(addressOrName: string): VotingReputation; + deployed(): Promise; + + on(event: EventFilter | string, listener: Listener): VotingReputation; + once(event: EventFilter | string, listener: Listener): VotingReputation; + addListener( + eventName: EventFilter | string, + listener: Listener + ): VotingReputation; + removeAllListeners(eventName: EventFilter | string): VotingReputation; + removeListener(eventName: any, listener: Listener): VotingReputation; + + interface: VotingReputationInterface; + + functions: { + authority(overrides?: TransactionOverrides): Promise; + + "authority()"(overrides?: TransactionOverrides): Promise; + + getColony(overrides?: TransactionOverrides): Promise; + + "getColony()"(overrides?: TransactionOverrides): Promise; + + getDeprecated(overrides?: TransactionOverrides): Promise; + + "getDeprecated()"(overrides?: TransactionOverrides): Promise; + + owner(overrides?: TransactionOverrides): Promise; + + "owner()"(overrides?: TransactionOverrides): Promise; + + setAuthority( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + "setAuthority(address)"( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + setOwner( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + "setOwner(address)"( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the identifier of the extension + */ + identifier(overrides?: TransactionOverrides): Promise; + + /** + * Returns the identifier of the extension + */ + "identifier()"(overrides?: TransactionOverrides): Promise; + + /** + * Return the version number + */ + version(overrides?: TransactionOverrides): Promise; + + /** + * Return the version number + */ + "version()"(overrides?: TransactionOverrides): Promise; + + /** + * Install the extension + * @param _colony Base colony for the installation + */ + install( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Install the extension + * @param _colony Base colony for the installation + */ + "install(address)"( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Initialise the extension + * @param _escalationPeriod The length of the escalation period in seconds + * @param _maxVoteFraction The fraction of the domain's reputation which must submit for quick-end + * @param _revealPeriod The length of the reveal period in seconds + * @param _stakePeriod The length of the staking period in seconds + * @param _submitPeriod The length of the submit period in seconds + * @param _totalStakeFraction The fraction of the domain's reputation we need to stake + * @param _userMinStakeFraction The minimum per-user stake as fraction of total stake + * @param _voterRewardFraction The fraction of the total stake paid out to voters as rewards + */ + initialise( + _totalStakeFraction: BigNumberish, + _voterRewardFraction: BigNumberish, + _userMinStakeFraction: BigNumberish, + _maxVoteFraction: BigNumberish, + _stakePeriod: BigNumberish, + _submitPeriod: BigNumberish, + _revealPeriod: BigNumberish, + _escalationPeriod: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Initialise the extension + * @param _escalationPeriod The length of the escalation period in seconds + * @param _maxVoteFraction The fraction of the domain's reputation which must submit for quick-end + * @param _revealPeriod The length of the reveal period in seconds + * @param _stakePeriod The length of the staking period in seconds + * @param _submitPeriod The length of the submit period in seconds + * @param _totalStakeFraction The fraction of the domain's reputation we need to stake + * @param _userMinStakeFraction The minimum per-user stake as fraction of total stake + * @param _voterRewardFraction The fraction of the total stake paid out to voters as rewards + */ + "initialise(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)"( + _totalStakeFraction: BigNumberish, + _voterRewardFraction: BigNumberish, + _userMinStakeFraction: BigNumberish, + _maxVoteFraction: BigNumberish, + _stakePeriod: BigNumberish, + _submitPeriod: BigNumberish, + _revealPeriod: BigNumberish, + _escalationPeriod: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when upgrading the extension + */ + finishUpgrade( + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when upgrading the extension + */ + "finishUpgrade()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + deprecate( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + "deprecate(bool)"( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when uninstalling the extension + */ + uninstall(overrides?: TransactionOverrides): Promise; + + /** + * Called when uninstalling the extension + */ + "uninstall()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Create a motion in the root domain + * @param _action A bytes array encoding a function call + * @param _altTarget The contract to which we send the action (0x0 for the colony) + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the root domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the root domain + */ + createRootMotion( + _altTarget: string, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Create a motion in the root domain + * @param _action A bytes array encoding a function call + * @param _altTarget The contract to which we send the action (0x0 for the colony) + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the root domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the root domain + */ + "createRootMotion(address,bytes,bytes,bytes,uint256,bytes32[])"( + _altTarget: string, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Create a motion in any domain + * @param _action A bytes array encoding a function call + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex The childSkillIndex pointing to the domain of the action + * @param _domainId The domain where we vote on the motion + * @param _key Reputation tree key for the domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the domain + */ + createDomainMotion( + _domainId: BigNumberish, + _childSkillIndex: BigNumberish, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Create a motion in any domain + * @param _action A bytes array encoding a function call + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex The childSkillIndex pointing to the domain of the action + * @param _domainId The domain where we vote on the motion + * @param _key Reputation tree key for the domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the domain + */ + "createDomainMotion(uint256,uint256,bytes,bytes,bytes,uint256,bytes32[])"( + _domainId: BigNumberish, + _childSkillIndex: BigNumberish, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Stake on a motion + * @param _amount The amount of tokens being staked + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex For the domain in which the motion is occurring + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _permissionDomainId The domain where the extension has the arbitration permission + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + stakeMotion( + _motionId: BigNumberish, + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _vote: BigNumberish, + _amount: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Stake on a motion + * @param _amount The amount of tokens being staked + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex For the domain in which the motion is occurring + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _permissionDomainId The domain where the extension has the arbitration permission + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + "stakeMotion(uint256,uint256,uint256,uint256,uint256,bytes,bytes,uint256,bytes32[])"( + _motionId: BigNumberish, + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _vote: BigNumberish, + _amount: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Submit a vote secret for a motion + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _voteSecret The hashed vote secret + */ + submitVote( + _motionId: BigNumberish, + _voteSecret: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Submit a vote secret for a motion + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _voteSecret The hashed vote secret + */ + "submitVote(uint256,bytes32,bytes,bytes,uint256,bytes32[])"( + _motionId: BigNumberish, + _voteSecret: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Reveal a vote secret for a motion + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _salt The salt used to hash the vote + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + revealVote( + _motionId: BigNumberish, + _salt: Arrayish, + _vote: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Reveal a vote secret for a motion + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _salt The salt used to hash the vote + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + "revealVote(uint256,bytes32,uint256,bytes,bytes,uint256,bytes32[])"( + _motionId: BigNumberish, + _salt: Arrayish, + _vote: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Escalate a motion to a higher domain + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex For the current domain, relative to the escalated domain + * @param _key Reputation tree key for the new domain + * @param _motionId The id of the motion + * @param _newDomainId The desired domain of escalation + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the new domain + */ + escalateMotion( + _motionId: BigNumberish, + _newDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Escalate a motion to a higher domain + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex For the current domain, relative to the escalated domain + * @param _key Reputation tree key for the new domain + * @param _motionId The id of the motion + * @param _newDomainId The desired domain of escalation + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the new domain + */ + "escalateMotion(uint256,uint256,uint256,bytes,bytes,uint256,bytes32[])"( + _motionId: BigNumberish, + _newDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + finalizeMotion( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "finalizeMotion(uint256)"( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Claim the staker's reward + * @param _childSkillIndex For the domain in which the motion is occurring + * @param _motionId The id of the motion + * @param _permissionDomainId The domain where the extension has the arbitration permission + * @param _staker The staker whose reward is being claimed + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + claimReward( + _motionId: BigNumberish, + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Claim the staker's reward + * @param _childSkillIndex For the domain in which the motion is occurring + * @param _motionId The id of the motion + * @param _permissionDomainId The domain where the extension has the arbitration permission + * @param _staker The staker whose reward is being claimed + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + "claimReward(uint256,uint256,uint256,address,uint256)"( + _motionId: BigNumberish, + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the total stake fraction + */ + getTotalStakeFraction(overrides?: TransactionOverrides): Promise; + + /** + * Get the total stake fraction + */ + "getTotalStakeFraction()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the voter reward fraction + */ + getVoterRewardFraction( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the voter reward fraction + */ + "getVoterRewardFraction()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the user min stake fraction + */ + getUserMinStakeFraction( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the user min stake fraction + */ + "getUserMinStakeFraction()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the max vote fraction + */ + getMaxVoteFraction(overrides?: TransactionOverrides): Promise; + + /** + * Get the max vote fraction + */ + "getMaxVoteFraction()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the stake period + */ + getStakePeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the stake period + */ + "getStakePeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the submit period + */ + getSubmitPeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the submit period + */ + "getSubmitPeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the reveal period + */ + getRevealPeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the reveal period + */ + "getRevealPeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the escalation period + */ + getEscalationPeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the escalation period + */ + "getEscalationPeriod()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the total motion count + */ + getMotionCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the total motion count + */ + "getMotionCount()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the data for a single motion + * @param _motionId The id of the motion + */ + getMotion( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [ + BigNumber[], + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber[], + BigNumber[], + BigNumber[], + boolean, + boolean, + string, + string + ] & { + events: BigNumber[]; + rootHash: string; + domainId: BigNumber; + skillId: BigNumber; + skillRep: BigNumber; + repSubmitted: BigNumber; + paidVoterComp: BigNumber; + pastVoterComp: BigNumber[]; + stakes: BigNumber[]; + votes: BigNumber[]; + escalated: boolean; + finalized: boolean; + altTarget: string; + action: string; + } + >; + + /** + * Get the data for a single motion + * @param _motionId The id of the motion + */ + "getMotion(uint256)"( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [ + BigNumber[], + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber[], + BigNumber[], + BigNumber[], + boolean, + boolean, + string, + string + ] & { + events: BigNumber[]; + rootHash: string; + domainId: BigNumber; + skillId: BigNumber; + skillRep: BigNumber; + repSubmitted: BigNumber; + paidVoterComp: BigNumber; + pastVoterComp: BigNumber[]; + stakes: BigNumber[]; + votes: BigNumber[]; + escalated: boolean; + finalized: boolean; + altTarget: string; + action: string; + } + >; + + /** + * Get a user's stake on a motion + * @param _motionId The id of the motion + * @param _staker The staker address + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + getStake( + _motionId: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a user's stake on a motion + * @param _motionId The id of the motion + * @param _staker The staker address + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + "getStake(uint256,address,uint256)"( + _motionId: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of ongoing motions for a single expenditure / expenditure slot + * @param _structHash The hash of the expenditureId or expenditureId*expenditureSlot + */ + getExpenditureMotionCount( + _structHash: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of ongoing motions for a single expenditure / expenditure slot + * @param _structHash The hash of the expenditureId or expenditureId*expenditureSlot + */ + "getExpenditureMotionCount(bytes32)"( + _structHash: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the largest past vote on a single expenditure variable + * @param _actionHash The hash of the particular expenditure action + */ + getExpenditurePastVote( + _actionHash: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the largest past vote on a single expenditure variable + * @param _actionHash The hash of the particular expenditure action + */ + "getExpenditurePastVote(bytes32)"( + _actionHash: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the current state of the motion + */ + getMotionState( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the current state of the motion + */ + "getMotionState(uint256)"( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the voter reward + * @param _motionId The id of the motion + * @param _voterRep The reputation the voter has in the domain + */ + getVoterReward( + _motionId: BigNumberish, + _voterRep: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the voter reward + * @param _motionId The id of the motion + * @param _voterRep The reputation the voter has in the domain + */ + "getVoterReward(uint256,uint256)"( + _motionId: BigNumberish, + _voterRep: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the staker reward + * @param _motionId The id of the motion + * @param _staker The staker's address + * @param _vote The vote (0 = NAY, 1 = YAY) + */ + getStakerReward( + _motionId: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise<[BigNumber, BigNumber]>; + + /** + * Get the staker reward + * @param _motionId The id of the motion + * @param _staker The staker's address + * @param _vote The vote (0 = NAY, 1 = YAY) + */ + "getStakerReward(uint256,address,uint256)"( + _motionId: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise<[BigNumber, BigNumber]>; + + createClaimDelayAction( + action: Arrayish, + value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "createClaimDelayAction(bytes,uint256)"( + action: Arrayish, + value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + }; + + authority(overrides?: TransactionOverrides): Promise; + + "authority()"(overrides?: TransactionOverrides): Promise; + + getColony(overrides?: TransactionOverrides): Promise; + + "getColony()"(overrides?: TransactionOverrides): Promise; + + getDeprecated(overrides?: TransactionOverrides): Promise; + + "getDeprecated()"(overrides?: TransactionOverrides): Promise; + + owner(overrides?: TransactionOverrides): Promise; + + "owner()"(overrides?: TransactionOverrides): Promise; + + setAuthority( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + "setAuthority(address)"( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + setOwner( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + "setOwner(address)"( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the identifier of the extension + */ + identifier(overrides?: TransactionOverrides): Promise; + + /** + * Returns the identifier of the extension + */ + "identifier()"(overrides?: TransactionOverrides): Promise; + + /** + * Return the version number + */ + version(overrides?: TransactionOverrides): Promise; + + /** + * Return the version number + */ + "version()"(overrides?: TransactionOverrides): Promise; + + /** + * Install the extension + * @param _colony Base colony for the installation + */ + install( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Install the extension + * @param _colony Base colony for the installation + */ + "install(address)"( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Initialise the extension + * @param _escalationPeriod The length of the escalation period in seconds + * @param _maxVoteFraction The fraction of the domain's reputation which must submit for quick-end + * @param _revealPeriod The length of the reveal period in seconds + * @param _stakePeriod The length of the staking period in seconds + * @param _submitPeriod The length of the submit period in seconds + * @param _totalStakeFraction The fraction of the domain's reputation we need to stake + * @param _userMinStakeFraction The minimum per-user stake as fraction of total stake + * @param _voterRewardFraction The fraction of the total stake paid out to voters as rewards + */ + initialise( + _totalStakeFraction: BigNumberish, + _voterRewardFraction: BigNumberish, + _userMinStakeFraction: BigNumberish, + _maxVoteFraction: BigNumberish, + _stakePeriod: BigNumberish, + _submitPeriod: BigNumberish, + _revealPeriod: BigNumberish, + _escalationPeriod: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Initialise the extension + * @param _escalationPeriod The length of the escalation period in seconds + * @param _maxVoteFraction The fraction of the domain's reputation which must submit for quick-end + * @param _revealPeriod The length of the reveal period in seconds + * @param _stakePeriod The length of the staking period in seconds + * @param _submitPeriod The length of the submit period in seconds + * @param _totalStakeFraction The fraction of the domain's reputation we need to stake + * @param _userMinStakeFraction The minimum per-user stake as fraction of total stake + * @param _voterRewardFraction The fraction of the total stake paid out to voters as rewards + */ + "initialise(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)"( + _totalStakeFraction: BigNumberish, + _voterRewardFraction: BigNumberish, + _userMinStakeFraction: BigNumberish, + _maxVoteFraction: BigNumberish, + _stakePeriod: BigNumberish, + _submitPeriod: BigNumberish, + _revealPeriod: BigNumberish, + _escalationPeriod: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when upgrading the extension + */ + finishUpgrade(overrides?: TransactionOverrides): Promise; + + /** + * Called when upgrading the extension + */ + "finishUpgrade()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + deprecate( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + "deprecate(bool)"( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when uninstalling the extension + */ + uninstall(overrides?: TransactionOverrides): Promise; + + /** + * Called when uninstalling the extension + */ + "uninstall()"(overrides?: TransactionOverrides): Promise; + + /** + * Create a motion in the root domain + * @param _action A bytes array encoding a function call + * @param _altTarget The contract to which we send the action (0x0 for the colony) + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the root domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the root domain + */ + createRootMotion( + _altTarget: string, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Create a motion in the root domain + * @param _action A bytes array encoding a function call + * @param _altTarget The contract to which we send the action (0x0 for the colony) + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the root domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the root domain + */ + "createRootMotion(address,bytes,bytes,bytes,uint256,bytes32[])"( + _altTarget: string, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Create a motion in any domain + * @param _action A bytes array encoding a function call + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex The childSkillIndex pointing to the domain of the action + * @param _domainId The domain where we vote on the motion + * @param _key Reputation tree key for the domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the domain + */ + createDomainMotion( + _domainId: BigNumberish, + _childSkillIndex: BigNumberish, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Create a motion in any domain + * @param _action A bytes array encoding a function call + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex The childSkillIndex pointing to the domain of the action + * @param _domainId The domain where we vote on the motion + * @param _key Reputation tree key for the domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the domain + */ + "createDomainMotion(uint256,uint256,bytes,bytes,bytes,uint256,bytes32[])"( + _domainId: BigNumberish, + _childSkillIndex: BigNumberish, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Stake on a motion + * @param _amount The amount of tokens being staked + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex For the domain in which the motion is occurring + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _permissionDomainId The domain where the extension has the arbitration permission + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + stakeMotion( + _motionId: BigNumberish, + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _vote: BigNumberish, + _amount: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Stake on a motion + * @param _amount The amount of tokens being staked + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex For the domain in which the motion is occurring + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _permissionDomainId The domain where the extension has the arbitration permission + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + "stakeMotion(uint256,uint256,uint256,uint256,uint256,bytes,bytes,uint256,bytes32[])"( + _motionId: BigNumberish, + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _vote: BigNumberish, + _amount: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Submit a vote secret for a motion + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _voteSecret The hashed vote secret + */ + submitVote( + _motionId: BigNumberish, + _voteSecret: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Submit a vote secret for a motion + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _voteSecret The hashed vote secret + */ + "submitVote(uint256,bytes32,bytes,bytes,uint256,bytes32[])"( + _motionId: BigNumberish, + _voteSecret: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Reveal a vote secret for a motion + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _salt The salt used to hash the vote + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + revealVote( + _motionId: BigNumberish, + _salt: Arrayish, + _vote: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Reveal a vote secret for a motion + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _salt The salt used to hash the vote + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + "revealVote(uint256,bytes32,uint256,bytes,bytes,uint256,bytes32[])"( + _motionId: BigNumberish, + _salt: Arrayish, + _vote: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Escalate a motion to a higher domain + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex For the current domain, relative to the escalated domain + * @param _key Reputation tree key for the new domain + * @param _motionId The id of the motion + * @param _newDomainId The desired domain of escalation + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the new domain + */ + escalateMotion( + _motionId: BigNumberish, + _newDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Escalate a motion to a higher domain + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex For the current domain, relative to the escalated domain + * @param _key Reputation tree key for the new domain + * @param _motionId The id of the motion + * @param _newDomainId The desired domain of escalation + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the new domain + */ + "escalateMotion(uint256,uint256,uint256,bytes,bytes,uint256,bytes32[])"( + _motionId: BigNumberish, + _newDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + finalizeMotion( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "finalizeMotion(uint256)"( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Claim the staker's reward + * @param _childSkillIndex For the domain in which the motion is occurring + * @param _motionId The id of the motion + * @param _permissionDomainId The domain where the extension has the arbitration permission + * @param _staker The staker whose reward is being claimed + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + claimReward( + _motionId: BigNumberish, + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Claim the staker's reward + * @param _childSkillIndex For the domain in which the motion is occurring + * @param _motionId The id of the motion + * @param _permissionDomainId The domain where the extension has the arbitration permission + * @param _staker The staker whose reward is being claimed + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + "claimReward(uint256,uint256,uint256,address,uint256)"( + _motionId: BigNumberish, + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the total stake fraction + */ + getTotalStakeFraction(overrides?: TransactionOverrides): Promise; + + /** + * Get the total stake fraction + */ + "getTotalStakeFraction()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the voter reward fraction + */ + getVoterRewardFraction(overrides?: TransactionOverrides): Promise; + + /** + * Get the voter reward fraction + */ + "getVoterRewardFraction()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the user min stake fraction + */ + getUserMinStakeFraction(overrides?: TransactionOverrides): Promise; + + /** + * Get the user min stake fraction + */ + "getUserMinStakeFraction()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the max vote fraction + */ + getMaxVoteFraction(overrides?: TransactionOverrides): Promise; + + /** + * Get the max vote fraction + */ + "getMaxVoteFraction()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the stake period + */ + getStakePeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the stake period + */ + "getStakePeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the submit period + */ + getSubmitPeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the submit period + */ + "getSubmitPeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the reveal period + */ + getRevealPeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the reveal period + */ + "getRevealPeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the escalation period + */ + getEscalationPeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the escalation period + */ + "getEscalationPeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the total motion count + */ + getMotionCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the total motion count + */ + "getMotionCount()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the data for a single motion + * @param _motionId The id of the motion + */ + getMotion( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [ + BigNumber[], + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber[], + BigNumber[], + BigNumber[], + boolean, + boolean, + string, + string + ] & { + events: BigNumber[]; + rootHash: string; + domainId: BigNumber; + skillId: BigNumber; + skillRep: BigNumber; + repSubmitted: BigNumber; + paidVoterComp: BigNumber; + pastVoterComp: BigNumber[]; + stakes: BigNumber[]; + votes: BigNumber[]; + escalated: boolean; + finalized: boolean; + altTarget: string; + action: string; + } + >; + + /** + * Get the data for a single motion + * @param _motionId The id of the motion + */ + "getMotion(uint256)"( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [ + BigNumber[], + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber[], + BigNumber[], + BigNumber[], + boolean, + boolean, + string, + string + ] & { + events: BigNumber[]; + rootHash: string; + domainId: BigNumber; + skillId: BigNumber; + skillRep: BigNumber; + repSubmitted: BigNumber; + paidVoterComp: BigNumber; + pastVoterComp: BigNumber[]; + stakes: BigNumber[]; + votes: BigNumber[]; + escalated: boolean; + finalized: boolean; + altTarget: string; + action: string; + } + >; + + /** + * Get a user's stake on a motion + * @param _motionId The id of the motion + * @param _staker The staker address + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + getStake( + _motionId: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a user's stake on a motion + * @param _motionId The id of the motion + * @param _staker The staker address + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + "getStake(uint256,address,uint256)"( + _motionId: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of ongoing motions for a single expenditure / expenditure slot + * @param _structHash The hash of the expenditureId or expenditureId*expenditureSlot + */ + getExpenditureMotionCount( + _structHash: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of ongoing motions for a single expenditure / expenditure slot + * @param _structHash The hash of the expenditureId or expenditureId*expenditureSlot + */ + "getExpenditureMotionCount(bytes32)"( + _structHash: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the largest past vote on a single expenditure variable + * @param _actionHash The hash of the particular expenditure action + */ + getExpenditurePastVote( + _actionHash: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the largest past vote on a single expenditure variable + * @param _actionHash The hash of the particular expenditure action + */ + "getExpenditurePastVote(bytes32)"( + _actionHash: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the current state of the motion + */ + getMotionState( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the current state of the motion + */ + "getMotionState(uint256)"( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the voter reward + * @param _motionId The id of the motion + * @param _voterRep The reputation the voter has in the domain + */ + getVoterReward( + _motionId: BigNumberish, + _voterRep: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the voter reward + * @param _motionId The id of the motion + * @param _voterRep The reputation the voter has in the domain + */ + "getVoterReward(uint256,uint256)"( + _motionId: BigNumberish, + _voterRep: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the staker reward + * @param _motionId The id of the motion + * @param _staker The staker's address + * @param _vote The vote (0 = NAY, 1 = YAY) + */ + getStakerReward( + _motionId: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise<[BigNumber, BigNumber]>; + + /** + * Get the staker reward + * @param _motionId The id of the motion + * @param _staker The staker's address + * @param _vote The vote (0 = NAY, 1 = YAY) + */ + "getStakerReward(uint256,address,uint256)"( + _motionId: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise<[BigNumber, BigNumber]>; + + createClaimDelayAction( + action: Arrayish, + value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "createClaimDelayAction(bytes,uint256)"( + action: Arrayish, + value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + filters: { + ExtensionInitialised(): EventFilter; + + LogSetAuthority(authority: string | null): EventFilter; + + LogSetOwner(owner: string | null): EventFilter; + + MotionCreated( + motionId: BigNumberish | null, + creator: null, + domainId: BigNumberish | null + ): EventFilter; + + MotionEscalated( + motionId: BigNumberish | null, + escalator: null, + domainId: BigNumberish | null, + newDomainId: BigNumberish | null + ): EventFilter; + + MotionEventSet( + motionId: BigNumberish | null, + eventIndex: null + ): EventFilter; + + MotionFinalized( + motionId: BigNumberish | null, + action: null, + executed: null + ): EventFilter; + + MotionRewardClaimed( + motionId: BigNumberish | null, + staker: string | null, + vote: BigNumberish | null, + amount: null + ): EventFilter; + + MotionStaked( + motionId: BigNumberish | null, + staker: string | null, + vote: BigNumberish | null, + amount: null + ): EventFilter; + + MotionVoteRevealed( + motionId: BigNumberish | null, + voter: string | null, + vote: BigNumberish | null + ): EventFilter; + + MotionVoteSubmitted( + motionId: BigNumberish | null, + voter: string | null + ): EventFilter; + }; + + estimate: { + authority(overrides?: TransactionOverrides): Promise; + + "authority()"(overrides?: TransactionOverrides): Promise; + + getColony(overrides?: TransactionOverrides): Promise; + + "getColony()"(overrides?: TransactionOverrides): Promise; + + getDeprecated(overrides?: TransactionOverrides): Promise; + + "getDeprecated()"(overrides?: TransactionOverrides): Promise; + + owner(overrides?: TransactionOverrides): Promise; + + "owner()"(overrides?: TransactionOverrides): Promise; + + setAuthority( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + "setAuthority(address)"( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + setOwner( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + "setOwner(address)"( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the identifier of the extension + */ + identifier(overrides?: TransactionOverrides): Promise; + + /** + * Returns the identifier of the extension + */ + "identifier()"(overrides?: TransactionOverrides): Promise; + + /** + * Return the version number + */ + version(overrides?: TransactionOverrides): Promise; + + /** + * Return the version number + */ + "version()"(overrides?: TransactionOverrides): Promise; + + /** + * Install the extension + * @param _colony Base colony for the installation + */ + install( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Install the extension + * @param _colony Base colony for the installation + */ + "install(address)"( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Initialise the extension + * @param _escalationPeriod The length of the escalation period in seconds + * @param _maxVoteFraction The fraction of the domain's reputation which must submit for quick-end + * @param _revealPeriod The length of the reveal period in seconds + * @param _stakePeriod The length of the staking period in seconds + * @param _submitPeriod The length of the submit period in seconds + * @param _totalStakeFraction The fraction of the domain's reputation we need to stake + * @param _userMinStakeFraction The minimum per-user stake as fraction of total stake + * @param _voterRewardFraction The fraction of the total stake paid out to voters as rewards + */ + initialise( + _totalStakeFraction: BigNumberish, + _voterRewardFraction: BigNumberish, + _userMinStakeFraction: BigNumberish, + _maxVoteFraction: BigNumberish, + _stakePeriod: BigNumberish, + _submitPeriod: BigNumberish, + _revealPeriod: BigNumberish, + _escalationPeriod: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Initialise the extension + * @param _escalationPeriod The length of the escalation period in seconds + * @param _maxVoteFraction The fraction of the domain's reputation which must submit for quick-end + * @param _revealPeriod The length of the reveal period in seconds + * @param _stakePeriod The length of the staking period in seconds + * @param _submitPeriod The length of the submit period in seconds + * @param _totalStakeFraction The fraction of the domain's reputation we need to stake + * @param _userMinStakeFraction The minimum per-user stake as fraction of total stake + * @param _voterRewardFraction The fraction of the total stake paid out to voters as rewards + */ + "initialise(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)"( + _totalStakeFraction: BigNumberish, + _voterRewardFraction: BigNumberish, + _userMinStakeFraction: BigNumberish, + _maxVoteFraction: BigNumberish, + _stakePeriod: BigNumberish, + _submitPeriod: BigNumberish, + _revealPeriod: BigNumberish, + _escalationPeriod: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when upgrading the extension + */ + finishUpgrade(overrides?: TransactionOverrides): Promise; + + /** + * Called when upgrading the extension + */ + "finishUpgrade()"(overrides?: TransactionOverrides): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + deprecate( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + "deprecate(bool)"( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when uninstalling the extension + */ + uninstall(overrides?: TransactionOverrides): Promise; + + /** + * Called when uninstalling the extension + */ + "uninstall()"(overrides?: TransactionOverrides): Promise; + + /** + * Create a motion in the root domain + * @param _action A bytes array encoding a function call + * @param _altTarget The contract to which we send the action (0x0 for the colony) + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the root domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the root domain + */ + createRootMotion( + _altTarget: string, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Create a motion in the root domain + * @param _action A bytes array encoding a function call + * @param _altTarget The contract to which we send the action (0x0 for the colony) + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the root domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the root domain + */ + "createRootMotion(address,bytes,bytes,bytes,uint256,bytes32[])"( + _altTarget: string, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Create a motion in any domain + * @param _action A bytes array encoding a function call + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex The childSkillIndex pointing to the domain of the action + * @param _domainId The domain where we vote on the motion + * @param _key Reputation tree key for the domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the domain + */ + createDomainMotion( + _domainId: BigNumberish, + _childSkillIndex: BigNumberish, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Create a motion in any domain + * @param _action A bytes array encoding a function call + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex The childSkillIndex pointing to the domain of the action + * @param _domainId The domain where we vote on the motion + * @param _key Reputation tree key for the domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the domain + */ + "createDomainMotion(uint256,uint256,bytes,bytes,bytes,uint256,bytes32[])"( + _domainId: BigNumberish, + _childSkillIndex: BigNumberish, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Stake on a motion + * @param _amount The amount of tokens being staked + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex For the domain in which the motion is occurring + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _permissionDomainId The domain where the extension has the arbitration permission + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + stakeMotion( + _motionId: BigNumberish, + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _vote: BigNumberish, + _amount: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Stake on a motion + * @param _amount The amount of tokens being staked + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex For the domain in which the motion is occurring + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _permissionDomainId The domain where the extension has the arbitration permission + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + "stakeMotion(uint256,uint256,uint256,uint256,uint256,bytes,bytes,uint256,bytes32[])"( + _motionId: BigNumberish, + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _vote: BigNumberish, + _amount: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Submit a vote secret for a motion + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _voteSecret The hashed vote secret + */ + submitVote( + _motionId: BigNumberish, + _voteSecret: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Submit a vote secret for a motion + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _voteSecret The hashed vote secret + */ + "submitVote(uint256,bytes32,bytes,bytes,uint256,bytes32[])"( + _motionId: BigNumberish, + _voteSecret: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Reveal a vote secret for a motion + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _salt The salt used to hash the vote + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + revealVote( + _motionId: BigNumberish, + _salt: Arrayish, + _vote: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Reveal a vote secret for a motion + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _salt The salt used to hash the vote + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + "revealVote(uint256,bytes32,uint256,bytes,bytes,uint256,bytes32[])"( + _motionId: BigNumberish, + _salt: Arrayish, + _vote: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Escalate a motion to a higher domain + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex For the current domain, relative to the escalated domain + * @param _key Reputation tree key for the new domain + * @param _motionId The id of the motion + * @param _newDomainId The desired domain of escalation + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the new domain + */ + escalateMotion( + _motionId: BigNumberish, + _newDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Escalate a motion to a higher domain + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex For the current domain, relative to the escalated domain + * @param _key Reputation tree key for the new domain + * @param _motionId The id of the motion + * @param _newDomainId The desired domain of escalation + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the new domain + */ + "escalateMotion(uint256,uint256,uint256,bytes,bytes,uint256,bytes32[])"( + _motionId: BigNumberish, + _newDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + finalizeMotion( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "finalizeMotion(uint256)"( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Claim the staker's reward + * @param _childSkillIndex For the domain in which the motion is occurring + * @param _motionId The id of the motion + * @param _permissionDomainId The domain where the extension has the arbitration permission + * @param _staker The staker whose reward is being claimed + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + claimReward( + _motionId: BigNumberish, + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Claim the staker's reward + * @param _childSkillIndex For the domain in which the motion is occurring + * @param _motionId The id of the motion + * @param _permissionDomainId The domain where the extension has the arbitration permission + * @param _staker The staker whose reward is being claimed + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + "claimReward(uint256,uint256,uint256,address,uint256)"( + _motionId: BigNumberish, + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the total stake fraction + */ + getTotalStakeFraction(overrides?: TransactionOverrides): Promise; + + /** + * Get the total stake fraction + */ + "getTotalStakeFraction()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the voter reward fraction + */ + getVoterRewardFraction( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the voter reward fraction + */ + "getVoterRewardFraction()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the user min stake fraction + */ + getUserMinStakeFraction( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the user min stake fraction + */ + "getUserMinStakeFraction()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the max vote fraction + */ + getMaxVoteFraction(overrides?: TransactionOverrides): Promise; + + /** + * Get the max vote fraction + */ + "getMaxVoteFraction()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the stake period + */ + getStakePeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the stake period + */ + "getStakePeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the submit period + */ + getSubmitPeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the submit period + */ + "getSubmitPeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the reveal period + */ + getRevealPeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the reveal period + */ + "getRevealPeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the escalation period + */ + getEscalationPeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the escalation period + */ + "getEscalationPeriod()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the total motion count + */ + getMotionCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the total motion count + */ + "getMotionCount()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the data for a single motion + * @param _motionId The id of the motion + */ + getMotion( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the data for a single motion + * @param _motionId The id of the motion + */ + "getMotion(uint256)"( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a user's stake on a motion + * @param _motionId The id of the motion + * @param _staker The staker address + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + getStake( + _motionId: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a user's stake on a motion + * @param _motionId The id of the motion + * @param _staker The staker address + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + "getStake(uint256,address,uint256)"( + _motionId: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of ongoing motions for a single expenditure / expenditure slot + * @param _structHash The hash of the expenditureId or expenditureId*expenditureSlot + */ + getExpenditureMotionCount( + _structHash: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of ongoing motions for a single expenditure / expenditure slot + * @param _structHash The hash of the expenditureId or expenditureId*expenditureSlot + */ + "getExpenditureMotionCount(bytes32)"( + _structHash: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the largest past vote on a single expenditure variable + * @param _actionHash The hash of the particular expenditure action + */ + getExpenditurePastVote( + _actionHash: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the largest past vote on a single expenditure variable + * @param _actionHash The hash of the particular expenditure action + */ + "getExpenditurePastVote(bytes32)"( + _actionHash: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the current state of the motion + */ + getMotionState( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the current state of the motion + */ + "getMotionState(uint256)"( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the voter reward + * @param _motionId The id of the motion + * @param _voterRep The reputation the voter has in the domain + */ + getVoterReward( + _motionId: BigNumberish, + _voterRep: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the voter reward + * @param _motionId The id of the motion + * @param _voterRep The reputation the voter has in the domain + */ + "getVoterReward(uint256,uint256)"( + _motionId: BigNumberish, + _voterRep: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the staker reward + * @param _motionId The id of the motion + * @param _staker The staker's address + * @param _vote The vote (0 = NAY, 1 = YAY) + */ + getStakerReward( + _motionId: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the staker reward + * @param _motionId The id of the motion + * @param _staker The staker's address + * @param _vote The vote (0 = NAY, 1 = YAY) + */ + "getStakerReward(uint256,address,uint256)"( + _motionId: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + createClaimDelayAction( + action: Arrayish, + value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "createClaimDelayAction(bytes,uint256)"( + action: Arrayish, + value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + }; +} diff --git a/src/contracts/6/factories/VotingReputation__factory.ts b/src/contracts/6/factories/VotingReputation__factory.ts new file mode 100644 index 000000000..7c99fae3f --- /dev/null +++ b/src/contracts/6/factories/VotingReputation__factory.ts @@ -0,0 +1,1151 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, ContractFactory, Signer } from "ethers"; +import { Provider } from "ethers/providers"; +import { UnsignedTransaction } from "ethers/utils/transaction"; + +import { TransactionOverrides } from ".."; +import { VotingReputation } from "../VotingReputation"; + +export class VotingReputation__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy(overrides?: TransactionOverrides): Promise { + return super.deploy(overrides) as Promise; + } + getDeployTransaction(overrides?: TransactionOverrides): UnsignedTransaction { + return super.getDeployTransaction(overrides); + } + attach(address: string): VotingReputation { + return super.attach(address) as VotingReputation; + } + connect(signer: Signer): VotingReputation__factory { + return super.connect(signer) as VotingReputation__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): VotingReputation { + return new Contract(address, _abi, signerOrProvider) as VotingReputation; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [], + name: "ExtensionInitialised", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "authority", + type: "address", + }, + ], + name: "LogSetAuthority", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "LogSetOwner", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "motionId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "creator", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "domainId", + type: "uint256", + }, + ], + name: "MotionCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "motionId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "escalator", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "domainId", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "newDomainId", + type: "uint256", + }, + ], + name: "MotionEscalated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "motionId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "eventIndex", + type: "uint256", + }, + ], + name: "MotionEventSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "motionId", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "action", + type: "bytes", + }, + { + indexed: false, + internalType: "bool", + name: "executed", + type: "bool", + }, + ], + name: "MotionFinalized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "motionId", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "staker", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "vote", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "MotionRewardClaimed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "motionId", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "staker", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "vote", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "MotionStaked", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "motionId", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "voter", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "vote", + type: "uint256", + }, + ], + name: "MotionVoteRevealed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "motionId", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "voter", + type: "address", + }, + ], + name: "MotionVoteSubmitted", + type: "event", + }, + { + inputs: [], + name: "authority", + outputs: [ + { + internalType: "contract DSAuthority", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getColony", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getDeprecated", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract DSAuthority", + name: "authority_", + type: "address", + }, + ], + name: "setAuthority", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner_", + type: "address", + }, + ], + name: "setOwner", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "identifier", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_colony", + type: "address", + }, + ], + name: "install", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_totalStakeFraction", + type: "uint256", + }, + { + internalType: "uint256", + name: "_voterRewardFraction", + type: "uint256", + }, + { + internalType: "uint256", + name: "_userMinStakeFraction", + type: "uint256", + }, + { + internalType: "uint256", + name: "_maxVoteFraction", + type: "uint256", + }, + { + internalType: "uint256", + name: "_stakePeriod", + type: "uint256", + }, + { + internalType: "uint256", + name: "_submitPeriod", + type: "uint256", + }, + { + internalType: "uint256", + name: "_revealPeriod", + type: "uint256", + }, + { + internalType: "uint256", + name: "_escalationPeriod", + type: "uint256", + }, + ], + name: "initialise", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "finishUpgrade", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bool", + name: "_deprecated", + type: "bool", + }, + ], + name: "deprecate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "uninstall", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_altTarget", + type: "address", + }, + { + internalType: "bytes", + name: "_action", + type: "bytes", + }, + { + internalType: "bytes", + name: "_key", + type: "bytes", + }, + { + internalType: "bytes", + name: "_value", + type: "bytes", + }, + { + internalType: "uint256", + name: "_branchMask", + type: "uint256", + }, + { + internalType: "bytes32[]", + name: "_siblings", + type: "bytes32[]", + }, + ], + name: "createRootMotion", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "bytes", + name: "_action", + type: "bytes", + }, + { + internalType: "bytes", + name: "_key", + type: "bytes", + }, + { + internalType: "bytes", + name: "_value", + type: "bytes", + }, + { + internalType: "uint256", + name: "_branchMask", + type: "uint256", + }, + { + internalType: "bytes32[]", + name: "_siblings", + type: "bytes32[]", + }, + ], + name: "createDomainMotion", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_motionId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_vote", + type: "uint256", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "_key", + type: "bytes", + }, + { + internalType: "bytes", + name: "_value", + type: "bytes", + }, + { + internalType: "uint256", + name: "_branchMask", + type: "uint256", + }, + { + internalType: "bytes32[]", + name: "_siblings", + type: "bytes32[]", + }, + ], + name: "stakeMotion", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_motionId", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_voteSecret", + type: "bytes32", + }, + { + internalType: "bytes", + name: "_key", + type: "bytes", + }, + { + internalType: "bytes", + name: "_value", + type: "bytes", + }, + { + internalType: "uint256", + name: "_branchMask", + type: "uint256", + }, + { + internalType: "bytes32[]", + name: "_siblings", + type: "bytes32[]", + }, + ], + name: "submitVote", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_motionId", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_salt", + type: "bytes32", + }, + { + internalType: "uint256", + name: "_vote", + type: "uint256", + }, + { + internalType: "bytes", + name: "_key", + type: "bytes", + }, + { + internalType: "bytes", + name: "_value", + type: "bytes", + }, + { + internalType: "uint256", + name: "_branchMask", + type: "uint256", + }, + { + internalType: "bytes32[]", + name: "_siblings", + type: "bytes32[]", + }, + ], + name: "revealVote", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_motionId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_newDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "bytes", + name: "_key", + type: "bytes", + }, + { + internalType: "bytes", + name: "_value", + type: "bytes", + }, + { + internalType: "uint256", + name: "_branchMask", + type: "uint256", + }, + { + internalType: "bytes32[]", + name: "_siblings", + type: "bytes32[]", + }, + ], + name: "escalateMotion", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_motionId", + type: "uint256", + }, + ], + name: "finalizeMotion", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_motionId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "address", + name: "_staker", + type: "address", + }, + { + internalType: "uint256", + name: "_vote", + type: "uint256", + }, + ], + name: "claimReward", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getTotalStakeFraction", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getVoterRewardFraction", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getUserMinStakeFraction", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getMaxVoteFraction", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getStakePeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getSubmitPeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getRevealPeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getEscalationPeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getMotionCount", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_motionId", + type: "uint256", + }, + ], + name: "getMotion", + outputs: [ + { + components: [ + { + internalType: "uint64[3]", + name: "events", + type: "uint64[3]", + }, + { + internalType: "bytes32", + name: "rootHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "domainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "skillId", + type: "uint256", + }, + { + internalType: "uint256", + name: "skillRep", + type: "uint256", + }, + { + internalType: "uint256", + name: "repSubmitted", + type: "uint256", + }, + { + internalType: "uint256", + name: "paidVoterComp", + type: "uint256", + }, + { + internalType: "uint256[2]", + name: "pastVoterComp", + type: "uint256[2]", + }, + { + internalType: "uint256[2]", + name: "stakes", + type: "uint256[2]", + }, + { + internalType: "uint256[2]", + name: "votes", + type: "uint256[2]", + }, + { + internalType: "bool", + name: "escalated", + type: "bool", + }, + { + internalType: "bool", + name: "finalized", + type: "bool", + }, + { + internalType: "address", + name: "altTarget", + type: "address", + }, + { + internalType: "bytes", + name: "action", + type: "bytes", + }, + ], + internalType: "struct VotingReputation.Motion", + name: "motion", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_motionId", + type: "uint256", + }, + { + internalType: "address", + name: "_staker", + type: "address", + }, + { + internalType: "uint256", + name: "_vote", + type: "uint256", + }, + ], + name: "getStake", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_structHash", + type: "bytes32", + }, + ], + name: "getExpenditureMotionCount", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_actionHash", + type: "bytes32", + }, + ], + name: "getExpenditurePastVote", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_motionId", + type: "uint256", + }, + ], + name: "getMotionState", + outputs: [ + { + internalType: "enum VotingReputation.MotionState", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_motionId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_voterRep", + type: "uint256", + }, + ], + name: "getVoterReward", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_motionId", + type: "uint256", + }, + { + internalType: "address", + name: "_staker", + type: "address", + }, + { + internalType: "uint256", + name: "_vote", + type: "uint256", + }, + ], + name: "getStakerReward", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "action", + type: "bytes", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "createClaimDelayAction", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +]; + +const _bytecode = + "0x608060405234801561001057600080fd5b50600180546001600160a01b031916339081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a2614a4b8061005e6000396000f3fe608060405234801561001057600080fd5b50600436106102325760003560e01c80637b9afba611610130578063bbd2f6c5116100b8578063da2332591161007c578063da23325914610454578063de3b0aa414610467578063deac280f1461047a578063ee2cf4731461048d578063fcf6ba93146104a057610232565b8063bbd2f6c51461040b578063bf7e214f1461041e578063bfd68ab714610426578063c06e47d61461042e578063d84eb9ee1461044157610232565b80639251cff4116100ff5780639251cff4146103aa578063ad15aad2146103bd578063b0048647146103dd578063b57025d4146103e5578063b9a8c27a146103f857610232565b80637b9afba61461035a5780637de22eb41461036d578063835ddcc11461038d5780638da5cb5b1461039557610232565b8063420b900c116101be5780636e7375b0116101825780636e7375b01461031c57806372d8bd7b146103245780637998a1c41461032c5780637a3dc330146103345780637a9e5e4b1461034757610232565b8063420b900c146102b857806354fd4d50146102d85780635c0d9d53146102e05780635d0050b2146102e85780636acd7fe61461030957610232565b80631a7dad2e116102055780631a7dad2e146102855780632363df0e1461028d5780632a1b8f9b146102955780632a1c708b146102a8578063340df28f146102b057610232565b806302d15d64146102375780630d638f301461025557806313af40351461025f578063157eb07214610272575b600080fd5b61023f6104b5565b60405161024c9190613eba565b60405180910390f35b61025d6104bb565b005b61025d61026d3660046138b5565b610504565b61025d610280366004613bdc565b610586565b61023f610788565b61023f61078e565b61025d6102a33660046138b5565b610794565b61023f610993565b61025d610999565b6102cb6102c63660046139e5565b6109cd565b60405161024c9190614066565b61023f610b37565b61023f610b3c565b6102fb6102f6366004613a9e565b610b42565b60405161024c929190613e96565b61025d6103173660046139e5565b610e00565b61023f6112f4565b61023f6112fa565b61023f611300565b61023f6103423660046139e5565b611324565b61025d6103553660046138b5565b611336565b61025d610368366004613d5b565b6113b4565b61038061037b366004613a15565b61162a565b60405161024c9190613fc0565b61023f611780565b61039d611786565b60405161024c9190613ec3565b61025d6103b83660046139ad565b611795565b6103d06103cb3660046139e5565b6117e5565b60405161024c9190614837565b61023f611a30565b61025d6103f3366004613c83565b611a36565b61025d610406366004613b11565b611d83565b61025d610419366004613c9d565b611fb1565b61039d6126af565b61039d6126be565b61025d61043c366004613ad5565b6126cd565b61023f61044f366004613bbb565b612850565b61025d610462366004613c3b565b6128ab565b61023f6104753660046139e5565b612a99565b61025d6104883660046138ed565b612aab565b61023f61049b366004613a9e565b612b49565b6104a8612b7c565b60405161024c9190613fa0565b600d5490565b6104d1336000356001600160e01b031916612b8c565b6104f65760405162461bcd60e51b81526004016104ed90614158565b60405180910390fd5b6003546001600160a01b0316ff5b61051a336000356001600160e01b031916612b8c565b6105365760405162461bcd60e51b81526004016104ed90614158565b600180546001600160a01b0319166001600160a01b0383811691909117918290556040519116907fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b6003805481906001600160a01b0316632dfbb0836105a389612c68565b6040518263ffffffff1660e01b81526004016105bf9190613fab565b60206040518083038186803b1580156105d757600080fd5b505afa1580156105eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060f91906139fd565b17141561062e5760405162461bcd60e51b81526004016104ed90614724565b600354604051630d3d4c7160e11b81526000916001600160a01b031690631a7a98e29061065f908b90600401613eba565b604080518083038186803b15801561067657600080fd5b505afa15801561068a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ae9190613a57565b51905060006106bc87612c6f565b905080821461076c57600480546040516304e8852f60e11b81526000926001600160a01b03909216916309d10a5e916106f99187918e9101613e96565b60206040518083038186803b15801561071157600080fd5b505afa158015610725573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061074991906139fd565b905081811461076a5760405162461bcd60e51b81526004016104ed906143a2565b505b61077d6000888b858a8a8a8a612da9565b505050505050505050565b600c5490565b60085490565b6003546001600160a01b0316156107bd5760405162461bcd60e51b81526004016104ed9061447e565b600380546001600160a01b0319166001600160a01b03838116919091179182905560408051634e5e839560e01b815290519290911691634e5e839591600480820192602092909190829003018186803b15801561081957600080fd5b505afa15801561082d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085191906138d1565b600480546001600160a01b0319166001600160a01b03928316178082556040805163598cc81560e11b81529051919093169263b319902a9281810192602092909190829003018186803b1580156108a757600080fd5b505afa1580156108bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108df91906138d1565b600580546001600160a01b0319166001600160a01b03928316179055600354604080516321df0da760e01b8152905191909216916321df0da7916004808301926020929190829003018186803b15801561093857600080fd5b505afa15801561094c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061097091906138d1565b600680546001600160a01b0319166001600160a01b039290921691909117905550565b60075490565b6109af336000356001600160e01b031916612b8c565b6109cb5760405162461bcd60e51b81526004016104ed90614158565b565b6000818152601060205260408120816109e584612fea565b90508315806109f55750600f5484115b15610a0557600092505050610b32565b600d820154610100900460ff1615610a2257600692505050610b32565b600a820154811180610a375750600982015481115b15610aa45781546001600160401b0316421015610a5957600192505050610b32565b600a820154811415610a7057600592505050610b32565b600b82018054600091610a88919060015b0154613009565b1115610a9957600592505050610b32565b600792505050610b32565b8154600160401b90046001600160401b0316421015610ac857600292505050610b32565b8154600160801b90046001600160401b0316421015610aec57600392505050610b32565b600e548254600160801b90046001600160401b03160142108015610b14575060018260020154115b15610b2457600492505050610b32565b600592505050610b32565b50505b919050565b600190565b60095490565b6000838152601060209081526040808320601183528184206001600160a01b038716855283528184208585529092528220548291908290610ba590610ba0600985018860028110610b8f57fe5b0154856007018960028110610a8157fe5b61302c565b90506000610bc382846009018860028110610bbc57fe5b015461305d565b90506000610bd089612fea565b905060008080610beb600b8801820154600b89016001610a81565b1115610ccc576000610c01848860060154613085565b600b88018054919250600091610c18916001610a81565b90506000610c3689600b018d60028110610c2e57fe5b01548361302c565b90506000610c4c82671bc16d674ec8000061305d565b9050670de0b6b3a7640000811180610c745750670de0b6b3a764000081148015610c7457508c155b15610ca657610c9f89610c9a89610c9588670de0b6b3a7640000870361305d565b613009565b61305d565b9550610cc3565b610cb489610c9a868461305d565b9550610cc08887613085565b94505b50505050610df0565b600686015415610cd857fe5b82866009018a60028110610ce857fe5b0154148015610d0e57508286600901610d008b6130a8565b60028110610d0a57fe5b0154105b15610d6157600086600901610d228b6130a8565b60028110610d2c57fe5b015490506000610d4882600a670de0b6b3a76400005b0461305d565b9050610d5887610c9a8784613009565b93505050610df0565b82866009018a60028110610d7157fe5b0154108015610d9757508286600901610d898b6130a8565b60028110610d9357fe5b0154145b15610dec576000866009018a60028110610dad57fe5b015490506000610dc782600a670de0b6b3a7640000610d42565b9050610dd787610c9a8484613085565b9350610de38685613085565b92505050610df0565b8391505b909a909950975050505050505050565b60008181526010602052604090206005610e19836109cd565b6007811115610e2457fe5b14610e415760405162461bcd60e51b81526004016104ed906146e3565b610e4a82612fea565b600a8201541480610e6d5750600b81018054600091610e6b91906001610a81565b115b610e7357fe5b600d8101805461ff0019166101001790556000600982016001015460098301600001541080610ea95750600c820154600b830154105b600e83018054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152939450633268b39f60e21b93610f4e9390929091830182828015610f445780601f10610f1957610100808354040283529160200191610f44565b820191906000526020600020905b815481529060010190602001808311610f2757829003601f168201915b5050505050612c68565b6001600160e01b031916148015610f765750600d8201546201000090046001600160a01b0316155b1561120c57600e8201805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152600093611016939192909183018282801561100c5780601f10610fe15761010080835404028352916020019161100c565b820191906000526020600020905b815481529060010190602001808311610fef57829003601f168201915b50505050506130b5565b600081815260146020526040902054909150611033906001613085565b60008281526014602052604090208190556110f457600e8301805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181526060936110e593919290918301828280156110d95780601f106110ae576101008083540402835291602001916110d9565b820191906000526020600020905b8154815290600101906020018083116110bc57829003601f168201915b5050505050600061162a565b90506110f18582613153565b50505b600e8301805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815260009361118f93919290918301828280156111855780601f1061115a57610100808354040283529160200191611185565b820191906000526020600020905b81548152906001019060200180831161116857829003601f168201915b50505050506131a7565b90506000806111a9600b8701820154600b88016001610a81565b116111b857600a8501546111be565b600c8501545b6000838152601360205260409020549091508111156111fa5760008281526013602052604090208190558380156111f3575060015b9350611208565b838015611205575060005b93505b5050505b600081156112b157600e8301805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181526112ae938893919290918301828280156112a45780601f10611279576101008083540402835291602001916112a4565b820191906000526020600020905b81548152906001019060200180831161128757829003601f168201915b5050505050613153565b90505b837f30a64da5658ebdc08619e03d1f155ef960c07fa9b332002f9ad606ec64b6096484600e01836040516112e6929190613fd3565b60405180910390a250505050565b600a5490565b600e5490565b7fdc951b3d4193c331186bc2de3b4e659e51d8b00ef92751ae69abaa48a6ab38dd90565b60009081526013602052604090205490565b61134c336000356001600160e01b031916612b8c565b6113685760405162461bcd60e51b81526004016104ed90614158565b600080546001600160a01b0319166001600160a01b03838116919091178083556040519116917f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada491a250565b600354604051635597bd7160e11b81526001600160a01b039091169063ab2f7ae2906113e99033906001908190600401613ed7565b60206040518083038186803b15801561140157600080fd5b505afa158015611415573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061143991906139c9565b6114555760405162461bcd60e51b81526004016104ed906143d9565b6000600354600160a81b900460ff16600281111561146f57fe5b1461148c5760405162461bcd60e51b81526004016104ed906141f5565b6706f05b59d3b200008811156114b45760405162461bcd60e51b81526004016104ed906142d1565b6706f05b59d3b200008711156114dc5760405162461bcd60e51b81526004016104ed906142d1565b670de0b6b3a76400008611156115045760405162461bcd60e51b81526004016104ed9061475b565b670de0b6b3a764000085111561152c5760405162461bcd60e51b81526004016104ed9061475b565b6301e133808411156115505760405162461bcd60e51b81526004016104ed906147c9565b6301e133808311156115745760405162461bcd60e51b81526004016104ed906147c9565b6301e133808211156115985760405162461bcd60e51b81526004016104ed906147c9565b6301e133808111156115bc5760405162461bcd60e51b81526004016104ed906147c9565b6003805460ff60a81b1916600160a81b179055600788905560088790556009869055600a859055600b849055600c839055600d829055600e8190556040517f690c4b6201f6a4c703f9d21c205d98a08dff8461e7a71e49c6d47cc8b894850190600090a15050505050505050565b602082015160248301516044840151606485015160848601516060949392919060198114156116d457604080516101648082526101a08201909252606091602082018180368337505050602081019690965250506024840192909252604483015260648201526019608482015260e060a482015261012060c482015260e481018390526001610104820181905261012482018190526101448201526004610164820152905061177a565b604080516101a48082526101e0820190925260609160208201818036833701905050905060006101848a01519050866020830152856024830152846044830152836064830152601a608483015260e060a483015261014060c48301528860e483015260026101048301526000610124830152600161014483015260026101648301528061018483015260016101a48301528197505050505050505061177a565b50505050505b92915050565b600f5490565b6001546001600160a01b031681565b6117ab336000356001600160e01b031916612b8c565b6117c75760405162461bcd60e51b81526004016104ed90614158565b60038054911515600160a01b0260ff60a01b19909216919091179055565b6117ed613633565b6000828152601060205260409081902081516102208101909252816101c081018260038282826020028201916000905b82829054906101000a90046001600160401b03166001600160401b03168152602001906008019060208260070104928301926001038202915080841161181d57905050505050508152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782016002806020026040519081016040528092919082600280156118e0576020028201915b8154815260200190600101908083116118cc575b5050509183525050604080518082019182905260209092019190600984019060029082845b815481526020019060010190808311611905575050509183525050604080518082019182905260209092019190600b84019060029082845b81548152602001906001019080831161193d575050509183525050600d82015460ff80821615156020808501919091526101008084049092161515604080860191909152620100009093046001600160a01b03166060850152600e850180548451600260018316159095026000190190911693909304601f8101839004830284018301909452838352608090940193919290830182828015611a205780601f106119f557610100808354040283529160200191611a20565b820191906000526020600020905b815481529060010190602001808311611a0357829003601f168201915b5050505050815250509050919050565b600b5490565b60008781526010602052604090206004611a4f896109cd565b6007811115611a5a57fe5b14611a775760405162461bcd60e51b81526004016104ed9061451b565b600354604051630d3d4c7160e11b81526000916001600160a01b031690631a7a98e290611aa8908b90600401613eba565b604080518083038186803b158015611abf57600080fd5b505afa158015611ad3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611af79190613a57565b51600480546040516304e8852f60e11b81529293506000926001600160a01b03909116916309d10a5e91611b2f9186918d9101613e96565b60206040518083038186803b158015611b4757600080fd5b505afa158015611b5b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b7f91906139fd565b905082600301548114611ba45760405162461bcd60e51b81526004016104ed90614447565b600283018054908a905560038401839055611bc48b60008a8a8a8a6131bd565b6004850155600c840154600b85015460009111611be2576001611be5565b60005b9050611c05856009018260028110611bf957fe5b01548660060154613085565b856009018260028110611c1457fe5b0155611c34600786018260028110611c2857fe5b01548660060154613009565b856007018260028110611c4357fe5b0155600060068601819055611c578d612fea565b90508060098701600001541080611c715750600a86015481115b611c7b5742611c81565b600b5442015b865467ffffffffffffffff19166001600160401b0391821617808855600c5467ffffffffffffffff60401b198216600160401b9284169091018316820217808955600d805467ffffffffffffffff60801b198316600160801b94909304851601909316919091021787558601805460ff191660011790556040518c9084908f907fd11ec0a82b67846e80d77c897fa0e54e2d81a0275e18cb2d40b9f534d9b738ad90611d2e903390613ec3565b60405180910390a48554426001600160401b0390811691161415611d74578c6000805160206149f68339815191526000604051611d6b9190613eba565b60405180910390a25b50505050505050505050505050565b60008781526010602052604090206003611d9c896109cd565b6007811115611da757fe5b14611dc45760405162461bcd60e51b81526004016104ed90614552565b6001861115611de55760405162461bcd60e51b81526004016104ed906145ce565b6000611df58933888888886131bd565b9050611e1182600b018860028110611e0957fe5b015482613009565b82600b018860028110611e2057fe5b01556000898152601260209081526040808320338452909152902054611e4689896132b1565b8114611e645760405162461bcd60e51b81526004016104ed9061422c565b60008a81526012602090815260408083203384529091528120819055611e8a8b84612850565b9050611e9a846006015482613009565b6006850155604051899033908d907f90285c90067ec863f95f2423d6cc031a545257d9b53dfb1974a65b46bd4a55bd90600090a46005840154600b85018054611ee4916001610a81565b1415611f3757835467ffffffffffffffff60801b1916600160801b426001600160401b0316021784556040518b906000805160206149f683398151915290611f2e90600290613eba565b60405180910390a25b6005546006546040516393c4553560e01b81526001600160a01b03928316926393c4553592611f729291169085903390600190600401613f76565b600060405180830381600087803b158015611f8c57600080fd5b505af1158015611fa0573d6000803e3d6000fd5b505050505050505050505050505050565b60008981526010602052604090206001871115611fe05760405162461bcd60e51b81526004016104ed906145ce565b6001611feb8b6109cd565b6007811115611ff657fe5b146120135760405162461bcd60e51b81526004016104ed90614263565b600061201e8b612fea565b905060006120458861204084866009018d6002811061203957fe5b0154613085565b6132e4565b9050600081116120675760405162461bcd60e51b81526004016104ed906145fb565b60008c815260116020908152604080832033845282528083208c84529091528120546120939083613009565b90506120a38d338a8a8a8a6131bd565b8111156120c25760405162461bcd60e51b81526004016104ed90614306565b6120ce8360095461305d565b811015806120f45750826120f2856009018c600281106120ea57fe5b015484613009565b145b6121105760405162461bcd60e51b81526004016104ed90614121565b6005546006546040516307dba22560e31b81526001600160a01b0392831692633edd11289261214a92911690600090600190600401613f53565b600060405180830381600087803b15801561216457600080fd5b505af1158015612178573d6000803e3d6000fd5b5050600354600287015460405163096abb4960e01b81526001600160a01b03909216935063096abb4992506121b4913391908790600401613f05565b600060405180830381600087803b1580156121ce57600080fd5b505af11580156121e2573d6000803e3d6000fd5b50505050600360009054906101000a90046001600160a01b03166001600160a01b031663446c1aa28d8d3033896002015488306040518863ffffffff1660e01b81526004016122379796959493929190614931565b600060405180830381600087803b15801561225157600080fd5b505af1158015612265573d6000803e3d6000fd5b50505050612283846009018b6002811061227b57fe5b015483613009565b846009018b6002811061229257fe5b015560008d815260116020908152604080832033845282528083208d8452909152902081905560018a1480156122cd5750600d84015460ff16155b80156122dc5750600a84015483145b801561235b5750600e8401805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152633268b39f60e21b9361234f9391929091830182828015610f445780601f10610f1957610100808354040283529160200191610f44565b6001600160e01b031916145b80156123785750600d8401546201000090046001600160a01b0316155b156124e557600e8401805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181526000936123e3939192909183018282801561100c5780601f10610fe15761010080835404028352916020019161100c565b600081815260146020526040902054909150612400906001613009565b60008281526014602090815260409182902092909255600e870180548251601f600260001961010060018616150201909316929092049182018590048502810185019093528083526060936124ba939291908301828280156124a35780601f10612478576101008083540402835291602001916124a3565b820191906000526020600020905b81548152906001019060200180831161248657829003601f168201915b50505050506003600019816124b457fe5b0461162a565b90506124c68f82613153565b6124e25760405162461bcd60e51b81526004016104ed90614079565b50505b89336001600160a01b03168e7f36de51a8af0dcecf368691aa77f69ba4d4e7974e9c709f33aeaad0e7ac5af1b8856040516125209190613eba565b60405180910390a460098401548314801561253e5750600a84015483145b156125db57835467ffffffffffffffff1916426001600160401b0390811691909117808655600c5467ffffffffffffffff60401b198216600160401b9284169091018316820217808755600d5467ffffffffffffffff60801b198216600160801b93909204841601909216021784556040518d906000805160206149f6833981519152906125ce90600090613eba565b60405180910390a2611d74565b891580156125ec5750600984015483145b80612605575060018a1480156126055750600a84015483145b15611d7457600b8054855467ffffffffffffffff1916429091016001600160401b0390811691909117808755600c5467ffffffffffffffff60401b198216600160401b9284169091018316820217808855600d5467ffffffffffffffff60801b198216600160801b939092048416019092160217855561268890850160006136bf565b83600501600090558c6000805160206149f68339815191526000604051611d6b9190613eba565b6000546001600160a01b031681565b6003546001600160a01b031690565b600086815260106020526040902060026126e6886109cd565b60078111156126f157fe5b1461270e5760405162461bcd60e51b81526004016104ed906140bb565b8561272b5760405162461bcd60e51b81526004016104ed906146ac565b600061273b8833888888886131bd565b60008981526012602090815260408083203384529091529020549091506127705761276a826005015482613009565b60058301555b60008881526012602090815260408083203380855292528083208a90555190918a917f918e84941a111dde88f3d5739c3e63ffa70d869cbbfd4ecbab1dbb3b379055f99190a36127c68260040154600a5461305d565b82600501541061284657815467ffffffffffffffff60401b1916600160401b426001600160401b038181169290920292909217808555600d5490920116600160801b0267ffffffffffffffff60801b1990911617825560405188906000805160206149f68339815191529061283d90600190613eba565b60405180910390a25b5050505050505050565b60008281526010602052604081206004810154829061287090859061302c565b9050600061288a6009840160010154600985016000610a81565b90506128a1612899838361305d565b60085461305d565b9695505050505050565b600085815260106020526040902060066128c4876109cd565b60078111156128cf57fe5b14806128ee575060076128e1876109cd565b60078111156128ec57fe5b145b61290a5760405162461bcd60e51b81526004016104ed90614800565b600080612918888686610b42565b915091506000821161293c5760405162461bcd60e51b81526004016104ed9061429a565b60008881526011602090815260408083206001600160a01b03808a1685529083528184208885529092528083209290925560055460065492516393c4553560e01b8152908216926393c455359261299f9291169086908a90600190600401613f76565b600060405180830381600087803b1580156129b957600080fd5b505af11580156129cd573d6000803e3d6000fd5b505050506000811115612a4c57600354600284015460405163fce891a560e01b81526001600160a01b039092169163fce891a591612a19918b918b918b9060008990039060040161496a565b600060405180830381600087803b158015612a3357600080fd5b505af1158015612a47573d6000803e3d6000fd5b505050505b83856001600160a01b0316897f388e060f12fe3bf76a4ba6d79050cbfa0484dfbfc3a2b866afbcbf4058b24bfe85604051612a879190613eba565b60405180910390a45050505050505050565b60009081526014602052604090205490565b600354604051630d3d4c7160e11b81526000916001600160a01b031690631a7a98e290612add90600190600401613eba565b604080518083038186803b158015612af457600080fd5b505afa158015612b08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b2c9190613a57565b519050612b40878760018489898989612da9565b50505050505050565b60008381526011602090815260408083206001600160a01b038616845282528083208484529091529020545b9392505050565b600354600160a01b900460ff1690565b60006001600160a01b038316301415612ba75750600161177a565b6001546001600160a01b0384811691161415612bc55750600161177a565b6000546001600160a01b0316612bdd5750600061177a565b60005460405163b700961360e01b81526001600160a01b039091169063b700961390612c1190869030908790600401613f26565b60206040518083038186803b158015612c2957600080fd5b505afa158015612c3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c6191906139c9565b905061177a565b6020015190565b60248101516044820151600354604051630d3d4c7160e11b8152600093929184916001600160a01b0390911690631a7a98e290612cb0908690600401613eba565b604080518083038186803b158015612cc757600080fd5b505afa158015612cdb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cff9190613a57565b519050600019821415612d16579250610b32915050565b600480546040516304e8852f60e11b81526001600160a01b03909116916309d10a5e91612d47918591879101613e96565b60206040518083038186803b158015612d5f57600080fd5b505afa158015612d73573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d9791906139fd565b9350505050610b32565b505050919050565b600354600160a01b900460ff1615612dd35760405162461bcd60e51b81526004016104ed90614792565b6001600354600160a81b900460ff166002811115612ded57fe5b14612e0a5760405162461bcd60e51b81526004016104ed906144ec565b6003546001600160a01b0389811691161415612e385760405162461bcd60e51b81526004016104ed9061462a565b600f805460010190819055600090815260106020908152604091829020600b54815467ffffffffffffffff1916429091016001600160401b0390811691909117808355600c5467ffffffffffffffff60401b198216600160401b9284169091018316820217808455600d5467ffffffffffffffff60801b198216600160801b93909204841601909216021781556004805484516397824c3f60e01b8152945192946001600160a01b03909116936397824c3f93828401939192909190829003018186803b158015612f0857600080fd5b505afa158015612f1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f4091906139fd565b60018201556002810187905560038101869055600f54612f65906000878787876131bd565b6004820155600d8101805462010000600160b01b031916620100006001600160a01b038c16021790558751612fa390600e83019060208b01906136cd565b5086600f547fec8f382abfacc0416a7b1eca9ddfcb6f79f9ee369eba7478f5471bd692bb5db733604051612fd79190613ec3565b60405180910390a3505050505050505050565b60008181526010602052604081206004015460075461177a919061305d565b8082018281101561177a5760405162461bcd60e51b81526004016104ed9061433d565b60008161304e61304485670de0b6b3a76400006132fb565b6002855b04613009565b8161305557fe5b049392505050565b6000670de0b6b3a764000061304e61307585856132fb565b6002670de0b6b3a7640000613048565b8082038281111561177a5760405162461bcd60e51b81526004016104ed906140f2565b600061177a600183613085565b6000633268b39f60e21b6130c883612c68565b6001600160e01b031916146130d957fe5b60648201516084830151610184840151601982141561312057826040516020016131039190613eba565b604051602081830303815290604052805190602001209350612da1565b8281604051602001613133929190613e96565b604051602081830303815290604052805190602001209350505050919050565b6000828152601060205260408120600d01546201000090046001600160a01b0316818115613181578161318e565b6003546001600160a01b03165b90506000808551602087016000855af195945050505050565b600060e482015280516043190160649091012090565b6000806131cc86868686613332565b60008981526010602052604090206001015490915081146131ff5760405162461bcd60e51b81526004016104ed9061436b565b60208501516014870151603488015160488901516003546001600160a01b038085169116146132405760405162461bcd60e51b81526004016104ed90614186565b60008c81526010602052604090206003015482146132705760405162461bcd60e51b81526004016104ed90614675565b8a6001600160a01b0316816001600160a01b0316146132a15760405162461bcd60e51b81526004016104ed906144b5565b50919a9950505050505050505050565b600082826040516020016132c6929190613e96565b60405160208183030381529060405280519060200120905092915050565b6000818311156132f45781612b75565b5090919050565b60008115806133165750508082028282828161331357fe5b04145b61177a5760405162461bcd60e51b81526004016104ed906141c7565b60008061334f86805190602001208680519060200120868661335a565b509695505050505050565b600061336461374b565b61336c613769565b5060408051808201909152868152610100602082015261338a613780565b86815261339561374b565b60005b86518110156134715760006133ac896134db565b60ff169050806001901b19891698506133d18160ff038661353390919063ffffffff16565b602086018190529095506000906133e79061359a565b602087015290506133f7856135f4565b84826002811061340357fe5b6020020152885189906000198582030190811061341c57fe5b602002602001015184826001036002811061343357fe5b6020020181815250508360405160200161344d9190613e62565b60408051601f19818403018152919052805160209091012085525050600101613398565b508661348357602082018390526134c4565b600061348e886134db565b60ff1690506134a98160ff038561353390919063ffffffff16565b602085018190529094506134bc9061359a565b602085015250505b6134cd826135f4565b999098509650505050505050565b6000816134fa5760405162461bcd60e51b81526004016104ed90614410565b8160805b60018160ff1610610b2f57600019600160ff83161b018216613528579182019160ff81169190911c905b60011c607f166134fe565b61353b613769565b613543613769565b8360200151831115801561355957506101008311155b61355f57fe5b60208201839052826135745760008252613583565b835160011960ff8590031b1682525b60208085015184900390820152925190911b825291565b60006135a4613769565b60008360200151116135c85760405162461bcd60e51b81526004016104ed90614589565b5050805160408051808201909152825160011b8152602092830151600019019281019290925260ff1c91565b8051602080830151808201519051604051600094613616949093929101613ea4565b604051602081830303815290604052805190602001209050919050565b604051806101c0016040528061364761379f565b815260200160008019168152602001600081526020016000815260200160008152602001600081526020016000815260200161368161374b565b815260200161368e61374b565b815260200161369b61374b565b81526000602082018190526040820181905260608083019190915260809091015290565b506000815560010160009055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061370e57805160ff191683800117855561373b565b8280016001018555821561373b579182015b8281111561373b578251825591602001919060010190613720565b506137479291506137bd565b5090565b60405180604001604052806002906020820280368337509192915050565b604080518082019091526000808252602082015290565b60408051808201909152600081526020810161379a613769565b905290565b60405180606001604052806003906020820280368337509192915050565b5b8082111561374757600081556001016137be565b8035610b32816149d2565b600082601f8301126137ed578081fd5b81356001600160401b0381111561380057fe5b6020808202613810828201614996565b8381529350818401858301828701840188101561382c57600080fd5b600092505b84831015611774578035825260019290920191908301908301613831565b600082601f83011261385f578081fd5b81356001600160401b0381111561387257fe5b613885601f8201601f1916602001614996565b915080825283602082850101111561389c57600080fd5b8060208401602084013760009082016020015292915050565b6000602082840312156138c6578081fd5b8135612b75816149d2565b6000602082840312156138e2578081fd5b8151612b75816149d2565b60008060008060008060c08789031215613905578182fd5b61390e876137d2565b955060208701356001600160401b0380821115613929578384fd5b6139358a838b0161384f565b9650604089013591508082111561394a578384fd5b6139568a838b0161384f565b9550606089013591508082111561396b578384fd5b6139778a838b0161384f565b94506080890135935060a0890135915080821115613993578283fd5b506139a089828a016137dd565b9150509295509295509295565b6000602082840312156139be578081fd5b8135612b75816149e7565b6000602082840312156139da578081fd5b8151612b75816149e7565b6000602082840312156139f6578081fd5b5035919050565b600060208284031215613a0e578081fd5b5051919050565b60008060408385031215613a27578182fd5b82356001600160401b03811115613a3c578283fd5b613a488582860161384f565b95602094909401359450505050565b600060408284031215613a68578081fd5b604051604081018181106001600160401b0382111715613a8457fe5b604052825181526020928301519281019290925250919050565b600080600060608486031215613ab2578283fd5b833592506020840135613ac4816149d2565b929592945050506040919091013590565b60008060008060008060c08789031215613aed578384fd5b863595506020870135945060408701356001600160401b038082111561394a578586fd5b600080600080600080600060e0888a031215613b2b578485fd5b87359650602088013595506040880135945060608801356001600160401b0380821115613b56578283fd5b613b628b838c0161384f565b955060808a0135915080821115613b77578283fd5b613b838b838c0161384f565b945060a08a0135935060c08a0135915080821115613b9f578283fd5b50613bac8a828b016137dd565b91505092959891949750929550565b60008060408385031215613bcd578182fd5b50508035926020909101359150565b600080600080600080600060e0888a031215613bf6578081fd5b873596506020880135955060408801356001600160401b0380821115613c1a578283fd5b613c268b838c0161384f565b965060608a0135915080821115613b56578283fd5b600080600080600060a08688031215613c52578283fd5b8535945060208601359350604086013592506060860135613c72816149d2565b949793965091946080013592915050565b600080600080600080600060e0888a031215613b2b578081fd5b60008060008060008060008060006101208a8c031215613cbb578283fd5b8935985060208a0135975060408a0135965060608a0135955060808a0135945060a08a01356001600160401b0380821115613cf4578485fd5b613d008d838e0161384f565b955060c08c0135915080821115613d15578485fd5b613d218d838e0161384f565b945060e08c013593506101008c0135915080821115613d3e578283fd5b50613d4b8c828d016137dd565b9150509295985092959850929598565b600080600080600080600080610100898b031215613d77578182fd5b505086359860208801359850604088013597606081013597506080810135965060a0810135955060c0810135945060e0013592509050565b6001600160a01b03169052565b8060005b6002811015613ddf578151845260209384019390910190600101613dc0565b50505050565b8060005b6003811015613ddf5781516001600160401b0316845260209384019390910190600101613de9565b15159052565b60008151808452815b81811015613e3c57602081850181015186830182015201613e20565b81811115613e4d5782602083870101525b50601f01601f19169290920160200192915050565b60008183825b6002811015613e87578151835260209283019290910190600101613e68565b50505060408201905092915050565b918252602082015260400190565b9283526020830191909152604082015260600190565b90815260200190565b6001600160a01b0391909116815260200190565b6001600160a01b03841681526020810183905260608101613ef7836149c5565b826040830152949350505050565b6001600160a01b039390931683526020830191909152604082015260600190565b6001600160a01b0393841681529190921660208201526001600160e01b0319909116604082015260600190565b6001600160a01b0393909316835260208301919091521515604082015260600190565b6001600160a01b039485168152602081019390935292166040820152901515606082015260800190565b901515815260200190565b6001600160e01b031991909116815260200190565b600060208252612b756020830184613e17565b60006040820160408352818554600180821660008114613ffa576001811461401857614051565b60028304607f16855260ff1983166060880152608087019350614051565b600283048086526140288a6149b9565b875b828110156140475781548a8201606001529084019060200161402a565b8901606001955050505b5050508092505050612b756020830184613e11565b60208101614073836149c5565b91905290565b60208082526022908201527f766f74696e672d7265702d657870656e6469747572652d6c6f636b2d6661696c604082015261195960f21b606082015260800190565b6020808252601a908201527f766f74696e672d7265702d6d6f74696f6e2d6e6f742d6f70656e000000000000604082015260600190565b60208082526015908201527464732d6d6174682d7375622d756e646572666c6f7760581b604082015260600190565b6020808252601d908201527f766f74696e672d7265702d696e73756666696369656e742d7374616b65000000604082015260600190565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b60208082526021908201527f766f74696e672d7265702d696e76616c69642d636f6c6f6e792d6164647265736040820152607360f81b606082015260800190565b60208082526014908201527364732d6d6174682d6d756c2d6f766572666c6f7760601b604082015260600190565b6020808252601e908201527f766f74696e672d7265702d616c72656164792d696e697469616c697365640000604082015260600190565b6020808252601a908201527f766f74696e672d7265702d7365637265742d6e6f2d6d61746368000000000000604082015260600190565b6020808252601d908201527f766f74696e672d7265702d6d6f74696f6e2d6e6f742d7374616b696e67000000604082015260600190565b6020808252601b908201527f766f74696e672d7265702d6e6f7468696e672d746f2d636c61696d0000000000604082015260600190565b6020808252818101527f766f74696e672d7265702d677265617465722d7468616e2d68616c662d776164604082015260600190565b6020808252601b908201527f766f74696e672d7265702d696e73756666696369656e742d7265700000000000604082015260600190565b60208082526014908201527364732d6d6174682d6164642d6f766572666c6f7760601b604082015260600190565b6020808252601c908201527f766f74696e672d7265702d696e76616c69642d726f6f742d6861736800000000604082015260600190565b6020808252601c908201527f766f74696e672d7265702d696e76616c69642d646f6d61696e2d696400000000604082015260600190565b6020808252601a908201527f766f74696e672d7265702d63616c6c65722d6e6f742d726f6f74000000000000604082015260600190565b6020808252601e908201527f636f6c6f6e792d70617472696369612d747265652d7a65726f2d73656c660000604082015260600190565b6020808252601f908201527f766f74696e672d7265702d696e76616c69642d646f6d61696e2d70726f6f6600604082015260600190565b6020808252601b908201527f657874656e73696f6e2d616c72656164792d696e7374616c6c65640000000000604082015260600190565b6020808252601f908201527f766f74696e672d7265702d696e76616c69642d757365722d6164647265737300604082015260600190565b602080825260159082015274766f74696e672d7265702d6e6f742d61637469766560581b604082015260600190565b6020808252601c908201527f766f74696e672d7265702d6d6f74696f6e2d6e6f742d636c6f73656400000000604082015260600190565b6020808252601c908201527f766f74696e672d7265702d6d6f74696f6e2d6e6f742d72657665616c00000000604082015260600190565b60208082526025908201527f636f6c6f6e792d70617472696369612d747265652d7a65726f2d73656c662d6c6040820152640cadccee8d60db1b606082015260800190565b602080825260139082015272766f74696e672d7265702d6261642d766f746560681b604082015260600190565b6020808252601590820152741d9bdd1a5b99cb5c995c0b5898590b585b5bdd5b9d605a1b604082015260600190565b6020808252602b908201527f766f74696e672d7265702d616c742d7461726765742d63616e6e6f742d62652d60408201526a626173652d636f6c6f6e7960a81b606082015260800190565b6020808252601b908201527f766f74696e672d7265702d696e76616c69642d736b696c6c2d69640000000000604082015260600190565b60208082526019908201527f766f74696e672d7265702d696e76616c69642d73656372657400000000000000604082015260600190565b60208082526021908201527f766f74696e672d7265702d6d6f74696f6e2d6e6f742d66696e616c697a61626c6040820152606560f81b606082015260800190565b6020808252601b908201527f766f74696e672d7265702d696e76616c69642d66756e6374696f6e0000000000604082015260600190565b6020808252601b908201527f766f74696e672d7265702d677265617465722d7468616e2d7761640000000000604082015260600190565b6020808252601b908201527f636f6c6f6e792d657874656e73696f6e2d646570726563617465640000000000604082015260600190565b6020808252601a908201527f766f74696e672d7265702d706572696f642d746f6f2d6c6f6e67000000000000604082015260600190565b6020808252601f908201527f766f74696e672d7265702d6d6f74696f6e2d6e6f742d636c61696d61626c6500604082015260600190565b60006020825261484b602083018451613de5565b60208301516080830152604083015160a0830152606083015160c0830152608083015160e083015260a0830151610100818185015260c08501519150610120828186015260e086015192506101406148a581870185613dbc565b918601519250610180916148bb86840185613dbc565b8187015193506148cf6101c0870185613dbc565b86015192506148e49050610200850183613e11565b61016085015191506148fa610220850183613e11565b840151905061490d610240840182613daf565b506101a083015161026083810152614929610280840182613e17565b949350505050565b96875260208701959095526001600160a01b0393841660408701529183166060860152608085015260a08401521660c082015260e00190565b948552602085019390935260408401919091526001600160a01b03166060830152608082015260a00190565b6040518181016001600160401b03811182821017156149b157fe5b604052919050565b60009081526020902090565b600881106149cf57fe5b50565b6001600160a01b03811681146149cf57600080fd5b80151581146149cf57600080fdfe0ae897e29e11067b0051d7f0047638509aeaeacf4e5c4146283aa5dd6ad03fd4a264697066735822122070c71b4c098633d9bd5f8191b72bc2b4fb870b5c9b448c842851c1827e11258364736f6c63430007030033"; diff --git a/src/contracts/colony/6/IColony.d.ts b/src/contracts/colony/6/IColony.d.ts new file mode 100644 index 000000000..b27dadc86 --- /dev/null +++ b/src/contracts/colony/6/IColony.d.ts @@ -0,0 +1,10684 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-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 }>; + + checkNotAdditionalProtectedVariable: TypedFunctionDescription<{ + encode([_slot]: [BigNumberish]): string; + }>; + + enterRecoveryMode: TypedFunctionDescription<{ encode([]: []): string }>; + + exitRecoveryMode: TypedFunctionDescription<{ encode([]: []): string }>; + + isInRecoveryMode: TypedFunctionDescription<{ encode([]: []): string }>; + + numRecoveryRoles: TypedFunctionDescription<{ encode([]: []): string }>; + + removeRecoveryRole: TypedFunctionDescription<{ + encode([_user]: [string]): string; + }>; + + setRecoveryRole: TypedFunctionDescription<{ + encode([_user]: [string]): string; + }>; + + setStorageSlotRecovery: TypedFunctionDescription<{ + encode([_slot, _value]: [BigNumberish, Arrayish]): string; + }>; + + authority: TypedFunctionDescription<{ encode([]: []): string }>; + + owner: TypedFunctionDescription<{ encode([]: []): string }>; + + version: TypedFunctionDescription<{ encode([]: []): string }>; + + upgrade: TypedFunctionDescription<{ + encode([_newVersion]: [BigNumberish]): string; + }>; + + finishUpgrade: TypedFunctionDescription<{ encode([]: []): string }>; + + getColonyNetwork: TypedFunctionDescription<{ encode([]: []): string }>; + + getToken: TypedFunctionDescription<{ encode([]: []): string }>; + + makeArbitraryTransaction: TypedFunctionDescription<{ + encode([_to, _action]: [string, Arrayish]): string; + }>; + + annotateTransaction: TypedFunctionDescription<{ + encode([_txHash, _metadata]: [Arrayish, string]): 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; + }>; + + setUserRoles: TypedFunctionDescription<{ + encode([ + _permissionDomainId, + _childSkillIndex, + _user, + _domainId, + _roles, + ]: [BigNumberish, BigNumberish, string, BigNumberish, Arrayish]): string; + }>; + + hasUserRole: TypedFunctionDescription<{ + encode([_user, _domainId, _role]: [ + string, + BigNumberish, + BigNumberish + ]): string; + }>; + + hasInheritedUserRole: TypedFunctionDescription<{ + encode([_user, _domainId, _role, _childSkillIndex, _childDomainId]: [ + string, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish + ]): string; + }>; + + userCanSetRoles: TypedFunctionDescription<{ + encode([_user, _domainId, _childSkillIndex, _childDomainId]: [ + string, + BigNumberish, + BigNumberish, + BigNumberish + ]): string; + }>; + + getUserRoles: TypedFunctionDescription<{ + encode([_user, _domain]: [string, BigNumberish]): string; + }>; + + getCapabilityRoles: TypedFunctionDescription<{ + encode([_sig]: [Arrayish]): string; + }>; + + emitDomainReputationReward: TypedFunctionDescription<{ + encode([_domainId, _user, _amount]: [ + BigNumberish, + string, + BigNumberish + ]): string; + }>; + + emitSkillReputationReward: TypedFunctionDescription<{ + encode([_skillId, _user, _amount]: [ + BigNumberish, + string, + BigNumberish + ]): string; + }>; + + emitDomainReputationPenalty: TypedFunctionDescription<{ + encode([ + _permissionDomainId, + _childSkillIndex, + _domainId, + _user, + _amount, + ]: [ + BigNumberish, + BigNumberish, + BigNumberish, + string, + BigNumberish + ]): string; + }>; + + emitSkillReputationPenalty: TypedFunctionDescription<{ + encode([_skillId, _user, _amount]: [ + BigNumberish, + string, + BigNumberish + ]): string; + }>; + + initialiseColony: TypedFunctionDescription<{ + encode([_colonyNetworkAddress, _token]: [string, string]): string; + }>; + + editColony: TypedFunctionDescription<{ + encode([_metadata]: [string]): string; + }>; + + bootstrapColony: TypedFunctionDescription<{ + encode([_users, _amount]: [string[], BigNumberish[]]): string; + }>; + + mintTokens: TypedFunctionDescription<{ + encode([_wad]: [BigNumberish]): string; + }>; + + mintTokensFor: TypedFunctionDescription<{ + encode([_guy, _wad]: [string, BigNumberish]): string; + }>; + + lockToken: TypedFunctionDescription<{ encode([]: []): string }>; + + unlockTokenForUser: TypedFunctionDescription<{ + encode([user, lockId]: [string, BigNumberish]): string; + }>; + + registerColonyLabel: TypedFunctionDescription<{ + encode([colonyName, orbitdb]: [string, string]): string; + }>; + + updateColonyOrbitDB: TypedFunctionDescription<{ + encode([orbitdb]: [string]): string; + }>; + + installExtension: TypedFunctionDescription<{ + encode([extensionId, version]: [Arrayish, BigNumberish]): string; + }>; + + upgradeExtension: TypedFunctionDescription<{ + encode([extensionId, newVersion]: [Arrayish, BigNumberish]): string; + }>; + + deprecateExtension: TypedFunctionDescription<{ + encode([extensionId, deprecated]: [Arrayish, boolean]): string; + }>; + + uninstallExtension: TypedFunctionDescription<{ + encode([extensionId]: [Arrayish]): string; + }>; + + addDomain: TypedFunctionDescription<{ + encode([_permissionDomainId, _childSkillIndex, _parentDomainId]: [ + BigNumberish, + BigNumberish, + BigNumberish + ]): string; + }>; + + editDomain: TypedFunctionDescription<{ + encode([_permissionDomainId, _childSkillIndex, _domainId, _metadata]: [ + BigNumberish, + BigNumberish, + BigNumberish, + string + ]): string; + }>; + + getDomain: TypedFunctionDescription<{ + encode([_id]: [BigNumberish]): string; + }>; + + getDomainCount: TypedFunctionDescription<{ encode([]: []): string }>; + + verifyReputationProof: TypedFunctionDescription<{ + encode([key, value, branchMask, siblings]: [ + Arrayish, + Arrayish, + BigNumberish, + Arrayish[] + ]): string; + }>; + + makeExpenditure: TypedFunctionDescription<{ + encode([_permissionDomainId, _childSkillIndex, _domainId]: [ + BigNumberish, + BigNumberish, + BigNumberish + ]): string; + }>; + + transferExpenditure: TypedFunctionDescription<{ + encode([_id, _newOwner]: [BigNumberish, string]): string; + }>; + + transferExpenditureViaArbitration: TypedFunctionDescription<{ + encode([_permissionDomainId, _childSkillIndex, _id, _newOwner]: [ + BigNumberish, + BigNumberish, + BigNumberish, + string + ]): string; + }>; + + cancelExpenditure: TypedFunctionDescription<{ + encode([_id]: [BigNumberish]): string; + }>; + + finalizeExpenditure: TypedFunctionDescription<{ + encode([_id]: [BigNumberish]): string; + }>; + + setExpenditureRecipient: TypedFunctionDescription<{ + encode([_id, _slot, _recipient]: [ + BigNumberish, + BigNumberish, + string + ]): string; + }>; + + setExpenditurePayout: TypedFunctionDescription<{ + encode([_id, _slot, _token, _amount]: [ + BigNumberish, + BigNumberish, + string, + BigNumberish + ]): string; + }>; + + setExpenditureSkill: TypedFunctionDescription<{ + encode([_id, _slot, _skillId]: [ + BigNumberish, + BigNumberish, + BigNumberish + ]): string; + }>; + + setExpenditurePayoutModifier: TypedFunctionDescription<{ + encode([ + _permissionDomainId, + _childSkillIndex, + _id, + _slot, + _payoutModifier, + ]: [ + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish + ]): string; + }>; + + setExpenditureClaimDelay: TypedFunctionDescription<{ + encode([_permissionDomainId, _childSkillIndex, _id, _slot, _claimDelay]: [ + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish + ]): string; + }>; + + setExpenditureState: TypedFunctionDescription<{ + encode([ + _permissionDomainId, + _childSkillIndex, + _id, + _storageSlot, + _mask, + _keys, + _value, + ]: [ + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + boolean[], + Arrayish[], + Arrayish + ]): string; + }>; + + claimExpenditurePayout: TypedFunctionDescription<{ + encode([_id, _slot, _token]: [ + BigNumberish, + BigNumberish, + string + ]): string; + }>; + + getExpenditureCount: TypedFunctionDescription<{ encode([]: []): string }>; + + getExpenditure: TypedFunctionDescription<{ + encode([_id]: [BigNumberish]): string; + }>; + + getExpenditureSlot: TypedFunctionDescription<{ + encode([_id, _slot]: [BigNumberish, BigNumberish]): string; + }>; + + getExpenditureSlotPayout: TypedFunctionDescription<{ + encode([_id, _slot, _token]: [ + BigNumberish, + BigNumberish, + string + ]): 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; + }>; + + 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; + }>; + + 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; + }>; + + approveStake: TypedFunctionDescription<{ + encode([_approvee, _domainId, _amount]: [ + string, + BigNumberish, + BigNumberish + ]): string; + }>; + + obligateStake: TypedFunctionDescription<{ + encode([_user, _domainId, _amount]: [ + string, + BigNumberish, + BigNumberish + ]): string; + }>; + + deobligateStake: TypedFunctionDescription<{ + encode([_user, _domainId, _amount]: [ + string, + BigNumberish, + BigNumberish + ]): string; + }>; + + transferStake: TypedFunctionDescription<{ + encode([ + _permissionDomainId, + _childSkillIndex, + _obligator, + _user, + _domainId, + _amount, + _recipient, + ]: [ + BigNumberish, + BigNumberish, + string, + string, + BigNumberish, + BigNumberish, + string + ]): string; + }>; + + getApproval: TypedFunctionDescription<{ + encode([_user, _obligator, _domainId]: [ + string, + string, + BigNumberish + ]): string; + }>; + + getObligation: TypedFunctionDescription<{ + encode([_user, _obligator, _domainId]: [ + string, + string, + BigNumberish + ]): string; + }>; + + getDomainFromFundingPot: TypedFunctionDescription<{ + encode([_fundingPotId]: [BigNumberish]): string; + }>; + + burnTokens: TypedFunctionDescription<{ + encode([token, amount]: [string, BigNumberish]): string; + }>; + + unlockToken: TypedFunctionDescription<{ encode([]: []): string }>; + }; + + events: { + Annotation: TypedEventDescription<{ + encodeTopics([agent, txHash, metadata]: [ + string | null, + Arrayish | null, + null + ]): string[]; + }>; + + ColonyBootstrapped: TypedEventDescription<{ + encodeTopics([agent, users, amounts]: [null, null, null]): string[]; + }>; + + ColonyFundsClaimed: TypedEventDescription<{ + encodeTopics([agent, token, fee, payoutRemainder]: [ + null, + null, + null, + null + ]): string[]; + }>; + + ColonyFundsMovedBetweenFundingPots: TypedEventDescription<{ + encodeTopics([agent, fromPot, toPot, amount, token]: [ + null, + BigNumberish | null, + BigNumberish | null, + null, + null + ]): string[]; + }>; + + ColonyInitialised: TypedEventDescription<{ + encodeTopics([agent, colonyNetwork, token]: [null, null, null]): string[]; + }>; + + ColonyMetadata: TypedEventDescription<{ + encodeTopics([agent, metadata]: [null, null]): string[]; + }>; + + ColonyRewardInverseSet: TypedEventDescription<{ + encodeTopics([agent, rewardInverse]: [null, null]): string[]; + }>; + + ColonyRoleSet: TypedEventDescription<{ + encodeTopics([agent, user, domainId, role, setTo]: [ + null, + string | null, + BigNumberish | null, + BigNumberish | null, + null + ]): string[]; + }>; + + ColonyUpgraded: TypedEventDescription<{ + encodeTopics([agent, oldVersion, newVersion]: [ + null, + null, + null + ]): string[]; + }>; + + DomainAdded: TypedEventDescription<{ + encodeTopics([agent, domainId]: [null, null]): string[]; + }>; + + DomainMetadata: TypedEventDescription<{ + encodeTopics([agent, domainId, metadata]: [ + null, + BigNumberish | null, + null + ]): string[]; + }>; + + ExpenditureAdded: TypedEventDescription<{ + encodeTopics([agent, expenditureId]: [null, null]): string[]; + }>; + + ExpenditureCancelled: TypedEventDescription<{ + encodeTopics([agent, expenditureId]: [ + null, + BigNumberish | null + ]): string[]; + }>; + + ExpenditureFinalized: TypedEventDescription<{ + encodeTopics([agent, expenditureId]: [ + null, + BigNumberish | null + ]): string[]; + }>; + + ExpenditurePayoutSet: TypedEventDescription<{ + encodeTopics([agent, expenditureId, slot, token, amount]: [ + null, + BigNumberish | null, + BigNumberish | null, + string | null, + null + ]): string[]; + }>; + + ExpenditureRecipientSet: TypedEventDescription<{ + encodeTopics([agent, expenditureId, slot, recipient]: [ + null, + BigNumberish | null, + BigNumberish | null, + string | null + ]): string[]; + }>; + + ExpenditureSkillSet: TypedEventDescription<{ + encodeTopics([agent, expenditureId, slot, skillId]: [ + null, + BigNumberish | null, + BigNumberish | null, + BigNumberish | null + ]): string[]; + }>; + + ExpenditureTransferred: TypedEventDescription<{ + encodeTopics([agent, expenditureId, owner]: [ + null, + BigNumberish | null, + string | null + ]): string[]; + }>; + + FundingPotAdded: TypedEventDescription<{ + encodeTopics([fundingPotId]: [null]): string[]; + }>; + + PaymentAdded: TypedEventDescription<{ + encodeTopics([agent, paymentId]: [null, null]): string[]; + }>; + + PaymentFinalized: TypedEventDescription<{ + encodeTopics([agent, paymentId]: [null, BigNumberish | null]): string[]; + }>; + + PaymentPayoutSet: TypedEventDescription<{ + encodeTopics([agent, paymentId, token, amount]: [ + null, + BigNumberish | null, + null, + null + ]): string[]; + }>; + + PaymentRecipientSet: TypedEventDescription<{ + encodeTopics([agent, paymentId, recipient]: [ + null, + BigNumberish | null, + null + ]): string[]; + }>; + + PaymentSkillSet: TypedEventDescription<{ + encodeTopics([agent, paymentId, skillId]: [ + null, + BigNumberish | null, + null + ]): string[]; + }>; + + PayoutClaimed: TypedEventDescription<{ + encodeTopics([agent, fundingPotId, token, amount]: [ + null, + BigNumberish | null, + null, + null + ]): string[]; + }>; + + RecoveryModeEntered: TypedEventDescription<{ + encodeTopics([user]: [null]): string[]; + }>; + + RecoveryModeExitApproved: TypedEventDescription<{ + encodeTopics([user]: [null]): string[]; + }>; + + RecoveryModeExited: TypedEventDescription<{ + encodeTopics([user]: [null]): string[]; + }>; + + RecoveryRoleSet: TypedEventDescription<{ + encodeTopics([user, setTo]: [string | null, null]): string[]; + }>; + + RecoveryStorageSlotSet: TypedEventDescription<{ + encodeTopics([user, slot, fromValue, toValue]: [ + null, + null, + null, + null + ]): string[]; + }>; + + RewardPayoutClaimed: TypedEventDescription<{ + encodeTopics([rewardPayoutId, user, fee, rewardRemainder]: [ + null, + null, + null, + null + ]): string[]; + }>; + + RewardPayoutCycleEnded: TypedEventDescription<{ + encodeTopics([agent, rewardPayoutId]: [null, null]): string[]; + }>; + + RewardPayoutCycleStarted: TypedEventDescription<{ + encodeTopics([agent, rewardPayoutId]: [null, null]): string[]; + }>; + + TaskAdded: TypedEventDescription<{ + encodeTopics([agent, taskId]: [null, null]): string[]; + }>; + + TaskBriefSet: TypedEventDescription<{ + encodeTopics([taskId, specificationHash]: [ + BigNumberish | null, + null + ]): string[]; + }>; + + TaskCanceled: TypedEventDescription<{ + encodeTopics([taskId]: [BigNumberish | null]): string[]; + }>; + + TaskChangedViaSignatures: TypedEventDescription<{ + encodeTopics([reviewerAddresses]: [null]): string[]; + }>; + + TaskCompleted: TypedEventDescription<{ + encodeTopics([agent, taskId]: [null, BigNumberish | null]): string[]; + }>; + + TaskDeliverableSubmitted: TypedEventDescription<{ + encodeTopics([agent, taskId, deliverableHash]: [ + null, + BigNumberish | null, + null + ]): string[]; + }>; + + TaskDueDateSet: TypedEventDescription<{ + encodeTopics([taskId, dueDate]: [BigNumberish | null, null]): string[]; + }>; + + TaskFinalized: TypedEventDescription<{ + encodeTopics([agent, taskId]: [null, BigNumberish | null]): string[]; + }>; + + TaskPayoutSet: TypedEventDescription<{ + encodeTopics([taskId, role, token, amount]: [ + BigNumberish | null, + null, + null, + null + ]): string[]; + }>; + + TaskRoleUserSet: TypedEventDescription<{ + encodeTopics([taskId, role, user]: [ + BigNumberish | null, + null, + string | null + ]): string[]; + }>; + + TaskSkillSet: TypedEventDescription<{ + encodeTopics([taskId, skillId]: [ + BigNumberish | null, + BigNumberish | null + ]): string[]; + }>; + + TaskWorkRatingRevealed: TypedEventDescription<{ + encodeTopics([agent, taskId, role, rating]: [ + null, + BigNumberish | null, + null, + null + ]): string[]; + }>; + + TokenUnlocked: TypedEventDescription<{ encodeTopics([]: []): string[] }>; + + TokensBurned: TypedEventDescription<{ + encodeTopics([agent, token, amount]: [null, null, null]): string[]; + }>; + + TokensMinted: TypedEventDescription<{ + encodeTopics([agent, who, amount]: [null, null, 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; + + /** + * Indicate approval to exit recovery mode. Can only be called by user with recovery role. + */ + "approveExitRecovery()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * No return value, but should throw if protected.This is external, 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, + overrides?: TransactionOverrides + ): Promise; + + /** + * No return value, but should throw if protected.This is external, 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(uint256)"( + _slot: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Put colony network mining into recovery mode. Can only be called by user with recovery role. + */ + enterRecoveryMode( + overrides?: TransactionOverrides + ): Promise; + + /** + * Put colony network mining into recovery mode. Can only be called by user with recovery role. + */ + "enterRecoveryMode()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Exit recovery mode, can be called by anyone if enough whitelist approvals are given. + */ + exitRecoveryMode( + overrides?: TransactionOverrides + ): Promise; + + /** + * Exit recovery mode, can be called by anyone if enough whitelist approvals are given. + */ + "exitRecoveryMode()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Is colony network in recovery mode. + */ + isInRecoveryMode(overrides?: TransactionOverrides): Promise; + + /** + * Is colony network in recovery mode. + */ + "isInRecoveryMode()"(overrides?: TransactionOverrides): Promise; + + /** + * Return number of recovery roles. + */ + numRecoveryRoles(overrides?: TransactionOverrides): Promise; + + /** + * Return number of recovery roles. + */ + "numRecoveryRoles()"(overrides?: TransactionOverrides): 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; + + /** + * Remove colony recovery role. Can only be called by root role. + * @param _user User we want to remove recovery role from + */ + "removeRecoveryRole(address)"( + _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; + + /** + * Set new colony recovery role. Can be called by root. + * @param _user User we want to give a recovery role to + */ + "setRecoveryRole(address)"( + _user: string, + overrides?: TransactionOverrides + ): 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; + + /** + * 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(uint256,bytes32)"( + _slot: BigNumberish, + _value: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `ColonyAuthority` for the colony. + */ + authority(overrides?: TransactionOverrides): Promise; + + /** + * Get the `ColonyAuthority` for the colony. + */ + "authority()"(overrides?: TransactionOverrides): Promise; + + /** + * Used for testing. + * Get the colony `owner` address. This should be address(0x0) at all times. + */ + owner(overrides?: TransactionOverrides): Promise; + + /** + * Used for testing. + * Get the colony `owner` address. This should be address(0x0) at all times. + */ + "owner()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the Colony contract version. Starts from 1 and is incremented with every deployed contract change. + */ + version(overrides?: TransactionOverrides): Promise; + + /** + * Get the Colony contract version. Starts from 1 and is incremented with every deployed contract change. + */ + "version()"(overrides?: TransactionOverrides): 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; + + /** + * 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(uint256)"( + _newVersion: BigNumberish, + 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 external 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; + + /** + * Can only be called by the colony itself, and only expected to be called as part of the `upgrade()` call. Required to be external 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. + */ + getColonyNetwork(overrides?: TransactionOverrides): Promise; + + /** + * The colonyNetworkAddress we read here is set once, during `initialiseColony`. + * Returns the colony network address set on the Colony. + */ + "getColonyNetwork()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the colony token. + */ + getToken(overrides?: TransactionOverrides): Promise; + + /** + * Get the colony token. + */ + "getToken()"(overrides?: TransactionOverrides): Promise; + + /** + * Execute arbitrary transaction on behalf of the Colony + * @param _action Bytes array encoding the function call and arguments + * @param _to Contract to receive the function call (cannot be network or token locking) + */ + makeArbitraryTransaction( + _to: string, + _action: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Execute arbitrary transaction on behalf of the Colony + * @param _action Bytes array encoding the function call and arguments + * @param _to Contract to receive the function call (cannot be network or token locking) + */ + "makeArbitraryTransaction(address,bytes)"( + _to: string, + _action: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a metadata string for a transaction + * @param _metadata String of metadata for tx + * @param _txHash Hash of transaction being annotated (0x0 for current tx) + */ + annotateTransaction( + _txHash: Arrayish, + _metadata: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a metadata string for a transaction + * @param _metadata String of metadata for tx + * @param _txHash Hash of transaction being annotated (0x0 for current tx) + */ + "annotateTransaction(bytes32,string)"( + _txHash: Arrayish, + _metadata: string, + overrides?: TransactionOverrides + ): 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 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(address,bool)"( + _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 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(uint256,uint256,address,uint256,bool)"( + _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 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(uint256,uint256,address,uint256,bool)"( + _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 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(uint256,uint256,address,uint256,bool)"( + _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; + + /** + * 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(uint256,uint256,address,uint256,bool)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _user: string, + _domainId: BigNumberish, + _setTo: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set several roles in one transaction. 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 _roles Byte array representing the desired role setting (1 for on, 0 for off) + * @param _user User we want to give a role to + */ + setUserRoles( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _user: string, + _domainId: BigNumberish, + _roles: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set several roles in one transaction. 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 _roles Byte array representing the desired role setting (1 for on, 0 for off) + * @param _user User we want to give a role to + */ + "setUserRoles(uint256,uint256,address,uint256,bytes32)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _user: string, + _domainId: BigNumberish, + _roles: Arrayish, + 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 + */ + hasUserRole( + _user: string, + _domainId: BigNumberish, + _role: BigNumberish, + 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 + */ + "hasUserRole(address,uint256,uint8)"( + _user: string, + _domainId: BigNumberish, + _role: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Check whether a given user has a given role for the colony, in a child domain. Calls the function of the same name on the colony's authority contract and an internal inheritence validator function + * @param _childDomainId The domain where we want to use the role + * @param _childSkillIndex The index that the `_childDomainId` is relative to `_domainId` + * @param _domainId Domain in which the caller has the role + * @param _role The role we want to check for + * @param _user The user whose role we want to check + */ + hasInheritedUserRole( + _user: string, + _domainId: BigNumberish, + _role: BigNumberish, + _childSkillIndex: BigNumberish, + _childDomainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Check whether a given user has a given role for the colony, in a child domain. Calls the function of the same name on the colony's authority contract and an internal inheritence validator function + * @param _childDomainId The domain where we want to use the role + * @param _childSkillIndex The index that the `_childDomainId` is relative to `_domainId` + * @param _domainId Domain in which the caller has the role + * @param _role The role we want to check for + * @param _user The user whose role we want to check + */ + "hasInheritedUserRole(address,uint256,uint8,uint256,uint256)"( + _user: string, + _domainId: BigNumberish, + _role: BigNumberish, + _childSkillIndex: BigNumberish, + _childDomainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Check whether a given user can modify roles in the target domain `_childDomainId`. Mostly a convenience function to provide a uniform interface for extension contracts validating permissions + * @param _childDomainId The domain where we want to edit roles + * @param _childSkillIndex The index that the `_childDomainId` is relative to `_domainId` + * @param _domainId Domain in which the caller has the role (currently Root or Architecture) + * @param _user The user whose permissions we want to check + */ + userCanSetRoles( + _user: string, + _domainId: BigNumberish, + _childSkillIndex: BigNumberish, + _childDomainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Check whether a given user can modify roles in the target domain `_childDomainId`. Mostly a convenience function to provide a uniform interface for extension contracts validating permissions + * @param _childDomainId The domain where we want to edit roles + * @param _childSkillIndex The index that the `_childDomainId` is relative to `_domainId` + * @param _domainId Domain in which the caller has the role (currently Root or Architecture) + * @param _user The user whose permissions we want to check + */ + "userCanSetRoles(address,uint256,uint256,uint256)"( + _user: string, + _domainId: BigNumberish, + _childSkillIndex: BigNumberish, + _childDomainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Gets the bytes32 representation of the roles for a user in a given domain + * @param _domain The domain we want to get roles in + * @param _user The user whose roles we want to get + */ + getUserRoles( + _user: string, + _domain: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Gets the bytes32 representation of the roles for a user in a given domain + * @param _domain The domain we want to get roles in + * @param _user The user whose roles we want to get + */ + "getUserRoles(address,uint256)"( + _user: string, + _domain: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Gets the bytes32 representation of the roles authorized to call a function + * @param _sig The function signature + */ + getCapabilityRoles( + _sig: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Gets the bytes32 representation of the roles authorized to call a function + * @param _sig The function signature + */ + "getCapabilityRoles(bytes4)"( + _sig: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a positive domain reputation update. Available only to Root role holders + * @param _amount The (positive) amount of reputation to gain + * @param _domainId The domain where the user will gain reputation + * @param _user The user who will gain reputation + */ + emitDomainReputationReward( + _domainId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a positive domain reputation update. Available only to Root role holders + * @param _amount The (positive) amount of reputation to gain + * @param _domainId The domain where the user will gain reputation + * @param _user The user who will gain reputation + */ + "emitDomainReputationReward(uint256,address,int256)"( + _domainId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a positive skill reputation update. Available only to Root role holders + * @param _amount The (positive) amount of reputation to gain + * @param _skillId The skill where the user will gain reputation + * @param _user The user who will gain reputation + */ + emitSkillReputationReward( + _skillId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a positive skill reputation update. Available only to Root role holders + * @param _amount The (positive) amount of reputation to gain + * @param _skillId The skill where the user will gain reputation + * @param _user The user who will gain reputation + */ + "emitSkillReputationReward(uint256,address,int256)"( + _skillId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a negative domain reputation update. Available only to Arbitration role holders + * @param _amount The (negative) amount of reputation to lose + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId` + * @param _domainId The domain where the user will lose reputation + * @param _permissionDomainId The domainId in which I hold the Arbitration role + * @param _user The user who will lose reputation + */ + emitDomainReputationPenalty( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a negative domain reputation update. Available only to Arbitration role holders + * @param _amount The (negative) amount of reputation to lose + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId` + * @param _domainId The domain where the user will lose reputation + * @param _permissionDomainId The domainId in which I hold the Arbitration role + * @param _user The user who will lose reputation + */ + "emitDomainReputationPenalty(uint256,uint256,uint256,address,int256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a negative skill reputation update. Available only to Arbitration role holders in the root domain + * @param _amount The (negative) amount of reputation to lose + * @param _skillId The skill where the user will lose reputation + * @param _user The user who will lose reputation + */ + emitSkillReputationPenalty( + _skillId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a negative skill reputation update. Available only to Arbitration role holders in the root domain + * @param _amount The (negative) amount of reputation to lose + * @param _skillId The skill where the user will lose reputation + * @param _user The user who will lose reputation + */ + "emitSkillReputationPenalty(uint256,address,int256)"( + _skillId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): 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; + + /** + * 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(address,address)"( + _colonyNetworkAddress: string, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called to change the metadata associated with a colony. Expected to be a IPFS hash of a JSON blob, but not enforced to any degree by the contracts + * @param _metadata IPFS hash of the metadata + */ + editColony( + _metadata: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called to change the metadata associated with a colony. Expected to be a IPFS hash of a JSON blob, but not enforced to any degree by the contracts + * @param _metadata IPFS hash of the metadata + */ + "editColony(string)"( + _metadata: 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; + + /** + * 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(address[],int256[])"( + _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; + + /** + * Mint `_wad` amount of colony tokens. Secured function to authorised members. + * @param _wad Amount to mint + */ + "mintTokens(uint256)"( + _wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Mint `_wad` amount of colony tokens and send to `_guy`. Secured function to authorised members. + * @param _guy Recipient of new tokens + * @param _wad Amount to mint + */ + mintTokensFor( + _guy: string, + _wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Mint `_wad` amount of colony tokens and send to `_guy`. Secured function to authorised members. + * @param _guy Recipient of new tokens + * @param _wad Amount to mint + */ + "mintTokensFor(address,uint256)"( + _guy: string, + _wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Lock the colony's token. Can only be called by a network-managed extension. + */ + lockToken(overrides?: TransactionOverrides): Promise; + + /** + * Lock the colony's token. Can only be called by a network-managed extension. + */ + "lockToken()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Unlock the colony's token for a user. Can only be called by a network-managed extension. + * @param lockId The specific lock to unlock + * @param user The user to unlock + */ + unlockTokenForUser( + user: string, + lockId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Unlock the colony's token for a user. Can only be called by a network-managed extension. + * @param lockId The specific lock to unlock + * @param user The user to unlock + */ + "unlockTokenForUser(address,uint256)"( + user: string, + lockId: 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; + + /** + * 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(string,string)"( + 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; + + /** + * 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(string)"( + orbitdb: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Install an extension to the colony. Secured function to authorised members. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param version The new extension version to install + */ + installExtension( + extensionId: Arrayish, + version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Install an extension to the colony. Secured function to authorised members. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param version The new extension version to install + */ + "installExtension(bytes32,uint256)"( + extensionId: Arrayish, + version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Upgrade an extension in a colony. Secured function to authorised members. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param newVersion The version to upgrade to (must be one larger than the current version) + */ + upgradeExtension( + extensionId: Arrayish, + newVersion: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Upgrade an extension in a colony. Secured function to authorised members. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param newVersion The version to upgrade to (must be one larger than the current version) + */ + "upgradeExtension(bytes32,uint256)"( + extensionId: Arrayish, + newVersion: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the deprecation of an extension in a colony. Secured function to authorised members. + * @param deprecated Whether to deprecate the extension or not + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + deprecateExtension( + extensionId: Arrayish, + deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the deprecation of an extension in a colony. Secured function to authorised members. + * @param deprecated Whether to deprecate the extension or not + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + "deprecateExtension(bytes32,bool)"( + extensionId: Arrayish, + deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is a permanent action -- re-installing the extension will deploy a new contractIt is recommended to deprecate an extension before uninstalling to allow active objects to be resolved + * Uninstall an extension from a colony. Secured function to authorised members. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + uninstallExtension( + extensionId: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is a permanent action -- re-installing the extension will deploy a new contractIt is recommended to deprecate an extension before uninstalling to allow active objects to be resolved + * Uninstall an extension from a colony. Secured function to authorised members. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + "uninstallExtension(bytes32)"( + extensionId: Arrayish, + 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; + + /** + * 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(uint256,uint256,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _parentDomainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Adding new domains is currently retricted to one level only, i.e. `_parentDomainId` has to be the root domain id: `1`.We expect this function to only be used by the dapp + * 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 _metadata Metadata relating to the domain. Expected to be the IPFS hash of a JSON blob, but not enforced by the contracts. + * @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(uint256,uint256,uint256,string)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _parentDomainId: BigNumberish, + _metadata: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * 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 _domainId Id of the domain being edited + * @param _metadata Metadata relating to the domain. Expected to be the IPFS hash of a JSON blob, but not enforced by the contracts. + * @param _permissionDomainId The domainId in which I have the permission to take this action + */ + editDomain( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + _metadata: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * 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 _domainId Id of the domain being edited + * @param _metadata Metadata relating to the domain. Expected to be the IPFS hash of a JSON blob, but not enforced by the contracts. + * @param _permissionDomainId The domainId in which I have the permission to take this action + */ + "editDomain(uint256,uint256,uint256,string)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + _metadata: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a domain by id. + * @param _id Id of the domain which details to get + */ + getDomain( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber] & { skillId: BigNumber; fundingPotId: BigNumber } + >; + + /** + * Get a domain by id. + * @param _id Id of the domain which details to get + */ + "getDomain(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber] & { skillId: BigNumber; fundingPotId: BigNumber } + >; + + /** + * Get the number of domains in the colony. + */ + getDomainCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of domains in the colony. + */ + "getDomainCount()"(overrides?: TransactionOverrides): Promise; + + /** + * For more detail about branchMask and siblings, examine the PatriciaTree implementation. While external, 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. + */ + verifyReputationProof( + key: Arrayish, + value: Arrayish, + branchMask: BigNumberish, + siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * For more detail about branchMask and siblings, examine the PatriciaTree implementation. While external, 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. + */ + "verifyReputationProof(bytes,bytes,uint256,bytes32[])"( + key: Arrayish, + value: Arrayish, + branchMask: BigNumberish, + siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Add a new expenditure in the colony. Secured function to authorised members. + * @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 expenditure belongs + * @param _permissionDomainId The domainId in which I have the permission to take this action + */ + makeExpenditure( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Add a new expenditure in the colony. Secured function to authorised members. + * @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 expenditure belongs + * @param _permissionDomainId The domainId in which I have the permission to take this action + */ + "makeExpenditure(uint256,uint256,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Updates the expenditure owner. Can only be called by expenditure owner. + * @param _id Expenditure identifier + * @param _newOwner New owner of expenditure + */ + transferExpenditure( + _id: BigNumberish, + _newOwner: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Updates the expenditure owner. Can only be called by expenditure owner. + * @param _id Expenditure identifier + * @param _newOwner New owner of expenditure + */ + "transferExpenditure(uint256,address)"( + _id: BigNumberish, + _newOwner: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future version + * DEPRECATED Updates the expenditure owner. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _id Expenditure identifier + * @param _newOwner New owner of expenditure + * @param _permissionDomainId The domainId in which I have the permission to take this action + */ + transferExpenditureViaArbitration( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _newOwner: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future version + * DEPRECATED Updates the expenditure owner. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _id Expenditure identifier + * @param _newOwner New owner of expenditure + * @param _permissionDomainId The domainId in which I have the permission to take this action + */ + "transferExpenditureViaArbitration(uint256,uint256,uint256,address)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _newOwner: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Cancels the expenditure and prevents further editing. Can only be called by expenditure owner. + * @param _id Expenditure identifier + */ + cancelExpenditure( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Cancels the expenditure and prevents further editing. Can only be called by expenditure owner. + * @param _id Expenditure identifier + */ + "cancelExpenditure(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Finalizes the expenditure and prevents further editing. Can only be called by expenditure owner. + * @param _id Expenditure identifier + */ + finalizeExpenditure( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Finalizes the expenditure and prevents further editing. Can only be called by expenditure owner. + * @param _id Expenditure identifier + */ + "finalizeExpenditure(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Sets the recipient on an expenditure slot. Can only be called by expenditure owner. + * @param _id Id of the expenditure + * @param _recipient Address of the recipient + * @param _slot Slot for the recipient address + */ + setExpenditureRecipient( + _id: BigNumberish, + _slot: BigNumberish, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Sets the recipient on an expenditure slot. Can only be called by expenditure owner. + * @param _id Id of the expenditure + * @param _recipient Address of the recipient + * @param _slot Slot for the recipient address + */ + "setExpenditureRecipient(uint256,uint256,address)"( + _id: BigNumberish, + _slot: BigNumberish, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the token payout on an expenditure slot. Can only be called by expenditure owner. + * @param _amount Payout amount + * @param _id Id of the expenditure + * @param _slot Number of the slot + * @param _token Address of the token, `0x0` value indicates Ether + */ + setExpenditurePayout( + _id: BigNumberish, + _slot: BigNumberish, + _token: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the token payout on an expenditure slot. Can only be called by expenditure owner. + * @param _amount Payout amount + * @param _id Id of the expenditure + * @param _slot Number of the slot + * @param _token Address of the token, `0x0` value indicates Ether + */ + "setExpenditurePayout(uint256,uint256,address,uint256)"( + _id: BigNumberish, + _slot: BigNumberish, + _token: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Sets the skill on an expenditure slot. Can only be called by expenditure owner. + * @param _id Expenditure identifier + * @param _skillId Id of the new skill to set + * @param _slot Number of the slot + */ + setExpenditureSkill( + _id: BigNumberish, + _slot: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Sets the skill on an expenditure slot. Can only be called by expenditure owner. + * @param _id Expenditure identifier + * @param _skillId Id of the new skill to set + * @param _slot Number of the slot + */ + "setExpenditureSkill(uint256,uint256,uint256)"( + _id: BigNumberish, + _slot: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future versionNote that when determining payouts the payoutModifier is incremented by WAD and converted into payoutScalar + * DEPRECATED Set the payout modifier on an expenditure slot. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _id Expenditure identifier + * @param _payoutModifier Modifier to their payout (between -1 and 1, denominated in WADs, 0 means no modification) + * @param _permissionDomainId The domainId in which I have the permission to take this action + * @param _slot Number of the slot + */ + setExpenditurePayoutModifier( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _slot: BigNumberish, + _payoutModifier: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future versionNote that when determining payouts the payoutModifier is incremented by WAD and converted into payoutScalar + * DEPRECATED Set the payout modifier on an expenditure slot. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _id Expenditure identifier + * @param _payoutModifier Modifier to their payout (between -1 and 1, denominated in WADs, 0 means no modification) + * @param _permissionDomainId The domainId in which I have the permission to take this action + * @param _slot Number of the slot + */ + "setExpenditurePayoutModifier(uint256,uint256,uint256,uint256,int256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _slot: BigNumberish, + _payoutModifier: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future version + * DEPRECATED Set the claim delay on an expenditure slot. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _claimDelay Time (in seconds) to delay claiming payout after finalization + * @param _id Expenditure identifier + * @param _permissionDomainId The domainId in which I have the permission to take this action + * @param _slot Number of the slot + */ + setExpenditureClaimDelay( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _slot: BigNumberish, + _claimDelay: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future version + * DEPRECATED Set the claim delay on an expenditure slot. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _claimDelay Time (in seconds) to delay claiming payout after finalization + * @param _id Expenditure identifier + * @param _permissionDomainId The domainId in which I have the permission to take this action + * @param _slot Number of the slot + */ + "setExpenditureClaimDelay(uint256,uint256,uint256,uint256,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _slot: BigNumberish, + _claimDelay: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set arbitrary state on an expenditure slot. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _id Expenditure identifier + * @param _keys Array of additional keys (for mappings & arrays) + * @param _mask Array of booleans indicated whether a key is a mapping (F) or an array index (T). + * @param _permissionDomainId The domainId in which I have the permission to take this action + * @param _storageSlot Number of the top-level storage slot (25, 26, or 27) + * @param _value Value to set at location + */ + setExpenditureState( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _storageSlot: BigNumberish, + _mask: boolean[], + _keys: Arrayish[], + _value: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set arbitrary state on an expenditure slot. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _id Expenditure identifier + * @param _keys Array of additional keys (for mappings & arrays) + * @param _mask Array of booleans indicated whether a key is a mapping (F) or an array index (T). + * @param _permissionDomainId The domainId in which I have the permission to take this action + * @param _storageSlot Number of the top-level storage slot (25, 26, or 27) + * @param _value Value to set at location + */ + "setExpenditureState(uint256,uint256,uint256,uint256,bool[],bytes32[],bytes32)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _storageSlot: BigNumberish, + _mask: boolean[], + _keys: Arrayish[], + _value: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Claim the payout for an expenditure slot. Here the network receives a fee from each payout. + * @param _id Expenditure identifier + * @param _slot Number of the slot + * @param _token Address of the token, `0x0` value indicates Ether + */ + claimExpenditurePayout( + _id: BigNumberish, + _slot: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Claim the payout for an expenditure slot. Here the network receives a fee from each payout. + * @param _id Expenditure identifier + * @param _slot Number of the slot + * @param _token Address of the token, `0x0` value indicates Ether + */ + "claimExpenditurePayout(uint256,uint256,address)"( + _id: BigNumberish, + _slot: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of expenditures in the colony. + */ + getExpenditureCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of expenditures in the colony. + */ + "getExpenditureCount()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns an existing expenditure. + * @param _id Expenditure identifier + */ + getExpenditure( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [number, string, BigNumber, BigNumber, BigNumber, BigNumber] & { + status: number; + owner: string; + fundingPotId: BigNumber; + domainId: BigNumber; + finalizedTimestamp: BigNumber; + globalClaimDelay: BigNumber; + } + >; + + /** + * Returns an existing expenditure. + * @param _id Expenditure identifier + */ + "getExpenditure(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [number, string, BigNumber, BigNumber, BigNumber, BigNumber] & { + status: number; + owner: string; + fundingPotId: BigNumber; + domainId: BigNumber; + finalizedTimestamp: BigNumber; + globalClaimDelay: BigNumber; + } + >; + + /** + * Returns an existing expenditure slot. + * @param _id Expenditure identifier + * @param _slot Expenditure slot + */ + getExpenditureSlot( + _id: BigNumberish, + _slot: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [string, BigNumber, BigNumber, BigNumber[]] & { + recipient: string; + claimDelay: BigNumber; + payoutModifier: BigNumber; + skills: BigNumber[]; + } + >; + + /** + * Returns an existing expenditure slot. + * @param _id Expenditure identifier + * @param _slot Expenditure slot + */ + "getExpenditureSlot(uint256,uint256)"( + _id: BigNumberish, + _slot: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [string, BigNumber, BigNumber, BigNumber[]] & { + recipient: string; + claimDelay: BigNumber; + payoutModifier: BigNumber; + skills: BigNumber[]; + } + >; + + /** + * Returns an existing expenditure slot's payout for a token. + * @param _id Expenditure identifier + * @param _slot Expenditure slot + * @param _token Token address + */ + getExpenditureSlotPayout( + _id: BigNumberish, + _slot: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns an existing expenditure slot's payout for a token. + * @param _id Expenditure identifier + * @param _slot Expenditure slot + * @param _token Token address + */ + "getExpenditureSlotPayout(uint256,uint256,address)"( + _id: BigNumberish, + _slot: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 + */ + addPayment( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _recipient: string, + _token: string, + _amount: BigNumberish, + _domainId: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): 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 + */ + "addPayment(uint256,uint256,address,address,uint256,uint256,uint256)"( + _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; + + /** + * 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(uint256,uint256,uint256)"( + _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 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(uint256,uint256,uint256,address)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _recipient: string, + 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 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(uint256,uint256,uint256,uint256)"( + _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; + + /** + * 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(uint256,uint256,uint256,address,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _token: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns an exiting payment. + * @param _id Payment identifier + */ + getPayment( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [string, boolean, BigNumber, BigNumber, BigNumber[]] & { + recipient: string; + finalized: boolean; + fundingPotId: BigNumber; + domainId: BigNumber; + skills: BigNumber[]; + } + >; + + /** + * Returns an exiting payment. + * @param _id Payment identifier + */ + "getPayment(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [string, boolean, BigNumber, BigNumber, BigNumber[]] & { + recipient: string; + finalized: boolean; + fundingPotId: BigNumber; + domainId: BigNumber; + skills: 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; + + /** + * 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(uint256,address)"( + _id: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of payments in the colony. + */ + getPaymentCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of payments in the colony. + */ + "getPaymentCount()"(overrides?: TransactionOverrides): 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; + + /** + * 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(uint256,uint256,bytes32,uint256,uint256,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _specificationHash: Arrayish, + _domainId: BigNumberish, + _skillId: BigNumberish, + _dueDate: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of tasks in the colony. + */ + getTaskCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of tasks in the colony. + */ + "getTaskCount()"(overrides?: TransactionOverrides): Promise; + + /** + * Starts from 0 and is incremented on every co-reviewed task change via `executeTaskChange` call. + * @param _id Id of the task + */ + getTaskChangeNonce( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Starts from 0 and is incremented on every co-reviewed task change via `executeTaskChange` call. + * @param _id Id of the task + */ + "getTaskChangeNonce(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): 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; + + /** + * 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(uint8[],bytes32[],bytes32[],uint8[],uint256,bytes)"( + _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; + + /** + * 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(uint8[],bytes32[],bytes32[],uint8[],uint256,bytes)"( + _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; + + /** + * 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(uint256,uint8,bytes32)"( + _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; + + /** + * 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(uint256,uint8,uint8,bytes32)"( + _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 + */ + generateSecret( + _salt: Arrayish, + _value: BigNumberish, + 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 + */ + "generateSecret(bytes32,uint256)"( + _salt: Arrayish, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `ColonyStorage.RatingSecrets` information for task `_id`. + * @param _id Id of the task + */ + getTaskWorkRatingSecretsInfo( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber] & { + nSecrets: BigNumber; + lastSubmittedAt: BigNumber; + } + >; + + /** + * Get the `ColonyStorage.RatingSecrets` information for task `_id`. + * @param _id Id of the task + */ + "getTaskWorkRatingSecretsInfo(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber] & { + nSecrets: BigNumber; + lastSubmittedAt: 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 + */ + getTaskWorkRatingSecret( + _id: BigNumberish, + _role: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * 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 + */ + "getTaskWorkRatingSecret(uint256,uint8)"( + _id: BigNumberish, + _role: BigNumberish, + overrides?: TransactionOverrides + ): 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 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(uint256,address,uint256,uint256)"( + _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 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(uint256,address)"( + _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; + + /** + * 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(uint256,address)"( + _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 evaluator role. Agreed between manager and currently assigned evaluator. + * @param _id Id of the task + */ + "removeTaskEvaluatorRole(uint256)"( + _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; + + /** + * Removing worker role. Agreed between manager and currently assigned worker. + * @param _id Id of the task + */ + "removeTaskWorkerRole(uint256)"( + _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; + + /** + * 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(uint256,uint256)"( + _id: BigNumberish, + _skillId: 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 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(uint256,bytes32)"( + _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 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(uint256,uint256)"( + _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; + + /** + * 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(uint256,bytes32)"( + _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; + + /** + * 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(uint256,bytes32,bytes32)"( + _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.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(uint256)"( + _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; + + /** + * 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(uint256)"( + _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; + + /** + * 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(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a task with id `_id` + * @param _id Id of the task + */ + getTask( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [ + string, + string, + number, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber[] + ] & { + specificationHash: string; + deliverableHash: string; + status: number; + dueDate: BigNumber; + fundingPotId: BigNumber; + completionTimestamp: BigNumber; + domainId: BigNumber; + skillIds: BigNumber[]; + } + >; + + /** + * Get a task with id `_id` + * @param _id Id of the task + */ + "getTask(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [ + string, + string, + number, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber[] + ] & { + specificationHash: string; + deliverableHash: string; + status: number; + dueDate: BigNumber; + fundingPotId: BigNumber; + completionTimestamp: BigNumber; + domainId: BigNumber; + skillIds: 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 + */ + getTaskRole( + _id: BigNumberish, + _role: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [string, boolean, number] & { + user: string; + rateFail: boolean; + rating: number; + } + >; + + /** + * 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 + */ + "getTaskRole(uint256,uint8)"( + _id: BigNumberish, + _role: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [string, boolean, number] & { + user: string; + rateFail: boolean; + rating: 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; + + /** + * 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(uint256)"( + _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. + */ + getRewardInverse(overrides?: TransactionOverrides): Promise; + + /** + * Return 1 / the reward to pay out from revenue. e.g. if the fee is 1% (or 0.01), return 100. + */ + "getRewardInverse()"(overrides?: TransactionOverrides): 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 + */ + getTaskPayout( + _id: BigNumberish, + _role: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 + */ + "getTaskPayout(uint256,uint8,address)"( + _id: BigNumberish, + _role: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 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(uint256,address,uint256)"( + _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 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(uint256,address,uint256)"( + _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; + + /** + * 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(uint256,address,uint256)"( + _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; + + /** + * 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(uint256,address,uint256,uint256,uint256)"( + _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; + + /** + * 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(uint256,uint8,address)"( + _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; + + /** + * 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(address,bytes,bytes,uint256,bytes32[])"( + _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 (deposited in TokenLocking), `_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; + + /** + * 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 (deposited in TokenLocking), `_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(uint256,uint256[7],bytes,bytes,uint256,bytes32[])"( + _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 + */ + getRewardPayoutInfo( + _payoutId: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [ + string, + BigNumber, + BigNumber, + BigNumber, + string, + BigNumber, + BigNumber, + boolean + ] & { + reputationState: string; + colonyWideReputation: BigNumber; + totalTokens: BigNumber; + amount: BigNumber; + tokenAddress: string; + blockTimestamp: BigNumber; + amountRemaining: BigNumber; + finalized: boolean; + } + >; + + /** + * Get useful information about specific reward payout. + * @param _payoutId Id of the reward payout + */ + "getRewardPayoutInfo(uint256)"( + _payoutId: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [ + string, + BigNumber, + BigNumber, + BigNumber, + string, + BigNumber, + BigNumber, + boolean + ] & { + reputationState: string; + colonyWideReputation: BigNumber; + totalTokens: BigNumber; + amount: BigNumber; + tokenAddress: string; + blockTimestamp: BigNumber; + amountRemaining: BigNumber; + finalized: boolean; + } + >; + + /** + * 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; + + /** + * 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(uint256)"( + _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 + */ + getFundingPot( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [number, BigNumber, BigNumber] & { + associatedType: number; + associatedTypeId: BigNumber; + payoutsWeCannotMake: BigNumber; + } + >; + + /** + * For the reward funding pot (e.g. id: 0) this returns (0, 0, 0). + * Get the non-mapping properties of a pot by id. + * @param _id Id of the pot which details to get + */ + "getFundingPot(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [number, BigNumber, BigNumber] & { + associatedType: number; + associatedTypeId: BigNumber; + payoutsWeCannotMake: BigNumber; + } + >; + + /** + * Get the number of funding pots in the colony. + */ + getFundingPotCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of funding pots in the colony. + */ + "getFundingPotCount()"( + overrides?: TransactionOverrides + ): 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 + */ + getFundingPotBalance( + _potId: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 + */ + "getFundingPotBalance(uint256,address)"( + _potId: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 + */ + getFundingPotPayout( + _potId: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 + */ + "getFundingPotPayout(uint256,address)"( + _potId: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 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(uint256,uint256,uint256,uint256,uint256,uint256,address)"( + _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; + + /** + * 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(address)"( + _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 + */ + getNonRewardPotsTotal( + _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 + */ + "getNonRewardPotsTotal(address)"( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Allow the _approvee to obligate some amount of tokens as a stake. + * @param _amount Amount of internal token up to which we are willing to be obligated. + * @param _approvee Address of the account we are willing to let obligate us. + * @param _domainId Domain in which we are willing to be obligated. + */ + approveStake( + _approvee: string, + _domainId: BigNumberish, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Allow the _approvee to obligate some amount of tokens as a stake. + * @param _amount Amount of internal token up to which we are willing to be obligated. + * @param _approvee Address of the account we are willing to let obligate us. + * @param _domainId Domain in which we are willing to be obligated. + */ + "approveStake(address,uint256,uint256)"( + _approvee: string, + _domainId: BigNumberish, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Obligate the user some amount of tokens as a stake. + * @param _amount Amount of internal token we are obligating. + * @param _domainId Domain in which we are obligating the user. + * @param _user Address of the account we are obligating. + */ + obligateStake( + _user: string, + _domainId: BigNumberish, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Obligate the user some amount of tokens as a stake. + * @param _amount Amount of internal token we are obligating. + * @param _domainId Domain in which we are obligating the user. + * @param _user Address of the account we are obligating. + */ + "obligateStake(address,uint256,uint256)"( + _user: string, + _domainId: BigNumberish, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Deobligate the user some amount of tokens, releasing the stake. + * @param _amount Amount of internal token we are deobligating. + * @param _domainId Domain in which we are deobligating the user. + * @param _user Address of the account we are deobligating. + */ + deobligateStake( + _user: string, + _domainId: BigNumberish, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Deobligate the user some amount of tokens, releasing the stake. + * @param _amount Amount of internal token we are deobligating. + * @param _domainId Domain in which we are deobligating the user. + * @param _user Address of the account we are deobligating. + */ + "deobligateStake(address,uint256,uint256)"( + _user: string, + _domainId: BigNumberish, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Transfer some amount of obligated tokens. Can be called by the arbitration role. + * @param _amount Amount of internal token we are transferring. + * @param _childSkillIndex The child index in `_permissionDomainId` where we can find `_domainId`. + * @param _domainId Domain in which we are transferring the tokens. + * @param _obligator Address of the account who set the obligation. + * @param _permissionDomainId The domainId in which I have the permission to take this action. + * @param _recipient Recipient of the transferred tokens. + * @param _user Address of the account we are transferring. + */ + transferStake( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _obligator: string, + _user: string, + _domainId: BigNumberish, + _amount: BigNumberish, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Transfer some amount of obligated tokens. Can be called by the arbitration role. + * @param _amount Amount of internal token we are transferring. + * @param _childSkillIndex The child index in `_permissionDomainId` where we can find `_domainId`. + * @param _domainId Domain in which we are transferring the tokens. + * @param _obligator Address of the account who set the obligation. + * @param _permissionDomainId The domainId in which I have the permission to take this action. + * @param _recipient Recipient of the transferred tokens. + * @param _user Address of the account we are transferring. + */ + "transferStake(uint256,uint256,address,address,uint256,uint256,address)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _obligator: string, + _user: string, + _domainId: BigNumberish, + _amount: BigNumberish, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * View an approval to obligate tokens. + * @param _domainId Domain in which we are willing to be obligated. + * @param _obligator Address of the account we are willing to let obligate us. + * @param _user User allowing their tokens to be obligated. + */ + getApproval( + _user: string, + _obligator: string, + _domainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * View an approval to obligate tokens. + * @param _domainId Domain in which we are willing to be obligated. + * @param _obligator Address of the account we are willing to let obligate us. + * @param _user User allowing their tokens to be obligated. + */ + "getApproval(address,address,uint256)"( + _user: string, + _obligator: string, + _domainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * View an obligation of tokens. + * @param _domainId Domain in which we are obligated. + * @param _obligator Address of the account who obligated us. + * @param _user User whose tokens are obligated. + */ + getObligation( + _user: string, + _obligator: string, + _domainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * View an obligation of tokens. + * @param _domainId Domain in which we are obligated. + * @param _obligator Address of the account who obligated us. + * @param _user User whose tokens are obligated. + */ + "getObligation(address,address,uint256)"( + _user: string, + _obligator: string, + _domainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the domain corresponding to a funding pot + * @param _fundingPotId Id of the funding pot + */ + getDomainFromFundingPot( + _fundingPotId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the domain corresponding to a funding pot + * @param _fundingPotId Id of the funding pot + */ + "getDomainFromFundingPot(uint256)"( + _fundingPotId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Burn tokens held by the colony. Can only burn tokens held in the root funding pot. + * @param amount The amount of tokens to burn + * @param token The address of the token to burn + */ + burnTokens( + token: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Burn tokens held by the colony. Can only burn tokens held in the root funding pot. + * @param amount The amount of tokens to burn + * @param token The address of the token to burn + */ + "burnTokens(address,uint256)"( + token: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * unlock the native colony token, if possible + */ + unlockToken(overrides?: TransactionOverrides): Promise; + + /** + * unlock the native colony token, if possible + */ + "unlockToken()"( + overrides?: TransactionOverrides + ): Promise; + }; + + /** + * Indicate approval to exit recovery mode. Can only be called by user with recovery role. + */ + approveExitRecovery( + overrides?: TransactionOverrides + ): Promise; + + /** + * Indicate approval to exit recovery mode. Can only be called by user with recovery role. + */ + "approveExitRecovery()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * No return value, but should throw if protected.This is external, 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, + overrides?: TransactionOverrides + ): Promise; + + /** + * No return value, but should throw if protected.This is external, 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(uint256)"( + _slot: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Put colony network mining into recovery mode. Can only be called by user with recovery role. + */ + enterRecoveryMode( + overrides?: TransactionOverrides + ): Promise; + + /** + * Put colony network mining into recovery mode. Can only be called by user with recovery role. + */ + "enterRecoveryMode()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Exit recovery mode, can be called by anyone if enough whitelist approvals are given. + */ + exitRecoveryMode( + overrides?: TransactionOverrides + ): Promise; + + /** + * Exit recovery mode, can be called by anyone if enough whitelist approvals are given. + */ + "exitRecoveryMode()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Is colony network in recovery mode. + */ + isInRecoveryMode(overrides?: TransactionOverrides): Promise; + + /** + * Is colony network in recovery mode. + */ + "isInRecoveryMode()"(overrides?: TransactionOverrides): Promise; + + /** + * Return number of recovery roles. + */ + numRecoveryRoles(overrides?: TransactionOverrides): Promise; + + /** + * Return number of recovery roles. + */ + "numRecoveryRoles()"(overrides?: TransactionOverrides): 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; + + /** + * Remove colony recovery role. Can only be called by root role. + * @param _user User we want to remove recovery role from + */ + "removeRecoveryRole(address)"( + _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; + + /** + * Set new colony recovery role. Can be called by root. + * @param _user User we want to give a recovery role to + */ + "setRecoveryRole(address)"( + _user: string, + overrides?: TransactionOverrides + ): 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; + + /** + * 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(uint256,bytes32)"( + _slot: BigNumberish, + _value: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `ColonyAuthority` for the colony. + */ + authority(overrides?: TransactionOverrides): Promise; + + /** + * Get the `ColonyAuthority` for the colony. + */ + "authority()"(overrides?: TransactionOverrides): Promise; + + /** + * Used for testing. + * Get the colony `owner` address. This should be address(0x0) at all times. + */ + owner(overrides?: TransactionOverrides): Promise; + + /** + * Used for testing. + * Get the colony `owner` address. This should be address(0x0) at all times. + */ + "owner()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the Colony contract version. Starts from 1 and is incremented with every deployed contract change. + */ + version(overrides?: TransactionOverrides): Promise; + + /** + * Get the Colony contract version. Starts from 1 and is incremented with every deployed contract change. + */ + "version()"(overrides?: TransactionOverrides): 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; + + /** + * 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(uint256)"( + _newVersion: BigNumberish, + 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 external 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; + + /** + * Can only be called by the colony itself, and only expected to be called as part of the `upgrade()` call. Required to be external 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. + */ + getColonyNetwork(overrides?: TransactionOverrides): Promise; + + /** + * The colonyNetworkAddress we read here is set once, during `initialiseColony`. + * Returns the colony network address set on the Colony. + */ + "getColonyNetwork()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the colony token. + */ + getToken(overrides?: TransactionOverrides): Promise; + + /** + * Get the colony token. + */ + "getToken()"(overrides?: TransactionOverrides): Promise; + + /** + * Execute arbitrary transaction on behalf of the Colony + * @param _action Bytes array encoding the function call and arguments + * @param _to Contract to receive the function call (cannot be network or token locking) + */ + makeArbitraryTransaction( + _to: string, + _action: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Execute arbitrary transaction on behalf of the Colony + * @param _action Bytes array encoding the function call and arguments + * @param _to Contract to receive the function call (cannot be network or token locking) + */ + "makeArbitraryTransaction(address,bytes)"( + _to: string, + _action: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a metadata string for a transaction + * @param _metadata String of metadata for tx + * @param _txHash Hash of transaction being annotated (0x0 for current tx) + */ + annotateTransaction( + _txHash: Arrayish, + _metadata: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a metadata string for a transaction + * @param _metadata String of metadata for tx + * @param _txHash Hash of transaction being annotated (0x0 for current tx) + */ + "annotateTransaction(bytes32,string)"( + _txHash: Arrayish, + _metadata: string, + overrides?: TransactionOverrides + ): 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 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(address,bool)"( + _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 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(uint256,uint256,address,uint256,bool)"( + _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 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(uint256,uint256,address,uint256,bool)"( + _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 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(uint256,uint256,address,uint256,bool)"( + _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; + + /** + * 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(uint256,uint256,address,uint256,bool)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _user: string, + _domainId: BigNumberish, + _setTo: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set several roles in one transaction. 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 _roles Byte array representing the desired role setting (1 for on, 0 for off) + * @param _user User we want to give a role to + */ + setUserRoles( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _user: string, + _domainId: BigNumberish, + _roles: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set several roles in one transaction. 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 _roles Byte array representing the desired role setting (1 for on, 0 for off) + * @param _user User we want to give a role to + */ + "setUserRoles(uint256,uint256,address,uint256,bytes32)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _user: string, + _domainId: BigNumberish, + _roles: Arrayish, + 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 + */ + hasUserRole( + _user: string, + _domainId: BigNumberish, + _role: BigNumberish, + 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 + */ + "hasUserRole(address,uint256,uint8)"( + _user: string, + _domainId: BigNumberish, + _role: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Check whether a given user has a given role for the colony, in a child domain. Calls the function of the same name on the colony's authority contract and an internal inheritence validator function + * @param _childDomainId The domain where we want to use the role + * @param _childSkillIndex The index that the `_childDomainId` is relative to `_domainId` + * @param _domainId Domain in which the caller has the role + * @param _role The role we want to check for + * @param _user The user whose role we want to check + */ + hasInheritedUserRole( + _user: string, + _domainId: BigNumberish, + _role: BigNumberish, + _childSkillIndex: BigNumberish, + _childDomainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Check whether a given user has a given role for the colony, in a child domain. Calls the function of the same name on the colony's authority contract and an internal inheritence validator function + * @param _childDomainId The domain where we want to use the role + * @param _childSkillIndex The index that the `_childDomainId` is relative to `_domainId` + * @param _domainId Domain in which the caller has the role + * @param _role The role we want to check for + * @param _user The user whose role we want to check + */ + "hasInheritedUserRole(address,uint256,uint8,uint256,uint256)"( + _user: string, + _domainId: BigNumberish, + _role: BigNumberish, + _childSkillIndex: BigNumberish, + _childDomainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Check whether a given user can modify roles in the target domain `_childDomainId`. Mostly a convenience function to provide a uniform interface for extension contracts validating permissions + * @param _childDomainId The domain where we want to edit roles + * @param _childSkillIndex The index that the `_childDomainId` is relative to `_domainId` + * @param _domainId Domain in which the caller has the role (currently Root or Architecture) + * @param _user The user whose permissions we want to check + */ + userCanSetRoles( + _user: string, + _domainId: BigNumberish, + _childSkillIndex: BigNumberish, + _childDomainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Check whether a given user can modify roles in the target domain `_childDomainId`. Mostly a convenience function to provide a uniform interface for extension contracts validating permissions + * @param _childDomainId The domain where we want to edit roles + * @param _childSkillIndex The index that the `_childDomainId` is relative to `_domainId` + * @param _domainId Domain in which the caller has the role (currently Root or Architecture) + * @param _user The user whose permissions we want to check + */ + "userCanSetRoles(address,uint256,uint256,uint256)"( + _user: string, + _domainId: BigNumberish, + _childSkillIndex: BigNumberish, + _childDomainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Gets the bytes32 representation of the roles for a user in a given domain + * @param _domain The domain we want to get roles in + * @param _user The user whose roles we want to get + */ + getUserRoles( + _user: string, + _domain: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Gets the bytes32 representation of the roles for a user in a given domain + * @param _domain The domain we want to get roles in + * @param _user The user whose roles we want to get + */ + "getUserRoles(address,uint256)"( + _user: string, + _domain: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Gets the bytes32 representation of the roles authorized to call a function + * @param _sig The function signature + */ + getCapabilityRoles( + _sig: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Gets the bytes32 representation of the roles authorized to call a function + * @param _sig The function signature + */ + "getCapabilityRoles(bytes4)"( + _sig: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a positive domain reputation update. Available only to Root role holders + * @param _amount The (positive) amount of reputation to gain + * @param _domainId The domain where the user will gain reputation + * @param _user The user who will gain reputation + */ + emitDomainReputationReward( + _domainId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a positive domain reputation update. Available only to Root role holders + * @param _amount The (positive) amount of reputation to gain + * @param _domainId The domain where the user will gain reputation + * @param _user The user who will gain reputation + */ + "emitDomainReputationReward(uint256,address,int256)"( + _domainId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a positive skill reputation update. Available only to Root role holders + * @param _amount The (positive) amount of reputation to gain + * @param _skillId The skill where the user will gain reputation + * @param _user The user who will gain reputation + */ + emitSkillReputationReward( + _skillId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a positive skill reputation update. Available only to Root role holders + * @param _amount The (positive) amount of reputation to gain + * @param _skillId The skill where the user will gain reputation + * @param _user The user who will gain reputation + */ + "emitSkillReputationReward(uint256,address,int256)"( + _skillId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a negative domain reputation update. Available only to Arbitration role holders + * @param _amount The (negative) amount of reputation to lose + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId` + * @param _domainId The domain where the user will lose reputation + * @param _permissionDomainId The domainId in which I hold the Arbitration role + * @param _user The user who will lose reputation + */ + emitDomainReputationPenalty( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a negative domain reputation update. Available only to Arbitration role holders + * @param _amount The (negative) amount of reputation to lose + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId` + * @param _domainId The domain where the user will lose reputation + * @param _permissionDomainId The domainId in which I hold the Arbitration role + * @param _user The user who will lose reputation + */ + "emitDomainReputationPenalty(uint256,uint256,uint256,address,int256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a negative skill reputation update. Available only to Arbitration role holders in the root domain + * @param _amount The (negative) amount of reputation to lose + * @param _skillId The skill where the user will lose reputation + * @param _user The user who will lose reputation + */ + emitSkillReputationPenalty( + _skillId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a negative skill reputation update. Available only to Arbitration role holders in the root domain + * @param _amount The (negative) amount of reputation to lose + * @param _skillId The skill where the user will lose reputation + * @param _user The user who will lose reputation + */ + "emitSkillReputationPenalty(uint256,address,int256)"( + _skillId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): 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; + + /** + * 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(address,address)"( + _colonyNetworkAddress: string, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called to change the metadata associated with a colony. Expected to be a IPFS hash of a JSON blob, but not enforced to any degree by the contracts + * @param _metadata IPFS hash of the metadata + */ + editColony( + _metadata: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called to change the metadata associated with a colony. Expected to be a IPFS hash of a JSON blob, but not enforced to any degree by the contracts + * @param _metadata IPFS hash of the metadata + */ + "editColony(string)"( + _metadata: 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; + + /** + * 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(address[],int256[])"( + _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; + + /** + * Mint `_wad` amount of colony tokens. Secured function to authorised members. + * @param _wad Amount to mint + */ + "mintTokens(uint256)"( + _wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Mint `_wad` amount of colony tokens and send to `_guy`. Secured function to authorised members. + * @param _guy Recipient of new tokens + * @param _wad Amount to mint + */ + mintTokensFor( + _guy: string, + _wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Mint `_wad` amount of colony tokens and send to `_guy`. Secured function to authorised members. + * @param _guy Recipient of new tokens + * @param _wad Amount to mint + */ + "mintTokensFor(address,uint256)"( + _guy: string, + _wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Lock the colony's token. Can only be called by a network-managed extension. + */ + lockToken(overrides?: TransactionOverrides): Promise; + + /** + * Lock the colony's token. Can only be called by a network-managed extension. + */ + "lockToken()"(overrides?: TransactionOverrides): Promise; + + /** + * Unlock the colony's token for a user. Can only be called by a network-managed extension. + * @param lockId The specific lock to unlock + * @param user The user to unlock + */ + unlockTokenForUser( + user: string, + lockId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Unlock the colony's token for a user. Can only be called by a network-managed extension. + * @param lockId The specific lock to unlock + * @param user The user to unlock + */ + "unlockTokenForUser(address,uint256)"( + user: string, + lockId: 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; + + /** + * 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(string,string)"( + 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; + + /** + * 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(string)"( + orbitdb: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Install an extension to the colony. Secured function to authorised members. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param version The new extension version to install + */ + installExtension( + extensionId: Arrayish, + version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Install an extension to the colony. Secured function to authorised members. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param version The new extension version to install + */ + "installExtension(bytes32,uint256)"( + extensionId: Arrayish, + version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Upgrade an extension in a colony. Secured function to authorised members. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param newVersion The version to upgrade to (must be one larger than the current version) + */ + upgradeExtension( + extensionId: Arrayish, + newVersion: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Upgrade an extension in a colony. Secured function to authorised members. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param newVersion The version to upgrade to (must be one larger than the current version) + */ + "upgradeExtension(bytes32,uint256)"( + extensionId: Arrayish, + newVersion: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the deprecation of an extension in a colony. Secured function to authorised members. + * @param deprecated Whether to deprecate the extension or not + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + deprecateExtension( + extensionId: Arrayish, + deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the deprecation of an extension in a colony. Secured function to authorised members. + * @param deprecated Whether to deprecate the extension or not + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + "deprecateExtension(bytes32,bool)"( + extensionId: Arrayish, + deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is a permanent action -- re-installing the extension will deploy a new contractIt is recommended to deprecate an extension before uninstalling to allow active objects to be resolved + * Uninstall an extension from a colony. Secured function to authorised members. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + uninstallExtension( + extensionId: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is a permanent action -- re-installing the extension will deploy a new contractIt is recommended to deprecate an extension before uninstalling to allow active objects to be resolved + * Uninstall an extension from a colony. Secured function to authorised members. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + "uninstallExtension(bytes32)"( + extensionId: Arrayish, + 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; + + /** + * 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(uint256,uint256,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _parentDomainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Adding new domains is currently retricted to one level only, i.e. `_parentDomainId` has to be the root domain id: `1`.We expect this function to only be used by the dapp + * 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 _metadata Metadata relating to the domain. Expected to be the IPFS hash of a JSON blob, but not enforced by the contracts. + * @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(uint256,uint256,uint256,string)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _parentDomainId: BigNumberish, + _metadata: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * 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 _domainId Id of the domain being edited + * @param _metadata Metadata relating to the domain. Expected to be the IPFS hash of a JSON blob, but not enforced by the contracts. + * @param _permissionDomainId The domainId in which I have the permission to take this action + */ + editDomain( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + _metadata: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * 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 _domainId Id of the domain being edited + * @param _metadata Metadata relating to the domain. Expected to be the IPFS hash of a JSON blob, but not enforced by the contracts. + * @param _permissionDomainId The domainId in which I have the permission to take this action + */ + "editDomain(uint256,uint256,uint256,string)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + _metadata: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a domain by id. + * @param _id Id of the domain which details to get + */ + getDomain( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber] & { skillId: BigNumber; fundingPotId: BigNumber } + >; + + /** + * Get a domain by id. + * @param _id Id of the domain which details to get + */ + "getDomain(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber] & { skillId: BigNumber; fundingPotId: BigNumber } + >; + + /** + * Get the number of domains in the colony. + */ + getDomainCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of domains in the colony. + */ + "getDomainCount()"(overrides?: TransactionOverrides): Promise; + + /** + * For more detail about branchMask and siblings, examine the PatriciaTree implementation. While external, 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. + */ + verifyReputationProof( + key: Arrayish, + value: Arrayish, + branchMask: BigNumberish, + siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * For more detail about branchMask and siblings, examine the PatriciaTree implementation. While external, 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. + */ + "verifyReputationProof(bytes,bytes,uint256,bytes32[])"( + key: Arrayish, + value: Arrayish, + branchMask: BigNumberish, + siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Add a new expenditure in the colony. Secured function to authorised members. + * @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 expenditure belongs + * @param _permissionDomainId The domainId in which I have the permission to take this action + */ + makeExpenditure( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Add a new expenditure in the colony. Secured function to authorised members. + * @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 expenditure belongs + * @param _permissionDomainId The domainId in which I have the permission to take this action + */ + "makeExpenditure(uint256,uint256,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Updates the expenditure owner. Can only be called by expenditure owner. + * @param _id Expenditure identifier + * @param _newOwner New owner of expenditure + */ + transferExpenditure( + _id: BigNumberish, + _newOwner: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Updates the expenditure owner. Can only be called by expenditure owner. + * @param _id Expenditure identifier + * @param _newOwner New owner of expenditure + */ + "transferExpenditure(uint256,address)"( + _id: BigNumberish, + _newOwner: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future version + * DEPRECATED Updates the expenditure owner. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _id Expenditure identifier + * @param _newOwner New owner of expenditure + * @param _permissionDomainId The domainId in which I have the permission to take this action + */ + transferExpenditureViaArbitration( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _newOwner: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future version + * DEPRECATED Updates the expenditure owner. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _id Expenditure identifier + * @param _newOwner New owner of expenditure + * @param _permissionDomainId The domainId in which I have the permission to take this action + */ + "transferExpenditureViaArbitration(uint256,uint256,uint256,address)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _newOwner: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Cancels the expenditure and prevents further editing. Can only be called by expenditure owner. + * @param _id Expenditure identifier + */ + cancelExpenditure( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Cancels the expenditure and prevents further editing. Can only be called by expenditure owner. + * @param _id Expenditure identifier + */ + "cancelExpenditure(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Finalizes the expenditure and prevents further editing. Can only be called by expenditure owner. + * @param _id Expenditure identifier + */ + finalizeExpenditure( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Finalizes the expenditure and prevents further editing. Can only be called by expenditure owner. + * @param _id Expenditure identifier + */ + "finalizeExpenditure(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Sets the recipient on an expenditure slot. Can only be called by expenditure owner. + * @param _id Id of the expenditure + * @param _recipient Address of the recipient + * @param _slot Slot for the recipient address + */ + setExpenditureRecipient( + _id: BigNumberish, + _slot: BigNumberish, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Sets the recipient on an expenditure slot. Can only be called by expenditure owner. + * @param _id Id of the expenditure + * @param _recipient Address of the recipient + * @param _slot Slot for the recipient address + */ + "setExpenditureRecipient(uint256,uint256,address)"( + _id: BigNumberish, + _slot: BigNumberish, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the token payout on an expenditure slot. Can only be called by expenditure owner. + * @param _amount Payout amount + * @param _id Id of the expenditure + * @param _slot Number of the slot + * @param _token Address of the token, `0x0` value indicates Ether + */ + setExpenditurePayout( + _id: BigNumberish, + _slot: BigNumberish, + _token: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the token payout on an expenditure slot. Can only be called by expenditure owner. + * @param _amount Payout amount + * @param _id Id of the expenditure + * @param _slot Number of the slot + * @param _token Address of the token, `0x0` value indicates Ether + */ + "setExpenditurePayout(uint256,uint256,address,uint256)"( + _id: BigNumberish, + _slot: BigNumberish, + _token: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Sets the skill on an expenditure slot. Can only be called by expenditure owner. + * @param _id Expenditure identifier + * @param _skillId Id of the new skill to set + * @param _slot Number of the slot + */ + setExpenditureSkill( + _id: BigNumberish, + _slot: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Sets the skill on an expenditure slot. Can only be called by expenditure owner. + * @param _id Expenditure identifier + * @param _skillId Id of the new skill to set + * @param _slot Number of the slot + */ + "setExpenditureSkill(uint256,uint256,uint256)"( + _id: BigNumberish, + _slot: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future versionNote that when determining payouts the payoutModifier is incremented by WAD and converted into payoutScalar + * DEPRECATED Set the payout modifier on an expenditure slot. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _id Expenditure identifier + * @param _payoutModifier Modifier to their payout (between -1 and 1, denominated in WADs, 0 means no modification) + * @param _permissionDomainId The domainId in which I have the permission to take this action + * @param _slot Number of the slot + */ + setExpenditurePayoutModifier( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _slot: BigNumberish, + _payoutModifier: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future versionNote that when determining payouts the payoutModifier is incremented by WAD and converted into payoutScalar + * DEPRECATED Set the payout modifier on an expenditure slot. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _id Expenditure identifier + * @param _payoutModifier Modifier to their payout (between -1 and 1, denominated in WADs, 0 means no modification) + * @param _permissionDomainId The domainId in which I have the permission to take this action + * @param _slot Number of the slot + */ + "setExpenditurePayoutModifier(uint256,uint256,uint256,uint256,int256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _slot: BigNumberish, + _payoutModifier: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future version + * DEPRECATED Set the claim delay on an expenditure slot. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _claimDelay Time (in seconds) to delay claiming payout after finalization + * @param _id Expenditure identifier + * @param _permissionDomainId The domainId in which I have the permission to take this action + * @param _slot Number of the slot + */ + setExpenditureClaimDelay( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _slot: BigNumberish, + _claimDelay: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future version + * DEPRECATED Set the claim delay on an expenditure slot. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _claimDelay Time (in seconds) to delay claiming payout after finalization + * @param _id Expenditure identifier + * @param _permissionDomainId The domainId in which I have the permission to take this action + * @param _slot Number of the slot + */ + "setExpenditureClaimDelay(uint256,uint256,uint256,uint256,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _slot: BigNumberish, + _claimDelay: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set arbitrary state on an expenditure slot. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _id Expenditure identifier + * @param _keys Array of additional keys (for mappings & arrays) + * @param _mask Array of booleans indicated whether a key is a mapping (F) or an array index (T). + * @param _permissionDomainId The domainId in which I have the permission to take this action + * @param _storageSlot Number of the top-level storage slot (25, 26, or 27) + * @param _value Value to set at location + */ + setExpenditureState( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _storageSlot: BigNumberish, + _mask: boolean[], + _keys: Arrayish[], + _value: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set arbitrary state on an expenditure slot. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _id Expenditure identifier + * @param _keys Array of additional keys (for mappings & arrays) + * @param _mask Array of booleans indicated whether a key is a mapping (F) or an array index (T). + * @param _permissionDomainId The domainId in which I have the permission to take this action + * @param _storageSlot Number of the top-level storage slot (25, 26, or 27) + * @param _value Value to set at location + */ + "setExpenditureState(uint256,uint256,uint256,uint256,bool[],bytes32[],bytes32)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _storageSlot: BigNumberish, + _mask: boolean[], + _keys: Arrayish[], + _value: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Claim the payout for an expenditure slot. Here the network receives a fee from each payout. + * @param _id Expenditure identifier + * @param _slot Number of the slot + * @param _token Address of the token, `0x0` value indicates Ether + */ + claimExpenditurePayout( + _id: BigNumberish, + _slot: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Claim the payout for an expenditure slot. Here the network receives a fee from each payout. + * @param _id Expenditure identifier + * @param _slot Number of the slot + * @param _token Address of the token, `0x0` value indicates Ether + */ + "claimExpenditurePayout(uint256,uint256,address)"( + _id: BigNumberish, + _slot: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of expenditures in the colony. + */ + getExpenditureCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of expenditures in the colony. + */ + "getExpenditureCount()"(overrides?: TransactionOverrides): Promise; + + /** + * Returns an existing expenditure. + * @param _id Expenditure identifier + */ + getExpenditure( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [number, string, BigNumber, BigNumber, BigNumber, BigNumber] & { + status: number; + owner: string; + fundingPotId: BigNumber; + domainId: BigNumber; + finalizedTimestamp: BigNumber; + globalClaimDelay: BigNumber; + } + >; + + /** + * Returns an existing expenditure. + * @param _id Expenditure identifier + */ + "getExpenditure(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [number, string, BigNumber, BigNumber, BigNumber, BigNumber] & { + status: number; + owner: string; + fundingPotId: BigNumber; + domainId: BigNumber; + finalizedTimestamp: BigNumber; + globalClaimDelay: BigNumber; + } + >; + + /** + * Returns an existing expenditure slot. + * @param _id Expenditure identifier + * @param _slot Expenditure slot + */ + getExpenditureSlot( + _id: BigNumberish, + _slot: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [string, BigNumber, BigNumber, BigNumber[]] & { + recipient: string; + claimDelay: BigNumber; + payoutModifier: BigNumber; + skills: BigNumber[]; + } + >; + + /** + * Returns an existing expenditure slot. + * @param _id Expenditure identifier + * @param _slot Expenditure slot + */ + "getExpenditureSlot(uint256,uint256)"( + _id: BigNumberish, + _slot: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [string, BigNumber, BigNumber, BigNumber[]] & { + recipient: string; + claimDelay: BigNumber; + payoutModifier: BigNumber; + skills: BigNumber[]; + } + >; + + /** + * Returns an existing expenditure slot's payout for a token. + * @param _id Expenditure identifier + * @param _slot Expenditure slot + * @param _token Token address + */ + getExpenditureSlotPayout( + _id: BigNumberish, + _slot: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns an existing expenditure slot's payout for a token. + * @param _id Expenditure identifier + * @param _slot Expenditure slot + * @param _token Token address + */ + "getExpenditureSlotPayout(uint256,uint256,address)"( + _id: BigNumberish, + _slot: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 + */ + addPayment( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _recipient: string, + _token: string, + _amount: BigNumberish, + _domainId: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): 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 + */ + "addPayment(uint256,uint256,address,address,uint256,uint256,uint256)"( + _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; + + /** + * 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(uint256,uint256,uint256)"( + _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 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(uint256,uint256,uint256,address)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _recipient: string, + 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 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(uint256,uint256,uint256,uint256)"( + _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; + + /** + * 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(uint256,uint256,uint256,address,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _token: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns an exiting payment. + * @param _id Payment identifier + */ + getPayment( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [string, boolean, BigNumber, BigNumber, BigNumber[]] & { + recipient: string; + finalized: boolean; + fundingPotId: BigNumber; + domainId: BigNumber; + skills: BigNumber[]; + } + >; + + /** + * Returns an exiting payment. + * @param _id Payment identifier + */ + "getPayment(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [string, boolean, BigNumber, BigNumber, BigNumber[]] & { + recipient: string; + finalized: boolean; + fundingPotId: BigNumber; + domainId: BigNumber; + skills: 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; + + /** + * 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(uint256,address)"( + _id: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of payments in the colony. + */ + getPaymentCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of payments in the colony. + */ + "getPaymentCount()"(overrides?: TransactionOverrides): 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; + + /** + * 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(uint256,uint256,bytes32,uint256,uint256,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _specificationHash: Arrayish, + _domainId: BigNumberish, + _skillId: BigNumberish, + _dueDate: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of tasks in the colony. + */ + getTaskCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of tasks in the colony. + */ + "getTaskCount()"(overrides?: TransactionOverrides): Promise; + + /** + * Starts from 0 and is incremented on every co-reviewed task change via `executeTaskChange` call. + * @param _id Id of the task + */ + getTaskChangeNonce( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Starts from 0 and is incremented on every co-reviewed task change via `executeTaskChange` call. + * @param _id Id of the task + */ + "getTaskChangeNonce(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): 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; + + /** + * 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(uint8[],bytes32[],bytes32[],uint8[],uint256,bytes)"( + _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; + + /** + * 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(uint8[],bytes32[],bytes32[],uint8[],uint256,bytes)"( + _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; + + /** + * 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(uint256,uint8,bytes32)"( + _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; + + /** + * 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(uint256,uint8,uint8,bytes32)"( + _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 + */ + generateSecret( + _salt: Arrayish, + _value: BigNumberish, + 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 + */ + "generateSecret(bytes32,uint256)"( + _salt: Arrayish, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `ColonyStorage.RatingSecrets` information for task `_id`. + * @param _id Id of the task + */ + getTaskWorkRatingSecretsInfo( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber] & { nSecrets: BigNumber; lastSubmittedAt: BigNumber } + >; + + /** + * Get the `ColonyStorage.RatingSecrets` information for task `_id`. + * @param _id Id of the task + */ + "getTaskWorkRatingSecretsInfo(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber] & { nSecrets: BigNumber; lastSubmittedAt: 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 + */ + getTaskWorkRatingSecret( + _id: BigNumberish, + _role: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * 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 + */ + "getTaskWorkRatingSecret(uint256,uint8)"( + _id: BigNumberish, + _role: BigNumberish, + overrides?: TransactionOverrides + ): 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 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(uint256,address,uint256,uint256)"( + _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 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(uint256,address)"( + _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; + + /** + * 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(uint256,address)"( + _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 evaluator role. Agreed between manager and currently assigned evaluator. + * @param _id Id of the task + */ + "removeTaskEvaluatorRole(uint256)"( + _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; + + /** + * Removing worker role. Agreed between manager and currently assigned worker. + * @param _id Id of the task + */ + "removeTaskWorkerRole(uint256)"( + _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; + + /** + * 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(uint256,uint256)"( + _id: BigNumberish, + _skillId: 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 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(uint256,bytes32)"( + _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 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(uint256,uint256)"( + _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; + + /** + * 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(uint256,bytes32)"( + _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; + + /** + * 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(uint256,bytes32,bytes32)"( + _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.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(uint256)"( + _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; + + /** + * 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(uint256)"( + _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; + + /** + * 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(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a task with id `_id` + * @param _id Id of the task + */ + getTask( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [ + string, + string, + number, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber[] + ] & { + specificationHash: string; + deliverableHash: string; + status: number; + dueDate: BigNumber; + fundingPotId: BigNumber; + completionTimestamp: BigNumber; + domainId: BigNumber; + skillIds: BigNumber[]; + } + >; + + /** + * Get a task with id `_id` + * @param _id Id of the task + */ + "getTask(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [ + string, + string, + number, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber[] + ] & { + specificationHash: string; + deliverableHash: string; + status: number; + dueDate: BigNumber; + fundingPotId: BigNumber; + completionTimestamp: BigNumber; + domainId: BigNumber; + skillIds: 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 + */ + getTaskRole( + _id: BigNumberish, + _role: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [string, boolean, number] & { + user: string; + rateFail: boolean; + rating: number; + } + >; + + /** + * 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 + */ + "getTaskRole(uint256,uint8)"( + _id: BigNumberish, + _role: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [string, boolean, number] & { + user: string; + rateFail: boolean; + rating: 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; + + /** + * 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(uint256)"( + _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. + */ + getRewardInverse(overrides?: TransactionOverrides): Promise; + + /** + * Return 1 / the reward to pay out from revenue. e.g. if the fee is 1% (or 0.01), return 100. + */ + "getRewardInverse()"(overrides?: TransactionOverrides): 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 + */ + getTaskPayout( + _id: BigNumberish, + _role: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 + */ + "getTaskPayout(uint256,uint8,address)"( + _id: BigNumberish, + _role: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 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(uint256,address,uint256)"( + _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 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(uint256,address,uint256)"( + _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; + + /** + * 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(uint256,address,uint256)"( + _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; + + /** + * 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(uint256,address,uint256,uint256,uint256)"( + _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; + + /** + * 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(uint256,uint8,address)"( + _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; + + /** + * 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(address,bytes,bytes,uint256,bytes32[])"( + _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 (deposited in TokenLocking), `_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; + + /** + * 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 (deposited in TokenLocking), `_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(uint256,uint256[7],bytes,bytes,uint256,bytes32[])"( + _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 + */ + getRewardPayoutInfo( + _payoutId: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [ + string, + BigNumber, + BigNumber, + BigNumber, + string, + BigNumber, + BigNumber, + boolean + ] & { + reputationState: string; + colonyWideReputation: BigNumber; + totalTokens: BigNumber; + amount: BigNumber; + tokenAddress: string; + blockTimestamp: BigNumber; + amountRemaining: BigNumber; + finalized: boolean; + } + >; + + /** + * Get useful information about specific reward payout. + * @param _payoutId Id of the reward payout + */ + "getRewardPayoutInfo(uint256)"( + _payoutId: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [ + string, + BigNumber, + BigNumber, + BigNumber, + string, + BigNumber, + BigNumber, + boolean + ] & { + reputationState: string; + colonyWideReputation: BigNumber; + totalTokens: BigNumber; + amount: BigNumber; + tokenAddress: string; + blockTimestamp: BigNumber; + amountRemaining: BigNumber; + finalized: boolean; + } + >; + + /** + * 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; + + /** + * 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(uint256)"( + _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 + */ + getFundingPot( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [number, BigNumber, BigNumber] & { + associatedType: number; + associatedTypeId: BigNumber; + payoutsWeCannotMake: BigNumber; + } + >; + + /** + * For the reward funding pot (e.g. id: 0) this returns (0, 0, 0). + * Get the non-mapping properties of a pot by id. + * @param _id Id of the pot which details to get + */ + "getFundingPot(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [number, BigNumber, BigNumber] & { + associatedType: number; + associatedTypeId: BigNumber; + payoutsWeCannotMake: BigNumber; + } + >; + + /** + * Get the number of funding pots in the colony. + */ + getFundingPotCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of funding pots in the colony. + */ + "getFundingPotCount()"(overrides?: TransactionOverrides): 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 + */ + getFundingPotBalance( + _potId: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 + */ + "getFundingPotBalance(uint256,address)"( + _potId: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 + */ + getFundingPotPayout( + _potId: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 + */ + "getFundingPotPayout(uint256,address)"( + _potId: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 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(uint256,uint256,uint256,uint256,uint256,uint256,address)"( + _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; + + /** + * 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(address)"( + _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 + */ + getNonRewardPotsTotal( + _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 + */ + "getNonRewardPotsTotal(address)"( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Allow the _approvee to obligate some amount of tokens as a stake. + * @param _amount Amount of internal token up to which we are willing to be obligated. + * @param _approvee Address of the account we are willing to let obligate us. + * @param _domainId Domain in which we are willing to be obligated. + */ + approveStake( + _approvee: string, + _domainId: BigNumberish, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Allow the _approvee to obligate some amount of tokens as a stake. + * @param _amount Amount of internal token up to which we are willing to be obligated. + * @param _approvee Address of the account we are willing to let obligate us. + * @param _domainId Domain in which we are willing to be obligated. + */ + "approveStake(address,uint256,uint256)"( + _approvee: string, + _domainId: BigNumberish, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Obligate the user some amount of tokens as a stake. + * @param _amount Amount of internal token we are obligating. + * @param _domainId Domain in which we are obligating the user. + * @param _user Address of the account we are obligating. + */ + obligateStake( + _user: string, + _domainId: BigNumberish, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Obligate the user some amount of tokens as a stake. + * @param _amount Amount of internal token we are obligating. + * @param _domainId Domain in which we are obligating the user. + * @param _user Address of the account we are obligating. + */ + "obligateStake(address,uint256,uint256)"( + _user: string, + _domainId: BigNumberish, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Deobligate the user some amount of tokens, releasing the stake. + * @param _amount Amount of internal token we are deobligating. + * @param _domainId Domain in which we are deobligating the user. + * @param _user Address of the account we are deobligating. + */ + deobligateStake( + _user: string, + _domainId: BigNumberish, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Deobligate the user some amount of tokens, releasing the stake. + * @param _amount Amount of internal token we are deobligating. + * @param _domainId Domain in which we are deobligating the user. + * @param _user Address of the account we are deobligating. + */ + "deobligateStake(address,uint256,uint256)"( + _user: string, + _domainId: BigNumberish, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Transfer some amount of obligated tokens. Can be called by the arbitration role. + * @param _amount Amount of internal token we are transferring. + * @param _childSkillIndex The child index in `_permissionDomainId` where we can find `_domainId`. + * @param _domainId Domain in which we are transferring the tokens. + * @param _obligator Address of the account who set the obligation. + * @param _permissionDomainId The domainId in which I have the permission to take this action. + * @param _recipient Recipient of the transferred tokens. + * @param _user Address of the account we are transferring. + */ + transferStake( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _obligator: string, + _user: string, + _domainId: BigNumberish, + _amount: BigNumberish, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Transfer some amount of obligated tokens. Can be called by the arbitration role. + * @param _amount Amount of internal token we are transferring. + * @param _childSkillIndex The child index in `_permissionDomainId` where we can find `_domainId`. + * @param _domainId Domain in which we are transferring the tokens. + * @param _obligator Address of the account who set the obligation. + * @param _permissionDomainId The domainId in which I have the permission to take this action. + * @param _recipient Recipient of the transferred tokens. + * @param _user Address of the account we are transferring. + */ + "transferStake(uint256,uint256,address,address,uint256,uint256,address)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _obligator: string, + _user: string, + _domainId: BigNumberish, + _amount: BigNumberish, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * View an approval to obligate tokens. + * @param _domainId Domain in which we are willing to be obligated. + * @param _obligator Address of the account we are willing to let obligate us. + * @param _user User allowing their tokens to be obligated. + */ + getApproval( + _user: string, + _obligator: string, + _domainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * View an approval to obligate tokens. + * @param _domainId Domain in which we are willing to be obligated. + * @param _obligator Address of the account we are willing to let obligate us. + * @param _user User allowing their tokens to be obligated. + */ + "getApproval(address,address,uint256)"( + _user: string, + _obligator: string, + _domainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * View an obligation of tokens. + * @param _domainId Domain in which we are obligated. + * @param _obligator Address of the account who obligated us. + * @param _user User whose tokens are obligated. + */ + getObligation( + _user: string, + _obligator: string, + _domainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * View an obligation of tokens. + * @param _domainId Domain in which we are obligated. + * @param _obligator Address of the account who obligated us. + * @param _user User whose tokens are obligated. + */ + "getObligation(address,address,uint256)"( + _user: string, + _obligator: string, + _domainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the domain corresponding to a funding pot + * @param _fundingPotId Id of the funding pot + */ + getDomainFromFundingPot( + _fundingPotId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the domain corresponding to a funding pot + * @param _fundingPotId Id of the funding pot + */ + "getDomainFromFundingPot(uint256)"( + _fundingPotId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Burn tokens held by the colony. Can only burn tokens held in the root funding pot. + * @param amount The amount of tokens to burn + * @param token The address of the token to burn + */ + burnTokens( + token: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Burn tokens held by the colony. Can only burn tokens held in the root funding pot. + * @param amount The amount of tokens to burn + * @param token The address of the token to burn + */ + "burnTokens(address,uint256)"( + token: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * unlock the native colony token, if possible + */ + unlockToken(overrides?: TransactionOverrides): Promise; + + /** + * unlock the native colony token, if possible + */ + "unlockToken()"( + overrides?: TransactionOverrides + ): Promise; + + filters: { + Annotation( + agent: string | null, + txHash: Arrayish | null, + metadata: null + ): EventFilter; + + ColonyBootstrapped(agent: null, users: null, amounts: null): EventFilter; + + ColonyFundsClaimed( + agent: null, + token: null, + fee: null, + payoutRemainder: null + ): EventFilter; + + ColonyFundsMovedBetweenFundingPots( + agent: null, + fromPot: BigNumberish | null, + toPot: BigNumberish | null, + amount: null, + token: null + ): EventFilter; + + ColonyInitialised( + agent: null, + colonyNetwork: null, + token: null + ): EventFilter; + + ColonyMetadata(agent: null, metadata: null): EventFilter; + + ColonyRewardInverseSet(agent: null, rewardInverse: null): EventFilter; + + ColonyRoleSet( + agent: null, + user: string | null, + domainId: BigNumberish | null, + role: BigNumberish | null, + setTo: null + ): EventFilter; + + ColonyUpgraded( + agent: null, + oldVersion: null, + newVersion: null + ): EventFilter; + + DomainAdded(agent: null, domainId: null): EventFilter; + + DomainMetadata( + agent: null, + domainId: BigNumberish | null, + metadata: null + ): EventFilter; + + ExpenditureAdded(agent: null, expenditureId: null): EventFilter; + + ExpenditureCancelled( + agent: null, + expenditureId: BigNumberish | null + ): EventFilter; + + ExpenditureFinalized( + agent: null, + expenditureId: BigNumberish | null + ): EventFilter; + + ExpenditurePayoutSet( + agent: null, + expenditureId: BigNumberish | null, + slot: BigNumberish | null, + token: string | null, + amount: null + ): EventFilter; + + ExpenditureRecipientSet( + agent: null, + expenditureId: BigNumberish | null, + slot: BigNumberish | null, + recipient: string | null + ): EventFilter; + + ExpenditureSkillSet( + agent: null, + expenditureId: BigNumberish | null, + slot: BigNumberish | null, + skillId: BigNumberish | null + ): EventFilter; + + ExpenditureTransferred( + agent: null, + expenditureId: BigNumberish | null, + owner: string | null + ): EventFilter; + + FundingPotAdded(fundingPotId: null): EventFilter; + + PaymentAdded(agent: null, paymentId: null): EventFilter; + + PaymentFinalized(agent: null, paymentId: BigNumberish | null): EventFilter; + + PaymentPayoutSet( + agent: null, + paymentId: BigNumberish | null, + token: null, + amount: null + ): EventFilter; + + PaymentRecipientSet( + agent: null, + paymentId: BigNumberish | null, + recipient: null + ): EventFilter; + + PaymentSkillSet( + agent: null, + paymentId: BigNumberish | null, + skillId: null + ): EventFilter; + + PayoutClaimed( + agent: null, + fundingPotId: BigNumberish | null, + token: null, + amount: null + ): EventFilter; + + RecoveryModeEntered(user: null): EventFilter; + + RecoveryModeExitApproved(user: null): EventFilter; + + RecoveryModeExited(user: null): EventFilter; + + RecoveryRoleSet(user: string | null, setTo: null): EventFilter; + + RecoveryStorageSlotSet( + user: null, + slot: null, + fromValue: null, + toValue: null + ): EventFilter; + + RewardPayoutClaimed( + rewardPayoutId: null, + user: null, + fee: null, + rewardRemainder: null + ): EventFilter; + + RewardPayoutCycleEnded(agent: null, rewardPayoutId: null): EventFilter; + + RewardPayoutCycleStarted(agent: null, rewardPayoutId: null): EventFilter; + + TaskAdded(agent: null, taskId: null): EventFilter; + + TaskBriefSet( + taskId: BigNumberish | null, + specificationHash: null + ): EventFilter; + + TaskCanceled(taskId: BigNumberish | null): EventFilter; + + TaskChangedViaSignatures(reviewerAddresses: null): EventFilter; + + TaskCompleted(agent: null, taskId: BigNumberish | null): EventFilter; + + TaskDeliverableSubmitted( + agent: null, + taskId: BigNumberish | null, + deliverableHash: null + ): EventFilter; + + TaskDueDateSet(taskId: BigNumberish | null, dueDate: null): EventFilter; + + TaskFinalized(agent: null, taskId: BigNumberish | null): EventFilter; + + TaskPayoutSet( + taskId: BigNumberish | null, + role: null, + token: null, + amount: null + ): EventFilter; + + TaskRoleUserSet( + taskId: BigNumberish | null, + role: null, + user: string | null + ): EventFilter; + + TaskSkillSet( + taskId: BigNumberish | null, + skillId: BigNumberish | null + ): EventFilter; + + TaskWorkRatingRevealed( + agent: null, + taskId: BigNumberish | null, + role: null, + rating: null + ): EventFilter; + + TokenUnlocked(): EventFilter; + + TokensBurned(agent: null, token: null, amount: null): EventFilter; + + TokensMinted(agent: null, who: null, amount: null): EventFilter; + }; + + estimate: { + /** + * Indicate approval to exit recovery mode. Can only be called by user with recovery role. + */ + approveExitRecovery(overrides?: TransactionOverrides): Promise; + + /** + * Indicate approval to exit recovery mode. Can only be called by user with recovery role. + */ + "approveExitRecovery()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * No return value, but should throw if protected.This is external, 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, + overrides?: TransactionOverrides + ): Promise; + + /** + * No return value, but should throw if protected.This is external, 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(uint256)"( + _slot: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Put colony network mining into recovery mode. Can only be called by user with recovery role. + */ + enterRecoveryMode(overrides?: TransactionOverrides): Promise; + + /** + * Put colony network mining into recovery mode. Can only be called by user with recovery role. + */ + "enterRecoveryMode()"(overrides?: TransactionOverrides): Promise; + + /** + * Exit recovery mode, can be called by anyone if enough whitelist approvals are given. + */ + exitRecoveryMode(overrides?: TransactionOverrides): Promise; + + /** + * Exit recovery mode, can be called by anyone if enough whitelist approvals are given. + */ + "exitRecoveryMode()"(overrides?: TransactionOverrides): Promise; + + /** + * Is colony network in recovery mode. + */ + isInRecoveryMode(overrides?: TransactionOverrides): Promise; + + /** + * Is colony network in recovery mode. + */ + "isInRecoveryMode()"(overrides?: TransactionOverrides): Promise; + + /** + * Return number of recovery roles. + */ + numRecoveryRoles(overrides?: TransactionOverrides): Promise; + + /** + * Return number of recovery roles. + */ + "numRecoveryRoles()"(overrides?: TransactionOverrides): 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; + + /** + * Remove colony recovery role. Can only be called by root role. + * @param _user User we want to remove recovery role from + */ + "removeRecoveryRole(address)"( + _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; + + /** + * Set new colony recovery role. Can be called by root. + * @param _user User we want to give a recovery role to + */ + "setRecoveryRole(address)"( + _user: string, + overrides?: TransactionOverrides + ): 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; + + /** + * 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(uint256,bytes32)"( + _slot: BigNumberish, + _value: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `ColonyAuthority` for the colony. + */ + authority(overrides?: TransactionOverrides): Promise; + + /** + * Get the `ColonyAuthority` for the colony. + */ + "authority()"(overrides?: TransactionOverrides): Promise; + + /** + * Used for testing. + * Get the colony `owner` address. This should be address(0x0) at all times. + */ + owner(overrides?: TransactionOverrides): Promise; + + /** + * Used for testing. + * Get the colony `owner` address. This should be address(0x0) at all times. + */ + "owner()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the Colony contract version. Starts from 1 and is incremented with every deployed contract change. + */ + version(overrides?: TransactionOverrides): Promise; + + /** + * Get the Colony contract version. Starts from 1 and is incremented with every deployed contract change. + */ + "version()"(overrides?: TransactionOverrides): 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; + + /** + * 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(uint256)"( + _newVersion: BigNumberish, + 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 external 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; + + /** + * Can only be called by the colony itself, and only expected to be called as part of the `upgrade()` call. Required to be external 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. + */ + getColonyNetwork(overrides?: TransactionOverrides): Promise; + + /** + * The colonyNetworkAddress we read here is set once, during `initialiseColony`. + * Returns the colony network address set on the Colony. + */ + "getColonyNetwork()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the colony token. + */ + getToken(overrides?: TransactionOverrides): Promise; + + /** + * Get the colony token. + */ + "getToken()"(overrides?: TransactionOverrides): Promise; + + /** + * Execute arbitrary transaction on behalf of the Colony + * @param _action Bytes array encoding the function call and arguments + * @param _to Contract to receive the function call (cannot be network or token locking) + */ + makeArbitraryTransaction( + _to: string, + _action: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Execute arbitrary transaction on behalf of the Colony + * @param _action Bytes array encoding the function call and arguments + * @param _to Contract to receive the function call (cannot be network or token locking) + */ + "makeArbitraryTransaction(address,bytes)"( + _to: string, + _action: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a metadata string for a transaction + * @param _metadata String of metadata for tx + * @param _txHash Hash of transaction being annotated (0x0 for current tx) + */ + annotateTransaction( + _txHash: Arrayish, + _metadata: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a metadata string for a transaction + * @param _metadata String of metadata for tx + * @param _txHash Hash of transaction being annotated (0x0 for current tx) + */ + "annotateTransaction(bytes32,string)"( + _txHash: Arrayish, + _metadata: string, + overrides?: TransactionOverrides + ): 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 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(address,bool)"( + _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 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(uint256,uint256,address,uint256,bool)"( + _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 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(uint256,uint256,address,uint256,bool)"( + _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 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(uint256,uint256,address,uint256,bool)"( + _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; + + /** + * 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(uint256,uint256,address,uint256,bool)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _user: string, + _domainId: BigNumberish, + _setTo: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set several roles in one transaction. 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 _roles Byte array representing the desired role setting (1 for on, 0 for off) + * @param _user User we want to give a role to + */ + setUserRoles( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _user: string, + _domainId: BigNumberish, + _roles: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set several roles in one transaction. 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 _roles Byte array representing the desired role setting (1 for on, 0 for off) + * @param _user User we want to give a role to + */ + "setUserRoles(uint256,uint256,address,uint256,bytes32)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _user: string, + _domainId: BigNumberish, + _roles: Arrayish, + 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 + */ + hasUserRole( + _user: string, + _domainId: BigNumberish, + _role: BigNumberish, + 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 + */ + "hasUserRole(address,uint256,uint8)"( + _user: string, + _domainId: BigNumberish, + _role: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Check whether a given user has a given role for the colony, in a child domain. Calls the function of the same name on the colony's authority contract and an internal inheritence validator function + * @param _childDomainId The domain where we want to use the role + * @param _childSkillIndex The index that the `_childDomainId` is relative to `_domainId` + * @param _domainId Domain in which the caller has the role + * @param _role The role we want to check for + * @param _user The user whose role we want to check + */ + hasInheritedUserRole( + _user: string, + _domainId: BigNumberish, + _role: BigNumberish, + _childSkillIndex: BigNumberish, + _childDomainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Check whether a given user has a given role for the colony, in a child domain. Calls the function of the same name on the colony's authority contract and an internal inheritence validator function + * @param _childDomainId The domain where we want to use the role + * @param _childSkillIndex The index that the `_childDomainId` is relative to `_domainId` + * @param _domainId Domain in which the caller has the role + * @param _role The role we want to check for + * @param _user The user whose role we want to check + */ + "hasInheritedUserRole(address,uint256,uint8,uint256,uint256)"( + _user: string, + _domainId: BigNumberish, + _role: BigNumberish, + _childSkillIndex: BigNumberish, + _childDomainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Check whether a given user can modify roles in the target domain `_childDomainId`. Mostly a convenience function to provide a uniform interface for extension contracts validating permissions + * @param _childDomainId The domain where we want to edit roles + * @param _childSkillIndex The index that the `_childDomainId` is relative to `_domainId` + * @param _domainId Domain in which the caller has the role (currently Root or Architecture) + * @param _user The user whose permissions we want to check + */ + userCanSetRoles( + _user: string, + _domainId: BigNumberish, + _childSkillIndex: BigNumberish, + _childDomainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Check whether a given user can modify roles in the target domain `_childDomainId`. Mostly a convenience function to provide a uniform interface for extension contracts validating permissions + * @param _childDomainId The domain where we want to edit roles + * @param _childSkillIndex The index that the `_childDomainId` is relative to `_domainId` + * @param _domainId Domain in which the caller has the role (currently Root or Architecture) + * @param _user The user whose permissions we want to check + */ + "userCanSetRoles(address,uint256,uint256,uint256)"( + _user: string, + _domainId: BigNumberish, + _childSkillIndex: BigNumberish, + _childDomainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Gets the bytes32 representation of the roles for a user in a given domain + * @param _domain The domain we want to get roles in + * @param _user The user whose roles we want to get + */ + getUserRoles( + _user: string, + _domain: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Gets the bytes32 representation of the roles for a user in a given domain + * @param _domain The domain we want to get roles in + * @param _user The user whose roles we want to get + */ + "getUserRoles(address,uint256)"( + _user: string, + _domain: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Gets the bytes32 representation of the roles authorized to call a function + * @param _sig The function signature + */ + getCapabilityRoles( + _sig: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Gets the bytes32 representation of the roles authorized to call a function + * @param _sig The function signature + */ + "getCapabilityRoles(bytes4)"( + _sig: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a positive domain reputation update. Available only to Root role holders + * @param _amount The (positive) amount of reputation to gain + * @param _domainId The domain where the user will gain reputation + * @param _user The user who will gain reputation + */ + emitDomainReputationReward( + _domainId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a positive domain reputation update. Available only to Root role holders + * @param _amount The (positive) amount of reputation to gain + * @param _domainId The domain where the user will gain reputation + * @param _user The user who will gain reputation + */ + "emitDomainReputationReward(uint256,address,int256)"( + _domainId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a positive skill reputation update. Available only to Root role holders + * @param _amount The (positive) amount of reputation to gain + * @param _skillId The skill where the user will gain reputation + * @param _user The user who will gain reputation + */ + emitSkillReputationReward( + _skillId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a positive skill reputation update. Available only to Root role holders + * @param _amount The (positive) amount of reputation to gain + * @param _skillId The skill where the user will gain reputation + * @param _user The user who will gain reputation + */ + "emitSkillReputationReward(uint256,address,int256)"( + _skillId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a negative domain reputation update. Available only to Arbitration role holders + * @param _amount The (negative) amount of reputation to lose + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId` + * @param _domainId The domain where the user will lose reputation + * @param _permissionDomainId The domainId in which I hold the Arbitration role + * @param _user The user who will lose reputation + */ + emitDomainReputationPenalty( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a negative domain reputation update. Available only to Arbitration role holders + * @param _amount The (negative) amount of reputation to lose + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId` + * @param _domainId The domain where the user will lose reputation + * @param _permissionDomainId The domainId in which I hold the Arbitration role + * @param _user The user who will lose reputation + */ + "emitDomainReputationPenalty(uint256,uint256,uint256,address,int256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a negative skill reputation update. Available only to Arbitration role holders in the root domain + * @param _amount The (negative) amount of reputation to lose + * @param _skillId The skill where the user will lose reputation + * @param _user The user who will lose reputation + */ + emitSkillReputationPenalty( + _skillId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a negative skill reputation update. Available only to Arbitration role holders in the root domain + * @param _amount The (negative) amount of reputation to lose + * @param _skillId The skill where the user will lose reputation + * @param _user The user who will lose reputation + */ + "emitSkillReputationPenalty(uint256,address,int256)"( + _skillId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): 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; + + /** + * 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(address,address)"( + _colonyNetworkAddress: string, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called to change the metadata associated with a colony. Expected to be a IPFS hash of a JSON blob, but not enforced to any degree by the contracts + * @param _metadata IPFS hash of the metadata + */ + editColony( + _metadata: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called to change the metadata associated with a colony. Expected to be a IPFS hash of a JSON blob, but not enforced to any degree by the contracts + * @param _metadata IPFS hash of the metadata + */ + "editColony(string)"( + _metadata: 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; + + /** + * 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(address[],int256[])"( + _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; + + /** + * Mint `_wad` amount of colony tokens. Secured function to authorised members. + * @param _wad Amount to mint + */ + "mintTokens(uint256)"( + _wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Mint `_wad` amount of colony tokens and send to `_guy`. Secured function to authorised members. + * @param _guy Recipient of new tokens + * @param _wad Amount to mint + */ + mintTokensFor( + _guy: string, + _wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Mint `_wad` amount of colony tokens and send to `_guy`. Secured function to authorised members. + * @param _guy Recipient of new tokens + * @param _wad Amount to mint + */ + "mintTokensFor(address,uint256)"( + _guy: string, + _wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Lock the colony's token. Can only be called by a network-managed extension. + */ + lockToken(overrides?: TransactionOverrides): Promise; + + /** + * Lock the colony's token. Can only be called by a network-managed extension. + */ + "lockToken()"(overrides?: TransactionOverrides): Promise; + + /** + * Unlock the colony's token for a user. Can only be called by a network-managed extension. + * @param lockId The specific lock to unlock + * @param user The user to unlock + */ + unlockTokenForUser( + user: string, + lockId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Unlock the colony's token for a user. Can only be called by a network-managed extension. + * @param lockId The specific lock to unlock + * @param user The user to unlock + */ + "unlockTokenForUser(address,uint256)"( + user: string, + lockId: 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; + + /** + * 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(string,string)"( + 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; + + /** + * 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(string)"( + orbitdb: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Install an extension to the colony. Secured function to authorised members. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param version The new extension version to install + */ + installExtension( + extensionId: Arrayish, + version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Install an extension to the colony. Secured function to authorised members. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param version The new extension version to install + */ + "installExtension(bytes32,uint256)"( + extensionId: Arrayish, + version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Upgrade an extension in a colony. Secured function to authorised members. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param newVersion The version to upgrade to (must be one larger than the current version) + */ + upgradeExtension( + extensionId: Arrayish, + newVersion: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Upgrade an extension in a colony. Secured function to authorised members. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param newVersion The version to upgrade to (must be one larger than the current version) + */ + "upgradeExtension(bytes32,uint256)"( + extensionId: Arrayish, + newVersion: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the deprecation of an extension in a colony. Secured function to authorised members. + * @param deprecated Whether to deprecate the extension or not + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + deprecateExtension( + extensionId: Arrayish, + deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the deprecation of an extension in a colony. Secured function to authorised members. + * @param deprecated Whether to deprecate the extension or not + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + "deprecateExtension(bytes32,bool)"( + extensionId: Arrayish, + deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is a permanent action -- re-installing the extension will deploy a new contractIt is recommended to deprecate an extension before uninstalling to allow active objects to be resolved + * Uninstall an extension from a colony. Secured function to authorised members. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + uninstallExtension( + extensionId: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is a permanent action -- re-installing the extension will deploy a new contractIt is recommended to deprecate an extension before uninstalling to allow active objects to be resolved + * Uninstall an extension from a colony. Secured function to authorised members. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + "uninstallExtension(bytes32)"( + extensionId: Arrayish, + 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; + + /** + * 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(uint256,uint256,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _parentDomainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Adding new domains is currently retricted to one level only, i.e. `_parentDomainId` has to be the root domain id: `1`.We expect this function to only be used by the dapp + * 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 _metadata Metadata relating to the domain. Expected to be the IPFS hash of a JSON blob, but not enforced by the contracts. + * @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(uint256,uint256,uint256,string)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _parentDomainId: BigNumberish, + _metadata: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * 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 _domainId Id of the domain being edited + * @param _metadata Metadata relating to the domain. Expected to be the IPFS hash of a JSON blob, but not enforced by the contracts. + * @param _permissionDomainId The domainId in which I have the permission to take this action + */ + editDomain( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + _metadata: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * 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 _domainId Id of the domain being edited + * @param _metadata Metadata relating to the domain. Expected to be the IPFS hash of a JSON blob, but not enforced by the contracts. + * @param _permissionDomainId The domainId in which I have the permission to take this action + */ + "editDomain(uint256,uint256,uint256,string)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + _metadata: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a domain by id. + * @param _id Id of the domain which details to get + */ + getDomain( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a domain by id. + * @param _id Id of the domain which details to get + */ + "getDomain(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of domains in the colony. + */ + getDomainCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of domains in the colony. + */ + "getDomainCount()"(overrides?: TransactionOverrides): Promise; + + /** + * For more detail about branchMask and siblings, examine the PatriciaTree implementation. While external, 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. + */ + verifyReputationProof( + key: Arrayish, + value: Arrayish, + branchMask: BigNumberish, + siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * For more detail about branchMask and siblings, examine the PatriciaTree implementation. While external, 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. + */ + "verifyReputationProof(bytes,bytes,uint256,bytes32[])"( + key: Arrayish, + value: Arrayish, + branchMask: BigNumberish, + siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Add a new expenditure in the colony. Secured function to authorised members. + * @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 expenditure belongs + * @param _permissionDomainId The domainId in which I have the permission to take this action + */ + makeExpenditure( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Add a new expenditure in the colony. Secured function to authorised members. + * @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 expenditure belongs + * @param _permissionDomainId The domainId in which I have the permission to take this action + */ + "makeExpenditure(uint256,uint256,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Updates the expenditure owner. Can only be called by expenditure owner. + * @param _id Expenditure identifier + * @param _newOwner New owner of expenditure + */ + transferExpenditure( + _id: BigNumberish, + _newOwner: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Updates the expenditure owner. Can only be called by expenditure owner. + * @param _id Expenditure identifier + * @param _newOwner New owner of expenditure + */ + "transferExpenditure(uint256,address)"( + _id: BigNumberish, + _newOwner: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future version + * DEPRECATED Updates the expenditure owner. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _id Expenditure identifier + * @param _newOwner New owner of expenditure + * @param _permissionDomainId The domainId in which I have the permission to take this action + */ + transferExpenditureViaArbitration( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _newOwner: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future version + * DEPRECATED Updates the expenditure owner. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _id Expenditure identifier + * @param _newOwner New owner of expenditure + * @param _permissionDomainId The domainId in which I have the permission to take this action + */ + "transferExpenditureViaArbitration(uint256,uint256,uint256,address)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _newOwner: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Cancels the expenditure and prevents further editing. Can only be called by expenditure owner. + * @param _id Expenditure identifier + */ + cancelExpenditure( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Cancels the expenditure and prevents further editing. Can only be called by expenditure owner. + * @param _id Expenditure identifier + */ + "cancelExpenditure(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Finalizes the expenditure and prevents further editing. Can only be called by expenditure owner. + * @param _id Expenditure identifier + */ + finalizeExpenditure( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Finalizes the expenditure and prevents further editing. Can only be called by expenditure owner. + * @param _id Expenditure identifier + */ + "finalizeExpenditure(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Sets the recipient on an expenditure slot. Can only be called by expenditure owner. + * @param _id Id of the expenditure + * @param _recipient Address of the recipient + * @param _slot Slot for the recipient address + */ + setExpenditureRecipient( + _id: BigNumberish, + _slot: BigNumberish, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Sets the recipient on an expenditure slot. Can only be called by expenditure owner. + * @param _id Id of the expenditure + * @param _recipient Address of the recipient + * @param _slot Slot for the recipient address + */ + "setExpenditureRecipient(uint256,uint256,address)"( + _id: BigNumberish, + _slot: BigNumberish, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the token payout on an expenditure slot. Can only be called by expenditure owner. + * @param _amount Payout amount + * @param _id Id of the expenditure + * @param _slot Number of the slot + * @param _token Address of the token, `0x0` value indicates Ether + */ + setExpenditurePayout( + _id: BigNumberish, + _slot: BigNumberish, + _token: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the token payout on an expenditure slot. Can only be called by expenditure owner. + * @param _amount Payout amount + * @param _id Id of the expenditure + * @param _slot Number of the slot + * @param _token Address of the token, `0x0` value indicates Ether + */ + "setExpenditurePayout(uint256,uint256,address,uint256)"( + _id: BigNumberish, + _slot: BigNumberish, + _token: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Sets the skill on an expenditure slot. Can only be called by expenditure owner. + * @param _id Expenditure identifier + * @param _skillId Id of the new skill to set + * @param _slot Number of the slot + */ + setExpenditureSkill( + _id: BigNumberish, + _slot: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Sets the skill on an expenditure slot. Can only be called by expenditure owner. + * @param _id Expenditure identifier + * @param _skillId Id of the new skill to set + * @param _slot Number of the slot + */ + "setExpenditureSkill(uint256,uint256,uint256)"( + _id: BigNumberish, + _slot: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future versionNote that when determining payouts the payoutModifier is incremented by WAD and converted into payoutScalar + * DEPRECATED Set the payout modifier on an expenditure slot. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _id Expenditure identifier + * @param _payoutModifier Modifier to their payout (between -1 and 1, denominated in WADs, 0 means no modification) + * @param _permissionDomainId The domainId in which I have the permission to take this action + * @param _slot Number of the slot + */ + setExpenditurePayoutModifier( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _slot: BigNumberish, + _payoutModifier: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future versionNote that when determining payouts the payoutModifier is incremented by WAD and converted into payoutScalar + * DEPRECATED Set the payout modifier on an expenditure slot. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _id Expenditure identifier + * @param _payoutModifier Modifier to their payout (between -1 and 1, denominated in WADs, 0 means no modification) + * @param _permissionDomainId The domainId in which I have the permission to take this action + * @param _slot Number of the slot + */ + "setExpenditurePayoutModifier(uint256,uint256,uint256,uint256,int256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _slot: BigNumberish, + _payoutModifier: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future version + * DEPRECATED Set the claim delay on an expenditure slot. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _claimDelay Time (in seconds) to delay claiming payout after finalization + * @param _id Expenditure identifier + * @param _permissionDomainId The domainId in which I have the permission to take this action + * @param _slot Number of the slot + */ + setExpenditureClaimDelay( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _slot: BigNumberish, + _claimDelay: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future version + * DEPRECATED Set the claim delay on an expenditure slot. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _claimDelay Time (in seconds) to delay claiming payout after finalization + * @param _id Expenditure identifier + * @param _permissionDomainId The domainId in which I have the permission to take this action + * @param _slot Number of the slot + */ + "setExpenditureClaimDelay(uint256,uint256,uint256,uint256,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _slot: BigNumberish, + _claimDelay: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set arbitrary state on an expenditure slot. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _id Expenditure identifier + * @param _keys Array of additional keys (for mappings & arrays) + * @param _mask Array of booleans indicated whether a key is a mapping (F) or an array index (T). + * @param _permissionDomainId The domainId in which I have the permission to take this action + * @param _storageSlot Number of the top-level storage slot (25, 26, or 27) + * @param _value Value to set at location + */ + setExpenditureState( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _storageSlot: BigNumberish, + _mask: boolean[], + _keys: Arrayish[], + _value: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set arbitrary state on an expenditure slot. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _id Expenditure identifier + * @param _keys Array of additional keys (for mappings & arrays) + * @param _mask Array of booleans indicated whether a key is a mapping (F) or an array index (T). + * @param _permissionDomainId The domainId in which I have the permission to take this action + * @param _storageSlot Number of the top-level storage slot (25, 26, or 27) + * @param _value Value to set at location + */ + "setExpenditureState(uint256,uint256,uint256,uint256,bool[],bytes32[],bytes32)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _storageSlot: BigNumberish, + _mask: boolean[], + _keys: Arrayish[], + _value: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Claim the payout for an expenditure slot. Here the network receives a fee from each payout. + * @param _id Expenditure identifier + * @param _slot Number of the slot + * @param _token Address of the token, `0x0` value indicates Ether + */ + claimExpenditurePayout( + _id: BigNumberish, + _slot: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Claim the payout for an expenditure slot. Here the network receives a fee from each payout. + * @param _id Expenditure identifier + * @param _slot Number of the slot + * @param _token Address of the token, `0x0` value indicates Ether + */ + "claimExpenditurePayout(uint256,uint256,address)"( + _id: BigNumberish, + _slot: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of expenditures in the colony. + */ + getExpenditureCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of expenditures in the colony. + */ + "getExpenditureCount()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns an existing expenditure. + * @param _id Expenditure identifier + */ + getExpenditure( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns an existing expenditure. + * @param _id Expenditure identifier + */ + "getExpenditure(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns an existing expenditure slot. + * @param _id Expenditure identifier + * @param _slot Expenditure slot + */ + getExpenditureSlot( + _id: BigNumberish, + _slot: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns an existing expenditure slot. + * @param _id Expenditure identifier + * @param _slot Expenditure slot + */ + "getExpenditureSlot(uint256,uint256)"( + _id: BigNumberish, + _slot: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns an existing expenditure slot's payout for a token. + * @param _id Expenditure identifier + * @param _slot Expenditure slot + * @param _token Token address + */ + getExpenditureSlotPayout( + _id: BigNumberish, + _slot: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns an existing expenditure slot's payout for a token. + * @param _id Expenditure identifier + * @param _slot Expenditure slot + * @param _token Token address + */ + "getExpenditureSlotPayout(uint256,uint256,address)"( + _id: BigNumberish, + _slot: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 + */ + addPayment( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _recipient: string, + _token: string, + _amount: BigNumberish, + _domainId: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): 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 + */ + "addPayment(uint256,uint256,address,address,uint256,uint256,uint256)"( + _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; + + /** + * 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(uint256,uint256,uint256)"( + _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 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(uint256,uint256,uint256,address)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _recipient: string, + 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 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(uint256,uint256,uint256,uint256)"( + _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; + + /** + * 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(uint256,uint256,uint256,address,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _token: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns an exiting payment. + * @param _id Payment identifier + */ + getPayment( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns an exiting payment. + * @param _id Payment identifier + */ + "getPayment(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * 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; + + /** + * 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(uint256,address)"( + _id: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of payments in the colony. + */ + getPaymentCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of payments in the colony. + */ + "getPaymentCount()"(overrides?: TransactionOverrides): 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; + + /** + * 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(uint256,uint256,bytes32,uint256,uint256,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _specificationHash: Arrayish, + _domainId: BigNumberish, + _skillId: BigNumberish, + _dueDate: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of tasks in the colony. + */ + getTaskCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of tasks in the colony. + */ + "getTaskCount()"(overrides?: TransactionOverrides): Promise; + + /** + * Starts from 0 and is incremented on every co-reviewed task change via `executeTaskChange` call. + * @param _id Id of the task + */ + getTaskChangeNonce( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Starts from 0 and is incremented on every co-reviewed task change via `executeTaskChange` call. + * @param _id Id of the task + */ + "getTaskChangeNonce(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): 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; + + /** + * 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(uint8[],bytes32[],bytes32[],uint8[],uint256,bytes)"( + _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; + + /** + * 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(uint8[],bytes32[],bytes32[],uint8[],uint256,bytes)"( + _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; + + /** + * 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(uint256,uint8,bytes32)"( + _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; + + /** + * 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(uint256,uint8,uint8,bytes32)"( + _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 + */ + generateSecret( + _salt: Arrayish, + _value: BigNumberish, + 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 + */ + "generateSecret(bytes32,uint256)"( + _salt: Arrayish, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `ColonyStorage.RatingSecrets` information for task `_id`. + * @param _id Id of the task + */ + getTaskWorkRatingSecretsInfo( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `ColonyStorage.RatingSecrets` information for task `_id`. + * @param _id Id of the task + */ + "getTaskWorkRatingSecretsInfo(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * 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 + */ + getTaskWorkRatingSecret( + _id: BigNumberish, + _role: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * 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 + */ + "getTaskWorkRatingSecret(uint256,uint8)"( + _id: BigNumberish, + _role: BigNumberish, + overrides?: TransactionOverrides + ): 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 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(uint256,address,uint256,uint256)"( + _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 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(uint256,address)"( + _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; + + /** + * 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(uint256,address)"( + _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 evaluator role. Agreed between manager and currently assigned evaluator. + * @param _id Id of the task + */ + "removeTaskEvaluatorRole(uint256)"( + _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; + + /** + * Removing worker role. Agreed between manager and currently assigned worker. + * @param _id Id of the task + */ + "removeTaskWorkerRole(uint256)"( + _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; + + /** + * 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(uint256,uint256)"( + _id: BigNumberish, + _skillId: 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 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(uint256,bytes32)"( + _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 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(uint256,uint256)"( + _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; + + /** + * 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(uint256,bytes32)"( + _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; + + /** + * 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(uint256,bytes32,bytes32)"( + _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.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(uint256)"( + _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; + + /** + * 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(uint256)"( + _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; + + /** + * 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(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a task with id `_id` + * @param _id Id of the task + */ + getTask( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a task with id `_id` + * @param _id Id of the task + */ + "getTask(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * 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 + */ + getTaskRole( + _id: BigNumberish, + _role: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * 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 + */ + "getTaskRole(uint256,uint8)"( + _id: BigNumberish, + _role: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * 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; + + /** + * 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(uint256)"( + _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. + */ + getRewardInverse(overrides?: TransactionOverrides): Promise; + + /** + * Return 1 / the reward to pay out from revenue. e.g. if the fee is 1% (or 0.01), return 100. + */ + "getRewardInverse()"(overrides?: TransactionOverrides): 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 + */ + getTaskPayout( + _id: BigNumberish, + _role: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 + */ + "getTaskPayout(uint256,uint8,address)"( + _id: BigNumberish, + _role: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 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(uint256,address,uint256)"( + _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 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(uint256,address,uint256)"( + _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; + + /** + * 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(uint256,address,uint256)"( + _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; + + /** + * 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(uint256,address,uint256,uint256,uint256)"( + _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; + + /** + * 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(uint256,uint8,address)"( + _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; + + /** + * 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(address,bytes,bytes,uint256,bytes32[])"( + _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 (deposited in TokenLocking), `_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; + + /** + * 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 (deposited in TokenLocking), `_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(uint256,uint256[7],bytes,bytes,uint256,bytes32[])"( + _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 + */ + getRewardPayoutInfo( + _payoutId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get useful information about specific reward payout. + * @param _payoutId Id of the reward payout + */ + "getRewardPayoutInfo(uint256)"( + _payoutId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * 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; + + /** + * 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(uint256)"( + _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 + */ + getFundingPot( + _id: 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 + */ + "getFundingPot(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of funding pots in the colony. + */ + getFundingPotCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of funding pots in the colony. + */ + "getFundingPotCount()"( + overrides?: TransactionOverrides + ): 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 + */ + getFundingPotBalance( + _potId: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 + */ + "getFundingPotBalance(uint256,address)"( + _potId: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 + */ + getFundingPotPayout( + _potId: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 + */ + "getFundingPotPayout(uint256,address)"( + _potId: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 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(uint256,uint256,uint256,uint256,uint256,uint256,address)"( + _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; + + /** + * 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(address)"( + _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 + */ + getNonRewardPotsTotal( + _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 + */ + "getNonRewardPotsTotal(address)"( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Allow the _approvee to obligate some amount of tokens as a stake. + * @param _amount Amount of internal token up to which we are willing to be obligated. + * @param _approvee Address of the account we are willing to let obligate us. + * @param _domainId Domain in which we are willing to be obligated. + */ + approveStake( + _approvee: string, + _domainId: BigNumberish, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Allow the _approvee to obligate some amount of tokens as a stake. + * @param _amount Amount of internal token up to which we are willing to be obligated. + * @param _approvee Address of the account we are willing to let obligate us. + * @param _domainId Domain in which we are willing to be obligated. + */ + "approveStake(address,uint256,uint256)"( + _approvee: string, + _domainId: BigNumberish, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Obligate the user some amount of tokens as a stake. + * @param _amount Amount of internal token we are obligating. + * @param _domainId Domain in which we are obligating the user. + * @param _user Address of the account we are obligating. + */ + obligateStake( + _user: string, + _domainId: BigNumberish, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Obligate the user some amount of tokens as a stake. + * @param _amount Amount of internal token we are obligating. + * @param _domainId Domain in which we are obligating the user. + * @param _user Address of the account we are obligating. + */ + "obligateStake(address,uint256,uint256)"( + _user: string, + _domainId: BigNumberish, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Deobligate the user some amount of tokens, releasing the stake. + * @param _amount Amount of internal token we are deobligating. + * @param _domainId Domain in which we are deobligating the user. + * @param _user Address of the account we are deobligating. + */ + deobligateStake( + _user: string, + _domainId: BigNumberish, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Deobligate the user some amount of tokens, releasing the stake. + * @param _amount Amount of internal token we are deobligating. + * @param _domainId Domain in which we are deobligating the user. + * @param _user Address of the account we are deobligating. + */ + "deobligateStake(address,uint256,uint256)"( + _user: string, + _domainId: BigNumberish, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Transfer some amount of obligated tokens. Can be called by the arbitration role. + * @param _amount Amount of internal token we are transferring. + * @param _childSkillIndex The child index in `_permissionDomainId` where we can find `_domainId`. + * @param _domainId Domain in which we are transferring the tokens. + * @param _obligator Address of the account who set the obligation. + * @param _permissionDomainId The domainId in which I have the permission to take this action. + * @param _recipient Recipient of the transferred tokens. + * @param _user Address of the account we are transferring. + */ + transferStake( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _obligator: string, + _user: string, + _domainId: BigNumberish, + _amount: BigNumberish, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Transfer some amount of obligated tokens. Can be called by the arbitration role. + * @param _amount Amount of internal token we are transferring. + * @param _childSkillIndex The child index in `_permissionDomainId` where we can find `_domainId`. + * @param _domainId Domain in which we are transferring the tokens. + * @param _obligator Address of the account who set the obligation. + * @param _permissionDomainId The domainId in which I have the permission to take this action. + * @param _recipient Recipient of the transferred tokens. + * @param _user Address of the account we are transferring. + */ + "transferStake(uint256,uint256,address,address,uint256,uint256,address)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _obligator: string, + _user: string, + _domainId: BigNumberish, + _amount: BigNumberish, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * View an approval to obligate tokens. + * @param _domainId Domain in which we are willing to be obligated. + * @param _obligator Address of the account we are willing to let obligate us. + * @param _user User allowing their tokens to be obligated. + */ + getApproval( + _user: string, + _obligator: string, + _domainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * View an approval to obligate tokens. + * @param _domainId Domain in which we are willing to be obligated. + * @param _obligator Address of the account we are willing to let obligate us. + * @param _user User allowing their tokens to be obligated. + */ + "getApproval(address,address,uint256)"( + _user: string, + _obligator: string, + _domainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * View an obligation of tokens. + * @param _domainId Domain in which we are obligated. + * @param _obligator Address of the account who obligated us. + * @param _user User whose tokens are obligated. + */ + getObligation( + _user: string, + _obligator: string, + _domainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * View an obligation of tokens. + * @param _domainId Domain in which we are obligated. + * @param _obligator Address of the account who obligated us. + * @param _user User whose tokens are obligated. + */ + "getObligation(address,address,uint256)"( + _user: string, + _obligator: string, + _domainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the domain corresponding to a funding pot + * @param _fundingPotId Id of the funding pot + */ + getDomainFromFundingPot( + _fundingPotId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the domain corresponding to a funding pot + * @param _fundingPotId Id of the funding pot + */ + "getDomainFromFundingPot(uint256)"( + _fundingPotId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Burn tokens held by the colony. Can only burn tokens held in the root funding pot. + * @param amount The amount of tokens to burn + * @param token The address of the token to burn + */ + burnTokens( + token: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Burn tokens held by the colony. Can only burn tokens held in the root funding pot. + * @param amount The amount of tokens to burn + * @param token The address of the token to burn + */ + "burnTokens(address,uint256)"( + token: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * unlock the native colony token, if possible + */ + unlockToken(overrides?: TransactionOverrides): Promise; + + /** + * unlock the native colony token, if possible + */ + "unlockToken()"(overrides?: TransactionOverrides): Promise; + }; +} diff --git a/src/contracts/colony/6/IColonyNetwork.d.ts b/src/contracts/colony/6/IColonyNetwork.d.ts new file mode 100644 index 000000000..896600644 --- /dev/null +++ b/src/contracts/colony/6/IColonyNetwork.d.ts @@ -0,0 +1,4852 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-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 IColonyNetworkInterface extends Interface { + functions: { + approveExitRecovery: TypedFunctionDescription<{ encode([]: []): string }>; + + checkNotAdditionalProtectedVariable: TypedFunctionDescription<{ + encode([_slot]: [BigNumberish]): string; + }>; + + enterRecoveryMode: TypedFunctionDescription<{ encode([]: []): string }>; + + exitRecoveryMode: TypedFunctionDescription<{ encode([]: []): string }>; + + isInRecoveryMode: TypedFunctionDescription<{ encode([]: []): string }>; + + numRecoveryRoles: TypedFunctionDescription<{ encode([]: []): string }>; + + removeRecoveryRole: TypedFunctionDescription<{ + encode([_user]: [string]): string; + }>; + + setRecoveryRole: TypedFunctionDescription<{ + encode([_user]: [string]): string; + }>; + + setStorageSlotRecovery: TypedFunctionDescription<{ + encode([_slot, _value]: [BigNumberish, Arrayish]): string; + }>; + + supportsInterface: TypedFunctionDescription<{ + encode([interfaceID]: [Arrayish]): string; + }>; + + setReplacementReputationUpdateLogEntry: TypedFunctionDescription<{ + encode([ + _reputationMiningCycle, + _id, + _user, + _amount, + _skillId, + _colony, + _nUpdates, + _nPreviousUpdates, + ]: [ + string, + BigNumberish, + string, + BigNumberish, + BigNumberish, + string, + BigNumberish, + BigNumberish + ]): string; + }>; + + getReplacementReputationUpdateLogEntry: TypedFunctionDescription<{ + encode([_reputationMiningCycle, _id]: [string, BigNumberish]): string; + }>; + + getReplacementReputationUpdateLogsExist: TypedFunctionDescription<{ + encode([_reputationMiningCycle]: [string]): string; + }>; + + getMetaColony: TypedFunctionDescription<{ encode([]: []): string }>; + + getColonyCount: TypedFunctionDescription<{ encode([]: []): string }>; + + isColony: TypedFunctionDescription<{ encode([_colony]: [string]): string }>; + + addSkill: TypedFunctionDescription<{ + encode([_parentSkillId]: [BigNumberish]): string; + }>; + + getSkill: TypedFunctionDescription<{ + encode([_skillId]: [BigNumberish]): string; + }>; + + deprecateSkill: TypedFunctionDescription<{ + encode([_skillId]: [BigNumberish]): string; + }>; + + appendReputationUpdateLog: TypedFunctionDescription<{ + encode([_user, _amount, _skillId]: [ + string, + BigNumberish, + BigNumberish + ]): string; + }>; + + getSkillCount: TypedFunctionDescription<{ encode([]: []): string }>; + + getReputationMiningSkillId: TypedFunctionDescription<{ + encode([]: []): string; + }>; + + setTokenLocking: TypedFunctionDescription<{ + encode([_tokenLockingAddress]: [string]): string; + }>; + + getTokenLocking: TypedFunctionDescription<{ encode([]: []): string }>; + + createMetaColony: TypedFunctionDescription<{ + encode([_tokenAddress]: [string]): string; + }>; + + createColony: TypedFunctionDescription<{ + encode([_tokenAddress]: [string]): string; + }>; + + addColonyVersion: TypedFunctionDescription<{ + encode([_version, _resolver]: [BigNumberish, string]): string; + }>; + + initialise: TypedFunctionDescription<{ + encode([_resolver, _version]: [string, BigNumberish]): string; + }>; + + getColony: TypedFunctionDescription<{ + encode([_id]: [BigNumberish]): string; + }>; + + getCurrentColonyVersion: TypedFunctionDescription<{ + encode([]: []): string; + }>; + + getParentSkillId: TypedFunctionDescription<{ + encode([_skillId, _parentSkillIndex]: [ + BigNumberish, + BigNumberish + ]): string; + }>; + + getChildSkillId: TypedFunctionDescription<{ + encode([_skillId, _childSkillIndex]: [ + BigNumberish, + BigNumberish + ]): string; + }>; + + getReputationMiningCycle: TypedFunctionDescription<{ + encode([_active]: [boolean]): string; + }>; + + calculateMinerWeight: TypedFunctionDescription<{ + encode([_timeStaked, _submissonIndex]: [ + BigNumberish, + BigNumberish + ]): string; + }>; + + getColonyVersionResolver: TypedFunctionDescription<{ + encode([_version]: [BigNumberish]): string; + }>; + + setReputationRootHash: TypedFunctionDescription<{ + encode([newHash, newNLeaves, stakers]: [ + Arrayish, + BigNumberish, + string[] + ]): string; + }>; + + startNextCycle: TypedFunctionDescription<{ encode([]: []): string }>; + + initialiseReputationMining: TypedFunctionDescription<{ + encode([]: []): string; + }>; + + getReputationRootHash: TypedFunctionDescription<{ encode([]: []): string }>; + + getReputationRootHashNLeaves: TypedFunctionDescription<{ + encode([]: []): string; + }>; + + getReputationRootHashNNodes: TypedFunctionDescription<{ + encode([]: []): string; + }>; + + startTokenAuction: TypedFunctionDescription<{ + encode([_token]: [string]): string; + }>; + + setupRegistrar: TypedFunctionDescription<{ + encode([_ens, _rootNode]: [string, Arrayish]): string; + }>; + + registerUserLabel: TypedFunctionDescription<{ + encode([username, orbitdb]: [string, string]): string; + }>; + + registerColonyLabel: TypedFunctionDescription<{ + encode([colonyName, orbitdb]: [string, string]): string; + }>; + + updateColonyOrbitDB: TypedFunctionDescription<{ + encode([orbitdb]: [string]): string; + }>; + + updateUserOrbitDB: TypedFunctionDescription<{ + encode([orbitdb]: [string]): string; + }>; + + getProfileDBAddress: TypedFunctionDescription<{ + encode([node]: [Arrayish]): string; + }>; + + lookupRegisteredENSDomain: TypedFunctionDescription<{ + encode([addr]: [string]): string; + }>; + + addr: TypedFunctionDescription<{ encode([node]: [Arrayish]): string }>; + + getENSRegistrar: TypedFunctionDescription<{ encode([]: []): string }>; + + setMiningResolver: TypedFunctionDescription<{ + encode([miningResolverAddress]: [string]): string; + }>; + + getMiningResolver: TypedFunctionDescription<{ encode([]: []): string }>; + + addExtensionToNetwork: TypedFunctionDescription<{ + encode([extensionId, resolver]: [Arrayish, string]): string; + }>; + + installExtension: TypedFunctionDescription<{ + encode([extensionId, version]: [Arrayish, BigNumberish]): string; + }>; + + upgradeExtension: TypedFunctionDescription<{ + encode([extensionId, newVersion]: [Arrayish, BigNumberish]): string; + }>; + + deprecateExtension: TypedFunctionDescription<{ + encode([extensionId, deprecated]: [Arrayish, boolean]): string; + }>; + + uninstallExtension: TypedFunctionDescription<{ + encode([extensionId]: [Arrayish]): string; + }>; + + getExtensionResolver: TypedFunctionDescription<{ + encode([extensionId, version]: [Arrayish, BigNumberish]): string; + }>; + + getExtensionInstallation: TypedFunctionDescription<{ + encode([extensionId, colony]: [Arrayish, string]): string; + }>; + + getFeeInverse: TypedFunctionDescription<{ encode([]: []): string }>; + + setFeeInverse: TypedFunctionDescription<{ + encode([_feeInverse]: [BigNumberish]): string; + }>; + + getPayoutWhitelist: TypedFunctionDescription<{ + encode([_token]: [string]): string; + }>; + + setPayoutWhitelist: TypedFunctionDescription<{ + encode([_token, _status]: [string, boolean]): string; + }>; + + punishStakers: TypedFunctionDescription<{ + encode([_stakers, _amount]: [string[], BigNumberish]): string; + }>; + + stakeForMining: TypedFunctionDescription<{ + encode([_amount]: [BigNumberish]): string; + }>; + + unstakeForMining: TypedFunctionDescription<{ + encode([_amount]: [BigNumberish]): string; + }>; + + getMiningStake: TypedFunctionDescription<{ + encode([_user]: [string]): string; + }>; + + reward: TypedFunctionDescription<{ + encode([_recipient, _amount]: [string, BigNumberish]): string; + }>; + + burnUnneededRewards: TypedFunctionDescription<{ + encode([_amount]: [BigNumberish]): string; + }>; + + claimMiningReward: TypedFunctionDescription<{ + encode([_recipient]: [string]): string; + }>; + + setReputationMiningCycleReward: TypedFunctionDescription<{ + encode([_amount]: [BigNumberish]): string; + }>; + + getReputationMiningCycleReward: TypedFunctionDescription<{ + encode([]: []): string; + }>; + }; + + events: { + AuctionCreated: TypedEventDescription<{ + encodeTopics([auction, token, quantity]: [null, null, null]): string[]; + }>; + + ColonyAdded: TypedEventDescription<{ + encodeTopics([colonyId, colonyAddress, token]: [ + BigNumberish | null, + string | null, + null + ]): string[]; + }>; + + ColonyLabelRegistered: TypedEventDescription<{ + encodeTopics([colony, label]: [string | null, null]): string[]; + }>; + + ColonyNetworkInitialised: TypedEventDescription<{ + encodeTopics([resolver]: [null]): string[]; + }>; + + ColonyVersionAdded: TypedEventDescription<{ + encodeTopics([version, resolver]: [null, null]): string[]; + }>; + + ExtensionAddedToNetwork: TypedEventDescription<{ + encodeTopics([extensionId, version]: [Arrayish | null, null]): string[]; + }>; + + ExtensionDeprecated: TypedEventDescription<{ + encodeTopics([extensionId, colony, deprecated]: [ + Arrayish | null, + string | null, + null + ]): string[]; + }>; + + ExtensionInstalled: TypedEventDescription<{ + encodeTopics([extensionId, colony, version]: [ + Arrayish | null, + string | null, + null + ]): string[]; + }>; + + ExtensionUninstalled: TypedEventDescription<{ + encodeTopics([extensionId, colony]: [ + Arrayish | null, + string | null + ]): string[]; + }>; + + ExtensionUpgraded: TypedEventDescription<{ + encodeTopics([extensionId, colony, version]: [ + Arrayish | null, + string | null, + null + ]): string[]; + }>; + + MetaColonyCreated: TypedEventDescription<{ + encodeTopics([metaColony, token, rootSkillId]: [ + null, + null, + null + ]): string[]; + }>; + + MiningCycleResolverSet: TypedEventDescription<{ + encodeTopics([miningCycleResolver]: [null]): string[]; + }>; + + NetworkFeeInverseSet: TypedEventDescription<{ + encodeTopics([feeInverse]: [null]): string[]; + }>; + + RecoveryModeEntered: TypedEventDescription<{ + encodeTopics([user]: [null]): string[]; + }>; + + RecoveryModeExitApproved: TypedEventDescription<{ + encodeTopics([user]: [null]): string[]; + }>; + + RecoveryModeExited: TypedEventDescription<{ + encodeTopics([user]: [null]): string[]; + }>; + + RecoveryRoleSet: TypedEventDescription<{ + encodeTopics([user, setTo]: [string | null, null]): string[]; + }>; + + RecoveryStorageSlotSet: TypedEventDescription<{ + encodeTopics([user, slot, fromValue, toValue]: [ + null, + null, + null, + null + ]): string[]; + }>; + + RegistrarInitialised: TypedEventDescription<{ + encodeTopics([ens, rootNode]: [null, null]): string[]; + }>; + + ReputationMinerPenalised: TypedEventDescription<{ + encodeTopics([miner, tokensLost]: [null, null]): string[]; + }>; + + ReputationMiningCycleComplete: TypedEventDescription<{ + encodeTopics([hash, nLeaves]: [null, null]): string[]; + }>; + + ReputationMiningInitialised: TypedEventDescription<{ + encodeTopics([inactiveReputationMiningCycle]: [null]): string[]; + }>; + + ReputationMiningRewardSet: TypedEventDescription<{ + encodeTopics([amount]: [null]): string[]; + }>; + + ReputationRootHashSet: TypedEventDescription<{ + encodeTopics([newHash, newNLeaves, stakers, reward]: [ + null, + null, + null, + null + ]): string[]; + }>; + + SkillAdded: TypedEventDescription<{ + encodeTopics([skillId, parentSkillId]: [null, null]): string[]; + }>; + + TokenLockingAddressSet: TypedEventDescription<{ + encodeTopics([tokenLocking]: [null]): string[]; + }>; + + TokenWhitelisted: TypedEventDescription<{ + encodeTopics([token, status]: [null, null]): string[]; + }>; + + UserLabelRegistered: TypedEventDescription<{ + encodeTopics([user, label]: [string | null, null]): string[]; + }>; + }; +} + +export class IColonyNetwork extends Contract { + connect(signerOrProvider: Signer | Provider | string): IColonyNetwork; + attach(addressOrName: string): IColonyNetwork; + deployed(): Promise; + + on(event: EventFilter | string, listener: Listener): IColonyNetwork; + once(event: EventFilter | string, listener: Listener): IColonyNetwork; + addListener( + eventName: EventFilter | string, + listener: Listener + ): IColonyNetwork; + removeAllListeners(eventName: EventFilter | string): IColonyNetwork; + removeListener(eventName: any, listener: Listener): IColonyNetwork; + + interface: IColonyNetworkInterface; + + functions: { + /** + * Indicate approval to exit recovery mode. Can only be called by user with recovery role. + */ + approveExitRecovery( + overrides?: TransactionOverrides + ): Promise; + + /** + * Indicate approval to exit recovery mode. Can only be called by user with recovery role. + */ + "approveExitRecovery()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * No return value, but should throw if protected.This is external, 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, + overrides?: TransactionOverrides + ): Promise; + + /** + * No return value, but should throw if protected.This is external, 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(uint256)"( + _slot: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Put colony network mining into recovery mode. Can only be called by user with recovery role. + */ + enterRecoveryMode( + overrides?: TransactionOverrides + ): Promise; + + /** + * Put colony network mining into recovery mode. Can only be called by user with recovery role. + */ + "enterRecoveryMode()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Exit recovery mode, can be called by anyone if enough whitelist approvals are given. + */ + exitRecoveryMode( + overrides?: TransactionOverrides + ): Promise; + + /** + * Exit recovery mode, can be called by anyone if enough whitelist approvals are given. + */ + "exitRecoveryMode()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Is colony network in recovery mode. + */ + isInRecoveryMode(overrides?: TransactionOverrides): Promise; + + /** + * Is colony network in recovery mode. + */ + "isInRecoveryMode()"(overrides?: TransactionOverrides): Promise; + + /** + * Return number of recovery roles. + */ + numRecoveryRoles(overrides?: TransactionOverrides): Promise; + + /** + * Return number of recovery roles. + */ + "numRecoveryRoles()"(overrides?: TransactionOverrides): 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; + + /** + * Remove colony recovery role. Can only be called by root role. + * @param _user User we want to remove recovery role from + */ + "removeRecoveryRole(address)"( + _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; + + /** + * Set new colony recovery role. Can be called by root. + * @param _user User we want to give a recovery role to + */ + "setRecoveryRole(address)"( + _user: string, + overrides?: TransactionOverrides + ): 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; + + /** + * 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(uint256,bytes32)"( + _slot: BigNumberish, + _value: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Interface identification is specified in ERC-165. + * Query if a contract implements an interface + * @param interfaceID The interface identifier, as specified in ERC-165 + */ + supportsInterface( + interfaceID: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Interface identification is specified in ERC-165. + * Query if a contract implements an interface + * @param interfaceID The interface identifier, as specified in ERC-165 + */ + "supportsInterface(bytes4)"( + interfaceID: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Note that strictly, `_nUpdates` and `_nPreviousUpdates` don't need to be set - they're only used during dispute resolution, which these replacement log entries are never used for. However, for ease of resyncing the client, we have decided to include them for now. + * Set a replacement log entry if we're in recovery mode. + * @param _amount The amount of reputation being earned / lost + * @param _colony The address of the colony being updated + * @param _id The number of the log entry in the reputation mining cycle in question. + * @param _nPreviousUpdates The number of updates in the log before this entry + * @param _nUpdates The number of updates the log entry corresponds to + * @param _reputationMiningCycle The address of the reputation mining cycle that the log was in. + * @param _skillId The id of the origin skill for the reputation update + * @param _user The address of the user earning / losing the reputation + */ + setReplacementReputationUpdateLogEntry( + _reputationMiningCycle: string, + _id: BigNumberish, + _user: string, + _amount: BigNumberish, + _skillId: BigNumberish, + _colony: string, + _nUpdates: BigNumberish, + _nPreviousUpdates: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Note that strictly, `_nUpdates` and `_nPreviousUpdates` don't need to be set - they're only used during dispute resolution, which these replacement log entries are never used for. However, for ease of resyncing the client, we have decided to include them for now. + * Set a replacement log entry if we're in recovery mode. + * @param _amount The amount of reputation being earned / lost + * @param _colony The address of the colony being updated + * @param _id The number of the log entry in the reputation mining cycle in question. + * @param _nPreviousUpdates The number of updates in the log before this entry + * @param _nUpdates The number of updates the log entry corresponds to + * @param _reputationMiningCycle The address of the reputation mining cycle that the log was in. + * @param _skillId The id of the origin skill for the reputation update + * @param _user The address of the user earning / losing the reputation + */ + "setReplacementReputationUpdateLogEntry(address,uint256,address,int256,uint256,address,uint128,uint128)"( + _reputationMiningCycle: string, + _id: BigNumberish, + _user: string, + _amount: BigNumberish, + _skillId: BigNumberish, + _colony: string, + _nUpdates: BigNumberish, + _nPreviousUpdates: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a replacement log entry (if set) for the log entry `_id` in the mining cycle that was at the address `_reputationMiningCycle`. + * @param _id The log entry number we wish to see if there is a replacement for + * @param _reputationMiningCycle The address of the reputation mining cycle we are asking about + */ + getReplacementReputationUpdateLogEntry( + _reputationMiningCycle: string, + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [string, BigNumber, BigNumber, string, BigNumber, BigNumber] & { + user: string; + amount: BigNumber; + skillId: BigNumber; + colony: string; + nUpdates: BigNumber; + nPreviousUpdates: BigNumber; + } + >; + + /** + * Get a replacement log entry (if set) for the log entry `_id` in the mining cycle that was at the address `_reputationMiningCycle`. + * @param _id The log entry number we wish to see if there is a replacement for + * @param _reputationMiningCycle The address of the reputation mining cycle we are asking about + */ + "getReplacementReputationUpdateLogEntry(address,uint256)"( + _reputationMiningCycle: string, + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [string, BigNumber, BigNumber, string, BigNumber, BigNumber] & { + user: string; + amount: BigNumber; + skillId: BigNumber; + colony: string; + nUpdates: BigNumber; + nPreviousUpdates: BigNumber; + } + >; + + /** + * Get whether any replacement log entries have been set for the supplied reputation mining cycle.Used by the client to avoid doubling the number of RPC calls when syncing from scratch. + * @param _reputationMiningCycle The reputation mining cycle address we want to know if any entries have been replaced in. + */ + getReplacementReputationUpdateLogsExist( + _reputationMiningCycle: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get whether any replacement log entries have been set for the supplied reputation mining cycle.Used by the client to avoid doubling the number of RPC calls when syncing from scratch. + * @param _reputationMiningCycle The reputation mining cycle address we want to know if any entries have been replaced in. + */ + "getReplacementReputationUpdateLogsExist(address)"( + _reputationMiningCycle: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the Meta Colony address. + */ + getMetaColony(overrides?: TransactionOverrides): Promise; + + /** + * Get the Meta Colony address. + */ + "getMetaColony()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of colonies in the network. + */ + getColonyCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of colonies in the network. + */ + "getColonyCount()"(overrides?: TransactionOverrides): Promise; + + /** + * Check if specific address is a colony created on colony network. + * @param _colony Address of the colony + */ + isColony( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Check if specific address is a colony created on colony network. + * @param _colony Address of the colony + */ + "isColony(address)"( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Errors if the parent skill does not exist or if this is called by an unauthorised sender. + * Adds a new skill to the global or local skills tree, under skill `_parentSkillId`. Only the Meta Colony is allowed to add a global skill, called via `IColony.addGlobalSkill`. Any colony is allowed to add a local skill and which is associated with a new domain via `IColony.addDomain`. + * @param _parentSkillId Id of the skill under which the new skill will be added. If 0, a global skill is added with no parent. + */ + addSkill( + _parentSkillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Errors if the parent skill does not exist or if this is called by an unauthorised sender. + * Adds a new skill to the global or local skills tree, under skill `_parentSkillId`. Only the Meta Colony is allowed to add a global skill, called via `IColony.addGlobalSkill`. Any colony is allowed to add a local skill and which is associated with a new domain via `IColony.addDomain`. + * @param _parentSkillId Id of the skill under which the new skill will be added. If 0, a global skill is added with no parent. + */ + "addSkill(uint256)"( + _parentSkillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `nParents` and `nChildren` of skill with id `_skillId`. + * @param _skillId Id of the skill + */ + getSkill( + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber[], BigNumber[], boolean, boolean] & { + nParents: BigNumber; + nChildren: BigNumber; + parents: BigNumber[]; + children: BigNumber[]; + globalSkill: boolean; + deprecated: boolean; + } + >; + + /** + * Get the `nParents` and `nChildren` of skill with id `_skillId`. + * @param _skillId Id of the skill + */ + "getSkill(uint256)"( + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber[], BigNumber[], boolean, boolean] & { + nParents: BigNumber; + nChildren: BigNumber; + parents: BigNumber[]; + children: BigNumber[]; + globalSkill: boolean; + deprecated: boolean; + } + >; + + /** + * Mark a global skill as deprecated which stops new tasks and payments from using it. + * @param _skillId Id of the skill + */ + deprecateSkill( + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Mark a global skill as deprecated which stops new tasks and payments from using it. + * @param _skillId Id of the skill + */ + "deprecateSkill(uint256)"( + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Errors if it is called by anyone but a colony or if skill with id `_skillId` does not exist or. + * Adds a reputation update entry to log. + * @param _amount The amount of reputation change for the update, this can be a negative as well as a positive value + * @param _skillId The skill for the reputation update + * @param _user The address of the user for the reputation update + */ + appendReputationUpdateLog( + _user: string, + _amount: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Errors if it is called by anyone but a colony or if skill with id `_skillId` does not exist or. + * Adds a reputation update entry to log. + * @param _amount The amount of reputation change for the update, this can be a negative as well as a positive value + * @param _skillId The skill for the reputation update + * @param _user The address of the user for the reputation update + */ + "appendReputationUpdateLog(address,int256,uint256)"( + _user: string, + _amount: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of skills in the network including both global and local skills. + */ + getSkillCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of skills in the network including both global and local skills. + */ + "getSkillCount()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the `skillId` of the reputation mining skill. Only set once the metacolony is set up. + */ + getReputationMiningSkillId( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `skillId` of the reputation mining skill. Only set once the metacolony is set up. + */ + "getReputationMiningSkillId()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Sets the token locking address. This is only set once, and can't be changed afterwards. + * @param _tokenLockingAddress Address of the locking contract + */ + setTokenLocking( + _tokenLockingAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Sets the token locking address. This is only set once, and can't be changed afterwards. + * @param _tokenLockingAddress Address of the locking contract + */ + "setTokenLocking(address)"( + _tokenLockingAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get token locking contract address. + */ + getTokenLocking(overrides?: TransactionOverrides): Promise; + + /** + * Get token locking contract address. + */ + "getTokenLocking()"(overrides?: TransactionOverrides): Promise; + + /** + * Create the Meta Colony, same as a normal colony plus the root skill. + * @param _tokenAddress Address of the CLNY token + */ + createMetaColony( + _tokenAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Create the Meta Colony, same as a normal colony plus the root skill. + * @param _tokenAddress Address of the CLNY token + */ + "createMetaColony(address)"( + _tokenAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future versionFor the colony to mint tokens, token ownership must be transferred to the new colony + * Creates a new colony in the network, at version 3 + * @param _tokenAddress Address of an ERC20 token to serve as the colony token. + */ + createColony( + _tokenAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future versionFor the colony to mint tokens, token ownership must be transferred to the new colony + * Creates a new colony in the network, at version 3 + * @param _tokenAddress Address of an ERC20 token to serve as the colony token. + */ + "createColony(address)"( + _tokenAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * For the colony to mint tokens, token ownership must be transferred to the new colonyWe expect this function to only be used by the dapp + * Creates a new colony in the network, with an optional ENS name + * @param _colonyName The label to register (if null, no label is registered) + * @param _metadata The metadata associated with the new colony + * @param _tokenAddress Address of an ERC20 token to serve as the colony token + * @param _version The version of colony to deploy (pass 0 for the current version) + */ + "createColony(address,uint256,string,string)"( + _tokenAddress: string, + _version: BigNumberish, + _colonyName: string, + _metadata: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * For the colony to mint tokens, token ownership must be transferred to the new colony + * Creates a new colony in the network, with an optional ENS name + * @param _colonyName The label to register (if null, no label is registered) + * @param _tokenAddress Address of an ERC20 token to serve as the colony token + * @param _version The version of colony to deploy (pass 0 for the current version) + */ + "createColony(address,uint256,string)"( + _tokenAddress: string, + _version: BigNumberish, + _colonyName: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future versionFor the colony to mint tokens, token ownership must be transferred to the new colony + * Overload of the simpler `createColony` -- creates a new colony in the network with a variety of options, at version 4 + * @param _colonyName The label to register (if null, no label is registered) + * @param _orbitdb DEPRECATED Currently a no-op + * @param _tokenAddress Address of an ERC20 token to serve as the colony token + * @param _useExtensionManager DEPRECATED Currently a no-op + * @param _version The version of colony to deploy (pass 0 for the current version) + */ + "createColony(address,uint256,string,string,bool)"( + _tokenAddress: string, + _version: BigNumberish, + _colonyName: string, + _orbitdb: string, + _useExtensionManager: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Adds a new Colony contract version and the address of associated `_resolver` contract. Secured function to authorised members. Allowed to be called by the Meta Colony only. + * @param _resolver Address of the `Resolver` contract which will be used with the underlying `EtherRouter` contract + * @param _version The new Colony contract version + */ + addColonyVersion( + _version: BigNumberish, + _resolver: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Adds a new Colony contract version and the address of associated `_resolver` contract. Secured function to authorised members. Allowed to be called by the Meta Colony only. + * @param _resolver Address of the `Resolver` contract which will be used with the underlying `EtherRouter` contract + * @param _version The new Colony contract version + */ + "addColonyVersion(uint256,address)"( + _version: BigNumberish, + _resolver: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Only allowed to be run once, by the Network owner before any Colony versions are added. + * Initialises the colony network by setting the first Colony version resolver to `_resolver` address. + * @param _resolver Address of the resolver for Colony contract + * @param _version Version of the Colony contract the resolver represents + */ + initialise( + _resolver: string, + _version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Only allowed to be run once, by the Network owner before any Colony versions are added. + * Initialises the colony network by setting the first Colony version resolver to `_resolver` address. + * @param _resolver Address of the resolver for Colony contract + * @param _version Version of the Colony contract the resolver represents + */ + "initialise(address,uint256)"( + _resolver: string, + _version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a colony address by its Id in the network. + * @param _id Id of the colony to get + */ + getColony( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a colony address by its Id in the network. + * @param _id Id of the colony to get + */ + "getColony(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the latest Colony contract version. This is the version used to create all new colonies. + */ + getCurrentColonyVersion( + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the latest Colony contract version. This is the version used to create all new colonies. + */ + "getCurrentColonyVersion()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the id of the parent skill at index `_parentSkillIndex` for skill with Id `_skillId`. + * @param _parentSkillIndex Index of the `skill.parents` array to get Note that not all parent skill ids are stored here. See `Skill.parents` member for definition on which parents are stored + * @param _skillId Id of the skill + */ + getParentSkillId( + _skillId: BigNumberish, + _parentSkillIndex: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the id of the parent skill at index `_parentSkillIndex` for skill with Id `_skillId`. + * @param _parentSkillIndex Index of the `skill.parents` array to get Note that not all parent skill ids are stored here. See `Skill.parents` member for definition on which parents are stored + * @param _skillId Id of the skill + */ + "getParentSkillId(uint256,uint256)"( + _skillId: BigNumberish, + _parentSkillIndex: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the id of the child skill at index `_childSkillIndex` for skill with Id `_skillId`. + * @param _childSkillIndex Index of the `skill.children` array to get + * @param _skillId Id of the skill + */ + getChildSkillId( + _skillId: BigNumberish, + _childSkillIndex: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the id of the child skill at index `_childSkillIndex` for skill with Id `_skillId`. + * @param _childSkillIndex Index of the `skill.children` array to get + * @param _skillId Id of the skill + */ + "getChildSkillId(uint256,uint256)"( + _skillId: BigNumberish, + _childSkillIndex: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the address of either the active or inactive reputation mining cycle, based on `active`. The active reputation mining cycle is the one currently under consideration by reputation miners. The inactive reputation cycle is the one with the log that is being appended to. + * @param _active Whether the user wants the active or inactive reputation mining cycle + */ + getReputationMiningCycle( + _active: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the address of either the active or inactive reputation mining cycle, based on `active`. The active reputation mining cycle is the one currently under consideration by reputation miners. The inactive reputation cycle is the one with the log that is being appended to. + * @param _active Whether the user wants the active or inactive reputation mining cycle + */ + "getReputationMiningCycle(bool)"( + _active: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Calculate raw miner weight in WADs. + * @param _submissonIndex Index of reputation hash submission (between 0 and 11) + * @param _timeStaked Amount of time (in seconds) that the miner has staked their CLNY + */ + calculateMinerWeight( + _timeStaked: BigNumberish, + _submissonIndex: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Calculate raw miner weight in WADs. + * @param _submissonIndex Index of reputation hash submission (between 0 and 11) + * @param _timeStaked Amount of time (in seconds) that the miner has staked their CLNY + */ + "calculateMinerWeight(uint256,uint256)"( + _timeStaked: BigNumberish, + _submissonIndex: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `Resolver` address for Colony contract version `_version`. + * @param _version The Colony contract version + */ + getColonyVersionResolver( + _version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `Resolver` address for Colony contract version `_version`. + * @param _version The Colony contract version + */ + "getColonyVersionResolver(uint256)"( + _version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set a new Reputation root hash and starts a new mining cycle. Can only be called by the ReputationMiningCycle contract. + * @param newHash The reputation root hash + * @param newNLeaves The updated leaves count value + * @param stakers Array of users who submitted or backed the hash, being accepted here as the new reputation root hash + */ + setReputationRootHash( + newHash: Arrayish, + newNLeaves: BigNumberish, + stakers: string[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Set a new Reputation root hash and starts a new mining cycle. Can only be called by the ReputationMiningCycle contract. + * @param newHash The reputation root hash + * @param newNLeaves The updated leaves count value + * @param stakers Array of users who submitted or backed the hash, being accepted here as the new reputation root hash + */ + "setReputationRootHash(bytes32,uint256,address[])"( + newHash: Arrayish, + newNLeaves: BigNumberish, + stakers: string[], + overrides?: TransactionOverrides + ): Promise; + + /** + * This version of setReputationRootHash is deprecated and will be removed in a future release. It transparently calls the new version if it is called (essentially, removing the `reward` parameter. + * @param newHash The reputation root hash + * @param newNLeaves The updated leaves count value + * @param reward Amount of CLNY to be distributed as reward to miners (not used) + * @param stakers Array of users who submitted or backed the hash, being accepted here as the new reputation root hash + */ + "setReputationRootHash(bytes32,uint256,address[],uint256)"( + newHash: Arrayish, + newNLeaves: BigNumberish, + stakers: string[], + reward: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Starts a new Reputation Mining cycle. Explicitly called only the first time, subsequently called from within `setReputationRootHash`. + */ + startNextCycle( + overrides?: TransactionOverrides + ): Promise; + + /** + * Starts a new Reputation Mining cycle. Explicitly called only the first time, subsequently called from within `setReputationRootHash`. + */ + "startNextCycle()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Creates initial inactive reputation mining cycle. + */ + initialiseReputationMining( + overrides?: TransactionOverrides + ): Promise; + + /** + * Creates initial inactive reputation mining cycle. + */ + "initialiseReputationMining()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the root hash of the current reputation state tree. + */ + getReputationRootHash(overrides?: TransactionOverrides): Promise; + + /** + * Get the root hash of the current reputation state tree. + */ + "getReputationRootHash()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * I cannot see a reason why a user's client would need to call this - only stored to help with some edge cases in reputation mining dispute resolution. + * Get the number of leaves in the current reputation state tree. + */ + getReputationRootHashNLeaves( + overrides?: TransactionOverrides + ): Promise; + + /** + * I cannot see a reason why a user's client would need to call this - only stored to help with some edge cases in reputation mining dispute resolution. + * Get the number of leaves in the current reputation state tree. + */ + "getReputationRootHashNLeaves()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Deprecated, replaced by getReputationRootHashNLeaves which does the same thing but is more accurately named.will be removed in a later version. + * Get the number of leaves in the current reputation state tree. + */ + getReputationRootHashNNodes( + overrides?: TransactionOverrides + ): Promise; + + /** + * Deprecated, replaced by getReputationRootHashNLeaves which does the same thing but is more accurately named.will be removed in a later version. + * Get the number of leaves in the current reputation state tree. + */ + "getReputationRootHashNNodes()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Create and start a new `DutchAuction` for the entire amount of `_token` owned by the Colony Network. + * @param _token Address of the token held by the network to be auctioned + */ + startTokenAuction( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Create and start a new `DutchAuction` for the entire amount of `_token` owned by the Colony Network. + * @param _token Address of the token held by the network to be auctioned + */ + "startTokenAuction(address)"( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Setup registrar with ENS and root node. + * @param _ens Address of ENS registrar + * @param _rootNode Namehash of the root node for the domain + */ + setupRegistrar( + _ens: string, + _rootNode: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Setup registrar with ENS and root node. + * @param _ens Address of ENS registrar + * @param _rootNode Namehash of the root node for the domain + */ + "setupRegistrar(address,bytes32)"( + _ens: string, + _rootNode: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Register a "user.joincolony.eth" label. + * @param orbitdb The path of the orbitDB database associated with the user profile + * @param username The label to register + */ + registerUserLabel( + username: string, + orbitdb: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Register a "user.joincolony.eth" label. + * @param orbitdb The path of the orbitDB database associated with the user profile + * @param username The label to register + */ + "registerUserLabel(string,string)"( + username: string, + orbitdb: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Register a "colony.joincolony.eth" label. Can only be called by a Colony. + * @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; + + /** + * Register a "colony.joincolony.eth" label. Can only be called by a Colony. + * @param colonyName The label to register. + * @param orbitdb The path of the orbitDB database associated with the colony name + */ + "registerColonyLabel(string,string)"( + 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; + + /** + * 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(string)"( + orbitdb: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Update a user's orbitdb address. Can only be called by a user with a registered subdomain + * @param orbitdb The path of the orbitDB database to be associated with the user + */ + updateUserOrbitDB( + orbitdb: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Update a user's orbitdb address. Can only be called by a user with a registered subdomain + * @param orbitdb The path of the orbitDB database to be associated with the user + */ + "updateUserOrbitDB(string)"( + orbitdb: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Retrieve the orbitdb address corresponding to a registered account. + * @param node The Namehash of the account being queried. + */ + getProfileDBAddress( + node: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Retrieve the orbitdb address corresponding to a registered account. + * @param node The Namehash of the account being queried. + */ + "getProfileDBAddress(bytes32)"( + node: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Reverse lookup a username from an address. + * @param addr The address we wish to find the corresponding ENS domain for (if any) + */ + lookupRegisteredENSDomain( + addr: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Reverse lookup a username from an address. + * @param addr The address we wish to find the corresponding ENS domain for (if any) + */ + "lookupRegisteredENSDomain(address)"( + addr: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the address the supplied node resolves do, if we are the resolver. + * @param node The namehash of the ENS address being requested + */ + addr(node: Arrayish, overrides?: TransactionOverrides): Promise; + + /** + * Returns the address the supplied node resolves do, if we are the resolver. + * @param node The namehash of the ENS address being requested + */ + "addr(bytes32)"( + node: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the address of the ENSRegistrar for the Network. + */ + getENSRegistrar(overrides?: TransactionOverrides): Promise; + + /** + * Returns the address of the ENSRegistrar for the Network. + */ + "getENSRegistrar()"(overrides?: TransactionOverrides): Promise; + + /** + * Set the resolver to be used by new instances of ReputationMiningCycle. + * @param miningResolverAddress The address of the Resolver contract with the functions correctly wired. + */ + setMiningResolver( + miningResolverAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the resolver to be used by new instances of ReputationMiningCycle. + * @param miningResolverAddress The address of the Resolver contract with the functions correctly wired. + */ + "setMiningResolver(address)"( + miningResolverAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the resolver to be used by new instances of ReputationMiningCycle. + */ + getMiningResolver(overrides?: TransactionOverrides): Promise; + + /** + * Get the resolver to be used by new instances of ReputationMiningCycle. + */ + "getMiningResolver()"(overrides?: TransactionOverrides): Promise; + + /** + * Can only be called by the MetaColony.The extension version is queried from the resolver itself. + * Add a new extension resolver to the Extensions repository. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param resolver The deployed resolver containing the extension contract logic + */ + addExtensionToNetwork( + extensionId: Arrayish, + resolver: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Can only be called by the MetaColony.The extension version is queried from the resolver itself. + * Add a new extension resolver to the Extensions repository. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param resolver The deployed resolver containing the extension contract logic + */ + "addExtensionToNetwork(bytes32,address)"( + extensionId: Arrayish, + resolver: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Install an extension in a colony. Can only be called by a Colony. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param version Version of the extension to install + */ + installExtension( + extensionId: Arrayish, + version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Install an extension in a colony. Can only be called by a Colony. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param version Version of the extension to install + */ + "installExtension(bytes32,uint256)"( + extensionId: Arrayish, + version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Upgrade an extension in a colony. Can only be called by a Colony. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param newVersion Version of the extension to upgrade to (must be one greater than current) + */ + upgradeExtension( + extensionId: Arrayish, + newVersion: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Upgrade an extension in a colony. Can only be called by a Colony. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param newVersion Version of the extension to upgrade to (must be one greater than current) + */ + "upgradeExtension(bytes32,uint256)"( + extensionId: Arrayish, + newVersion: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the deprecation of an extension in a colony. Can only be called by a Colony. + * @param deprecated Whether to deprecate the extension or not + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + deprecateExtension( + extensionId: Arrayish, + deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the deprecation of an extension in a colony. Can only be called by a Colony. + * @param deprecated Whether to deprecate the extension or not + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + "deprecateExtension(bytes32,bool)"( + extensionId: Arrayish, + deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Uninstall an extension in a colony. Can only be called by a Colony. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + uninstallExtension( + extensionId: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Uninstall an extension in a colony. Can only be called by a Colony. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + "uninstallExtension(bytes32)"( + extensionId: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get an extension's resolver. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param version Version of the extension + */ + getExtensionResolver( + extensionId: Arrayish, + version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get an extension's resolver. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param version Version of the extension + */ + "getExtensionResolver(bytes32,uint256)"( + extensionId: Arrayish, + version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get an extension's installation. + * @param colony Address of the colony the extension is installed in + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + getExtensionInstallation( + extensionId: Arrayish, + colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get an extension's installation. + * @param colony Address of the colony the extension is installed in + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + "getExtensionInstallation(bytes32,address)"( + extensionId: Arrayish, + colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Return 1 / the fee to pay to the network. e.g. if the fee is 1% (or 0.01), return 100. + */ + getFeeInverse(overrides?: TransactionOverrides): Promise; + + /** + * Return 1 / the fee to pay to the network. e.g. if the fee is 1% (or 0.01), return 100. + */ + "getFeeInverse()"(overrides?: TransactionOverrides): Promise; + + /** + * Set the colony network fee to pay. e.g. if the fee is 1% (or 0.01), pass 100 as `_feeInverse`. + * @param _feeInverse The inverse of the network fee to set + */ + setFeeInverse( + _feeInverse: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the colony network fee to pay. e.g. if the fee is 1% (or 0.01), pass 100 as `_feeInverse`. + * @param _feeInverse The inverse of the network fee to set + */ + "setFeeInverse(uint256)"( + _feeInverse: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a token's status in the payout whitelist + * @param _token The token being queried + */ + getPayoutWhitelist( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a token's status in the payout whitelist + * @param _token The token being queried + */ + "getPayoutWhitelist(address)"( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set a token's status in the payout whitelist + * @param _status The whitelist status + * @param _token The token being set + */ + setPayoutWhitelist( + _token: string, + _status: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set a token's status in the payout whitelist + * @param _status The whitelist status + * @param _token The token being set + */ + "setPayoutWhitelist(address,bool)"( + _token: string, + _status: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * While external, it can only be called successfully by the current ReputationMiningCycle. + * Function called to punish people who staked against a new reputation root hash that turned out to be incorrect. + * @param _amount Amount of stake to slash + * @param _stakers Array of the addresses of stakers to punish + */ + punishStakers( + _stakers: string[], + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * While external, it can only be called successfully by the current ReputationMiningCycle. + * Function called to punish people who staked against a new reputation root hash that turned out to be incorrect. + * @param _amount Amount of stake to slash + * @param _stakers Array of the addresses of stakers to punish + */ + "punishStakers(address[],uint256)"( + _stakers: string[], + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Stake CLNY to allow the staker to participate in reputation mining. + * @param _amount Amount of CLNY to stake for the purposes of mining + */ + stakeForMining( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Stake CLNY to allow the staker to participate in reputation mining. + * @param _amount Amount of CLNY to stake for the purposes of mining + */ + "stakeForMining(uint256)"( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Unstake CLNY currently staked for reputation mining. + * @param _amount Amount of CLNY staked for mining to unstake + */ + unstakeForMining( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Unstake CLNY currently staked for reputation mining. + * @param _amount Amount of CLNY staked for mining to unstake + */ + "unstakeForMining(uint256)"( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * returns how much CLNY _user has staked for the purposes of reputation mining + * @param _user The user to query + */ + getMiningStake( + _user: string, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber] & { amount: BigNumber; timestamp: BigNumber } + >; + + /** + * returns how much CLNY _user has staked for the purposes of reputation mining + * @param _user The user to query + */ + "getMiningStake(address)"( + _user: string, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber] & { amount: BigNumber; timestamp: BigNumber } + >; + + /** + * Only callable by the active reputation mining cycle + * Used to track that a user is eligible to claim a reward + * @param _amount The amount of CLNY to be awarded + * @param _recipient The address receiving the award + */ + reward( + _recipient: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Only callable by the active reputation mining cycle + * Used to track that a user is eligible to claim a reward + * @param _amount The amount of CLNY to be awarded + * @param _recipient The address receiving the award + */ + "reward(address,uint256)"( + _recipient: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Only callable by the active reputation mining cycle + * Used to burn tokens that are not needed to pay out rewards (because not every possible defence was made for all submissions) + * @param _amount The amount of CLNY to burn + */ + burnUnneededRewards( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Only callable by the active reputation mining cycle + * Used to burn tokens that are not needed to pay out rewards (because not every possible defence was made for all submissions) + * @param _amount The amount of CLNY to burn + */ + "burnUnneededRewards(uint256)"( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Can be called by anyone, not just _recipient + * Used by a user to claim any mining rewards due to them. This will place them in their balance or pending balance, as appropriate. + * @param _recipient The user whose rewards to claim + */ + claimMiningReward( + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Can be called by anyone, not just _recipient + * Used by a user to claim any mining rewards due to them. This will place them in their balance or pending balance, as appropriate. + * @param _recipient The user whose rewards to claim + */ + "claimMiningReward(address)"( + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Can only be called by the MetaColony. + * Called to set the total per-cycle reputation reward, which will be split between all miners. + */ + setReputationMiningCycleReward( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Can only be called by the MetaColony. + * Called to set the total per-cycle reputation reward, which will be split between all miners. + */ + "setReputationMiningCycleReward(uint256)"( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called to get the total per-cycle reputation mining reward. + */ + getReputationMiningCycleReward( + overrides?: TransactionOverrides + ): Promise; + + /** + * Called to get the total per-cycle reputation mining reward. + */ + "getReputationMiningCycleReward()"( + overrides?: TransactionOverrides + ): Promise; + }; + + /** + * Indicate approval to exit recovery mode. Can only be called by user with recovery role. + */ + approveExitRecovery( + overrides?: TransactionOverrides + ): Promise; + + /** + * Indicate approval to exit recovery mode. Can only be called by user with recovery role. + */ + "approveExitRecovery()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * No return value, but should throw if protected.This is external, 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, + overrides?: TransactionOverrides + ): Promise; + + /** + * No return value, but should throw if protected.This is external, 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(uint256)"( + _slot: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Put colony network mining into recovery mode. Can only be called by user with recovery role. + */ + enterRecoveryMode( + overrides?: TransactionOverrides + ): Promise; + + /** + * Put colony network mining into recovery mode. Can only be called by user with recovery role. + */ + "enterRecoveryMode()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Exit recovery mode, can be called by anyone if enough whitelist approvals are given. + */ + exitRecoveryMode( + overrides?: TransactionOverrides + ): Promise; + + /** + * Exit recovery mode, can be called by anyone if enough whitelist approvals are given. + */ + "exitRecoveryMode()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Is colony network in recovery mode. + */ + isInRecoveryMode(overrides?: TransactionOverrides): Promise; + + /** + * Is colony network in recovery mode. + */ + "isInRecoveryMode()"(overrides?: TransactionOverrides): Promise; + + /** + * Return number of recovery roles. + */ + numRecoveryRoles(overrides?: TransactionOverrides): Promise; + + /** + * Return number of recovery roles. + */ + "numRecoveryRoles()"(overrides?: TransactionOverrides): 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; + + /** + * Remove colony recovery role. Can only be called by root role. + * @param _user User we want to remove recovery role from + */ + "removeRecoveryRole(address)"( + _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; + + /** + * Set new colony recovery role. Can be called by root. + * @param _user User we want to give a recovery role to + */ + "setRecoveryRole(address)"( + _user: string, + overrides?: TransactionOverrides + ): 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; + + /** + * 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(uint256,bytes32)"( + _slot: BigNumberish, + _value: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Interface identification is specified in ERC-165. + * Query if a contract implements an interface + * @param interfaceID The interface identifier, as specified in ERC-165 + */ + supportsInterface( + interfaceID: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Interface identification is specified in ERC-165. + * Query if a contract implements an interface + * @param interfaceID The interface identifier, as specified in ERC-165 + */ + "supportsInterface(bytes4)"( + interfaceID: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Note that strictly, `_nUpdates` and `_nPreviousUpdates` don't need to be set - they're only used during dispute resolution, which these replacement log entries are never used for. However, for ease of resyncing the client, we have decided to include them for now. + * Set a replacement log entry if we're in recovery mode. + * @param _amount The amount of reputation being earned / lost + * @param _colony The address of the colony being updated + * @param _id The number of the log entry in the reputation mining cycle in question. + * @param _nPreviousUpdates The number of updates in the log before this entry + * @param _nUpdates The number of updates the log entry corresponds to + * @param _reputationMiningCycle The address of the reputation mining cycle that the log was in. + * @param _skillId The id of the origin skill for the reputation update + * @param _user The address of the user earning / losing the reputation + */ + setReplacementReputationUpdateLogEntry( + _reputationMiningCycle: string, + _id: BigNumberish, + _user: string, + _amount: BigNumberish, + _skillId: BigNumberish, + _colony: string, + _nUpdates: BigNumberish, + _nPreviousUpdates: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Note that strictly, `_nUpdates` and `_nPreviousUpdates` don't need to be set - they're only used during dispute resolution, which these replacement log entries are never used for. However, for ease of resyncing the client, we have decided to include them for now. + * Set a replacement log entry if we're in recovery mode. + * @param _amount The amount of reputation being earned / lost + * @param _colony The address of the colony being updated + * @param _id The number of the log entry in the reputation mining cycle in question. + * @param _nPreviousUpdates The number of updates in the log before this entry + * @param _nUpdates The number of updates the log entry corresponds to + * @param _reputationMiningCycle The address of the reputation mining cycle that the log was in. + * @param _skillId The id of the origin skill for the reputation update + * @param _user The address of the user earning / losing the reputation + */ + "setReplacementReputationUpdateLogEntry(address,uint256,address,int256,uint256,address,uint128,uint128)"( + _reputationMiningCycle: string, + _id: BigNumberish, + _user: string, + _amount: BigNumberish, + _skillId: BigNumberish, + _colony: string, + _nUpdates: BigNumberish, + _nPreviousUpdates: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a replacement log entry (if set) for the log entry `_id` in the mining cycle that was at the address `_reputationMiningCycle`. + * @param _id The log entry number we wish to see if there is a replacement for + * @param _reputationMiningCycle The address of the reputation mining cycle we are asking about + */ + getReplacementReputationUpdateLogEntry( + _reputationMiningCycle: string, + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [string, BigNumber, BigNumber, string, BigNumber, BigNumber] & { + user: string; + amount: BigNumber; + skillId: BigNumber; + colony: string; + nUpdates: BigNumber; + nPreviousUpdates: BigNumber; + } + >; + + /** + * Get a replacement log entry (if set) for the log entry `_id` in the mining cycle that was at the address `_reputationMiningCycle`. + * @param _id The log entry number we wish to see if there is a replacement for + * @param _reputationMiningCycle The address of the reputation mining cycle we are asking about + */ + "getReplacementReputationUpdateLogEntry(address,uint256)"( + _reputationMiningCycle: string, + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [string, BigNumber, BigNumber, string, BigNumber, BigNumber] & { + user: string; + amount: BigNumber; + skillId: BigNumber; + colony: string; + nUpdates: BigNumber; + nPreviousUpdates: BigNumber; + } + >; + + /** + * Get whether any replacement log entries have been set for the supplied reputation mining cycle.Used by the client to avoid doubling the number of RPC calls when syncing from scratch. + * @param _reputationMiningCycle The reputation mining cycle address we want to know if any entries have been replaced in. + */ + getReplacementReputationUpdateLogsExist( + _reputationMiningCycle: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get whether any replacement log entries have been set for the supplied reputation mining cycle.Used by the client to avoid doubling the number of RPC calls when syncing from scratch. + * @param _reputationMiningCycle The reputation mining cycle address we want to know if any entries have been replaced in. + */ + "getReplacementReputationUpdateLogsExist(address)"( + _reputationMiningCycle: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the Meta Colony address. + */ + getMetaColony(overrides?: TransactionOverrides): Promise; + + /** + * Get the Meta Colony address. + */ + "getMetaColony()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of colonies in the network. + */ + getColonyCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of colonies in the network. + */ + "getColonyCount()"(overrides?: TransactionOverrides): Promise; + + /** + * Check if specific address is a colony created on colony network. + * @param _colony Address of the colony + */ + isColony(_colony: string, overrides?: TransactionOverrides): Promise; + + /** + * Check if specific address is a colony created on colony network. + * @param _colony Address of the colony + */ + "isColony(address)"( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Errors if the parent skill does not exist or if this is called by an unauthorised sender. + * Adds a new skill to the global or local skills tree, under skill `_parentSkillId`. Only the Meta Colony is allowed to add a global skill, called via `IColony.addGlobalSkill`. Any colony is allowed to add a local skill and which is associated with a new domain via `IColony.addDomain`. + * @param _parentSkillId Id of the skill under which the new skill will be added. If 0, a global skill is added with no parent. + */ + addSkill( + _parentSkillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Errors if the parent skill does not exist or if this is called by an unauthorised sender. + * Adds a new skill to the global or local skills tree, under skill `_parentSkillId`. Only the Meta Colony is allowed to add a global skill, called via `IColony.addGlobalSkill`. Any colony is allowed to add a local skill and which is associated with a new domain via `IColony.addDomain`. + * @param _parentSkillId Id of the skill under which the new skill will be added. If 0, a global skill is added with no parent. + */ + "addSkill(uint256)"( + _parentSkillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `nParents` and `nChildren` of skill with id `_skillId`. + * @param _skillId Id of the skill + */ + getSkill( + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber[], BigNumber[], boolean, boolean] & { + nParents: BigNumber; + nChildren: BigNumber; + parents: BigNumber[]; + children: BigNumber[]; + globalSkill: boolean; + deprecated: boolean; + } + >; + + /** + * Get the `nParents` and `nChildren` of skill with id `_skillId`. + * @param _skillId Id of the skill + */ + "getSkill(uint256)"( + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber[], BigNumber[], boolean, boolean] & { + nParents: BigNumber; + nChildren: BigNumber; + parents: BigNumber[]; + children: BigNumber[]; + globalSkill: boolean; + deprecated: boolean; + } + >; + + /** + * Mark a global skill as deprecated which stops new tasks and payments from using it. + * @param _skillId Id of the skill + */ + deprecateSkill( + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Mark a global skill as deprecated which stops new tasks and payments from using it. + * @param _skillId Id of the skill + */ + "deprecateSkill(uint256)"( + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Errors if it is called by anyone but a colony or if skill with id `_skillId` does not exist or. + * Adds a reputation update entry to log. + * @param _amount The amount of reputation change for the update, this can be a negative as well as a positive value + * @param _skillId The skill for the reputation update + * @param _user The address of the user for the reputation update + */ + appendReputationUpdateLog( + _user: string, + _amount: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Errors if it is called by anyone but a colony or if skill with id `_skillId` does not exist or. + * Adds a reputation update entry to log. + * @param _amount The amount of reputation change for the update, this can be a negative as well as a positive value + * @param _skillId The skill for the reputation update + * @param _user The address of the user for the reputation update + */ + "appendReputationUpdateLog(address,int256,uint256)"( + _user: string, + _amount: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of skills in the network including both global and local skills. + */ + getSkillCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of skills in the network including both global and local skills. + */ + "getSkillCount()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the `skillId` of the reputation mining skill. Only set once the metacolony is set up. + */ + getReputationMiningSkillId( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `skillId` of the reputation mining skill. Only set once the metacolony is set up. + */ + "getReputationMiningSkillId()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Sets the token locking address. This is only set once, and can't be changed afterwards. + * @param _tokenLockingAddress Address of the locking contract + */ + setTokenLocking( + _tokenLockingAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Sets the token locking address. This is only set once, and can't be changed afterwards. + * @param _tokenLockingAddress Address of the locking contract + */ + "setTokenLocking(address)"( + _tokenLockingAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get token locking contract address. + */ + getTokenLocking(overrides?: TransactionOverrides): Promise; + + /** + * Get token locking contract address. + */ + "getTokenLocking()"(overrides?: TransactionOverrides): Promise; + + /** + * Create the Meta Colony, same as a normal colony plus the root skill. + * @param _tokenAddress Address of the CLNY token + */ + createMetaColony( + _tokenAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Create the Meta Colony, same as a normal colony plus the root skill. + * @param _tokenAddress Address of the CLNY token + */ + "createMetaColony(address)"( + _tokenAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future versionFor the colony to mint tokens, token ownership must be transferred to the new colony + * Creates a new colony in the network, at version 3 + * @param _tokenAddress Address of an ERC20 token to serve as the colony token. + */ + createColony( + _tokenAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future versionFor the colony to mint tokens, token ownership must be transferred to the new colony + * Creates a new colony in the network, at version 3 + * @param _tokenAddress Address of an ERC20 token to serve as the colony token. + */ + "createColony(address)"( + _tokenAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * For the colony to mint tokens, token ownership must be transferred to the new colonyWe expect this function to only be used by the dapp + * Creates a new colony in the network, with an optional ENS name + * @param _colonyName The label to register (if null, no label is registered) + * @param _metadata The metadata associated with the new colony + * @param _tokenAddress Address of an ERC20 token to serve as the colony token + * @param _version The version of colony to deploy (pass 0 for the current version) + */ + "createColony(address,uint256,string,string)"( + _tokenAddress: string, + _version: BigNumberish, + _colonyName: string, + _metadata: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * For the colony to mint tokens, token ownership must be transferred to the new colony + * Creates a new colony in the network, with an optional ENS name + * @param _colonyName The label to register (if null, no label is registered) + * @param _tokenAddress Address of an ERC20 token to serve as the colony token + * @param _version The version of colony to deploy (pass 0 for the current version) + */ + "createColony(address,uint256,string)"( + _tokenAddress: string, + _version: BigNumberish, + _colonyName: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future versionFor the colony to mint tokens, token ownership must be transferred to the new colony + * Overload of the simpler `createColony` -- creates a new colony in the network with a variety of options, at version 4 + * @param _colonyName The label to register (if null, no label is registered) + * @param _orbitdb DEPRECATED Currently a no-op + * @param _tokenAddress Address of an ERC20 token to serve as the colony token + * @param _useExtensionManager DEPRECATED Currently a no-op + * @param _version The version of colony to deploy (pass 0 for the current version) + */ + "createColony(address,uint256,string,string,bool)"( + _tokenAddress: string, + _version: BigNumberish, + _colonyName: string, + _orbitdb: string, + _useExtensionManager: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Adds a new Colony contract version and the address of associated `_resolver` contract. Secured function to authorised members. Allowed to be called by the Meta Colony only. + * @param _resolver Address of the `Resolver` contract which will be used with the underlying `EtherRouter` contract + * @param _version The new Colony contract version + */ + addColonyVersion( + _version: BigNumberish, + _resolver: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Adds a new Colony contract version and the address of associated `_resolver` contract. Secured function to authorised members. Allowed to be called by the Meta Colony only. + * @param _resolver Address of the `Resolver` contract which will be used with the underlying `EtherRouter` contract + * @param _version The new Colony contract version + */ + "addColonyVersion(uint256,address)"( + _version: BigNumberish, + _resolver: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Only allowed to be run once, by the Network owner before any Colony versions are added. + * Initialises the colony network by setting the first Colony version resolver to `_resolver` address. + * @param _resolver Address of the resolver for Colony contract + * @param _version Version of the Colony contract the resolver represents + */ + initialise( + _resolver: string, + _version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Only allowed to be run once, by the Network owner before any Colony versions are added. + * Initialises the colony network by setting the first Colony version resolver to `_resolver` address. + * @param _resolver Address of the resolver for Colony contract + * @param _version Version of the Colony contract the resolver represents + */ + "initialise(address,uint256)"( + _resolver: string, + _version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a colony address by its Id in the network. + * @param _id Id of the colony to get + */ + getColony( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a colony address by its Id in the network. + * @param _id Id of the colony to get + */ + "getColony(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the latest Colony contract version. This is the version used to create all new colonies. + */ + getCurrentColonyVersion(overrides?: TransactionOverrides): Promise; + + /** + * Returns the latest Colony contract version. This is the version used to create all new colonies. + */ + "getCurrentColonyVersion()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the id of the parent skill at index `_parentSkillIndex` for skill with Id `_skillId`. + * @param _parentSkillIndex Index of the `skill.parents` array to get Note that not all parent skill ids are stored here. See `Skill.parents` member for definition on which parents are stored + * @param _skillId Id of the skill + */ + getParentSkillId( + _skillId: BigNumberish, + _parentSkillIndex: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the id of the parent skill at index `_parentSkillIndex` for skill with Id `_skillId`. + * @param _parentSkillIndex Index of the `skill.parents` array to get Note that not all parent skill ids are stored here. See `Skill.parents` member for definition on which parents are stored + * @param _skillId Id of the skill + */ + "getParentSkillId(uint256,uint256)"( + _skillId: BigNumberish, + _parentSkillIndex: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the id of the child skill at index `_childSkillIndex` for skill with Id `_skillId`. + * @param _childSkillIndex Index of the `skill.children` array to get + * @param _skillId Id of the skill + */ + getChildSkillId( + _skillId: BigNumberish, + _childSkillIndex: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the id of the child skill at index `_childSkillIndex` for skill with Id `_skillId`. + * @param _childSkillIndex Index of the `skill.children` array to get + * @param _skillId Id of the skill + */ + "getChildSkillId(uint256,uint256)"( + _skillId: BigNumberish, + _childSkillIndex: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the address of either the active or inactive reputation mining cycle, based on `active`. The active reputation mining cycle is the one currently under consideration by reputation miners. The inactive reputation cycle is the one with the log that is being appended to. + * @param _active Whether the user wants the active or inactive reputation mining cycle + */ + getReputationMiningCycle( + _active: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the address of either the active or inactive reputation mining cycle, based on `active`. The active reputation mining cycle is the one currently under consideration by reputation miners. The inactive reputation cycle is the one with the log that is being appended to. + * @param _active Whether the user wants the active or inactive reputation mining cycle + */ + "getReputationMiningCycle(bool)"( + _active: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Calculate raw miner weight in WADs. + * @param _submissonIndex Index of reputation hash submission (between 0 and 11) + * @param _timeStaked Amount of time (in seconds) that the miner has staked their CLNY + */ + calculateMinerWeight( + _timeStaked: BigNumberish, + _submissonIndex: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Calculate raw miner weight in WADs. + * @param _submissonIndex Index of reputation hash submission (between 0 and 11) + * @param _timeStaked Amount of time (in seconds) that the miner has staked their CLNY + */ + "calculateMinerWeight(uint256,uint256)"( + _timeStaked: BigNumberish, + _submissonIndex: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `Resolver` address for Colony contract version `_version`. + * @param _version The Colony contract version + */ + getColonyVersionResolver( + _version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `Resolver` address for Colony contract version `_version`. + * @param _version The Colony contract version + */ + "getColonyVersionResolver(uint256)"( + _version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set a new Reputation root hash and starts a new mining cycle. Can only be called by the ReputationMiningCycle contract. + * @param newHash The reputation root hash + * @param newNLeaves The updated leaves count value + * @param stakers Array of users who submitted or backed the hash, being accepted here as the new reputation root hash + */ + setReputationRootHash( + newHash: Arrayish, + newNLeaves: BigNumberish, + stakers: string[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Set a new Reputation root hash and starts a new mining cycle. Can only be called by the ReputationMiningCycle contract. + * @param newHash The reputation root hash + * @param newNLeaves The updated leaves count value + * @param stakers Array of users who submitted or backed the hash, being accepted here as the new reputation root hash + */ + "setReputationRootHash(bytes32,uint256,address[])"( + newHash: Arrayish, + newNLeaves: BigNumberish, + stakers: string[], + overrides?: TransactionOverrides + ): Promise; + + /** + * This version of setReputationRootHash is deprecated and will be removed in a future release. It transparently calls the new version if it is called (essentially, removing the `reward` parameter. + * @param newHash The reputation root hash + * @param newNLeaves The updated leaves count value + * @param reward Amount of CLNY to be distributed as reward to miners (not used) + * @param stakers Array of users who submitted or backed the hash, being accepted here as the new reputation root hash + */ + "setReputationRootHash(bytes32,uint256,address[],uint256)"( + newHash: Arrayish, + newNLeaves: BigNumberish, + stakers: string[], + reward: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Starts a new Reputation Mining cycle. Explicitly called only the first time, subsequently called from within `setReputationRootHash`. + */ + startNextCycle( + overrides?: TransactionOverrides + ): Promise; + + /** + * Starts a new Reputation Mining cycle. Explicitly called only the first time, subsequently called from within `setReputationRootHash`. + */ + "startNextCycle()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Creates initial inactive reputation mining cycle. + */ + initialiseReputationMining( + overrides?: TransactionOverrides + ): Promise; + + /** + * Creates initial inactive reputation mining cycle. + */ + "initialiseReputationMining()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the root hash of the current reputation state tree. + */ + getReputationRootHash(overrides?: TransactionOverrides): Promise; + + /** + * Get the root hash of the current reputation state tree. + */ + "getReputationRootHash()"(overrides?: TransactionOverrides): Promise; + + /** + * I cannot see a reason why a user's client would need to call this - only stored to help with some edge cases in reputation mining dispute resolution. + * Get the number of leaves in the current reputation state tree. + */ + getReputationRootHashNLeaves( + overrides?: TransactionOverrides + ): Promise; + + /** + * I cannot see a reason why a user's client would need to call this - only stored to help with some edge cases in reputation mining dispute resolution. + * Get the number of leaves in the current reputation state tree. + */ + "getReputationRootHashNLeaves()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Deprecated, replaced by getReputationRootHashNLeaves which does the same thing but is more accurately named.will be removed in a later version. + * Get the number of leaves in the current reputation state tree. + */ + getReputationRootHashNNodes( + overrides?: TransactionOverrides + ): Promise; + + /** + * Deprecated, replaced by getReputationRootHashNLeaves which does the same thing but is more accurately named.will be removed in a later version. + * Get the number of leaves in the current reputation state tree. + */ + "getReputationRootHashNNodes()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Create and start a new `DutchAuction` for the entire amount of `_token` owned by the Colony Network. + * @param _token Address of the token held by the network to be auctioned + */ + startTokenAuction( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Create and start a new `DutchAuction` for the entire amount of `_token` owned by the Colony Network. + * @param _token Address of the token held by the network to be auctioned + */ + "startTokenAuction(address)"( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Setup registrar with ENS and root node. + * @param _ens Address of ENS registrar + * @param _rootNode Namehash of the root node for the domain + */ + setupRegistrar( + _ens: string, + _rootNode: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Setup registrar with ENS and root node. + * @param _ens Address of ENS registrar + * @param _rootNode Namehash of the root node for the domain + */ + "setupRegistrar(address,bytes32)"( + _ens: string, + _rootNode: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Register a "user.joincolony.eth" label. + * @param orbitdb The path of the orbitDB database associated with the user profile + * @param username The label to register + */ + registerUserLabel( + username: string, + orbitdb: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Register a "user.joincolony.eth" label. + * @param orbitdb The path of the orbitDB database associated with the user profile + * @param username The label to register + */ + "registerUserLabel(string,string)"( + username: string, + orbitdb: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Register a "colony.joincolony.eth" label. Can only be called by a Colony. + * @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; + + /** + * Register a "colony.joincolony.eth" label. Can only be called by a Colony. + * @param colonyName The label to register. + * @param orbitdb The path of the orbitDB database associated with the colony name + */ + "registerColonyLabel(string,string)"( + 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; + + /** + * 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(string)"( + orbitdb: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Update a user's orbitdb address. Can only be called by a user with a registered subdomain + * @param orbitdb The path of the orbitDB database to be associated with the user + */ + updateUserOrbitDB( + orbitdb: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Update a user's orbitdb address. Can only be called by a user with a registered subdomain + * @param orbitdb The path of the orbitDB database to be associated with the user + */ + "updateUserOrbitDB(string)"( + orbitdb: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Retrieve the orbitdb address corresponding to a registered account. + * @param node The Namehash of the account being queried. + */ + getProfileDBAddress( + node: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Retrieve the orbitdb address corresponding to a registered account. + * @param node The Namehash of the account being queried. + */ + "getProfileDBAddress(bytes32)"( + node: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Reverse lookup a username from an address. + * @param addr The address we wish to find the corresponding ENS domain for (if any) + */ + lookupRegisteredENSDomain( + addr: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Reverse lookup a username from an address. + * @param addr The address we wish to find the corresponding ENS domain for (if any) + */ + "lookupRegisteredENSDomain(address)"( + addr: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the address the supplied node resolves do, if we are the resolver. + * @param node The namehash of the ENS address being requested + */ + addr(node: Arrayish, overrides?: TransactionOverrides): Promise; + + /** + * Returns the address the supplied node resolves do, if we are the resolver. + * @param node The namehash of the ENS address being requested + */ + "addr(bytes32)"( + node: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the address of the ENSRegistrar for the Network. + */ + getENSRegistrar(overrides?: TransactionOverrides): Promise; + + /** + * Returns the address of the ENSRegistrar for the Network. + */ + "getENSRegistrar()"(overrides?: TransactionOverrides): Promise; + + /** + * Set the resolver to be used by new instances of ReputationMiningCycle. + * @param miningResolverAddress The address of the Resolver contract with the functions correctly wired. + */ + setMiningResolver( + miningResolverAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the resolver to be used by new instances of ReputationMiningCycle. + * @param miningResolverAddress The address of the Resolver contract with the functions correctly wired. + */ + "setMiningResolver(address)"( + miningResolverAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the resolver to be used by new instances of ReputationMiningCycle. + */ + getMiningResolver(overrides?: TransactionOverrides): Promise; + + /** + * Get the resolver to be used by new instances of ReputationMiningCycle. + */ + "getMiningResolver()"(overrides?: TransactionOverrides): Promise; + + /** + * Can only be called by the MetaColony.The extension version is queried from the resolver itself. + * Add a new extension resolver to the Extensions repository. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param resolver The deployed resolver containing the extension contract logic + */ + addExtensionToNetwork( + extensionId: Arrayish, + resolver: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Can only be called by the MetaColony.The extension version is queried from the resolver itself. + * Add a new extension resolver to the Extensions repository. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param resolver The deployed resolver containing the extension contract logic + */ + "addExtensionToNetwork(bytes32,address)"( + extensionId: Arrayish, + resolver: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Install an extension in a colony. Can only be called by a Colony. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param version Version of the extension to install + */ + installExtension( + extensionId: Arrayish, + version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Install an extension in a colony. Can only be called by a Colony. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param version Version of the extension to install + */ + "installExtension(bytes32,uint256)"( + extensionId: Arrayish, + version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Upgrade an extension in a colony. Can only be called by a Colony. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param newVersion Version of the extension to upgrade to (must be one greater than current) + */ + upgradeExtension( + extensionId: Arrayish, + newVersion: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Upgrade an extension in a colony. Can only be called by a Colony. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param newVersion Version of the extension to upgrade to (must be one greater than current) + */ + "upgradeExtension(bytes32,uint256)"( + extensionId: Arrayish, + newVersion: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the deprecation of an extension in a colony. Can only be called by a Colony. + * @param deprecated Whether to deprecate the extension or not + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + deprecateExtension( + extensionId: Arrayish, + deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the deprecation of an extension in a colony. Can only be called by a Colony. + * @param deprecated Whether to deprecate the extension or not + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + "deprecateExtension(bytes32,bool)"( + extensionId: Arrayish, + deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Uninstall an extension in a colony. Can only be called by a Colony. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + uninstallExtension( + extensionId: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Uninstall an extension in a colony. Can only be called by a Colony. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + "uninstallExtension(bytes32)"( + extensionId: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get an extension's resolver. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param version Version of the extension + */ + getExtensionResolver( + extensionId: Arrayish, + version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get an extension's resolver. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param version Version of the extension + */ + "getExtensionResolver(bytes32,uint256)"( + extensionId: Arrayish, + version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get an extension's installation. + * @param colony Address of the colony the extension is installed in + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + getExtensionInstallation( + extensionId: Arrayish, + colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get an extension's installation. + * @param colony Address of the colony the extension is installed in + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + "getExtensionInstallation(bytes32,address)"( + extensionId: Arrayish, + colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Return 1 / the fee to pay to the network. e.g. if the fee is 1% (or 0.01), return 100. + */ + getFeeInverse(overrides?: TransactionOverrides): Promise; + + /** + * Return 1 / the fee to pay to the network. e.g. if the fee is 1% (or 0.01), return 100. + */ + "getFeeInverse()"(overrides?: TransactionOverrides): Promise; + + /** + * Set the colony network fee to pay. e.g. if the fee is 1% (or 0.01), pass 100 as `_feeInverse`. + * @param _feeInverse The inverse of the network fee to set + */ + setFeeInverse( + _feeInverse: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the colony network fee to pay. e.g. if the fee is 1% (or 0.01), pass 100 as `_feeInverse`. + * @param _feeInverse The inverse of the network fee to set + */ + "setFeeInverse(uint256)"( + _feeInverse: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a token's status in the payout whitelist + * @param _token The token being queried + */ + getPayoutWhitelist( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a token's status in the payout whitelist + * @param _token The token being queried + */ + "getPayoutWhitelist(address)"( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set a token's status in the payout whitelist + * @param _status The whitelist status + * @param _token The token being set + */ + setPayoutWhitelist( + _token: string, + _status: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set a token's status in the payout whitelist + * @param _status The whitelist status + * @param _token The token being set + */ + "setPayoutWhitelist(address,bool)"( + _token: string, + _status: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * While external, it can only be called successfully by the current ReputationMiningCycle. + * Function called to punish people who staked against a new reputation root hash that turned out to be incorrect. + * @param _amount Amount of stake to slash + * @param _stakers Array of the addresses of stakers to punish + */ + punishStakers( + _stakers: string[], + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * While external, it can only be called successfully by the current ReputationMiningCycle. + * Function called to punish people who staked against a new reputation root hash that turned out to be incorrect. + * @param _amount Amount of stake to slash + * @param _stakers Array of the addresses of stakers to punish + */ + "punishStakers(address[],uint256)"( + _stakers: string[], + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Stake CLNY to allow the staker to participate in reputation mining. + * @param _amount Amount of CLNY to stake for the purposes of mining + */ + stakeForMining( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Stake CLNY to allow the staker to participate in reputation mining. + * @param _amount Amount of CLNY to stake for the purposes of mining + */ + "stakeForMining(uint256)"( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Unstake CLNY currently staked for reputation mining. + * @param _amount Amount of CLNY staked for mining to unstake + */ + unstakeForMining( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Unstake CLNY currently staked for reputation mining. + * @param _amount Amount of CLNY staked for mining to unstake + */ + "unstakeForMining(uint256)"( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * returns how much CLNY _user has staked for the purposes of reputation mining + * @param _user The user to query + */ + getMiningStake( + _user: string, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber] & { amount: BigNumber; timestamp: BigNumber } + >; + + /** + * returns how much CLNY _user has staked for the purposes of reputation mining + * @param _user The user to query + */ + "getMiningStake(address)"( + _user: string, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber] & { amount: BigNumber; timestamp: BigNumber } + >; + + /** + * Only callable by the active reputation mining cycle + * Used to track that a user is eligible to claim a reward + * @param _amount The amount of CLNY to be awarded + * @param _recipient The address receiving the award + */ + reward( + _recipient: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Only callable by the active reputation mining cycle + * Used to track that a user is eligible to claim a reward + * @param _amount The amount of CLNY to be awarded + * @param _recipient The address receiving the award + */ + "reward(address,uint256)"( + _recipient: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Only callable by the active reputation mining cycle + * Used to burn tokens that are not needed to pay out rewards (because not every possible defence was made for all submissions) + * @param _amount The amount of CLNY to burn + */ + burnUnneededRewards( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Only callable by the active reputation mining cycle + * Used to burn tokens that are not needed to pay out rewards (because not every possible defence was made for all submissions) + * @param _amount The amount of CLNY to burn + */ + "burnUnneededRewards(uint256)"( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Can be called by anyone, not just _recipient + * Used by a user to claim any mining rewards due to them. This will place them in their balance or pending balance, as appropriate. + * @param _recipient The user whose rewards to claim + */ + claimMiningReward( + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Can be called by anyone, not just _recipient + * Used by a user to claim any mining rewards due to them. This will place them in their balance or pending balance, as appropriate. + * @param _recipient The user whose rewards to claim + */ + "claimMiningReward(address)"( + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Can only be called by the MetaColony. + * Called to set the total per-cycle reputation reward, which will be split between all miners. + */ + setReputationMiningCycleReward( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Can only be called by the MetaColony. + * Called to set the total per-cycle reputation reward, which will be split between all miners. + */ + "setReputationMiningCycleReward(uint256)"( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called to get the total per-cycle reputation mining reward. + */ + getReputationMiningCycleReward( + overrides?: TransactionOverrides + ): Promise; + + /** + * Called to get the total per-cycle reputation mining reward. + */ + "getReputationMiningCycleReward()"( + overrides?: TransactionOverrides + ): Promise; + + filters: { + AuctionCreated(auction: null, token: null, quantity: null): EventFilter; + + ColonyAdded( + colonyId: BigNumberish | null, + colonyAddress: string | null, + token: null + ): EventFilter; + + ColonyLabelRegistered(colony: string | null, label: null): EventFilter; + + ColonyNetworkInitialised(resolver: null): EventFilter; + + ColonyVersionAdded(version: null, resolver: null): EventFilter; + + ExtensionAddedToNetwork( + extensionId: Arrayish | null, + version: null + ): EventFilter; + + ExtensionDeprecated( + extensionId: Arrayish | null, + colony: string | null, + deprecated: null + ): EventFilter; + + ExtensionInstalled( + extensionId: Arrayish | null, + colony: string | null, + version: null + ): EventFilter; + + ExtensionUninstalled( + extensionId: Arrayish | null, + colony: string | null + ): EventFilter; + + ExtensionUpgraded( + extensionId: Arrayish | null, + colony: string | null, + version: null + ): EventFilter; + + MetaColonyCreated( + metaColony: null, + token: null, + rootSkillId: null + ): EventFilter; + + MiningCycleResolverSet(miningCycleResolver: null): EventFilter; + + NetworkFeeInverseSet(feeInverse: null): EventFilter; + + RecoveryModeEntered(user: null): EventFilter; + + RecoveryModeExitApproved(user: null): EventFilter; + + RecoveryModeExited(user: null): EventFilter; + + RecoveryRoleSet(user: string | null, setTo: null): EventFilter; + + RecoveryStorageSlotSet( + user: null, + slot: null, + fromValue: null, + toValue: null + ): EventFilter; + + RegistrarInitialised(ens: null, rootNode: null): EventFilter; + + ReputationMinerPenalised(miner: null, tokensLost: null): EventFilter; + + ReputationMiningCycleComplete(hash: null, nLeaves: null): EventFilter; + + ReputationMiningInitialised( + inactiveReputationMiningCycle: null + ): EventFilter; + + ReputationMiningRewardSet(amount: null): EventFilter; + + ReputationRootHashSet( + newHash: null, + newNLeaves: null, + stakers: null, + reward: null + ): EventFilter; + + SkillAdded(skillId: null, parentSkillId: null): EventFilter; + + TokenLockingAddressSet(tokenLocking: null): EventFilter; + + TokenWhitelisted(token: null, status: null): EventFilter; + + UserLabelRegistered(user: string | null, label: null): EventFilter; + }; + + estimate: { + /** + * Indicate approval to exit recovery mode. Can only be called by user with recovery role. + */ + approveExitRecovery(overrides?: TransactionOverrides): Promise; + + /** + * Indicate approval to exit recovery mode. Can only be called by user with recovery role. + */ + "approveExitRecovery()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * No return value, but should throw if protected.This is external, 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, + overrides?: TransactionOverrides + ): Promise; + + /** + * No return value, but should throw if protected.This is external, 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(uint256)"( + _slot: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Put colony network mining into recovery mode. Can only be called by user with recovery role. + */ + enterRecoveryMode(overrides?: TransactionOverrides): Promise; + + /** + * Put colony network mining into recovery mode. Can only be called by user with recovery role. + */ + "enterRecoveryMode()"(overrides?: TransactionOverrides): Promise; + + /** + * Exit recovery mode, can be called by anyone if enough whitelist approvals are given. + */ + exitRecoveryMode(overrides?: TransactionOverrides): Promise; + + /** + * Exit recovery mode, can be called by anyone if enough whitelist approvals are given. + */ + "exitRecoveryMode()"(overrides?: TransactionOverrides): Promise; + + /** + * Is colony network in recovery mode. + */ + isInRecoveryMode(overrides?: TransactionOverrides): Promise; + + /** + * Is colony network in recovery mode. + */ + "isInRecoveryMode()"(overrides?: TransactionOverrides): Promise; + + /** + * Return number of recovery roles. + */ + numRecoveryRoles(overrides?: TransactionOverrides): Promise; + + /** + * Return number of recovery roles. + */ + "numRecoveryRoles()"(overrides?: TransactionOverrides): 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; + + /** + * Remove colony recovery role. Can only be called by root role. + * @param _user User we want to remove recovery role from + */ + "removeRecoveryRole(address)"( + _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; + + /** + * Set new colony recovery role. Can be called by root. + * @param _user User we want to give a recovery role to + */ + "setRecoveryRole(address)"( + _user: string, + overrides?: TransactionOverrides + ): 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; + + /** + * 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(uint256,bytes32)"( + _slot: BigNumberish, + _value: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Interface identification is specified in ERC-165. + * Query if a contract implements an interface + * @param interfaceID The interface identifier, as specified in ERC-165 + */ + supportsInterface( + interfaceID: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Interface identification is specified in ERC-165. + * Query if a contract implements an interface + * @param interfaceID The interface identifier, as specified in ERC-165 + */ + "supportsInterface(bytes4)"( + interfaceID: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Note that strictly, `_nUpdates` and `_nPreviousUpdates` don't need to be set - they're only used during dispute resolution, which these replacement log entries are never used for. However, for ease of resyncing the client, we have decided to include them for now. + * Set a replacement log entry if we're in recovery mode. + * @param _amount The amount of reputation being earned / lost + * @param _colony The address of the colony being updated + * @param _id The number of the log entry in the reputation mining cycle in question. + * @param _nPreviousUpdates The number of updates in the log before this entry + * @param _nUpdates The number of updates the log entry corresponds to + * @param _reputationMiningCycle The address of the reputation mining cycle that the log was in. + * @param _skillId The id of the origin skill for the reputation update + * @param _user The address of the user earning / losing the reputation + */ + setReplacementReputationUpdateLogEntry( + _reputationMiningCycle: string, + _id: BigNumberish, + _user: string, + _amount: BigNumberish, + _skillId: BigNumberish, + _colony: string, + _nUpdates: BigNumberish, + _nPreviousUpdates: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Note that strictly, `_nUpdates` and `_nPreviousUpdates` don't need to be set - they're only used during dispute resolution, which these replacement log entries are never used for. However, for ease of resyncing the client, we have decided to include them for now. + * Set a replacement log entry if we're in recovery mode. + * @param _amount The amount of reputation being earned / lost + * @param _colony The address of the colony being updated + * @param _id The number of the log entry in the reputation mining cycle in question. + * @param _nPreviousUpdates The number of updates in the log before this entry + * @param _nUpdates The number of updates the log entry corresponds to + * @param _reputationMiningCycle The address of the reputation mining cycle that the log was in. + * @param _skillId The id of the origin skill for the reputation update + * @param _user The address of the user earning / losing the reputation + */ + "setReplacementReputationUpdateLogEntry(address,uint256,address,int256,uint256,address,uint128,uint128)"( + _reputationMiningCycle: string, + _id: BigNumberish, + _user: string, + _amount: BigNumberish, + _skillId: BigNumberish, + _colony: string, + _nUpdates: BigNumberish, + _nPreviousUpdates: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a replacement log entry (if set) for the log entry `_id` in the mining cycle that was at the address `_reputationMiningCycle`. + * @param _id The log entry number we wish to see if there is a replacement for + * @param _reputationMiningCycle The address of the reputation mining cycle we are asking about + */ + getReplacementReputationUpdateLogEntry( + _reputationMiningCycle: string, + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a replacement log entry (if set) for the log entry `_id` in the mining cycle that was at the address `_reputationMiningCycle`. + * @param _id The log entry number we wish to see if there is a replacement for + * @param _reputationMiningCycle The address of the reputation mining cycle we are asking about + */ + "getReplacementReputationUpdateLogEntry(address,uint256)"( + _reputationMiningCycle: string, + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get whether any replacement log entries have been set for the supplied reputation mining cycle.Used by the client to avoid doubling the number of RPC calls when syncing from scratch. + * @param _reputationMiningCycle The reputation mining cycle address we want to know if any entries have been replaced in. + */ + getReplacementReputationUpdateLogsExist( + _reputationMiningCycle: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get whether any replacement log entries have been set for the supplied reputation mining cycle.Used by the client to avoid doubling the number of RPC calls when syncing from scratch. + * @param _reputationMiningCycle The reputation mining cycle address we want to know if any entries have been replaced in. + */ + "getReplacementReputationUpdateLogsExist(address)"( + _reputationMiningCycle: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the Meta Colony address. + */ + getMetaColony(overrides?: TransactionOverrides): Promise; + + /** + * Get the Meta Colony address. + */ + "getMetaColony()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of colonies in the network. + */ + getColonyCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of colonies in the network. + */ + "getColonyCount()"(overrides?: TransactionOverrides): Promise; + + /** + * Check if specific address is a colony created on colony network. + * @param _colony Address of the colony + */ + isColony( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Check if specific address is a colony created on colony network. + * @param _colony Address of the colony + */ + "isColony(address)"( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Errors if the parent skill does not exist or if this is called by an unauthorised sender. + * Adds a new skill to the global or local skills tree, under skill `_parentSkillId`. Only the Meta Colony is allowed to add a global skill, called via `IColony.addGlobalSkill`. Any colony is allowed to add a local skill and which is associated with a new domain via `IColony.addDomain`. + * @param _parentSkillId Id of the skill under which the new skill will be added. If 0, a global skill is added with no parent. + */ + addSkill( + _parentSkillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Errors if the parent skill does not exist or if this is called by an unauthorised sender. + * Adds a new skill to the global or local skills tree, under skill `_parentSkillId`. Only the Meta Colony is allowed to add a global skill, called via `IColony.addGlobalSkill`. Any colony is allowed to add a local skill and which is associated with a new domain via `IColony.addDomain`. + * @param _parentSkillId Id of the skill under which the new skill will be added. If 0, a global skill is added with no parent. + */ + "addSkill(uint256)"( + _parentSkillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `nParents` and `nChildren` of skill with id `_skillId`. + * @param _skillId Id of the skill + */ + getSkill( + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `nParents` and `nChildren` of skill with id `_skillId`. + * @param _skillId Id of the skill + */ + "getSkill(uint256)"( + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Mark a global skill as deprecated which stops new tasks and payments from using it. + * @param _skillId Id of the skill + */ + deprecateSkill( + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Mark a global skill as deprecated which stops new tasks and payments from using it. + * @param _skillId Id of the skill + */ + "deprecateSkill(uint256)"( + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Errors if it is called by anyone but a colony or if skill with id `_skillId` does not exist or. + * Adds a reputation update entry to log. + * @param _amount The amount of reputation change for the update, this can be a negative as well as a positive value + * @param _skillId The skill for the reputation update + * @param _user The address of the user for the reputation update + */ + appendReputationUpdateLog( + _user: string, + _amount: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Errors if it is called by anyone but a colony or if skill with id `_skillId` does not exist or. + * Adds a reputation update entry to log. + * @param _amount The amount of reputation change for the update, this can be a negative as well as a positive value + * @param _skillId The skill for the reputation update + * @param _user The address of the user for the reputation update + */ + "appendReputationUpdateLog(address,int256,uint256)"( + _user: string, + _amount: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of skills in the network including both global and local skills. + */ + getSkillCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of skills in the network including both global and local skills. + */ + "getSkillCount()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the `skillId` of the reputation mining skill. Only set once the metacolony is set up. + */ + getReputationMiningSkillId( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `skillId` of the reputation mining skill. Only set once the metacolony is set up. + */ + "getReputationMiningSkillId()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Sets the token locking address. This is only set once, and can't be changed afterwards. + * @param _tokenLockingAddress Address of the locking contract + */ + setTokenLocking( + _tokenLockingAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Sets the token locking address. This is only set once, and can't be changed afterwards. + * @param _tokenLockingAddress Address of the locking contract + */ + "setTokenLocking(address)"( + _tokenLockingAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get token locking contract address. + */ + getTokenLocking(overrides?: TransactionOverrides): Promise; + + /** + * Get token locking contract address. + */ + "getTokenLocking()"(overrides?: TransactionOverrides): Promise; + + /** + * Create the Meta Colony, same as a normal colony plus the root skill. + * @param _tokenAddress Address of the CLNY token + */ + createMetaColony( + _tokenAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Create the Meta Colony, same as a normal colony plus the root skill. + * @param _tokenAddress Address of the CLNY token + */ + "createMetaColony(address)"( + _tokenAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future versionFor the colony to mint tokens, token ownership must be transferred to the new colony + * Creates a new colony in the network, at version 3 + * @param _tokenAddress Address of an ERC20 token to serve as the colony token. + */ + createColony( + _tokenAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future versionFor the colony to mint tokens, token ownership must be transferred to the new colony + * Creates a new colony in the network, at version 3 + * @param _tokenAddress Address of an ERC20 token to serve as the colony token. + */ + "createColony(address)"( + _tokenAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * For the colony to mint tokens, token ownership must be transferred to the new colonyWe expect this function to only be used by the dapp + * Creates a new colony in the network, with an optional ENS name + * @param _colonyName The label to register (if null, no label is registered) + * @param _metadata The metadata associated with the new colony + * @param _tokenAddress Address of an ERC20 token to serve as the colony token + * @param _version The version of colony to deploy (pass 0 for the current version) + */ + "createColony(address,uint256,string,string)"( + _tokenAddress: string, + _version: BigNumberish, + _colonyName: string, + _metadata: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * For the colony to mint tokens, token ownership must be transferred to the new colony + * Creates a new colony in the network, with an optional ENS name + * @param _colonyName The label to register (if null, no label is registered) + * @param _tokenAddress Address of an ERC20 token to serve as the colony token + * @param _version The version of colony to deploy (pass 0 for the current version) + */ + "createColony(address,uint256,string)"( + _tokenAddress: string, + _version: BigNumberish, + _colonyName: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future versionFor the colony to mint tokens, token ownership must be transferred to the new colony + * Overload of the simpler `createColony` -- creates a new colony in the network with a variety of options, at version 4 + * @param _colonyName The label to register (if null, no label is registered) + * @param _orbitdb DEPRECATED Currently a no-op + * @param _tokenAddress Address of an ERC20 token to serve as the colony token + * @param _useExtensionManager DEPRECATED Currently a no-op + * @param _version The version of colony to deploy (pass 0 for the current version) + */ + "createColony(address,uint256,string,string,bool)"( + _tokenAddress: string, + _version: BigNumberish, + _colonyName: string, + _orbitdb: string, + _useExtensionManager: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Adds a new Colony contract version and the address of associated `_resolver` contract. Secured function to authorised members. Allowed to be called by the Meta Colony only. + * @param _resolver Address of the `Resolver` contract which will be used with the underlying `EtherRouter` contract + * @param _version The new Colony contract version + */ + addColonyVersion( + _version: BigNumberish, + _resolver: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Adds a new Colony contract version and the address of associated `_resolver` contract. Secured function to authorised members. Allowed to be called by the Meta Colony only. + * @param _resolver Address of the `Resolver` contract which will be used with the underlying `EtherRouter` contract + * @param _version The new Colony contract version + */ + "addColonyVersion(uint256,address)"( + _version: BigNumberish, + _resolver: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Only allowed to be run once, by the Network owner before any Colony versions are added. + * Initialises the colony network by setting the first Colony version resolver to `_resolver` address. + * @param _resolver Address of the resolver for Colony contract + * @param _version Version of the Colony contract the resolver represents + */ + initialise( + _resolver: string, + _version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Only allowed to be run once, by the Network owner before any Colony versions are added. + * Initialises the colony network by setting the first Colony version resolver to `_resolver` address. + * @param _resolver Address of the resolver for Colony contract + * @param _version Version of the Colony contract the resolver represents + */ + "initialise(address,uint256)"( + _resolver: string, + _version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a colony address by its Id in the network. + * @param _id Id of the colony to get + */ + getColony( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a colony address by its Id in the network. + * @param _id Id of the colony to get + */ + "getColony(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the latest Colony contract version. This is the version used to create all new colonies. + */ + getCurrentColonyVersion( + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the latest Colony contract version. This is the version used to create all new colonies. + */ + "getCurrentColonyVersion()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the id of the parent skill at index `_parentSkillIndex` for skill with Id `_skillId`. + * @param _parentSkillIndex Index of the `skill.parents` array to get Note that not all parent skill ids are stored here. See `Skill.parents` member for definition on which parents are stored + * @param _skillId Id of the skill + */ + getParentSkillId( + _skillId: BigNumberish, + _parentSkillIndex: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the id of the parent skill at index `_parentSkillIndex` for skill with Id `_skillId`. + * @param _parentSkillIndex Index of the `skill.parents` array to get Note that not all parent skill ids are stored here. See `Skill.parents` member for definition on which parents are stored + * @param _skillId Id of the skill + */ + "getParentSkillId(uint256,uint256)"( + _skillId: BigNumberish, + _parentSkillIndex: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the id of the child skill at index `_childSkillIndex` for skill with Id `_skillId`. + * @param _childSkillIndex Index of the `skill.children` array to get + * @param _skillId Id of the skill + */ + getChildSkillId( + _skillId: BigNumberish, + _childSkillIndex: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the id of the child skill at index `_childSkillIndex` for skill with Id `_skillId`. + * @param _childSkillIndex Index of the `skill.children` array to get + * @param _skillId Id of the skill + */ + "getChildSkillId(uint256,uint256)"( + _skillId: BigNumberish, + _childSkillIndex: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the address of either the active or inactive reputation mining cycle, based on `active`. The active reputation mining cycle is the one currently under consideration by reputation miners. The inactive reputation cycle is the one with the log that is being appended to. + * @param _active Whether the user wants the active or inactive reputation mining cycle + */ + getReputationMiningCycle( + _active: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the address of either the active or inactive reputation mining cycle, based on `active`. The active reputation mining cycle is the one currently under consideration by reputation miners. The inactive reputation cycle is the one with the log that is being appended to. + * @param _active Whether the user wants the active or inactive reputation mining cycle + */ + "getReputationMiningCycle(bool)"( + _active: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Calculate raw miner weight in WADs. + * @param _submissonIndex Index of reputation hash submission (between 0 and 11) + * @param _timeStaked Amount of time (in seconds) that the miner has staked their CLNY + */ + calculateMinerWeight( + _timeStaked: BigNumberish, + _submissonIndex: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Calculate raw miner weight in WADs. + * @param _submissonIndex Index of reputation hash submission (between 0 and 11) + * @param _timeStaked Amount of time (in seconds) that the miner has staked their CLNY + */ + "calculateMinerWeight(uint256,uint256)"( + _timeStaked: BigNumberish, + _submissonIndex: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `Resolver` address for Colony contract version `_version`. + * @param _version The Colony contract version + */ + getColonyVersionResolver( + _version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `Resolver` address for Colony contract version `_version`. + * @param _version The Colony contract version + */ + "getColonyVersionResolver(uint256)"( + _version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set a new Reputation root hash and starts a new mining cycle. Can only be called by the ReputationMiningCycle contract. + * @param newHash The reputation root hash + * @param newNLeaves The updated leaves count value + * @param stakers Array of users who submitted or backed the hash, being accepted here as the new reputation root hash + */ + setReputationRootHash( + newHash: Arrayish, + newNLeaves: BigNumberish, + stakers: string[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Set a new Reputation root hash and starts a new mining cycle. Can only be called by the ReputationMiningCycle contract. + * @param newHash The reputation root hash + * @param newNLeaves The updated leaves count value + * @param stakers Array of users who submitted or backed the hash, being accepted here as the new reputation root hash + */ + "setReputationRootHash(bytes32,uint256,address[])"( + newHash: Arrayish, + newNLeaves: BigNumberish, + stakers: string[], + overrides?: TransactionOverrides + ): Promise; + + /** + * This version of setReputationRootHash is deprecated and will be removed in a future release. It transparently calls the new version if it is called (essentially, removing the `reward` parameter. + * @param newHash The reputation root hash + * @param newNLeaves The updated leaves count value + * @param reward Amount of CLNY to be distributed as reward to miners (not used) + * @param stakers Array of users who submitted or backed the hash, being accepted here as the new reputation root hash + */ + "setReputationRootHash(bytes32,uint256,address[],uint256)"( + newHash: Arrayish, + newNLeaves: BigNumberish, + stakers: string[], + reward: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Starts a new Reputation Mining cycle. Explicitly called only the first time, subsequently called from within `setReputationRootHash`. + */ + startNextCycle(overrides?: TransactionOverrides): Promise; + + /** + * Starts a new Reputation Mining cycle. Explicitly called only the first time, subsequently called from within `setReputationRootHash`. + */ + "startNextCycle()"(overrides?: TransactionOverrides): Promise; + + /** + * Creates initial inactive reputation mining cycle. + */ + initialiseReputationMining( + overrides?: TransactionOverrides + ): Promise; + + /** + * Creates initial inactive reputation mining cycle. + */ + "initialiseReputationMining()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the root hash of the current reputation state tree. + */ + getReputationRootHash(overrides?: TransactionOverrides): Promise; + + /** + * Get the root hash of the current reputation state tree. + */ + "getReputationRootHash()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * I cannot see a reason why a user's client would need to call this - only stored to help with some edge cases in reputation mining dispute resolution. + * Get the number of leaves in the current reputation state tree. + */ + getReputationRootHashNLeaves( + overrides?: TransactionOverrides + ): Promise; + + /** + * I cannot see a reason why a user's client would need to call this - only stored to help with some edge cases in reputation mining dispute resolution. + * Get the number of leaves in the current reputation state tree. + */ + "getReputationRootHashNLeaves()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Deprecated, replaced by getReputationRootHashNLeaves which does the same thing but is more accurately named.will be removed in a later version. + * Get the number of leaves in the current reputation state tree. + */ + getReputationRootHashNNodes( + overrides?: TransactionOverrides + ): Promise; + + /** + * Deprecated, replaced by getReputationRootHashNLeaves which does the same thing but is more accurately named.will be removed in a later version. + * Get the number of leaves in the current reputation state tree. + */ + "getReputationRootHashNNodes()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Create and start a new `DutchAuction` for the entire amount of `_token` owned by the Colony Network. + * @param _token Address of the token held by the network to be auctioned + */ + startTokenAuction( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Create and start a new `DutchAuction` for the entire amount of `_token` owned by the Colony Network. + * @param _token Address of the token held by the network to be auctioned + */ + "startTokenAuction(address)"( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Setup registrar with ENS and root node. + * @param _ens Address of ENS registrar + * @param _rootNode Namehash of the root node for the domain + */ + setupRegistrar( + _ens: string, + _rootNode: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Setup registrar with ENS and root node. + * @param _ens Address of ENS registrar + * @param _rootNode Namehash of the root node for the domain + */ + "setupRegistrar(address,bytes32)"( + _ens: string, + _rootNode: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Register a "user.joincolony.eth" label. + * @param orbitdb The path of the orbitDB database associated with the user profile + * @param username The label to register + */ + registerUserLabel( + username: string, + orbitdb: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Register a "user.joincolony.eth" label. + * @param orbitdb The path of the orbitDB database associated with the user profile + * @param username The label to register + */ + "registerUserLabel(string,string)"( + username: string, + orbitdb: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Register a "colony.joincolony.eth" label. Can only be called by a Colony. + * @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; + + /** + * Register a "colony.joincolony.eth" label. Can only be called by a Colony. + * @param colonyName The label to register. + * @param orbitdb The path of the orbitDB database associated with the colony name + */ + "registerColonyLabel(string,string)"( + 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; + + /** + * 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(string)"( + orbitdb: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Update a user's orbitdb address. Can only be called by a user with a registered subdomain + * @param orbitdb The path of the orbitDB database to be associated with the user + */ + updateUserOrbitDB( + orbitdb: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Update a user's orbitdb address. Can only be called by a user with a registered subdomain + * @param orbitdb The path of the orbitDB database to be associated with the user + */ + "updateUserOrbitDB(string)"( + orbitdb: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Retrieve the orbitdb address corresponding to a registered account. + * @param node The Namehash of the account being queried. + */ + getProfileDBAddress( + node: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Retrieve the orbitdb address corresponding to a registered account. + * @param node The Namehash of the account being queried. + */ + "getProfileDBAddress(bytes32)"( + node: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Reverse lookup a username from an address. + * @param addr The address we wish to find the corresponding ENS domain for (if any) + */ + lookupRegisteredENSDomain( + addr: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Reverse lookup a username from an address. + * @param addr The address we wish to find the corresponding ENS domain for (if any) + */ + "lookupRegisteredENSDomain(address)"( + addr: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the address the supplied node resolves do, if we are the resolver. + * @param node The namehash of the ENS address being requested + */ + addr(node: Arrayish, overrides?: TransactionOverrides): Promise; + + /** + * Returns the address the supplied node resolves do, if we are the resolver. + * @param node The namehash of the ENS address being requested + */ + "addr(bytes32)"( + node: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the address of the ENSRegistrar for the Network. + */ + getENSRegistrar(overrides?: TransactionOverrides): Promise; + + /** + * Returns the address of the ENSRegistrar for the Network. + */ + "getENSRegistrar()"(overrides?: TransactionOverrides): Promise; + + /** + * Set the resolver to be used by new instances of ReputationMiningCycle. + * @param miningResolverAddress The address of the Resolver contract with the functions correctly wired. + */ + setMiningResolver( + miningResolverAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the resolver to be used by new instances of ReputationMiningCycle. + * @param miningResolverAddress The address of the Resolver contract with the functions correctly wired. + */ + "setMiningResolver(address)"( + miningResolverAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the resolver to be used by new instances of ReputationMiningCycle. + */ + getMiningResolver(overrides?: TransactionOverrides): Promise; + + /** + * Get the resolver to be used by new instances of ReputationMiningCycle. + */ + "getMiningResolver()"(overrides?: TransactionOverrides): Promise; + + /** + * Can only be called by the MetaColony.The extension version is queried from the resolver itself. + * Add a new extension resolver to the Extensions repository. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param resolver The deployed resolver containing the extension contract logic + */ + addExtensionToNetwork( + extensionId: Arrayish, + resolver: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Can only be called by the MetaColony.The extension version is queried from the resolver itself. + * Add a new extension resolver to the Extensions repository. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param resolver The deployed resolver containing the extension contract logic + */ + "addExtensionToNetwork(bytes32,address)"( + extensionId: Arrayish, + resolver: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Install an extension in a colony. Can only be called by a Colony. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param version Version of the extension to install + */ + installExtension( + extensionId: Arrayish, + version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Install an extension in a colony. Can only be called by a Colony. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param version Version of the extension to install + */ + "installExtension(bytes32,uint256)"( + extensionId: Arrayish, + version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Upgrade an extension in a colony. Can only be called by a Colony. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param newVersion Version of the extension to upgrade to (must be one greater than current) + */ + upgradeExtension( + extensionId: Arrayish, + newVersion: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Upgrade an extension in a colony. Can only be called by a Colony. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param newVersion Version of the extension to upgrade to (must be one greater than current) + */ + "upgradeExtension(bytes32,uint256)"( + extensionId: Arrayish, + newVersion: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the deprecation of an extension in a colony. Can only be called by a Colony. + * @param deprecated Whether to deprecate the extension or not + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + deprecateExtension( + extensionId: Arrayish, + deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the deprecation of an extension in a colony. Can only be called by a Colony. + * @param deprecated Whether to deprecate the extension or not + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + "deprecateExtension(bytes32,bool)"( + extensionId: Arrayish, + deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Uninstall an extension in a colony. Can only be called by a Colony. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + uninstallExtension( + extensionId: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Uninstall an extension in a colony. Can only be called by a Colony. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + "uninstallExtension(bytes32)"( + extensionId: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get an extension's resolver. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param version Version of the extension + */ + getExtensionResolver( + extensionId: Arrayish, + version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get an extension's resolver. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param version Version of the extension + */ + "getExtensionResolver(bytes32,uint256)"( + extensionId: Arrayish, + version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get an extension's installation. + * @param colony Address of the colony the extension is installed in + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + getExtensionInstallation( + extensionId: Arrayish, + colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get an extension's installation. + * @param colony Address of the colony the extension is installed in + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + "getExtensionInstallation(bytes32,address)"( + extensionId: Arrayish, + colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Return 1 / the fee to pay to the network. e.g. if the fee is 1% (or 0.01), return 100. + */ + getFeeInverse(overrides?: TransactionOverrides): Promise; + + /** + * Return 1 / the fee to pay to the network. e.g. if the fee is 1% (or 0.01), return 100. + */ + "getFeeInverse()"(overrides?: TransactionOverrides): Promise; + + /** + * Set the colony network fee to pay. e.g. if the fee is 1% (or 0.01), pass 100 as `_feeInverse`. + * @param _feeInverse The inverse of the network fee to set + */ + setFeeInverse( + _feeInverse: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the colony network fee to pay. e.g. if the fee is 1% (or 0.01), pass 100 as `_feeInverse`. + * @param _feeInverse The inverse of the network fee to set + */ + "setFeeInverse(uint256)"( + _feeInverse: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a token's status in the payout whitelist + * @param _token The token being queried + */ + getPayoutWhitelist( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a token's status in the payout whitelist + * @param _token The token being queried + */ + "getPayoutWhitelist(address)"( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set a token's status in the payout whitelist + * @param _status The whitelist status + * @param _token The token being set + */ + setPayoutWhitelist( + _token: string, + _status: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set a token's status in the payout whitelist + * @param _status The whitelist status + * @param _token The token being set + */ + "setPayoutWhitelist(address,bool)"( + _token: string, + _status: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * While external, it can only be called successfully by the current ReputationMiningCycle. + * Function called to punish people who staked against a new reputation root hash that turned out to be incorrect. + * @param _amount Amount of stake to slash + * @param _stakers Array of the addresses of stakers to punish + */ + punishStakers( + _stakers: string[], + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * While external, it can only be called successfully by the current ReputationMiningCycle. + * Function called to punish people who staked against a new reputation root hash that turned out to be incorrect. + * @param _amount Amount of stake to slash + * @param _stakers Array of the addresses of stakers to punish + */ + "punishStakers(address[],uint256)"( + _stakers: string[], + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Stake CLNY to allow the staker to participate in reputation mining. + * @param _amount Amount of CLNY to stake for the purposes of mining + */ + stakeForMining( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Stake CLNY to allow the staker to participate in reputation mining. + * @param _amount Amount of CLNY to stake for the purposes of mining + */ + "stakeForMining(uint256)"( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Unstake CLNY currently staked for reputation mining. + * @param _amount Amount of CLNY staked for mining to unstake + */ + unstakeForMining( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Unstake CLNY currently staked for reputation mining. + * @param _amount Amount of CLNY staked for mining to unstake + */ + "unstakeForMining(uint256)"( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * returns how much CLNY _user has staked for the purposes of reputation mining + * @param _user The user to query + */ + getMiningStake( + _user: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * returns how much CLNY _user has staked for the purposes of reputation mining + * @param _user The user to query + */ + "getMiningStake(address)"( + _user: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Only callable by the active reputation mining cycle + * Used to track that a user is eligible to claim a reward + * @param _amount The amount of CLNY to be awarded + * @param _recipient The address receiving the award + */ + reward( + _recipient: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Only callable by the active reputation mining cycle + * Used to track that a user is eligible to claim a reward + * @param _amount The amount of CLNY to be awarded + * @param _recipient The address receiving the award + */ + "reward(address,uint256)"( + _recipient: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Only callable by the active reputation mining cycle + * Used to burn tokens that are not needed to pay out rewards (because not every possible defence was made for all submissions) + * @param _amount The amount of CLNY to burn + */ + burnUnneededRewards( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Only callable by the active reputation mining cycle + * Used to burn tokens that are not needed to pay out rewards (because not every possible defence was made for all submissions) + * @param _amount The amount of CLNY to burn + */ + "burnUnneededRewards(uint256)"( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Can be called by anyone, not just _recipient + * Used by a user to claim any mining rewards due to them. This will place them in their balance or pending balance, as appropriate. + * @param _recipient The user whose rewards to claim + */ + claimMiningReward( + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Can be called by anyone, not just _recipient + * Used by a user to claim any mining rewards due to them. This will place them in their balance or pending balance, as appropriate. + * @param _recipient The user whose rewards to claim + */ + "claimMiningReward(address)"( + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Can only be called by the MetaColony. + * Called to set the total per-cycle reputation reward, which will be split between all miners. + */ + setReputationMiningCycleReward( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Can only be called by the MetaColony. + * Called to set the total per-cycle reputation reward, which will be split between all miners. + */ + "setReputationMiningCycleReward(uint256)"( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called to get the total per-cycle reputation mining reward. + */ + getReputationMiningCycleReward( + overrides?: TransactionOverrides + ): Promise; + + /** + * Called to get the total per-cycle reputation mining reward. + */ + "getReputationMiningCycleReward()"( + overrides?: TransactionOverrides + ): Promise; + }; +} diff --git a/src/contracts/colony/6/Token.d.ts b/src/contracts/colony/6/Token.d.ts new file mode 100644 index 000000000..17121c677 --- /dev/null +++ b/src/contracts/colony/6/Token.d.ts @@ -0,0 +1,560 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-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 TokenInterface extends Interface { + functions: { + name: TypedFunctionDescription<{ encode([]: []): string }>; + + approve: TypedFunctionDescription<{ + encode([guy, wad]: [string, BigNumberish]): string; + }>; + + setOwner: TypedFunctionDescription<{ encode([owner_]: [string]): string }>; + + totalSupply: TypedFunctionDescription<{ encode([]: []): string }>; + + decimals: TypedFunctionDescription<{ encode([]: []): string }>; + + balanceOf: TypedFunctionDescription<{ encode([src]: [string]): string }>; + + setAuthority: TypedFunctionDescription<{ + encode([authority_]: [string]): string; + }>; + + owner: TypedFunctionDescription<{ encode([]: []): string }>; + + symbol: TypedFunctionDescription<{ encode([]: []): string }>; + + transfer: TypedFunctionDescription<{ + encode([dst, wad]: [string, BigNumberish]): string; + }>; + + authority: TypedFunctionDescription<{ encode([]: []): string }>; + + locked: TypedFunctionDescription<{ encode([]: []): string }>; + + allowance: TypedFunctionDescription<{ + encode([src, guy]: [string, string]): string; + }>; + + transferFrom: TypedFunctionDescription<{ + encode([src, dst, wad]: [string, string, BigNumberish]): string; + }>; + + mint: TypedFunctionDescription<{ + encode([guy, wad]: [string, BigNumberish]): string; + }>; + + burn: TypedFunctionDescription<{ encode([wad]: [BigNumberish]): string }>; + + unlock: TypedFunctionDescription<{ encode([]: []): string }>; + }; + + events: { + Mint: TypedEventDescription<{ + encodeTopics([guy, wad]: [string | null, null]): string[]; + }>; + + Burn: TypedEventDescription<{ + encodeTopics([guy, wad]: [string | null, null]): string[]; + }>; + + LogSetAuthority: TypedEventDescription<{ + encodeTopics([authority]: [string | null]): string[]; + }>; + + LogSetOwner: TypedEventDescription<{ + encodeTopics([owner]: [string | null]): string[]; + }>; + + Approval: TypedEventDescription<{ + encodeTopics([src, guy, wad]: [ + string | null, + string | null, + null + ]): string[]; + }>; + + Transfer: TypedEventDescription<{ + encodeTopics([src, dst, wad]: [ + string | null, + string | null, + null + ]): string[]; + }>; + }; +} + +export class Token extends Contract { + connect(signerOrProvider: Signer | Provider | string): Token; + attach(addressOrName: string): Token; + deployed(): Promise; + + on(event: EventFilter | string, listener: Listener): Token; + once(event: EventFilter | string, listener: Listener): Token; + addListener(eventName: EventFilter | string, listener: Listener): Token; + removeAllListeners(eventName: EventFilter | string): Token; + removeListener(eventName: any, listener: Listener): Token; + + interface: TokenInterface; + + functions: { + name(overrides?: TransactionOverrides): Promise; + + "name()"(overrides?: TransactionOverrides): Promise; + + approve( + guy: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "approve(address,uint256)"( + guy: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + setOwner( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + "setOwner(address)"( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + totalSupply(overrides?: TransactionOverrides): Promise; + + "totalSupply()"(overrides?: TransactionOverrides): Promise; + + decimals(overrides?: TransactionOverrides): Promise; + + "decimals()"(overrides?: TransactionOverrides): Promise; + + balanceOf( + src: string, + overrides?: TransactionOverrides + ): Promise; + + "balanceOf(address)"( + src: string, + overrides?: TransactionOverrides + ): Promise; + + setAuthority( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + "setAuthority(address)"( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + owner(overrides?: TransactionOverrides): Promise; + + "owner()"(overrides?: TransactionOverrides): Promise; + + symbol(overrides?: TransactionOverrides): Promise; + + "symbol()"(overrides?: TransactionOverrides): Promise; + + transfer( + dst: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "transfer(address,uint256)"( + dst: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + authority(overrides?: TransactionOverrides): Promise; + + "authority()"(overrides?: TransactionOverrides): Promise; + + locked(overrides?: TransactionOverrides): Promise; + + "locked()"(overrides?: TransactionOverrides): Promise; + + allowance( + src: string, + guy: string, + overrides?: TransactionOverrides + ): Promise; + + "allowance(address,address)"( + src: string, + guy: string, + overrides?: TransactionOverrides + ): Promise; + + transferFrom( + src: string, + dst: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "transferFrom(address,address,uint256)"( + src: string, + dst: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + mint( + guy: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "mint(address,uint256)"( + guy: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "mint(uint256)"( + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + burn( + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "burn(uint256)"( + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "burn(address,uint256)"( + guy: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + unlock(overrides?: TransactionOverrides): Promise; + + "unlock()"(overrides?: TransactionOverrides): Promise; + }; + + name(overrides?: TransactionOverrides): Promise; + + "name()"(overrides?: TransactionOverrides): Promise; + + approve( + guy: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "approve(address,uint256)"( + guy: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + setOwner( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + "setOwner(address)"( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + totalSupply(overrides?: TransactionOverrides): Promise; + + "totalSupply()"(overrides?: TransactionOverrides): Promise; + + decimals(overrides?: TransactionOverrides): Promise; + + "decimals()"(overrides?: TransactionOverrides): Promise; + + balanceOf(src: string, overrides?: TransactionOverrides): Promise; + + "balanceOf(address)"( + src: string, + overrides?: TransactionOverrides + ): Promise; + + setAuthority( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + "setAuthority(address)"( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + owner(overrides?: TransactionOverrides): Promise; + + "owner()"(overrides?: TransactionOverrides): Promise; + + symbol(overrides?: TransactionOverrides): Promise; + + "symbol()"(overrides?: TransactionOverrides): Promise; + + transfer( + dst: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "transfer(address,uint256)"( + dst: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + authority(overrides?: TransactionOverrides): Promise; + + "authority()"(overrides?: TransactionOverrides): Promise; + + locked(overrides?: TransactionOverrides): Promise; + + "locked()"(overrides?: TransactionOverrides): Promise; + + allowance( + src: string, + guy: string, + overrides?: TransactionOverrides + ): Promise; + + "allowance(address,address)"( + src: string, + guy: string, + overrides?: TransactionOverrides + ): Promise; + + transferFrom( + src: string, + dst: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "transferFrom(address,address,uint256)"( + src: string, + dst: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + mint( + guy: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "mint(address,uint256)"( + guy: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "mint(uint256)"( + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + burn( + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "burn(uint256)"( + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "burn(address,uint256)"( + guy: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + unlock(overrides?: TransactionOverrides): Promise; + + "unlock()"(overrides?: TransactionOverrides): Promise; + + filters: { + Mint(guy: string | null, wad: null): EventFilter; + + Burn(guy: string | null, wad: null): EventFilter; + + LogSetAuthority(authority: string | null): EventFilter; + + LogSetOwner(owner: string | null): EventFilter; + + Approval(src: string | null, guy: string | null, wad: null): EventFilter; + + Transfer(src: string | null, dst: string | null, wad: null): EventFilter; + }; + + estimate: { + name(overrides?: TransactionOverrides): Promise; + + "name()"(overrides?: TransactionOverrides): Promise; + + approve( + guy: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "approve(address,uint256)"( + guy: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + setOwner( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + "setOwner(address)"( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + totalSupply(overrides?: TransactionOverrides): Promise; + + "totalSupply()"(overrides?: TransactionOverrides): Promise; + + decimals(overrides?: TransactionOverrides): Promise; + + "decimals()"(overrides?: TransactionOverrides): Promise; + + balanceOf( + src: string, + overrides?: TransactionOverrides + ): Promise; + + "balanceOf(address)"( + src: string, + overrides?: TransactionOverrides + ): Promise; + + setAuthority( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + "setAuthority(address)"( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + owner(overrides?: TransactionOverrides): Promise; + + "owner()"(overrides?: TransactionOverrides): Promise; + + symbol(overrides?: TransactionOverrides): Promise; + + "symbol()"(overrides?: TransactionOverrides): Promise; + + transfer( + dst: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "transfer(address,uint256)"( + dst: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + authority(overrides?: TransactionOverrides): Promise; + + "authority()"(overrides?: TransactionOverrides): Promise; + + locked(overrides?: TransactionOverrides): Promise; + + "locked()"(overrides?: TransactionOverrides): Promise; + + allowance( + src: string, + guy: string, + overrides?: TransactionOverrides + ): Promise; + + "allowance(address,address)"( + src: string, + guy: string, + overrides?: TransactionOverrides + ): Promise; + + transferFrom( + src: string, + dst: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "transferFrom(address,address,uint256)"( + src: string, + dst: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + mint( + guy: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "mint(address,uint256)"( + guy: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "mint(uint256)"( + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + burn( + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "burn(uint256)"( + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "burn(address,uint256)"( + guy: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + unlock(overrides?: TransactionOverrides): Promise; + + "unlock()"(overrides?: TransactionOverrides): Promise; + }; +} diff --git a/src/contracts/colony/6/TokenERC20.d.ts b/src/contracts/colony/6/TokenERC20.d.ts new file mode 100644 index 000000000..93c7a6793 --- /dev/null +++ b/src/contracts/colony/6/TokenERC20.d.ts @@ -0,0 +1,316 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-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 TokenERC20Interface extends Interface { + functions: { + name: TypedFunctionDescription<{ encode([]: []): string }>; + + approve: TypedFunctionDescription<{ + encode([_spender, _value]: [string, BigNumberish]): string; + }>; + + totalSupply: TypedFunctionDescription<{ encode([]: []): string }>; + + transferFrom: TypedFunctionDescription<{ + encode([_from, _to, _value]: [string, string, BigNumberish]): string; + }>; + + decimals: TypedFunctionDescription<{ encode([]: []): string }>; + + balanceOf: TypedFunctionDescription<{ encode([_owner]: [string]): string }>; + + symbol: TypedFunctionDescription<{ encode([]: []): string }>; + + transfer: TypedFunctionDescription<{ + encode([_to, _value]: [string, BigNumberish]): string; + }>; + + allowance: TypedFunctionDescription<{ + encode([_owner, _spender]: [string, string]): string; + }>; + }; + + events: { + Approval: TypedEventDescription<{ + encodeTopics([owner, spender, value]: [ + string | null, + string | null, + null + ]): string[]; + }>; + + Transfer: TypedEventDescription<{ + encodeTopics([from, to, value]: [ + string | null, + string | null, + null + ]): string[]; + }>; + }; +} + +export class TokenERC20 extends Contract { + connect(signerOrProvider: Signer | Provider | string): TokenERC20; + attach(addressOrName: string): TokenERC20; + deployed(): Promise; + + on(event: EventFilter | string, listener: Listener): TokenERC20; + once(event: EventFilter | string, listener: Listener): TokenERC20; + addListener(eventName: EventFilter | string, listener: Listener): TokenERC20; + removeAllListeners(eventName: EventFilter | string): TokenERC20; + removeListener(eventName: any, listener: Listener): TokenERC20; + + interface: TokenERC20Interface; + + functions: { + name(overrides?: TransactionOverrides): Promise; + + "name()"(overrides?: TransactionOverrides): Promise; + + approve( + _spender: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "approve(address,uint256)"( + _spender: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + totalSupply(overrides?: TransactionOverrides): Promise; + + "totalSupply()"(overrides?: TransactionOverrides): Promise; + + transferFrom( + _from: string, + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "transferFrom(address,address,uint256)"( + _from: string, + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + decimals(overrides?: TransactionOverrides): Promise; + + "decimals()"(overrides?: TransactionOverrides): Promise; + + balanceOf( + _owner: string, + overrides?: TransactionOverrides + ): Promise; + + "balanceOf(address)"( + _owner: string, + overrides?: TransactionOverrides + ): Promise; + + symbol(overrides?: TransactionOverrides): Promise; + + "symbol()"(overrides?: TransactionOverrides): Promise; + + transfer( + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "transfer(address,uint256)"( + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + allowance( + _owner: string, + _spender: string, + overrides?: TransactionOverrides + ): Promise; + + "allowance(address,address)"( + _owner: string, + _spender: string, + overrides?: TransactionOverrides + ): Promise; + }; + + name(overrides?: TransactionOverrides): Promise; + + "name()"(overrides?: TransactionOverrides): Promise; + + approve( + _spender: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "approve(address,uint256)"( + _spender: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + totalSupply(overrides?: TransactionOverrides): Promise; + + "totalSupply()"(overrides?: TransactionOverrides): Promise; + + transferFrom( + _from: string, + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "transferFrom(address,address,uint256)"( + _from: string, + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + decimals(overrides?: TransactionOverrides): Promise; + + "decimals()"(overrides?: TransactionOverrides): Promise; + + balanceOf( + _owner: string, + overrides?: TransactionOverrides + ): Promise; + + "balanceOf(address)"( + _owner: string, + overrides?: TransactionOverrides + ): Promise; + + symbol(overrides?: TransactionOverrides): Promise; + + "symbol()"(overrides?: TransactionOverrides): Promise; + + transfer( + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "transfer(address,uint256)"( + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + allowance( + _owner: string, + _spender: string, + overrides?: TransactionOverrides + ): Promise; + + "allowance(address,address)"( + _owner: string, + _spender: string, + overrides?: TransactionOverrides + ): Promise; + + filters: { + Approval( + owner: string | null, + spender: string | null, + value: null + ): EventFilter; + + Transfer(from: string | null, to: string | null, value: null): EventFilter; + }; + + estimate: { + name(overrides?: TransactionOverrides): Promise; + + "name()"(overrides?: TransactionOverrides): Promise; + + approve( + _spender: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "approve(address,uint256)"( + _spender: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + totalSupply(overrides?: TransactionOverrides): Promise; + + "totalSupply()"(overrides?: TransactionOverrides): Promise; + + transferFrom( + _from: string, + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "transferFrom(address,address,uint256)"( + _from: string, + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + decimals(overrides?: TransactionOverrides): Promise; + + "decimals()"(overrides?: TransactionOverrides): Promise; + + balanceOf( + _owner: string, + overrides?: TransactionOverrides + ): Promise; + + "balanceOf(address)"( + _owner: string, + overrides?: TransactionOverrides + ): Promise; + + symbol(overrides?: TransactionOverrides): Promise; + + "symbol()"(overrides?: TransactionOverrides): Promise; + + transfer( + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "transfer(address,uint256)"( + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + allowance( + _owner: string, + _spender: string, + overrides?: TransactionOverrides + ): Promise; + + "allowance(address,address)"( + _owner: string, + _spender: string, + overrides?: TransactionOverrides + ): Promise; + }; +} diff --git a/src/contracts/colony/6/TokenLocking.d.ts b/src/contracts/colony/6/TokenLocking.d.ts new file mode 100644 index 000000000..75de79a43 --- /dev/null +++ b/src/contracts/colony/6/TokenLocking.d.ts @@ -0,0 +1,1085 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-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 TokenLockingInterface extends Interface { + functions: { + authority: TypedFunctionDescription<{ encode([]: []): string }>; + + owner: TypedFunctionDescription<{ encode([]: []): string }>; + + setAuthority: TypedFunctionDescription<{ + encode([authority_]: [string]): string; + }>; + + setOwner: TypedFunctionDescription<{ encode([owner_]: [string]): string }>; + + setColonyNetwork: TypedFunctionDescription<{ + encode([_colonyNetwork]: [string]): string; + }>; + + getColonyNetwork: TypedFunctionDescription<{ encode([]: []): string }>; + + lockToken: TypedFunctionDescription<{ encode([_token]: [string]): string }>; + + unlockTokenForUser: TypedFunctionDescription<{ + encode([_token, _user, _lockId]: [string, string, BigNumberish]): string; + }>; + + incrementLockCounterTo: TypedFunctionDescription<{ + encode([_token, _lockId]: [string, BigNumberish]): string; + }>; + + deposit: TypedFunctionDescription<{ + encode([_token, _amount, _force]: [ + string, + BigNumberish, + boolean + ]): string; + }>; + + depositFor: TypedFunctionDescription<{ + encode([_token, _amount, _recipient]: [ + string, + BigNumberish, + string + ]): string; + }>; + + transfer: TypedFunctionDescription<{ + encode([_token, _amount, _recipient, _force]: [ + string, + BigNumberish, + string, + boolean + ]): string; + }>; + + withdraw: TypedFunctionDescription<{ + encode([_token, _amount, _force]: [ + string, + BigNumberish, + boolean + ]): string; + }>; + + approveStake: TypedFunctionDescription<{ + encode([_user, _amount, _token]: [string, BigNumberish, string]): string; + }>; + + obligateStake: TypedFunctionDescription<{ + encode([_user, _amount, _token]: [string, BigNumberish, string]): string; + }>; + + deobligateStake: TypedFunctionDescription<{ + encode([_user, _amount, _token]: [string, BigNumberish, string]): string; + }>; + + transferStake: TypedFunctionDescription<{ + encode([_user, _amount, _token, _recipient]: [ + string, + BigNumberish, + string, + string + ]): string; + }>; + + reward: TypedFunctionDescription<{ + encode([_recipient, _amount]: [string, BigNumberish]): string; + }>; + + getTotalLockCount: TypedFunctionDescription<{ + encode([_token]: [string]): string; + }>; + + getUserLock: TypedFunctionDescription<{ + encode([_token, _user]: [string, string]): string; + }>; + + getTotalObligation: TypedFunctionDescription<{ + encode([_user, _token]: [string, string]): string; + }>; + + getApproval: TypedFunctionDescription<{ + encode([_user, _token, _obligator]: [string, string, string]): string; + }>; + + getObligation: TypedFunctionDescription<{ + encode([_user, _token, _obligator]: [string, string, string]): string; + }>; + }; + + events: { + ColonyNetworkSet: TypedEventDescription<{ + encodeTopics([colonyNetwork]: [null]): string[]; + }>; + + LogSetAuthority: TypedEventDescription<{ + encodeTopics([authority]: [string | null]): string[]; + }>; + + LogSetOwner: TypedEventDescription<{ + encodeTopics([owner]: [string | null]): string[]; + }>; + + TokenLocked: TypedEventDescription<{ + encodeTopics([token, lockedBy, lockCount]: [ + string | null, + string | null, + null + ]): string[]; + }>; + + UserTokenClaimed: TypedEventDescription<{ + encodeTopics([token, user, amount]: [null, null, null]): string[]; + }>; + + UserTokenDeposited: TypedEventDescription<{ + encodeTopics([token, user, amount]: [null, null, null]): string[]; + }>; + + UserTokenTransferred: TypedEventDescription<{ + encodeTopics([token, user, recipient, amount]: [ + null, + null, + null, + null + ]): string[]; + }>; + + UserTokenUnlocked: TypedEventDescription<{ + encodeTopics([token, user, lockId]: [null, null, null]): string[]; + }>; + + UserTokenWithdrawn: TypedEventDescription<{ + encodeTopics([token, user, amount]: [null, null, null]): string[]; + }>; + }; +} + +export class TokenLocking extends Contract { + connect(signerOrProvider: Signer | Provider | string): TokenLocking; + attach(addressOrName: string): TokenLocking; + deployed(): Promise; + + on(event: EventFilter | string, listener: Listener): TokenLocking; + once(event: EventFilter | string, listener: Listener): TokenLocking; + addListener( + eventName: EventFilter | string, + listener: Listener + ): TokenLocking; + removeAllListeners(eventName: EventFilter | string): TokenLocking; + removeListener(eventName: any, listener: Listener): TokenLocking; + + interface: TokenLockingInterface; + + functions: { + authority(overrides?: TransactionOverrides): Promise; + + "authority()"(overrides?: TransactionOverrides): Promise; + + owner(overrides?: TransactionOverrides): Promise; + + "owner()"(overrides?: TransactionOverrides): Promise; + + setAuthority( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + "setAuthority(address)"( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + setOwner( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + "setOwner(address)"( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + setColonyNetwork( + _colonyNetwork: string, + overrides?: TransactionOverrides + ): Promise; + + "setColonyNetwork(address)"( + _colonyNetwork: string, + overrides?: TransactionOverrides + ): Promise; + + getColonyNetwork(overrides?: TransactionOverrides): Promise; + + "getColonyNetwork()"(overrides?: TransactionOverrides): Promise; + + lockToken( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + "lockToken(address)"( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + unlockTokenForUser( + _token: string, + _user: string, + _lockId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "unlockTokenForUser(address,address,uint256)"( + _token: string, + _user: string, + _lockId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + incrementLockCounterTo( + _token: string, + _lockId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "incrementLockCounterTo(address,uint256)"( + _token: string, + _lockId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + deposit( + _token: string, + _amount: BigNumberish, + _force: boolean, + overrides?: TransactionOverrides + ): Promise; + + "deposit(address,uint256,bool)"( + _token: string, + _amount: BigNumberish, + _force: boolean, + overrides?: TransactionOverrides + ): Promise; + + "deposit(address,uint256)"( + _token: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + depositFor( + _token: string, + _amount: BigNumberish, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + "depositFor(address,uint256,address)"( + _token: string, + _amount: BigNumberish, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + transfer( + _token: string, + _amount: BigNumberish, + _recipient: string, + _force: boolean, + overrides?: TransactionOverrides + ): Promise; + + "transfer(address,uint256,address,bool)"( + _token: string, + _amount: BigNumberish, + _recipient: string, + _force: boolean, + overrides?: TransactionOverrides + ): Promise; + + withdraw( + _token: string, + _amount: BigNumberish, + _force: boolean, + overrides?: TransactionOverrides + ): Promise; + + "withdraw(address,uint256,bool)"( + _token: string, + _amount: BigNumberish, + _force: boolean, + overrides?: TransactionOverrides + ): Promise; + + "withdraw(address,uint256)"( + _token: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + approveStake( + _user: string, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + "approveStake(address,uint256,address)"( + _user: string, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + obligateStake( + _user: string, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + "obligateStake(address,uint256,address)"( + _user: string, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + deobligateStake( + _user: string, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + "deobligateStake(address,uint256,address)"( + _user: string, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + transferStake( + _user: string, + _amount: BigNumberish, + _token: string, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + "transferStake(address,uint256,address,address)"( + _user: string, + _amount: BigNumberish, + _token: string, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + reward( + _recipient: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "reward(address,uint256)"( + _recipient: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + getTotalLockCount( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + "getTotalLockCount(address)"( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + getUserLock( + _token: string, + _user: string, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber, BigNumber] & { + lockCount: BigNumber; + balance: BigNumber; + DEPRECATED_timestamp: BigNumber; + pendingBalance: BigNumber; + } + >; + + "getUserLock(address,address)"( + _token: string, + _user: string, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber, BigNumber] & { + lockCount: BigNumber; + balance: BigNumber; + DEPRECATED_timestamp: BigNumber; + pendingBalance: BigNumber; + } + >; + + getTotalObligation( + _user: string, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + "getTotalObligation(address,address)"( + _user: string, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + getApproval( + _user: string, + _token: string, + _obligator: string, + overrides?: TransactionOverrides + ): Promise; + + "getApproval(address,address,address)"( + _user: string, + _token: string, + _obligator: string, + overrides?: TransactionOverrides + ): Promise; + + getObligation( + _user: string, + _token: string, + _obligator: string, + overrides?: TransactionOverrides + ): Promise; + + "getObligation(address,address,address)"( + _user: string, + _token: string, + _obligator: string, + overrides?: TransactionOverrides + ): Promise; + }; + + authority(overrides?: TransactionOverrides): Promise; + + "authority()"(overrides?: TransactionOverrides): Promise; + + owner(overrides?: TransactionOverrides): Promise; + + "owner()"(overrides?: TransactionOverrides): Promise; + + setAuthority( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + "setAuthority(address)"( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + setOwner( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + "setOwner(address)"( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + setColonyNetwork( + _colonyNetwork: string, + overrides?: TransactionOverrides + ): Promise; + + "setColonyNetwork(address)"( + _colonyNetwork: string, + overrides?: TransactionOverrides + ): Promise; + + getColonyNetwork(overrides?: TransactionOverrides): Promise; + + "getColonyNetwork()"(overrides?: TransactionOverrides): Promise; + + lockToken( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + "lockToken(address)"( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + unlockTokenForUser( + _token: string, + _user: string, + _lockId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "unlockTokenForUser(address,address,uint256)"( + _token: string, + _user: string, + _lockId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + incrementLockCounterTo( + _token: string, + _lockId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "incrementLockCounterTo(address,uint256)"( + _token: string, + _lockId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + deposit( + _token: string, + _amount: BigNumberish, + _force: boolean, + overrides?: TransactionOverrides + ): Promise; + + "deposit(address,uint256,bool)"( + _token: string, + _amount: BigNumberish, + _force: boolean, + overrides?: TransactionOverrides + ): Promise; + + "deposit(address,uint256)"( + _token: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + depositFor( + _token: string, + _amount: BigNumberish, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + "depositFor(address,uint256,address)"( + _token: string, + _amount: BigNumberish, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + transfer( + _token: string, + _amount: BigNumberish, + _recipient: string, + _force: boolean, + overrides?: TransactionOverrides + ): Promise; + + "transfer(address,uint256,address,bool)"( + _token: string, + _amount: BigNumberish, + _recipient: string, + _force: boolean, + overrides?: TransactionOverrides + ): Promise; + + withdraw( + _token: string, + _amount: BigNumberish, + _force: boolean, + overrides?: TransactionOverrides + ): Promise; + + "withdraw(address,uint256,bool)"( + _token: string, + _amount: BigNumberish, + _force: boolean, + overrides?: TransactionOverrides + ): Promise; + + "withdraw(address,uint256)"( + _token: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + approveStake( + _user: string, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + "approveStake(address,uint256,address)"( + _user: string, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + obligateStake( + _user: string, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + "obligateStake(address,uint256,address)"( + _user: string, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + deobligateStake( + _user: string, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + "deobligateStake(address,uint256,address)"( + _user: string, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + transferStake( + _user: string, + _amount: BigNumberish, + _token: string, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + "transferStake(address,uint256,address,address)"( + _user: string, + _amount: BigNumberish, + _token: string, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + reward( + _recipient: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "reward(address,uint256)"( + _recipient: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + getTotalLockCount( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + "getTotalLockCount(address)"( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + getUserLock( + _token: string, + _user: string, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber, BigNumber] & { + lockCount: BigNumber; + balance: BigNumber; + DEPRECATED_timestamp: BigNumber; + pendingBalance: BigNumber; + } + >; + + "getUserLock(address,address)"( + _token: string, + _user: string, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber, BigNumber] & { + lockCount: BigNumber; + balance: BigNumber; + DEPRECATED_timestamp: BigNumber; + pendingBalance: BigNumber; + } + >; + + getTotalObligation( + _user: string, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + "getTotalObligation(address,address)"( + _user: string, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + getApproval( + _user: string, + _token: string, + _obligator: string, + overrides?: TransactionOverrides + ): Promise; + + "getApproval(address,address,address)"( + _user: string, + _token: string, + _obligator: string, + overrides?: TransactionOverrides + ): Promise; + + getObligation( + _user: string, + _token: string, + _obligator: string, + overrides?: TransactionOverrides + ): Promise; + + "getObligation(address,address,address)"( + _user: string, + _token: string, + _obligator: string, + overrides?: TransactionOverrides + ): Promise; + + filters: { + ColonyNetworkSet(colonyNetwork: null): EventFilter; + + LogSetAuthority(authority: string | null): EventFilter; + + LogSetOwner(owner: string | null): EventFilter; + + TokenLocked( + token: string | null, + lockedBy: string | null, + lockCount: null + ): EventFilter; + + UserTokenClaimed(token: null, user: null, amount: null): EventFilter; + + UserTokenDeposited(token: null, user: null, amount: null): EventFilter; + + UserTokenTransferred( + token: null, + user: null, + recipient: null, + amount: null + ): EventFilter; + + UserTokenUnlocked(token: null, user: null, lockId: null): EventFilter; + + UserTokenWithdrawn(token: null, user: null, amount: null): EventFilter; + }; + + estimate: { + authority(overrides?: TransactionOverrides): Promise; + + "authority()"(overrides?: TransactionOverrides): Promise; + + owner(overrides?: TransactionOverrides): Promise; + + "owner()"(overrides?: TransactionOverrides): Promise; + + setAuthority( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + "setAuthority(address)"( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + setOwner( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + "setOwner(address)"( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + setColonyNetwork( + _colonyNetwork: string, + overrides?: TransactionOverrides + ): Promise; + + "setColonyNetwork(address)"( + _colonyNetwork: string, + overrides?: TransactionOverrides + ): Promise; + + getColonyNetwork(overrides?: TransactionOverrides): Promise; + + "getColonyNetwork()"(overrides?: TransactionOverrides): Promise; + + lockToken( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + "lockToken(address)"( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + unlockTokenForUser( + _token: string, + _user: string, + _lockId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "unlockTokenForUser(address,address,uint256)"( + _token: string, + _user: string, + _lockId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + incrementLockCounterTo( + _token: string, + _lockId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "incrementLockCounterTo(address,uint256)"( + _token: string, + _lockId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + deposit( + _token: string, + _amount: BigNumberish, + _force: boolean, + overrides?: TransactionOverrides + ): Promise; + + "deposit(address,uint256,bool)"( + _token: string, + _amount: BigNumberish, + _force: boolean, + overrides?: TransactionOverrides + ): Promise; + + "deposit(address,uint256)"( + _token: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + depositFor( + _token: string, + _amount: BigNumberish, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + "depositFor(address,uint256,address)"( + _token: string, + _amount: BigNumberish, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + transfer( + _token: string, + _amount: BigNumberish, + _recipient: string, + _force: boolean, + overrides?: TransactionOverrides + ): Promise; + + "transfer(address,uint256,address,bool)"( + _token: string, + _amount: BigNumberish, + _recipient: string, + _force: boolean, + overrides?: TransactionOverrides + ): Promise; + + withdraw( + _token: string, + _amount: BigNumberish, + _force: boolean, + overrides?: TransactionOverrides + ): Promise; + + "withdraw(address,uint256,bool)"( + _token: string, + _amount: BigNumberish, + _force: boolean, + overrides?: TransactionOverrides + ): Promise; + + "withdraw(address,uint256)"( + _token: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + approveStake( + _user: string, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + "approveStake(address,uint256,address)"( + _user: string, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + obligateStake( + _user: string, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + "obligateStake(address,uint256,address)"( + _user: string, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + deobligateStake( + _user: string, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + "deobligateStake(address,uint256,address)"( + _user: string, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + transferStake( + _user: string, + _amount: BigNumberish, + _token: string, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + "transferStake(address,uint256,address,address)"( + _user: string, + _amount: BigNumberish, + _token: string, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + reward( + _recipient: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "reward(address,uint256)"( + _recipient: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + getTotalLockCount( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + "getTotalLockCount(address)"( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + getUserLock( + _token: string, + _user: string, + overrides?: TransactionOverrides + ): Promise; + + "getUserLock(address,address)"( + _token: string, + _user: string, + overrides?: TransactionOverrides + ): Promise; + + getTotalObligation( + _user: string, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + "getTotalObligation(address,address)"( + _user: string, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + getApproval( + _user: string, + _token: string, + _obligator: string, + overrides?: TransactionOverrides + ): Promise; + + "getApproval(address,address,address)"( + _user: string, + _token: string, + _obligator: string, + overrides?: TransactionOverrides + ): Promise; + + getObligation( + _user: string, + _token: string, + _obligator: string, + overrides?: TransactionOverrides + ): Promise; + + "getObligation(address,address,address)"( + _user: string, + _token: string, + _obligator: string, + overrides?: TransactionOverrides + ): Promise; + }; +} diff --git a/src/contracts/colony/6/TokenSAI.d.ts b/src/contracts/colony/6/TokenSAI.d.ts new file mode 100644 index 000000000..7b5834e38 --- /dev/null +++ b/src/contracts/colony/6/TokenSAI.d.ts @@ -0,0 +1,316 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-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 TokenSAIInterface extends Interface { + functions: { + name: TypedFunctionDescription<{ encode([]: []): string }>; + + approve: TypedFunctionDescription<{ + encode([_spender, _value]: [string, BigNumberish]): string; + }>; + + totalSupply: TypedFunctionDescription<{ encode([]: []): string }>; + + transferFrom: TypedFunctionDescription<{ + encode([_from, _to, _value]: [string, string, BigNumberish]): string; + }>; + + decimals: TypedFunctionDescription<{ encode([]: []): string }>; + + balanceOf: TypedFunctionDescription<{ encode([_owner]: [string]): string }>; + + symbol: TypedFunctionDescription<{ encode([]: []): string }>; + + transfer: TypedFunctionDescription<{ + encode([_to, _value]: [string, BigNumberish]): string; + }>; + + allowance: TypedFunctionDescription<{ + encode([_owner, _spender]: [string, string]): string; + }>; + }; + + events: { + Approval: TypedEventDescription<{ + encodeTopics([owner, spender, value]: [ + string | null, + string | null, + null + ]): string[]; + }>; + + Transfer: TypedEventDescription<{ + encodeTopics([from, to, value]: [ + string | null, + string | null, + null + ]): string[]; + }>; + }; +} + +export class TokenSAI extends Contract { + connect(signerOrProvider: Signer | Provider | string): TokenSAI; + attach(addressOrName: string): TokenSAI; + deployed(): Promise; + + on(event: EventFilter | string, listener: Listener): TokenSAI; + once(event: EventFilter | string, listener: Listener): TokenSAI; + addListener(eventName: EventFilter | string, listener: Listener): TokenSAI; + removeAllListeners(eventName: EventFilter | string): TokenSAI; + removeListener(eventName: any, listener: Listener): TokenSAI; + + interface: TokenSAIInterface; + + functions: { + name(overrides?: TransactionOverrides): Promise; + + "name()"(overrides?: TransactionOverrides): Promise; + + approve( + _spender: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "approve(address,uint256)"( + _spender: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + totalSupply(overrides?: TransactionOverrides): Promise; + + "totalSupply()"(overrides?: TransactionOverrides): Promise; + + transferFrom( + _from: string, + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "transferFrom(address,address,uint256)"( + _from: string, + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + decimals(overrides?: TransactionOverrides): Promise; + + "decimals()"(overrides?: TransactionOverrides): Promise; + + balanceOf( + _owner: string, + overrides?: TransactionOverrides + ): Promise; + + "balanceOf(address)"( + _owner: string, + overrides?: TransactionOverrides + ): Promise; + + symbol(overrides?: TransactionOverrides): Promise; + + "symbol()"(overrides?: TransactionOverrides): Promise; + + transfer( + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "transfer(address,uint256)"( + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + allowance( + _owner: string, + _spender: string, + overrides?: TransactionOverrides + ): Promise; + + "allowance(address,address)"( + _owner: string, + _spender: string, + overrides?: TransactionOverrides + ): Promise; + }; + + name(overrides?: TransactionOverrides): Promise; + + "name()"(overrides?: TransactionOverrides): Promise; + + approve( + _spender: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "approve(address,uint256)"( + _spender: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + totalSupply(overrides?: TransactionOverrides): Promise; + + "totalSupply()"(overrides?: TransactionOverrides): Promise; + + transferFrom( + _from: string, + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "transferFrom(address,address,uint256)"( + _from: string, + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + decimals(overrides?: TransactionOverrides): Promise; + + "decimals()"(overrides?: TransactionOverrides): Promise; + + balanceOf( + _owner: string, + overrides?: TransactionOverrides + ): Promise; + + "balanceOf(address)"( + _owner: string, + overrides?: TransactionOverrides + ): Promise; + + symbol(overrides?: TransactionOverrides): Promise; + + "symbol()"(overrides?: TransactionOverrides): Promise; + + transfer( + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "transfer(address,uint256)"( + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + allowance( + _owner: string, + _spender: string, + overrides?: TransactionOverrides + ): Promise; + + "allowance(address,address)"( + _owner: string, + _spender: string, + overrides?: TransactionOverrides + ): Promise; + + filters: { + Approval( + owner: string | null, + spender: string | null, + value: null + ): EventFilter; + + Transfer(from: string | null, to: string | null, value: null): EventFilter; + }; + + estimate: { + name(overrides?: TransactionOverrides): Promise; + + "name()"(overrides?: TransactionOverrides): Promise; + + approve( + _spender: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "approve(address,uint256)"( + _spender: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + totalSupply(overrides?: TransactionOverrides): Promise; + + "totalSupply()"(overrides?: TransactionOverrides): Promise; + + transferFrom( + _from: string, + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "transferFrom(address,address,uint256)"( + _from: string, + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + decimals(overrides?: TransactionOverrides): Promise; + + "decimals()"(overrides?: TransactionOverrides): Promise; + + balanceOf( + _owner: string, + overrides?: TransactionOverrides + ): Promise; + + "balanceOf(address)"( + _owner: string, + overrides?: TransactionOverrides + ): Promise; + + symbol(overrides?: TransactionOverrides): Promise; + + "symbol()"(overrides?: TransactionOverrides): Promise; + + transfer( + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "transfer(address,uint256)"( + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + allowance( + _owner: string, + _spender: string, + overrides?: TransactionOverrides + ): Promise; + + "allowance(address,address)"( + _owner: string, + _spender: string, + overrides?: TransactionOverrides + ): Promise; + }; +} diff --git a/src/contracts/colony/6/factories/IColonyNetwork__factory.ts b/src/contracts/colony/6/factories/IColonyNetwork__factory.ts new file mode 100644 index 000000000..57511a1db --- /dev/null +++ b/src/contracts/colony/6/factories/IColonyNetwork__factory.ts @@ -0,0 +1,1953 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "ethers/providers"; + +import { IColonyNetwork } from "../IColonyNetwork"; + +export class IColonyNetwork__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IColonyNetwork { + return new Contract(address, _abi, signerOrProvider) as IColonyNetwork; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "auction", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "quantity", + type: "uint256", + }, + ], + name: "AuctionCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "colonyId", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "colonyAddress", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + ], + name: "ColonyAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "colony", + type: "address", + }, + { + indexed: false, + internalType: "bytes32", + name: "label", + type: "bytes32", + }, + ], + name: "ColonyLabelRegistered", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "resolver", + type: "address", + }, + ], + name: "ColonyNetworkInitialised", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "version", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "resolver", + type: "address", + }, + ], + name: "ColonyVersionAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "extensionId", + type: "bytes32", + }, + { + indexed: false, + internalType: "uint256", + name: "version", + type: "uint256", + }, + ], + name: "ExtensionAddedToNetwork", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "extensionId", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "colony", + type: "address", + }, + { + indexed: false, + internalType: "bool", + name: "deprecated", + type: "bool", + }, + ], + name: "ExtensionDeprecated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "extensionId", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "colony", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "version", + type: "uint256", + }, + ], + name: "ExtensionInstalled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "extensionId", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "colony", + type: "address", + }, + ], + name: "ExtensionUninstalled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "extensionId", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "colony", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "version", + type: "uint256", + }, + ], + name: "ExtensionUpgraded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "metaColony", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "rootSkillId", + type: "uint256", + }, + ], + name: "MetaColonyCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "miningCycleResolver", + type: "address", + }, + ], + name: "MiningCycleResolverSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "feeInverse", + type: "uint256", + }, + ], + name: "NetworkFeeInverseSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "user", + type: "address", + }, + ], + name: "RecoveryModeEntered", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "user", + type: "address", + }, + ], + name: "RecoveryModeExitApproved", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "user", + type: "address", + }, + ], + name: "RecoveryModeExited", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: false, + internalType: "bool", + name: "setTo", + type: "bool", + }, + ], + name: "RecoveryRoleSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "slot", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes32", + name: "fromValue", + type: "bytes32", + }, + { + indexed: false, + internalType: "bytes32", + name: "toValue", + type: "bytes32", + }, + ], + name: "RecoveryStorageSlotSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "ens", + type: "address", + }, + { + indexed: false, + internalType: "bytes32", + name: "rootNode", + type: "bytes32", + }, + ], + name: "RegistrarInitialised", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "miner", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "tokensLost", + type: "uint256", + }, + ], + name: "ReputationMinerPenalised", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes32", + name: "hash", + type: "bytes32", + }, + { + indexed: false, + internalType: "uint256", + name: "nLeaves", + type: "uint256", + }, + ], + name: "ReputationMiningCycleComplete", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "inactiveReputationMiningCycle", + type: "address", + }, + ], + name: "ReputationMiningInitialised", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "ReputationMiningRewardSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes32", + name: "newHash", + type: "bytes32", + }, + { + indexed: false, + internalType: "uint256", + name: "newNLeaves", + type: "uint256", + }, + { + indexed: false, + internalType: "address[]", + name: "stakers", + type: "address[]", + }, + { + indexed: false, + internalType: "uint256", + name: "reward", + type: "uint256", + }, + ], + name: "ReputationRootHashSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "skillId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "parentSkillId", + type: "uint256", + }, + ], + name: "SkillAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "tokenLocking", + type: "address", + }, + ], + name: "TokenLockingAddressSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "bool", + name: "status", + type: "bool", + }, + ], + name: "TokenWhitelisted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: false, + internalType: "bytes32", + name: "label", + type: "bytes32", + }, + ], + name: "UserLabelRegistered", + type: "event", + }, + { + inputs: [], + name: "approveExitRecovery", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_slot", + type: "uint256", + }, + ], + name: "checkNotAdditionalProtectedVariable", + outputs: [], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "enterRecoveryMode", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "exitRecoveryMode", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "isInRecoveryMode", + outputs: [ + { + internalType: "bool", + name: "inRecoveryMode", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "numRecoveryRoles", + outputs: [ + { + internalType: "uint64", + name: "numRoles", + type: "uint64", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + ], + name: "removeRecoveryRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + ], + name: "setRecoveryRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_slot", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_value", + type: "bytes32", + }, + ], + name: "setStorageSlotRecovery", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceID", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "status", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_reputationMiningCycle", + type: "address", + }, + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "int256", + name: "_amount", + type: "int256", + }, + { + internalType: "uint256", + name: "_skillId", + type: "uint256", + }, + { + internalType: "address", + name: "_colony", + type: "address", + }, + { + internalType: "uint128", + name: "_nUpdates", + type: "uint128", + }, + { + internalType: "uint128", + name: "_nPreviousUpdates", + type: "uint128", + }, + ], + name: "setReplacementReputationUpdateLogEntry", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_reputationMiningCycle", + type: "address", + }, + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + ], + name: "getReplacementReputationUpdateLogEntry", + outputs: [ + { + components: [ + { + internalType: "address", + name: "user", + type: "address", + }, + { + internalType: "int256", + name: "amount", + type: "int256", + }, + { + internalType: "uint256", + name: "skillId", + type: "uint256", + }, + { + internalType: "address", + name: "colony", + type: "address", + }, + { + internalType: "uint128", + name: "nUpdates", + type: "uint128", + }, + { + internalType: "uint128", + name: "nPreviousUpdates", + type: "uint128", + }, + ], + internalType: "struct ColonyNetworkDataTypes.ReputationLogEntry", + name: "reputationLogEntry", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_reputationMiningCycle", + type: "address", + }, + ], + name: "getReplacementReputationUpdateLogsExist", + outputs: [ + { + internalType: "bool", + name: "exists", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getMetaColony", + outputs: [ + { + internalType: "address payable", + name: "colonyAddress", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getColonyCount", + outputs: [ + { + internalType: "uint256", + name: "count", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_colony", + type: "address", + }, + ], + name: "isColony", + outputs: [ + { + internalType: "bool", + name: "addressIsColony", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_parentSkillId", + type: "uint256", + }, + ], + name: "addSkill", + outputs: [ + { + internalType: "uint256", + name: "skillId", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_skillId", + type: "uint256", + }, + ], + name: "getSkill", + outputs: [ + { + components: [ + { + internalType: "uint128", + name: "nParents", + type: "uint128", + }, + { + internalType: "uint128", + name: "nChildren", + type: "uint128", + }, + { + internalType: "uint256[]", + name: "parents", + type: "uint256[]", + }, + { + internalType: "uint256[]", + name: "children", + type: "uint256[]", + }, + { + internalType: "bool", + name: "globalSkill", + type: "bool", + }, + { + internalType: "bool", + name: "deprecated", + type: "bool", + }, + ], + internalType: "struct ColonyNetworkDataTypes.Skill", + name: "skill", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_skillId", + type: "uint256", + }, + ], + name: "deprecateSkill", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "int256", + name: "_amount", + type: "int256", + }, + { + internalType: "uint256", + name: "_skillId", + type: "uint256", + }, + ], + name: "appendReputationUpdateLog", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getSkillCount", + outputs: [ + { + internalType: "uint256", + name: "count", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getReputationMiningSkillId", + outputs: [ + { + internalType: "uint256", + name: "skillId", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_tokenLockingAddress", + type: "address", + }, + ], + name: "setTokenLocking", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getTokenLocking", + outputs: [ + { + internalType: "address", + name: "lockingAddress", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_tokenAddress", + type: "address", + }, + ], + name: "createMetaColony", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_tokenAddress", + type: "address", + }, + ], + name: "createColony", + outputs: [ + { + internalType: "address", + name: "colonyAddress", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_tokenAddress", + type: "address", + }, + { + internalType: "uint256", + name: "_version", + type: "uint256", + }, + { + internalType: "string", + name: "_colonyName", + type: "string", + }, + { + internalType: "string", + name: "_metadata", + type: "string", + }, + ], + name: "createColony", + outputs: [ + { + internalType: "address", + name: "colonyAddress", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_tokenAddress", + type: "address", + }, + { + internalType: "uint256", + name: "_version", + type: "uint256", + }, + { + internalType: "string", + name: "_colonyName", + type: "string", + }, + ], + name: "createColony", + outputs: [ + { + internalType: "address", + name: "colonyAddress", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_tokenAddress", + type: "address", + }, + { + internalType: "uint256", + name: "_version", + type: "uint256", + }, + { + internalType: "string", + name: "_colonyName", + type: "string", + }, + { + internalType: "string", + name: "_orbitdb", + type: "string", + }, + { + internalType: "bool", + name: "_useExtensionManager", + type: "bool", + }, + ], + name: "createColony", + outputs: [ + { + internalType: "address", + name: "colonyAddress", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_version", + type: "uint256", + }, + { + internalType: "address", + name: "_resolver", + type: "address", + }, + ], + name: "addColonyVersion", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_resolver", + type: "address", + }, + { + internalType: "uint256", + name: "_version", + type: "uint256", + }, + ], + name: "initialise", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + ], + name: "getColony", + outputs: [ + { + internalType: "address", + name: "colonyAddress", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getCurrentColonyVersion", + outputs: [ + { + internalType: "uint256", + name: "version", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_skillId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_parentSkillIndex", + type: "uint256", + }, + ], + name: "getParentSkillId", + outputs: [ + { + internalType: "uint256", + name: "skillId", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_skillId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + ], + name: "getChildSkillId", + outputs: [ + { + internalType: "uint256", + name: "skillId", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bool", + name: "_active", + type: "bool", + }, + ], + name: "getReputationMiningCycle", + outputs: [ + { + internalType: "address", + name: "repMiningCycleAddress", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_timeStaked", + type: "uint256", + }, + { + internalType: "uint256", + name: "_submissonIndex", + type: "uint256", + }, + ], + name: "calculateMinerWeight", + outputs: [ + { + internalType: "uint256", + name: "minerWeight", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_version", + type: "uint256", + }, + ], + name: "getColonyVersionResolver", + outputs: [ + { + internalType: "address", + name: "resolverAddress", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "newHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "newNLeaves", + type: "uint256", + }, + { + internalType: "address[]", + name: "stakers", + type: "address[]", + }, + ], + name: "setReputationRootHash", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "newHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "newNLeaves", + type: "uint256", + }, + { + internalType: "address[]", + name: "stakers", + type: "address[]", + }, + { + internalType: "uint256", + name: "reward", + type: "uint256", + }, + ], + name: "setReputationRootHash", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "startNextCycle", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "initialiseReputationMining", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getReputationRootHash", + outputs: [ + { + internalType: "bytes32", + name: "rootHash", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getReputationRootHashNLeaves", + outputs: [ + { + internalType: "uint256", + name: "nLeaves", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getReputationRootHashNNodes", + outputs: [ + { + internalType: "uint256", + name: "nNodes", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "startTokenAuction", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_ens", + type: "address", + }, + { + internalType: "bytes32", + name: "_rootNode", + type: "bytes32", + }, + ], + name: "setupRegistrar", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "username", + type: "string", + }, + { + internalType: "string", + name: "orbitdb", + type: "string", + }, + ], + name: "registerUserLabel", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "colonyName", + type: "string", + }, + { + internalType: "string", + name: "orbitdb", + type: "string", + }, + ], + name: "registerColonyLabel", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "orbitdb", + type: "string", + }, + ], + name: "updateColonyOrbitDB", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "orbitdb", + type: "string", + }, + ], + name: "updateUserOrbitDB", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + ], + name: "getProfileDBAddress", + outputs: [ + { + internalType: "string", + name: "orbitDB", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "addr", + type: "address", + }, + ], + name: "lookupRegisteredENSDomain", + outputs: [ + { + internalType: "string", + name: "domain", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + ], + name: "addr", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getENSRegistrar", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "miningResolverAddress", + type: "address", + }, + ], + name: "setMiningResolver", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getMiningResolver", + outputs: [ + { + internalType: "address", + name: "miningResolverAddress", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "extensionId", + type: "bytes32", + }, + { + internalType: "address", + name: "resolver", + type: "address", + }, + ], + name: "addExtensionToNetwork", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "extensionId", + type: "bytes32", + }, + { + internalType: "uint256", + name: "version", + type: "uint256", + }, + ], + name: "installExtension", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "extensionId", + type: "bytes32", + }, + { + internalType: "uint256", + name: "newVersion", + type: "uint256", + }, + ], + name: "upgradeExtension", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "extensionId", + type: "bytes32", + }, + { + internalType: "bool", + name: "deprecated", + type: "bool", + }, + ], + name: "deprecateExtension", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "extensionId", + type: "bytes32", + }, + ], + name: "uninstallExtension", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "extensionId", + type: "bytes32", + }, + { + internalType: "uint256", + name: "version", + type: "uint256", + }, + ], + name: "getExtensionResolver", + outputs: [ + { + internalType: "address", + name: "resolver", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "extensionId", + type: "bytes32", + }, + { + internalType: "address", + name: "colony", + type: "address", + }, + ], + name: "getExtensionInstallation", + outputs: [ + { + internalType: "address", + name: "installation", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getFeeInverse", + outputs: [ + { + internalType: "uint256", + name: "_feeInverse", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_feeInverse", + type: "uint256", + }, + ], + name: "setFeeInverse", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "getPayoutWhitelist", + outputs: [ + { + internalType: "bool", + name: "status", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "bool", + name: "_status", + type: "bool", + }, + ], + name: "setPayoutWhitelist", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "_stakers", + type: "address[]", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "punishStakers", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "stakeForMining", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "unstakeForMining", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + ], + name: "getMiningStake", + outputs: [ + { + components: [ + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "uint256", + name: "timestamp", + type: "uint256", + }, + ], + internalType: "struct ColonyNetworkDataTypes.MiningStake", + name: "_info", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_recipient", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "reward", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "burnUnneededRewards", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_recipient", + type: "address", + }, + ], + name: "claimMiningReward", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "setReputationMiningCycleReward", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getReputationMiningCycleReward", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, +]; diff --git a/src/contracts/colony/6/factories/IColony__factory.ts b/src/contracts/colony/6/factories/IColony__factory.ts new file mode 100644 index 000000000..517680b5b --- /dev/null +++ b/src/contracts/colony/6/factories/IColony__factory.ts @@ -0,0 +1,4120 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "ethers/providers"; + +import { IColony } from "../IColony"; + +export class IColony__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IColony { + return new Contract(address, _abi, signerOrProvider) as IColony; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: true, + internalType: "bytes32", + name: "txHash", + type: "bytes32", + }, + { + indexed: false, + internalType: "string", + name: "metadata", + type: "string", + }, + ], + name: "Annotation", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: false, + internalType: "address[]", + name: "users", + type: "address[]", + }, + { + indexed: false, + internalType: "int256[]", + name: "amounts", + type: "int256[]", + }, + ], + name: "ColonyBootstrapped", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "fee", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "payoutRemainder", + type: "uint256", + }, + ], + name: "ColonyFundsClaimed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "fromPot", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "toPot", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + ], + name: "ColonyFundsMovedBetweenFundingPots", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "colonyNetwork", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + ], + name: "ColonyInitialised", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: false, + internalType: "string", + name: "metadata", + type: "string", + }, + ], + name: "ColonyMetadata", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "rewardInverse", + type: "uint256", + }, + ], + name: "ColonyRewardInverseSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "domainId", + type: "uint256", + }, + { + indexed: true, + internalType: "uint8", + name: "role", + type: "uint8", + }, + { + indexed: false, + internalType: "bool", + name: "setTo", + type: "bool", + }, + ], + name: "ColonyRoleSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "oldVersion", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newVersion", + type: "uint256", + }, + ], + name: "ColonyUpgraded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "domainId", + type: "uint256", + }, + ], + name: "DomainAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "domainId", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "metadata", + type: "string", + }, + ], + name: "DomainMetadata", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "expenditureId", + type: "uint256", + }, + ], + name: "ExpenditureAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "expenditureId", + type: "uint256", + }, + ], + name: "ExpenditureCancelled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "expenditureId", + type: "uint256", + }, + ], + name: "ExpenditureFinalized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "expenditureId", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "slot", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "ExpenditurePayoutSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "expenditureId", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "slot", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "recipient", + type: "address", + }, + ], + name: "ExpenditureRecipientSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "expenditureId", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "slot", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "skillId", + type: "uint256", + }, + ], + name: "ExpenditureSkillSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "expenditureId", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "ExpenditureTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "fundingPotId", + type: "uint256", + }, + ], + name: "FundingPotAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "paymentId", + type: "uint256", + }, + ], + name: "PaymentAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "paymentId", + type: "uint256", + }, + ], + name: "PaymentFinalized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "paymentId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "PaymentPayoutSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "paymentId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "recipient", + type: "address", + }, + ], + name: "PaymentRecipientSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "paymentId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "skillId", + type: "uint256", + }, + ], + name: "PaymentSkillSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "fundingPotId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "PayoutClaimed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "user", + type: "address", + }, + ], + name: "RecoveryModeEntered", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "user", + type: "address", + }, + ], + name: "RecoveryModeExitApproved", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "user", + type: "address", + }, + ], + name: "RecoveryModeExited", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: false, + internalType: "bool", + name: "setTo", + type: "bool", + }, + ], + name: "RecoveryRoleSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "slot", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes32", + name: "fromValue", + type: "bytes32", + }, + { + indexed: false, + internalType: "bytes32", + name: "toValue", + type: "bytes32", + }, + ], + name: "RecoveryStorageSlotSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "rewardPayoutId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "fee", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "rewardRemainder", + type: "uint256", + }, + ], + name: "RewardPayoutClaimed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "rewardPayoutId", + type: "uint256", + }, + ], + name: "RewardPayoutCycleEnded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "rewardPayoutId", + type: "uint256", + }, + ], + name: "RewardPayoutCycleStarted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "taskId", + type: "uint256", + }, + ], + name: "TaskAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "taskId", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes32", + name: "specificationHash", + type: "bytes32", + }, + ], + name: "TaskBriefSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "taskId", + type: "uint256", + }, + ], + name: "TaskCanceled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address[]", + name: "reviewerAddresses", + type: "address[]", + }, + ], + name: "TaskChangedViaSignatures", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "taskId", + type: "uint256", + }, + ], + name: "TaskCompleted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "taskId", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes32", + name: "deliverableHash", + type: "bytes32", + }, + ], + name: "TaskDeliverableSubmitted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "taskId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "dueDate", + type: "uint256", + }, + ], + name: "TaskDueDateSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "taskId", + type: "uint256", + }, + ], + name: "TaskFinalized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "taskId", + type: "uint256", + }, + { + indexed: false, + internalType: "enum ColonyDataTypes.TaskRole", + name: "role", + type: "uint8", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "TaskPayoutSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "taskId", + type: "uint256", + }, + { + indexed: false, + internalType: "enum ColonyDataTypes.TaskRole", + name: "role", + type: "uint8", + }, + { + indexed: true, + internalType: "address", + name: "user", + type: "address", + }, + ], + name: "TaskRoleUserSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "taskId", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "skillId", + type: "uint256", + }, + ], + name: "TaskSkillSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "taskId", + type: "uint256", + }, + { + indexed: false, + internalType: "enum ColonyDataTypes.TaskRole", + name: "role", + type: "uint8", + }, + { + indexed: false, + internalType: "uint8", + name: "rating", + type: "uint8", + }, + ], + name: "TaskWorkRatingRevealed", + type: "event", + }, + { + anonymous: false, + inputs: [], + name: "TokenUnlocked", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "TokensBurned", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "who", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "TokensMinted", + type: "event", + }, + { + inputs: [], + name: "approveExitRecovery", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_slot", + type: "uint256", + }, + ], + name: "checkNotAdditionalProtectedVariable", + outputs: [], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "enterRecoveryMode", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "exitRecoveryMode", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "isInRecoveryMode", + outputs: [ + { + internalType: "bool", + name: "inRecoveryMode", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "numRecoveryRoles", + outputs: [ + { + internalType: "uint64", + name: "numRoles", + type: "uint64", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + ], + name: "removeRecoveryRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + ], + name: "setRecoveryRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_slot", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_value", + type: "bytes32", + }, + ], + name: "setStorageSlotRecovery", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "authority", + outputs: [ + { + internalType: "address", + name: "colonyAuthority", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "colonyOwner", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "uint256", + name: "colonyVersion", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_newVersion", + type: "uint256", + }, + ], + name: "upgrade", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "finishUpgrade", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getColonyNetwork", + outputs: [ + { + internalType: "address", + name: "colonyNetwork", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getToken", + outputs: [ + { + internalType: "address", + name: "tokenAddress", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_to", + type: "address", + }, + { + internalType: "bytes", + name: "_action", + type: "bytes", + }, + ], + name: "makeArbitraryTransaction", + outputs: [ + { + internalType: "bool", + name: "success", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_txHash", + type: "bytes32", + }, + { + internalType: "string", + name: "_metadata", + type: "string", + }, + ], + name: "annotateTransaction", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "bool", + name: "_setTo", + type: "bool", + }, + ], + name: "setRootRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "bool", + name: "_setTo", + type: "bool", + }, + ], + name: "setArbitrationRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "bool", + name: "_setTo", + type: "bool", + }, + ], + name: "setArchitectureRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "bool", + name: "_setTo", + type: "bool", + }, + ], + name: "setFundingRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "bool", + name: "_setTo", + type: "bool", + }, + ], + name: "setAdministrationRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_roles", + type: "bytes32", + }, + ], + name: "setUserRoles", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "enum ColonyDataTypes.ColonyRole", + name: "_role", + type: "uint8", + }, + ], + name: "hasUserRole", + outputs: [ + { + internalType: "bool", + name: "hasRole", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "enum ColonyDataTypes.ColonyRole", + name: "_role", + type: "uint8", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childDomainId", + type: "uint256", + }, + ], + name: "hasInheritedUserRole", + outputs: [ + { + internalType: "bool", + name: "hasRole", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childDomainId", + type: "uint256", + }, + ], + name: "userCanSetRoles", + outputs: [ + { + internalType: "bool", + name: "canSet", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "uint256", + name: "_domain", + type: "uint256", + }, + ], + name: "getUserRoles", + outputs: [ + { + internalType: "bytes32", + name: "roles", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "_sig", + type: "bytes4", + }, + ], + name: "getCapabilityRoles", + outputs: [ + { + internalType: "bytes32", + name: "roles", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "int256", + name: "_amount", + type: "int256", + }, + ], + name: "emitDomainReputationReward", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_skillId", + type: "uint256", + }, + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "int256", + name: "_amount", + type: "int256", + }, + ], + name: "emitSkillReputationReward", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "int256", + name: "_amount", + type: "int256", + }, + ], + name: "emitDomainReputationPenalty", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_skillId", + type: "uint256", + }, + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "int256", + name: "_amount", + type: "int256", + }, + ], + name: "emitSkillReputationPenalty", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_colonyNetworkAddress", + type: "address", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "initialiseColony", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_metadata", + type: "string", + }, + ], + name: "editColony", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "_users", + type: "address[]", + }, + { + internalType: "int256[]", + name: "_amount", + type: "int256[]", + }, + ], + name: "bootstrapColony", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_wad", + type: "uint256", + }, + ], + name: "mintTokens", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_guy", + type: "address", + }, + { + internalType: "uint256", + name: "_wad", + type: "uint256", + }, + ], + name: "mintTokensFor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "lockToken", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "user", + type: "address", + }, + { + internalType: "uint256", + name: "lockId", + type: "uint256", + }, + ], + name: "unlockTokenForUser", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "colonyName", + type: "string", + }, + { + internalType: "string", + name: "orbitdb", + type: "string", + }, + ], + name: "registerColonyLabel", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "orbitdb", + type: "string", + }, + ], + name: "updateColonyOrbitDB", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "extensionId", + type: "bytes32", + }, + { + internalType: "uint256", + name: "version", + type: "uint256", + }, + ], + name: "installExtension", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "extensionId", + type: "bytes32", + }, + { + internalType: "uint256", + name: "newVersion", + type: "uint256", + }, + ], + name: "upgradeExtension", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "extensionId", + type: "bytes32", + }, + { + internalType: "bool", + name: "deprecated", + type: "bool", + }, + ], + name: "deprecateExtension", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "extensionId", + type: "bytes32", + }, + ], + name: "uninstallExtension", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_parentDomainId", + type: "uint256", + }, + ], + name: "addDomain", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_parentDomainId", + type: "uint256", + }, + { + internalType: "string", + name: "_metadata", + type: "string", + }, + ], + name: "addDomain", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "string", + name: "_metadata", + type: "string", + }, + ], + name: "editDomain", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + ], + name: "getDomain", + outputs: [ + { + components: [ + { + internalType: "uint256", + name: "skillId", + type: "uint256", + }, + { + internalType: "uint256", + name: "fundingPotId", + type: "uint256", + }, + ], + internalType: "struct ColonyDataTypes.Domain", + name: "domain", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getDomainCount", + outputs: [ + { + internalType: "uint256", + name: "count", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "key", + type: "bytes", + }, + { + internalType: "bytes", + name: "value", + type: "bytes", + }, + { + internalType: "uint256", + name: "branchMask", + type: "uint256", + }, + { + internalType: "bytes32[]", + name: "siblings", + type: "bytes32[]", + }, + ], + name: "verifyReputationProof", + outputs: [ + { + internalType: "bool", + name: "isValid", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + ], + name: "makeExpenditure", + outputs: [ + { + internalType: "uint256", + name: "expenditureId", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "address", + name: "_newOwner", + type: "address", + }, + ], + name: "transferExpenditure", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "address", + name: "_newOwner", + type: "address", + }, + ], + name: "transferExpenditureViaArbitration", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + ], + name: "cancelExpenditure", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + ], + name: "finalizeExpenditure", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "uint256", + name: "_slot", + type: "uint256", + }, + { + internalType: "address payable", + name: "_recipient", + type: "address", + }, + ], + name: "setExpenditureRecipient", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "uint256", + name: "_slot", + type: "uint256", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "setExpenditurePayout", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "uint256", + name: "_slot", + type: "uint256", + }, + { + internalType: "uint256", + name: "_skillId", + type: "uint256", + }, + ], + name: "setExpenditureSkill", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "uint256", + name: "_slot", + type: "uint256", + }, + { + internalType: "int256", + name: "_payoutModifier", + type: "int256", + }, + ], + name: "setExpenditurePayoutModifier", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "uint256", + name: "_slot", + type: "uint256", + }, + { + internalType: "uint256", + name: "_claimDelay", + type: "uint256", + }, + ], + name: "setExpenditureClaimDelay", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "uint256", + name: "_storageSlot", + type: "uint256", + }, + { + internalType: "bool[]", + name: "_mask", + type: "bool[]", + }, + { + internalType: "bytes32[]", + name: "_keys", + type: "bytes32[]", + }, + { + internalType: "bytes32", + name: "_value", + type: "bytes32", + }, + ], + name: "setExpenditureState", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "uint256", + name: "_slot", + type: "uint256", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "claimExpenditurePayout", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getExpenditureCount", + outputs: [ + { + internalType: "uint256", + name: "count", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + ], + name: "getExpenditure", + outputs: [ + { + components: [ + { + internalType: "enum ColonyDataTypes.ExpenditureStatus", + name: "status", + type: "uint8", + }, + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "uint256", + name: "fundingPotId", + type: "uint256", + }, + { + internalType: "uint256", + name: "domainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "finalizedTimestamp", + type: "uint256", + }, + { + internalType: "uint256", + name: "globalClaimDelay", + type: "uint256", + }, + ], + internalType: "struct ColonyDataTypes.Expenditure", + name: "expenditure", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "uint256", + name: "_slot", + type: "uint256", + }, + ], + name: "getExpenditureSlot", + outputs: [ + { + components: [ + { + internalType: "address payable", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "claimDelay", + type: "uint256", + }, + { + internalType: "int256", + name: "payoutModifier", + type: "int256", + }, + { + internalType: "uint256[]", + name: "skills", + type: "uint256[]", + }, + ], + internalType: "struct ColonyDataTypes.ExpenditureSlot", + name: "expenditureSlot", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "uint256", + name: "_slot", + type: "uint256", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "getExpenditureSlotPayout", + outputs: [ + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "address payable", + name: "_recipient", + type: "address", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_skillId", + type: "uint256", + }, + ], + name: "addPayment", + outputs: [ + { + internalType: "uint256", + name: "paymentId", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + ], + name: "finalizePayment", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "address payable", + name: "_recipient", + type: "address", + }, + ], + name: "setPaymentRecipient", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "uint256", + name: "_skillId", + type: "uint256", + }, + ], + name: "setPaymentSkill", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "setPaymentPayout", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + ], + name: "getPayment", + outputs: [ + { + components: [ + { + internalType: "address payable", + name: "recipient", + type: "address", + }, + { + internalType: "bool", + name: "finalized", + type: "bool", + }, + { + internalType: "uint256", + name: "fundingPotId", + type: "uint256", + }, + { + internalType: "uint256", + name: "domainId", + type: "uint256", + }, + { + internalType: "uint256[]", + name: "skills", + type: "uint256[]", + }, + ], + internalType: "struct ColonyDataTypes.Payment", + name: "payment", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "claimPayment", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getPaymentCount", + outputs: [ + { + internalType: "uint256", + name: "count", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_specificationHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_skillId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_dueDate", + type: "uint256", + }, + ], + name: "makeTask", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getTaskCount", + outputs: [ + { + internalType: "uint256", + name: "count", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + ], + name: "getTaskChangeNonce", + outputs: [ + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint8[]", + name: "_sigV", + type: "uint8[]", + }, + { + internalType: "bytes32[]", + name: "_sigR", + type: "bytes32[]", + }, + { + internalType: "bytes32[]", + name: "_sigS", + type: "bytes32[]", + }, + { + internalType: "uint8[]", + name: "_mode", + type: "uint8[]", + }, + { + internalType: "uint256", + name: "_value", + type: "uint256", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", + }, + ], + name: "executeTaskChange", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint8[]", + name: "_sigV", + type: "uint8[]", + }, + { + internalType: "bytes32[]", + name: "_sigR", + type: "bytes32[]", + }, + { + internalType: "bytes32[]", + name: "_sigS", + type: "bytes32[]", + }, + { + internalType: "uint8[]", + name: "_mode", + type: "uint8[]", + }, + { + internalType: "uint256", + name: "_value", + type: "uint256", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", + }, + ], + name: "executeTaskRoleAssignment", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "uint8", + name: "_role", + type: "uint8", + }, + { + internalType: "bytes32", + name: "_ratingSecret", + type: "bytes32", + }, + ], + name: "submitTaskWorkRating", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "uint8", + name: "_role", + type: "uint8", + }, + { + internalType: "uint8", + name: "_rating", + type: "uint8", + }, + { + internalType: "bytes32", + name: "_salt", + type: "bytes32", + }, + ], + name: "revealTaskWorkRating", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_salt", + type: "bytes32", + }, + { + internalType: "uint256", + name: "_value", + type: "uint256", + }, + ], + name: "generateSecret", + outputs: [ + { + internalType: "bytes32", + name: "secret", + type: "bytes32", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + ], + name: "getTaskWorkRatingSecretsInfo", + outputs: [ + { + internalType: "uint256", + name: "nSecrets", + type: "uint256", + }, + { + internalType: "uint256", + name: "lastSubmittedAt", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "uint8", + name: "_role", + type: "uint8", + }, + ], + name: "getTaskWorkRatingSecret", + outputs: [ + { + internalType: "bytes32", + name: "secret", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "address payable", + name: "_user", + type: "address", + }, + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + ], + name: "setTaskManagerRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "address payable", + name: "_user", + type: "address", + }, + ], + name: "setTaskEvaluatorRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "address payable", + name: "_user", + type: "address", + }, + ], + name: "setTaskWorkerRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + ], + name: "removeTaskEvaluatorRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + ], + name: "removeTaskWorkerRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "uint256", + name: "_skillId", + type: "uint256", + }, + ], + name: "setTaskSkill", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_specificationHash", + type: "bytes32", + }, + ], + name: "setTaskBrief", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "uint256", + name: "_dueDate", + type: "uint256", + }, + ], + name: "setTaskDueDate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_deliverableHash", + type: "bytes32", + }, + ], + name: "submitTaskDeliverable", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_deliverableHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "_ratingSecret", + type: "bytes32", + }, + ], + name: "submitTaskDeliverableAndRating", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + ], + name: "finalizeTask", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + ], + name: "cancelTask", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + ], + name: "completeTask", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + ], + name: "getTask", + outputs: [ + { + internalType: "bytes32", + name: "specificationHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "deliverableHash", + type: "bytes32", + }, + { + internalType: "enum ColonyDataTypes.TaskStatus", + name: "status", + type: "uint8", + }, + { + internalType: "uint256", + name: "dueDate", + type: "uint256", + }, + { + internalType: "uint256", + name: "fundingPotId", + type: "uint256", + }, + { + internalType: "uint256", + name: "completionTimestamp", + type: "uint256", + }, + { + internalType: "uint256", + name: "domainId", + type: "uint256", + }, + { + internalType: "uint256[]", + name: "skillIds", + type: "uint256[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "uint8", + name: "_role", + type: "uint8", + }, + ], + name: "getTaskRole", + outputs: [ + { + components: [ + { + internalType: "address payable", + name: "user", + type: "address", + }, + { + internalType: "bool", + name: "rateFail", + type: "bool", + }, + { + internalType: "enum ColonyDataTypes.TaskRatings", + name: "rating", + type: "uint8", + }, + ], + internalType: "struct ColonyDataTypes.Role", + name: "role", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_rewardInverse", + type: "uint256", + }, + ], + name: "setRewardInverse", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getRewardInverse", + outputs: [ + { + internalType: "uint256", + name: "rewardInverse", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "uint8", + name: "_role", + type: "uint8", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "getTaskPayout", + outputs: [ + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "setTaskManagerPayout", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "setTaskEvaluatorPayout", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "setTaskWorkerPayout", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "uint256", + name: "_managerAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "_evaluatorAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "_workerAmount", + type: "uint256", + }, + ], + name: "setAllTaskPayouts", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "uint8", + name: "_role", + type: "uint8", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "claimTaskPayout", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "bytes", + name: "key", + type: "bytes", + }, + { + internalType: "bytes", + name: "value", + type: "bytes", + }, + { + internalType: "uint256", + name: "branchMask", + type: "uint256", + }, + { + internalType: "bytes32[]", + name: "siblings", + type: "bytes32[]", + }, + ], + name: "startNextRewardPayout", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_payoutId", + type: "uint256", + }, + { + internalType: "uint256[7]", + name: "_squareRoots", + type: "uint256[7]", + }, + { + internalType: "bytes", + name: "key", + type: "bytes", + }, + { + internalType: "bytes", + name: "value", + type: "bytes", + }, + { + internalType: "uint256", + name: "branchMask", + type: "uint256", + }, + { + internalType: "bytes32[]", + name: "siblings", + type: "bytes32[]", + }, + ], + name: "claimRewardPayout", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_payoutId", + type: "uint256", + }, + ], + name: "getRewardPayoutInfo", + outputs: [ + { + components: [ + { + internalType: "bytes32", + name: "reputationState", + type: "bytes32", + }, + { + internalType: "uint256", + name: "colonyWideReputation", + type: "uint256", + }, + { + internalType: "uint256", + name: "totalTokens", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "address", + name: "tokenAddress", + type: "address", + }, + { + internalType: "uint256", + name: "blockTimestamp", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountRemaining", + type: "uint256", + }, + { + internalType: "bool", + name: "finalized", + type: "bool", + }, + ], + internalType: "struct ColonyDataTypes.RewardPayoutCycle", + name: "rewardPayoutCycle", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_payoutId", + type: "uint256", + }, + ], + name: "finalizeRewardPayout", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + ], + name: "getFundingPot", + outputs: [ + { + internalType: "enum ColonyDataTypes.FundingPotAssociatedType", + name: "associatedType", + type: "uint8", + }, + { + internalType: "uint256", + name: "associatedTypeId", + type: "uint256", + }, + { + internalType: "uint256", + name: "payoutsWeCannotMake", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getFundingPotCount", + outputs: [ + { + internalType: "uint256", + name: "count", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_potId", + type: "uint256", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "getFundingPotBalance", + outputs: [ + { + internalType: "uint256", + name: "balance", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_potId", + type: "uint256", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "getFundingPotPayout", + outputs: [ + { + internalType: "uint256", + name: "payout", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_fromChildSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_toChildSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_fromPot", + type: "uint256", + }, + { + internalType: "uint256", + name: "_toPot", + type: "uint256", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "moveFundsBetweenPots", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "claimColonyFunds", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "getNonRewardPotsTotal", + outputs: [ + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_approvee", + type: "address", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "approveStake", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "obligateStake", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "deobligateStake", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "address", + name: "_obligator", + type: "address", + }, + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "address", + name: "_recipient", + type: "address", + }, + ], + name: "transferStake", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "address", + name: "_obligator", + type: "address", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + ], + name: "getApproval", + outputs: [ + { + internalType: "uint256", + name: "approval", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "address", + name: "_obligator", + type: "address", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + ], + name: "getObligation", + outputs: [ + { + internalType: "uint256", + name: "obligation", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_fundingPotId", + type: "uint256", + }, + ], + name: "getDomainFromFundingPot", + outputs: [ + { + internalType: "uint256", + name: "domainId", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "burnTokens", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "unlockToken", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; diff --git a/src/contracts/colony/6/factories/TokenERC20__factory.ts b/src/contracts/colony/6/factories/TokenERC20__factory.ts new file mode 100644 index 000000000..dc1d83452 --- /dev/null +++ b/src/contracts/colony/6/factories/TokenERC20__factory.ts @@ -0,0 +1,240 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "ethers/providers"; + +import { TokenERC20 } from "../TokenERC20"; + +export class TokenERC20__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): TokenERC20 { + return new Contract(address, _abi, signerOrProvider) as TokenERC20; + } +} + +const _abi = [ + { + constant: true, + inputs: [], + name: "name", + outputs: [ + { + name: "", + type: "string", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "_spender", + type: "address", + }, + { + name: "_value", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "totalSupply", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "_from", + type: "address", + }, + { + name: "_to", + type: "address", + }, + { + name: "_value", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "decimals", + outputs: [ + { + name: "", + type: "uint8", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + name: "_owner", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + name: "balance", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "symbol", + outputs: [ + { + name: "", + type: "string", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "_to", + type: "address", + }, + { + name: "_value", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [ + { + name: "_owner", + type: "address", + }, + { + name: "_spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + payable: true, + stateMutability: "payable", + type: "fallback", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "owner", + type: "address", + }, + { + indexed: true, + name: "spender", + type: "address", + }, + { + indexed: false, + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "from", + type: "address", + }, + { + indexed: true, + name: "to", + type: "address", + }, + { + indexed: false, + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, +]; diff --git a/src/contracts/colony/6/factories/TokenLocking__factory.ts b/src/contracts/colony/6/factories/TokenLocking__factory.ts new file mode 100644 index 000000000..12e2f3f56 --- /dev/null +++ b/src/contracts/colony/6/factories/TokenLocking__factory.ts @@ -0,0 +1,769 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, ContractFactory, Signer } from "ethers"; +import { Provider } from "ethers/providers"; +import { UnsignedTransaction } from "ethers/utils/transaction"; + +import { TransactionOverrides } from ".."; +import { TokenLocking } from "../TokenLocking"; + +export class TokenLocking__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy(overrides?: TransactionOverrides): Promise { + return super.deploy(overrides) as Promise; + } + getDeployTransaction(overrides?: TransactionOverrides): UnsignedTransaction { + return super.getDeployTransaction(overrides); + } + attach(address: string): TokenLocking { + return super.attach(address) as TokenLocking; + } + connect(signer: Signer): TokenLocking__factory { + return super.connect(signer) as TokenLocking__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): TokenLocking { + return new Contract(address, _abi, signerOrProvider) as TokenLocking; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "colonyNetwork", + type: "address", + }, + ], + name: "ColonyNetworkSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "authority", + type: "address", + }, + ], + name: "LogSetAuthority", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "LogSetOwner", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "lockedBy", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "lockCount", + type: "uint256", + }, + ], + name: "TokenLocked", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "UserTokenClaimed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "UserTokenDeposited", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "recipient", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "UserTokenTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "lockId", + type: "uint256", + }, + ], + name: "UserTokenUnlocked", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "UserTokenWithdrawn", + type: "event", + }, + { + inputs: [], + name: "authority", + outputs: [ + { + internalType: "contract DSAuthority", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract DSAuthority", + name: "authority_", + type: "address", + }, + ], + name: "setAuthority", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner_", + type: "address", + }, + ], + name: "setOwner", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_colonyNetwork", + type: "address", + }, + ], + name: "setColonyNetwork", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getColonyNetwork", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "lockToken", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "uint256", + name: "_lockId", + type: "uint256", + }, + ], + name: "unlockTokenForUser", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "uint256", + name: "_lockId", + type: "uint256", + }, + ], + name: "incrementLockCounterTo", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "bool", + name: "_force", + type: "bool", + }, + ], + name: "deposit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "deposit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "address", + name: "_recipient", + type: "address", + }, + ], + name: "depositFor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "address", + name: "_recipient", + type: "address", + }, + { + internalType: "bool", + name: "_force", + type: "bool", + }, + ], + name: "transfer", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "bool", + name: "_force", + type: "bool", + }, + ], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "approveStake", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "obligateStake", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "deobligateStake", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "address", + name: "_recipient", + type: "address", + }, + ], + name: "transferStake", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_recipient", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "reward", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "getTotalLockCount", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "address", + name: "_user", + type: "address", + }, + ], + name: "getUserLock", + outputs: [ + { + components: [ + { + internalType: "uint256", + name: "lockCount", + type: "uint256", + }, + { + internalType: "uint256", + name: "balance", + type: "uint256", + }, + { + internalType: "uint256", + name: "DEPRECATED_timestamp", + type: "uint256", + }, + { + internalType: "uint256", + name: "pendingBalance", + type: "uint256", + }, + ], + internalType: "struct TokenLockingDataTypes.Lock", + name: "lock", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "getTotalObligation", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "address", + name: "_obligator", + type: "address", + }, + ], + name: "getApproval", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "address", + name: "_obligator", + type: "address", + }, + ], + name: "getObligation", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, +]; + +const _bytecode = + "0x608060405234801561001057600080fd5b50600180546001600160a01b031916339081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a2611fae8061005e6000396000f3fe608060405234801561001057600080fd5b50600436106101725760003560e01c80635afd5341116100de578063bf50382311610097578063e49d7ebd11610071578063e49d7ebd14610317578063ead5d3591461032a578063f3fef3a31461033d578063f75312811461035057610172565b8063bf503823146102e9578063bf7e214f146102fc578063c8820f6c1461030457610172565b80635afd53411461028257806361ac1990146102955780636d7bd889146102a85780637a9e5e4b146102bb5780638da5cb5b146102ce57806393c45535146102d657610172565b806321670f221161013057806321670f221461020e5780632c822a0d146102215780633edd11281461023457806343af70a41461024757806347e7ef241461025a5780634e5e83951461026d57610172565b80626ad1001461017757806303e27b42146101a057806310693fcd146101b557806313af4035146101c85780631ca55574146101db5780631cc17c52146101ee575b600080fd5b61018a6101853660046118e8565b610363565b6040516101979190611f49565b60405180910390f35b6101b36101ae3660046118c5565b610390565b005b61018a6101c33660046118c5565b610447565b6101b36101d63660046118c5565b61059d565b61018a6101e93660046118c5565b61061f565b6102016101fc3660046118e8565b61063a565b6040516101979190611f1e565b6101b361021c3660046119aa565b61069d565b61018a61022f366004611920565b6106a1565b6101b3610242366004611aa4565b6106d6565b6101b36102553660046119d5565b610873565b6101b36102683660046119aa565b6109db565b6102756109e7565b6040516101979190611af6565b6101b3610290366004611a0b565b6109f6565b6101b36102a33660046119d5565b610b8d565b6101b36102b636600461196a565b610cad565b6101b36102c93660046118c5565b610eb5565b610275610f33565b6101b36102e4366004611a5d565b610f42565b6101b36102f73660046119aa565b61108c565b610275611119565b6101b36103123660046119d5565b611128565b6101b36103253660046119d5565b61123a565b6101b3610338366004611aa4565b61142f565b6101b361034b3660046119aa565b611607565b61018a61035e366004611920565b611613565b6001600160a01b038083166000908152600860209081526040808320938516835292905220545b92915050565b6103a6336000356001600160e01b031916611648565b6103cb5760405162461bcd60e51b81526004016103c290611c18565b60405180910390fd5b6001600160a01b0381166103f15760405162461bcd60e51b81526004016103c290611bcd565b600380546001600160a01b0319166001600160a01b0383161790556040517faac08694cb36f6250aa0c27b058ab1542ec8a9289c0a3af21af36cdfaf1b46cc9061043c908390611af6565b60405180910390a150565b6003546000906001600160a01b03163314806104de575060035460405163db0dd7ff60e01b81526001600160a01b039091169063db0dd7ff9061048e903390600401611af6565b60206040518083038186803b1580156104a657600080fd5b505afa1580156104ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104de9190611ada565b6104fa5760405162461bcd60e51b81526004016103c290611c46565b6001600160a01b0382166000818152600560208181526040808420805460010180825560098452828620908652835281852080546001600160a01b031916339081179091559486905292909152905490519192917f991b8e8a2e2b8ff515f7045174eeb52eb4868e69c5bb4259da6146a93c77574d9161057991611f49565b60405180910390a3506001600160a01b031660009081526005602052604090205490565b6105b3336000356001600160e01b031916611648565b6105cf5760405162461bcd60e51b81526004016103c290611c18565b600180546001600160a01b0319166001600160a01b0383811691909117918290556040519116907fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b6001600160a01b031660009081526005602052604090205490565b61064261189d565b506001600160a01b039182166000908152600460209081526040808320939094168252918252829020825160808101845281548152600182015492810192909252600281015492820192909252600390910154606082015290565b5050565b6001600160a01b0392831660009081526007602090815260408083209486168352938152838220929094168152925290205490565b8281801561070c576001600160a01b03821660009081526005602090815260408083205460048352818420338552909252909120555b6107168233611724565b6107325760405162461bcd60e51b81526004016103c290611cc5565b6001600160a01b0385166000908152600460209081526040808320338452909152902060018101546107649086611757565b6001820155831561078e5761078181600101548260030154611757565b6001820155600060038201555b6040516323b872dd60e01b81526001600160a01b038716906323b872dd906107be90339030908a90600401611b0a565b602060405180830381600087803b1580156107d857600080fd5b505af11580156107ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108109190611ada565b61082c5760405162461bcd60e51b81526004016103c290611e46565b7fd783236f9ce1a99ac7489d26331b958d099f7895331d5c91777389e01a73cda98633836001015460405161086393929190611b0a565b60405180910390a1505050505050565b6003546001600160a01b0316331480610907575060035460405163db0dd7ff60e01b81526001600160a01b039091169063db0dd7ff906108b7903390600401611af6565b60206040518083038186803b1580156108cf57600080fd5b505afa1580156108e3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109079190611ada565b6109235760405162461bcd60e51b81526004016103c290611c46565b6001600160a01b03808416600090815260076020908152604080832093851683529281528282203383529052205461095b908361177a565b6001600160a01b0380851660008181526007602090815260408083209487168084529482528083203384528252808320959095559181526008825283812092815291905220546109ab908361177a565b6001600160a01b039384166000908152600860209081526040808320949096168252929092529290209190915550565b61069d828260006106d6565b6003546001600160a01b031690565b6003546001600160a01b0316331480610a8a575060035460405163db0dd7ff60e01b81526001600160a01b039091169063db0dd7ff90610a3a903390600401611af6565b60206040518083038186803b158015610a5257600080fd5b505afa158015610a66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8a9190611ada565b610aa65760405162461bcd60e51b81526004016103c290611c46565b6001600160a01b038085166000908152600760209081526040808320938616835292815282822033835290522054610ade908461177a565b6001600160a01b038086166000818152600760209081526040808320948816808452948252808320338452825280832095909555918152600882528381209281529190522054610b2e908461177a565b6001600160a01b03808616600081815260086020908152604080832094881683529381528382209490945560048452828120918152925290206001810154610b76908561177a565b6001820155610b8683858461179d565b5050505050565b6003546001600160a01b0316331480610c21575060035460405163db0dd7ff60e01b81526001600160a01b039091169063db0dd7ff90610bd1903390600401611af6565b60206040518083038186803b158015610be957600080fd5b505afa158015610bfd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c219190611ada565b610c3d5760405162461bcd60e51b81526004016103c290611c46565b6001600160a01b038084166000908152600660209081526040808320938516835292815282822033835290522054610c759083611757565b6001600160a01b0393841660009081526006602090815260408083209490961682529283528481203382529092529290209190915550565b6003546001600160a01b0316331480610d41575060035460405163db0dd7ff60e01b81526001600160a01b039091169063db0dd7ff90610cf1903390600401611af6565b60206040518083038186803b158015610d0957600080fd5b505afa158015610d1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d419190611ada565b610d5d5760405162461bcd60e51b81526004016103c290611c46565b6001600160a01b038381166000908152600960209081526040808320858452909152902054163314610da15760405162461bcd60e51b81526004016103c290611d4a565b6001600160a01b038316600090815260056020526040902054811115610dd95760405162461bcd60e51b81526004016103c290611dca565b6001600160a01b038084166000908152600460209081526040808320938616835292905290812054610e0c90839061177a565b905080610e2b5760405162461bcd60e51b81526004016103c290611e01565b80600114610e4b5760405162461bcd60e51b81526004016103c290611ed0565b6001600160a01b0380851660009081526004602090815260408083209387168352929052819020839055517f66d1ba6a7bba8a64b1341777e1e7721371ab2824e4b50ec33c687036451fe7f090610ea790869086908690611b0a565b60405180910390a150505050565b610ecb336000356001600160e01b031916611648565b610ee75760405162461bcd60e51b81526004016103c290611c18565b600080546001600160a01b0319166001600160a01b03838116919091178083556040519116917f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada491a250565b6001546001600160a01b031681565b3360008181526008602090815260408083206001600160a01b0389168452825280832054600483528184209484529390915290206001015485918591610f88908361177a565b1015610fa65760405162461bcd60e51b81526004016103c290611e8a565b85838015610fdc576001600160a01b03821660009081526005602090815260408083205460048352818420338552909252909120555b610fe68233611724565b6110025760405162461bcd60e51b81526004016103c290611cc5565b6001600160a01b038816600090815260046020908152604080832033845290915290206001810154611034908961177a565b600182015561104489898961179d565b7fb8c56c2a9387492995ba191019b63a38d5ce068bd9fe02315cbe2600d561dc398933898b6040516110799493929190611b47565b60405180910390a1505050505050505050565b6001600160a01b03821660009081526005602052604090205481118015906110d657506001600160a01b038216600090815260046020908152604080832033845290915290205481115b6110f25760405162461bcd60e51b81526004016103c290611d06565b6001600160a01b039091166000908152600460209081526040808320338452909152902055565b6000546001600160a01b031681565b6040516323b872dd60e01b81526001600160a01b038416906323b872dd9061115890339030908790600401611b0a565b602060405180830381600087803b15801561117257600080fd5b505af1158015611186573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111aa9190611ada565b6111c65760405162461bcd60e51b81526004016103c290611e46565b6111d183838361179d565b6001600160a01b03808416600090815260046020908152604080832093851683529290528190206001015490517fd783236f9ce1a99ac7489d26331b958d099f7895331d5c91777389e01a73cda99161122d9186918591611b0a565b60405180910390a1505050565b6003546001600160a01b03163314806112ce575060035460405163db0dd7ff60e01b81526001600160a01b039091169063db0dd7ff9061127e903390600401611af6565b60206040518083038186803b15801561129657600080fd5b505afa1580156112aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112ce9190611ada565b6112ea5760405162461bcd60e51b81526004016103c290611c46565b6001600160a01b038084166000908152600660209081526040808320938516835292815282822033835290522054611322908361177a565b6001600160a01b0380851660008181526006602090815260408083209487168084529482528083203380855290835281842096909655928252600781528282209382529283528181209381529290915290205461137f9083611757565b6001600160a01b0380851660008181526007602090815260408083209487168084529482528083203384528252808320959095559181526008825283812092815291905220546113cf9083611757565b6001600160a01b038481166000818152600860209081526040808320948716835293815283822085905560048152838220928252919091522060010154101561142a5760405162461bcd60e51b81526004016103c290611d81565b505050565b3360008181526008602090815260408083206001600160a01b0388168452825280832054600483528184209484529390915290206001015484918491611475908361177a565b10156114935760405162461bcd60e51b81526004016103c290611e8a565b848380156114c9576001600160a01b03821660009081526005602090815260408083205460048352818420338552909252909120555b6114d38233611724565b6114ef5760405162461bcd60e51b81526004016103c290611cc5565b6001600160a01b038716600090815260046020908152604080832033845290915290206001810154611521908861177a565b600182015560405163a9059cbb60e01b81526001600160a01b0389169063a9059cbb906115549033908b90600401611b2e565b602060405180830381600087803b15801561156e57600080fd5b505af1158015611582573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a69190611ada565b6115c25760405162461bcd60e51b81526004016103c290611e46565b7f01e2c71b014f62b55400e8becdca80c6a907b5cc36c7a5789443c3ed5e5799278833896040516115f593929190611b0a565b60405180910390a15050505050505050565b61069d8282600061142f565b6001600160a01b0392831660009081526006602090815260408083209486168352938152838220929094168152925290205490565b60006001600160a01b0383163014156116635750600161038a565b6001546001600160a01b03848116911614156116815750600161038a565b6000546001600160a01b03166116995750600061038a565b60005460405163b700961360e01b81526001600160a01b039091169063b7009613906116cd90869030908790600401611b71565b60206040518083038186803b1580156116e557600080fd5b505afa1580156116f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061171d9190611ada565b905061038a565b6001600160a01b039182166000908152600560209081526040808320546004835281842094909516835292905220541490565b8082018281101561038a5760405162461bcd60e51b81526004016103c290611c97565b8082038281111561038a5760405162461bcd60e51b81526004016103c290611b9e565b6001600160a01b0380841660009081526004602090815260408083209385168352929052206117cc8483611724565b156117e9576117df816001015484611757565b6001820155611897565b60405163a9059cbb60e01b81526001600160a01b0385169063a9059cbb906118179085908790600401611b2e565b602060405180830381600087803b15801561183157600080fd5b505af1925050508015611861575060408051601f3d908101601f1916820190925261185e91810190611ada565b60015b61187d57611873816003015484611757565b6003820155611897565b80610b8657611890826003015485611757565b6003830155505b50505050565b6040518060800160405280600081526020016000815260200160008152602001600081525090565b6000602082840312156118d6578081fd5b81356118e181611f52565b9392505050565b600080604083850312156118fa578081fd5b823561190581611f52565b9150602083013561191581611f52565b809150509250929050565b600080600060608486031215611934578081fd5b833561193f81611f52565b9250602084013561194f81611f52565b9150604084013561195f81611f52565b809150509250925092565b60008060006060848603121561197e578283fd5b833561198981611f52565b9250602084013561199981611f52565b929592945050506040919091013590565b600080604083850312156119bc578182fd5b82356119c781611f52565b946020939093013593505050565b6000806000606084860312156119e9578283fd5b83356119f481611f52565b925060208401359150604084013561195f81611f52565b60008060008060808587031215611a20578081fd5b8435611a2b81611f52565b9350602085013592506040850135611a4281611f52565b91506060850135611a5281611f52565b939692955090935050565b60008060008060808587031215611a72578384fd5b8435611a7d81611f52565b9350602085013592506040850135611a9481611f52565b91506060850135611a5281611f6a565b600080600060608486031215611ab8578283fd5b8335611ac381611f52565b925060208401359150604084013561195f81611f6a565b600060208284031215611aeb578081fd5b81516118e181611f6a565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039485168152928416602084015292166040820152606081019190915260800190565b6001600160a01b0393841681529190921660208201526001600160e01b0319909116604082015260600190565b60208082526015908201527464732d6d6174682d7375622d756e646572666c6f7760581b604082015260600190565b6020808252602b908201527f636f6c6f6e792d746f6b656e2d6c6f636b696e672d6e6574776f726b2d63616e60408201526a6e6f742d62652d7a65726f60a81b606082015260800190565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b60208082526031908201527f636f6c6f6e792d746f6b656e2d6c6f636b696e672d73656e6465722d6e6f742d604082015270636f6c6f6e792d6f722d6e6574776f726b60781b606082015260800190565b60208082526014908201527364732d6d6174682d6164642d6f766572666c6f7760601b604082015260600190565b60208082526021908201527f636f6c6f6e792d746f6b656e2d6c6f636b696e672d746f6b656e2d6c6f636b656040820152601960fa1b606082015260800190565b60208082526024908201527f636f6c6f6e792d746f6b656e2d6c6f636b696e672d696e76616c69642d6c6f636040820152631acb5a5960e21b606082015260800190565b6020808252601f908201527f636f6c6f6e792d746f6b656e2d6c6f636b696e672d6e6f742d6c6f636b657200604082015260600190565b60208082526029908201527f636f6c6f6e792d746f6b656e2d6c6f636b696e672d696e73756666696369656e6040820152681d0b59195c1bdcda5d60ba1b606082015260800190565b6020808252601b908201527f636f6c6f6e792d746f6b656e2d696e76616c69642d6c6f636b69640000000000604082015260600190565b60208082526025908201527f636f6c6f6e792d746f6b656e2d6c6f636b696e672d616c72656164792d756e6c6040820152641bd8dad95960da1b606082015260800190565b60208082526024908201527f636f6c6f6e792d746f6b656e2d6c6f636b696e672d7472616e736665722d66616040820152631a5b195960e21b606082015260800190565b60208082526026908201527f636f6c6f6e792d746f6b656e2d6c6f636b696e672d6578636573732d6f626c6960408201526533b0ba34b7b760d11b606082015260800190565b6020808252602e908201527f636f6c6f6e792d746f6b656e2d6c6f636b696e672d6861732d70726576696f7560408201526d732d6163746976652d6c6f636b7360901b606082015260800190565b8151815260208083015190820152604080830151908201526060918201519181019190915260800190565b90815260200190565b6001600160a01b0381168114611f6757600080fd5b50565b8015158114611f6757600080fdfea26469706673582212206e522020bae21cf9d4a9cc242aea18d04699dc2f358dc8a0f87aeff0e1d83bd164736f6c63430007030033"; diff --git a/src/contracts/colony/6/factories/TokenSAI__factory.ts b/src/contracts/colony/6/factories/TokenSAI__factory.ts new file mode 100644 index 000000000..a8f6c796d --- /dev/null +++ b/src/contracts/colony/6/factories/TokenSAI__factory.ts @@ -0,0 +1,240 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "ethers/providers"; + +import { TokenSAI } from "../TokenSAI"; + +export class TokenSAI__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): TokenSAI { + return new Contract(address, _abi, signerOrProvider) as TokenSAI; + } +} + +const _abi = [ + { + constant: true, + inputs: [], + name: "name", + outputs: [ + { + name: "", + type: "bytes32", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "_spender", + type: "address", + }, + { + name: "_value", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "totalSupply", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "_from", + type: "address", + }, + { + name: "_to", + type: "address", + }, + { + name: "_value", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "decimals", + outputs: [ + { + name: "", + type: "uint8", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + name: "_owner", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + name: "balance", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "symbol", + outputs: [ + { + name: "", + type: "bytes32", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "_to", + type: "address", + }, + { + name: "_value", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [ + { + name: "_owner", + type: "address", + }, + { + name: "_spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + payable: true, + stateMutability: "payable", + type: "fallback", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "owner", + type: "address", + }, + { + indexed: true, + name: "spender", + type: "address", + }, + { + indexed: false, + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "from", + type: "address", + }, + { + indexed: true, + name: "to", + type: "address", + }, + { + indexed: false, + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, +]; diff --git a/src/contracts/colony/6/factories/Token__factory.ts b/src/contracts/colony/6/factories/Token__factory.ts new file mode 100644 index 000000000..2f3b8b083 --- /dev/null +++ b/src/contracts/colony/6/factories/Token__factory.ts @@ -0,0 +1,484 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, ContractFactory, Signer } from "ethers"; +import { Provider } from "ethers/providers"; +import { UnsignedTransaction } from "ethers/utils/transaction"; +import { BigNumberish } from "ethers/utils"; + +import { TransactionOverrides } from ".."; +import { Token } from "../Token"; + +export class Token__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + _name: string, + _symbol: string, + _decimals: BigNumberish, + overrides?: TransactionOverrides + ): Promise { + return super.deploy(_name, _symbol, _decimals, overrides) as Promise; + } + getDeployTransaction( + _name: string, + _symbol: string, + _decimals: BigNumberish, + overrides?: TransactionOverrides + ): UnsignedTransaction { + return super.getDeployTransaction(_name, _symbol, _decimals, overrides); + } + attach(address: string): Token { + return super.attach(address) as Token; + } + connect(signer: Signer): Token__factory { + return super.connect(signer) as Token__factory; + } + static connect(address: string, signerOrProvider: Signer | Provider): Token { + return new Contract(address, _abi, signerOrProvider) as Token; + } +} + +const _abi = [ + { + constant: true, + inputs: [], + name: "name", + outputs: [ + { + name: "", + type: "string", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "guy", + type: "address", + }, + { + name: "wad", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "owner_", + type: "address", + }, + ], + name: "setOwner", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "totalSupply", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "decimals", + outputs: [ + { + name: "", + type: "uint8", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + name: "src", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "authority_", + type: "address", + }, + ], + name: "setAuthority", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "owner", + outputs: [ + { + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "symbol", + outputs: [ + { + name: "", + type: "string", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "dst", + type: "address", + }, + { + name: "wad", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "authority", + outputs: [ + { + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "locked", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + name: "src", + type: "address", + }, + { + name: "guy", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + name: "_name", + type: "string", + }, + { + name: "_symbol", + type: "string", + }, + { + name: "_decimals", + type: "uint8", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "guy", + type: "address", + }, + { + indexed: false, + name: "wad", + type: "uint256", + }, + ], + name: "Mint", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "guy", + type: "address", + }, + { + indexed: false, + name: "wad", + type: "uint256", + }, + ], + name: "Burn", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "authority", + type: "address", + }, + ], + name: "LogSetAuthority", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "owner", + type: "address", + }, + ], + name: "LogSetOwner", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "src", + type: "address", + }, + { + indexed: true, + name: "guy", + type: "address", + }, + { + indexed: false, + name: "wad", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "src", + type: "address", + }, + { + indexed: true, + name: "dst", + type: "address", + }, + { + indexed: false, + name: "wad", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + constant: false, + inputs: [ + { + name: "src", + type: "address", + }, + { + name: "dst", + type: "address", + }, + { + name: "wad", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "guy", + type: "address", + }, + { + name: "wad", + type: "uint256", + }, + ], + name: "mint", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "wad", + type: "uint256", + }, + ], + name: "mint", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "wad", + type: "uint256", + }, + ], + name: "burn", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "guy", + type: "address", + }, + { + name: "wad", + type: "uint256", + }, + ], + name: "burn", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [], + name: "unlock", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, +]; + +const _bytecode = + "0x60806040523480156200001157600080fd5b50604051620011ce380380620011ce833981018060405260608110156200003757600080fd5b8101908080516401000000008111156200005057600080fd5b820160208101848111156200006457600080fd5b81516401000000008111828201871017156200007f57600080fd5b505092919060200180516401000000008111156200009c57600080fd5b82016020810184811115620000b057600080fd5b8151640100000000811182820187101715620000cb57600080fd5b505060209182015133600081815260019094526040808520859055848055600480546001600160a01b0319168317905551929550909350917fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9491a282516200013b90600690602086019062000199565b5081516200015190600590602085019062000199565b506004805460ff9092167401000000000000000000000000000000000000000002600160a01b60ff021990921691909117905550506007805460ff191660011790556200023e565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620001dc57805160ff19168380011785556200020c565b828001600101855582156200020c579182015b828111156200020c578251825591602001919060010190620001ef565b506200021a9291506200021e565b5090565b6200023b91905b808211156200021a576000815560010162000225565b90565b610f80806200024e6000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c80637a9e5e4b116100ad578063a69df4b511610071578063a69df4b514610383578063a9059cbb1461038b578063bf7e214f146103b7578063cf309012146103bf578063dd62ed3e146103c757610121565b80637a9e5e4b146102e85780638da5cb5b1461030e57806395d89b41146103325780639dc29fac1461033a578063a0712d681461036657610121565b806323b872dd116100f457806323b872dd14610225578063313ce5671461025b57806340c10f191461027957806342966c68146102a557806370a08231146102c257610121565b806306fdde0314610126578063095ea7b3146101a357806313af4035146101e357806318160ddd1461020b575b600080fd5b61012e6103f5565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610168578181015183820152602001610150565b50505050905090810190601f1680156101955780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101cf600480360360408110156101b957600080fd5b506001600160a01b038135169060200135610483565b604080519115158252519081900360200190f35b610209600480360360208110156101f957600080fd5b50356001600160a01b03166104ea565b005b610213610592565b60408051918252519081900360200190f35b6101cf6004803603606081101561023b57600080fd5b506001600160a01b03813581169160208101359091169060400135610598565b610263610623565b6040805160ff9092168252519081900360200190f35b6102096004803603604081101561028f57600080fd5b506001600160a01b038135169060200135610633565b610209600480360360208110156102bb57600080fd5b503561075c565b610213600480360360208110156102d857600080fd5b50356001600160a01b0316610769565b610209600480360360208110156102fe57600080fd5b50356001600160a01b0316610784565b61031661082c565b604080516001600160a01b039092168252519081900360200190f35b61012e61083b565b6102096004803603604081101561035057600080fd5b506001600160a01b038135169060200135610896565b6102096004803603602081101561037c57600080fd5b5035610a74565b610209610ad6565b6101cf600480360360408110156103a157600080fd5b506001600160a01b038135169060200135610b3a565b610316610b4e565b6101cf610b5d565b610213600480360360408110156103dd57600080fd5b506001600160a01b0381358116916020013516610b66565b6006805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561047b5780601f106104505761010080835404028352916020019161047b565b820191906000526020600020905b81548152906001019060200180831161045e57829003601f168201915b505050505081565b3360008181526002602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b610500336000356001600160e01b031916610b91565b6105425760408051600160e51b62461bcd0281526020600482015260146024820152600080516020610f35833981519152604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0383811691909117918290556040519116907fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60005490565b60075460009060ff1615610610576105bc336000356001600160e01b031916610b91565b6106105760408051600160e51b62461bcd02815260206004820152601960248201527f636f6c6f6e792d746f6b656e2d756e617574686f726973656400000000000000604482015290519081900360640190fd5b61061b848484610c7b565b949350505050565b600454600160a01b900460ff1681565b610649336000356001600160e01b031916610b91565b61068b5760408051600160e51b62461bcd0281526020600482015260146024820152600080516020610f35833981519152604482015290519081900360640190fd5b6001600160a01b0382166000908152600160205260409020546106ae9082610e7e565b6001600160a01b038316600090815260016020526040812091909155546106d59082610e7e565b6000556040805182815290516001600160a01b038416917f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885919081900360200190a26040805182815290516001600160a01b038416916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b6107663382610896565b50565b6001600160a01b031660009081526001602052604090205490565b61079a336000356001600160e01b031916610b91565b6107dc5760408051600160e51b62461bcd0281526020600482015260146024820152600080516020610f35833981519152604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0383811691909117918290556040519116907f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6004546001600160a01b031681565b6005805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561047b5780601f106104505761010080835404028352916020019161047b565b6001600160a01b0382163314610974576001600160a01b03821660009081526002602090815260408083203384529091529020548111156109215760408051600160e51b62461bcd02815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c0000604482015290519081900360640190fd5b6001600160a01b038216600090815260026020908152604080832033845290915290205461094f9082610ed9565b6001600160a01b03831660009081526002602090815260408083203384529091529020555b6001600160a01b0382166000908152600160205260409020548111156109e45760408051600160e51b62461bcd02815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e6365000000604482015290519081900360640190fd5b6001600160a01b038216600090815260016020526040902054610a079082610ed9565b6001600160a01b03831660009081526001602052604081209190915554610a2e9082610ed9565b6000556040805182815290516001600160a01b038416917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a25050565b610a8a336000356001600160e01b031916610b91565b610acc5760408051600160e51b62461bcd0281526020600482015260146024820152600080516020610f35833981519152604482015290519081900360640190fd5b6107663382610633565b610aec336000356001600160e01b031916610b91565b610b2e5760408051600160e51b62461bcd0281526020600482015260146024820152600080516020610f35833981519152604482015290519081900360640190fd5b6007805460ff19169055565b6000610b47338484610598565b9392505050565b6003546001600160a01b031681565b60075460ff1681565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b60006001600160a01b038316301415610bac575060016104e4565b6004546001600160a01b0384811691161415610bca575060016104e4565b6003546001600160a01b0316610be2575060006104e4565b60035460408051600160e01b63b70096130281526001600160a01b0386811660048301523060248301526001600160e01b0319861660448301529151919092169163b7009613916064808301926020929190829003018186803b158015610c4857600080fd5b505afa158015610c5c573d6000803e3d6000fd5b505050506040513d6020811015610c7257600080fd5b505190506104e4565b60006001600160a01b0384163314610d5b576001600160a01b0384166000908152600260209081526040808320338452909152902054821115610d085760408051600160e51b62461bcd02815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c0000604482015290519081900360640190fd5b6001600160a01b0384166000908152600260209081526040808320338452909152902054610d369083610ed9565b6001600160a01b03851660009081526002602090815260408083203384529091529020555b6001600160a01b038416600090815260016020526040902054821115610dcb5760408051600160e51b62461bcd02815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e6365000000604482015290519081900360640190fd5b6001600160a01b038416600090815260016020526040902054610dee9083610ed9565b6001600160a01b038086166000908152600160205260408082209390935590851681522054610e1d9083610e7e565b6001600160a01b0380851660008181526001602090815260409182902094909455805186815290519193928816927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a35060019392505050565b808201828110156104e45760408051600160e51b62461bcd02815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b808203828111156104e45760408051600160e51b62461bcd02815260206004820152601560248201527f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000604482015290519081900360640190fdfe64732d617574682d756e617574686f72697a6564000000000000000000000000a165627a7a72305820ed8de9a90263e33e6d6e4fb5554694081cb7508892aee98c6e637d87f2bec09a0029"; diff --git a/src/contracts/colony/6/index.d.ts b/src/contracts/colony/6/index.d.ts new file mode 100644 index 000000000..910d6a045 --- /dev/null +++ b/src/contracts/colony/6/index.d.ts @@ -0,0 +1,29 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { + BigNumberish, + EventDescription, + FunctionDescription, +} from "ethers/utils"; + +export interface TransactionOverrides { + gasLimit?: BigNumberish | Promise; + gasPrice?: BigNumberish | Promise; + nonce?: BigNumberish | Promise; + value?: BigNumberish | Promise; + from?: string | Promise; + chainId?: number | Promise; +} + +export interface TypedEventDescription< + T extends Pick +> extends EventDescription { + encodeTopics: T["encodeTopics"]; +} + +export interface TypedFunctionDescription< + T extends Pick +> extends FunctionDescription { + encode: T["encode"]; +} diff --git a/src/contracts/colony/7/IColony.d.ts b/src/contracts/colony/7/IColony.d.ts new file mode 100644 index 000000000..f28a69cbb --- /dev/null +++ b/src/contracts/colony/7/IColony.d.ts @@ -0,0 +1,10973 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-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 }>; + + checkNotAdditionalProtectedVariable: TypedFunctionDescription<{ + encode([_slot]: [BigNumberish]): string; + }>; + + enterRecoveryMode: TypedFunctionDescription<{ encode([]: []): string }>; + + exitRecoveryMode: TypedFunctionDescription<{ encode([]: []): string }>; + + isInRecoveryMode: TypedFunctionDescription<{ encode([]: []): string }>; + + numRecoveryRoles: TypedFunctionDescription<{ encode([]: []): string }>; + + removeRecoveryRole: TypedFunctionDescription<{ + encode([_user]: [string]): string; + }>; + + setRecoveryRole: TypedFunctionDescription<{ + encode([_user]: [string]): string; + }>; + + setStorageSlotRecovery: TypedFunctionDescription<{ + encode([_slot, _value]: [BigNumberish, Arrayish]): string; + }>; + + authority: TypedFunctionDescription<{ encode([]: []): string }>; + + owner: TypedFunctionDescription<{ encode([]: []): string }>; + + version: TypedFunctionDescription<{ encode([]: []): string }>; + + upgrade: TypedFunctionDescription<{ + encode([_newVersion]: [BigNumberish]): string; + }>; + + finishUpgrade: TypedFunctionDescription<{ encode([]: []): string }>; + + getColonyNetwork: TypedFunctionDescription<{ encode([]: []): string }>; + + getToken: TypedFunctionDescription<{ encode([]: []): string }>; + + makeArbitraryTransaction: TypedFunctionDescription<{ + encode([_to, _action]: [string, Arrayish]): string; + }>; + + annotateTransaction: TypedFunctionDescription<{ + encode([_txHash, _metadata]: [Arrayish, string]): 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; + }>; + + setUserRoles: TypedFunctionDescription<{ + encode([ + _permissionDomainId, + _childSkillIndex, + _user, + _domainId, + _roles, + ]: [BigNumberish, BigNumberish, string, BigNumberish, Arrayish]): string; + }>; + + hasUserRole: TypedFunctionDescription<{ + encode([_user, _domainId, _role]: [ + string, + BigNumberish, + BigNumberish + ]): string; + }>; + + hasInheritedUserRole: TypedFunctionDescription<{ + encode([_user, _domainId, _role, _childSkillIndex, _childDomainId]: [ + string, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish + ]): string; + }>; + + userCanSetRoles: TypedFunctionDescription<{ + encode([_user, _domainId, _childSkillIndex, _childDomainId]: [ + string, + BigNumberish, + BigNumberish, + BigNumberish + ]): string; + }>; + + getUserRoles: TypedFunctionDescription<{ + encode([_user, _domain]: [string, BigNumberish]): string; + }>; + + getCapabilityRoles: TypedFunctionDescription<{ + encode([_sig]: [Arrayish]): string; + }>; + + emitDomainReputationReward: TypedFunctionDescription<{ + encode([_domainId, _user, _amount]: [ + BigNumberish, + string, + BigNumberish + ]): string; + }>; + + emitSkillReputationReward: TypedFunctionDescription<{ + encode([_skillId, _user, _amount]: [ + BigNumberish, + string, + BigNumberish + ]): string; + }>; + + emitDomainReputationPenalty: TypedFunctionDescription<{ + encode([ + _permissionDomainId, + _childSkillIndex, + _domainId, + _user, + _amount, + ]: [ + BigNumberish, + BigNumberish, + BigNumberish, + string, + BigNumberish + ]): string; + }>; + + emitSkillReputationPenalty: TypedFunctionDescription<{ + encode([_skillId, _user, _amount]: [ + BigNumberish, + string, + BigNumberish + ]): string; + }>; + + initialiseColony: TypedFunctionDescription<{ + encode([_colonyNetworkAddress, _token]: [string, string]): string; + }>; + + editColony: TypedFunctionDescription<{ + encode([_metadata]: [string]): string; + }>; + + bootstrapColony: TypedFunctionDescription<{ + encode([_users, _amount]: [string[], BigNumberish[]]): string; + }>; + + mintTokens: TypedFunctionDescription<{ + encode([_wad]: [BigNumberish]): string; + }>; + + mintTokensFor: TypedFunctionDescription<{ + encode([_guy, _wad]: [string, BigNumberish]): string; + }>; + + lockToken: TypedFunctionDescription<{ encode([]: []): string }>; + + unlockTokenForUser: TypedFunctionDescription<{ + encode([user, lockId]: [string, BigNumberish]): string; + }>; + + registerColonyLabel: TypedFunctionDescription<{ + encode([colonyName, orbitdb]: [string, string]): string; + }>; + + updateColonyOrbitDB: TypedFunctionDescription<{ + encode([orbitdb]: [string]): string; + }>; + + installExtension: TypedFunctionDescription<{ + encode([extensionId, version]: [Arrayish, BigNumberish]): string; + }>; + + upgradeExtension: TypedFunctionDescription<{ + encode([extensionId, newVersion]: [Arrayish, BigNumberish]): string; + }>; + + deprecateExtension: TypedFunctionDescription<{ + encode([extensionId, deprecated]: [Arrayish, boolean]): string; + }>; + + uninstallExtension: TypedFunctionDescription<{ + encode([extensionId]: [Arrayish]): string; + }>; + + addDomain: TypedFunctionDescription<{ + encode([_permissionDomainId, _childSkillIndex, _parentDomainId]: [ + BigNumberish, + BigNumberish, + BigNumberish + ]): string; + }>; + + editDomain: TypedFunctionDescription<{ + encode([_permissionDomainId, _childSkillIndex, _domainId, _metadata]: [ + BigNumberish, + BigNumberish, + BigNumberish, + string + ]): string; + }>; + + getDomain: TypedFunctionDescription<{ + encode([_id]: [BigNumberish]): string; + }>; + + getDomainCount: TypedFunctionDescription<{ encode([]: []): string }>; + + verifyReputationProof: TypedFunctionDescription<{ + encode([key, value, branchMask, siblings]: [ + Arrayish, + Arrayish, + BigNumberish, + Arrayish[] + ]): string; + }>; + + makeExpenditure: TypedFunctionDescription<{ + encode([_permissionDomainId, _childSkillIndex, _domainId]: [ + BigNumberish, + BigNumberish, + BigNumberish + ]): string; + }>; + + transferExpenditure: TypedFunctionDescription<{ + encode([_id, _newOwner]: [BigNumberish, string]): string; + }>; + + transferExpenditureViaArbitration: TypedFunctionDescription<{ + encode([_permissionDomainId, _childSkillIndex, _id, _newOwner]: [ + BigNumberish, + BigNumberish, + BigNumberish, + string + ]): string; + }>; + + cancelExpenditure: TypedFunctionDescription<{ + encode([_id]: [BigNumberish]): string; + }>; + + finalizeExpenditure: TypedFunctionDescription<{ + encode([_id]: [BigNumberish]): string; + }>; + + setExpenditureRecipient: TypedFunctionDescription<{ + encode([_id, _slot, _recipient]: [ + BigNumberish, + BigNumberish, + string + ]): string; + }>; + + setExpenditurePayout: TypedFunctionDescription<{ + encode([_id, _slot, _token, _amount]: [ + BigNumberish, + BigNumberish, + string, + BigNumberish + ]): string; + }>; + + setExpenditureSkill: TypedFunctionDescription<{ + encode([_id, _slot, _skillId]: [ + BigNumberish, + BigNumberish, + BigNumberish + ]): string; + }>; + + setExpenditurePayoutModifier: TypedFunctionDescription<{ + encode([ + _permissionDomainId, + _childSkillIndex, + _id, + _slot, + _payoutModifier, + ]: [ + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish + ]): string; + }>; + + setExpenditureClaimDelay: TypedFunctionDescription<{ + encode([_permissionDomainId, _childSkillIndex, _id, _slot, _claimDelay]: [ + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish + ]): string; + }>; + + setExpenditureState: TypedFunctionDescription<{ + encode([ + _permissionDomainId, + _childSkillIndex, + _id, + _storageSlot, + _mask, + _keys, + _value, + ]: [ + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + boolean[], + Arrayish[], + Arrayish + ]): string; + }>; + + claimExpenditurePayout: TypedFunctionDescription<{ + encode([_id, _slot, _token]: [ + BigNumberish, + BigNumberish, + string + ]): string; + }>; + + getExpenditureCount: TypedFunctionDescription<{ encode([]: []): string }>; + + getExpenditure: TypedFunctionDescription<{ + encode([_id]: [BigNumberish]): string; + }>; + + getExpenditureSlot: TypedFunctionDescription<{ + encode([_id, _slot]: [BigNumberish, BigNumberish]): string; + }>; + + getExpenditureSlotPayout: TypedFunctionDescription<{ + encode([_id, _slot, _token]: [ + BigNumberish, + BigNumberish, + string + ]): 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; + }>; + + 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; + }>; + + 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, + _childSkillIndex, + _domainId, + _fromChildSkillIndex, + _toChildSkillIndex, + _fromPot, + _toPot, + _amount, + _token, + ]: [ + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + string + ]): string; + }>; + + claimColonyFunds: TypedFunctionDescription<{ + encode([_token]: [string]): string; + }>; + + getNonRewardPotsTotal: TypedFunctionDescription<{ + encode([_token]: [string]): string; + }>; + + approveStake: TypedFunctionDescription<{ + encode([_approvee, _domainId, _amount]: [ + string, + BigNumberish, + BigNumberish + ]): string; + }>; + + obligateStake: TypedFunctionDescription<{ + encode([_user, _domainId, _amount]: [ + string, + BigNumberish, + BigNumberish + ]): string; + }>; + + deobligateStake: TypedFunctionDescription<{ + encode([_user, _domainId, _amount]: [ + string, + BigNumberish, + BigNumberish + ]): string; + }>; + + transferStake: TypedFunctionDescription<{ + encode([ + _permissionDomainId, + _childSkillIndex, + _obligator, + _user, + _domainId, + _amount, + _recipient, + ]: [ + BigNumberish, + BigNumberish, + string, + string, + BigNumberish, + BigNumberish, + string + ]): string; + }>; + + getApproval: TypedFunctionDescription<{ + encode([_user, _obligator, _domainId]: [ + string, + string, + BigNumberish + ]): string; + }>; + + getObligation: TypedFunctionDescription<{ + encode([_user, _obligator, _domainId]: [ + string, + string, + BigNumberish + ]): string; + }>; + + getDomainFromFundingPot: TypedFunctionDescription<{ + encode([_fundingPotId]: [BigNumberish]): string; + }>; + + burnTokens: TypedFunctionDescription<{ + encode([token, amount]: [string, BigNumberish]): string; + }>; + + unlockToken: TypedFunctionDescription<{ encode([]: []): string }>; + + updateApprovalAmount: TypedFunctionDescription<{ + encode([token, spender]: [string, string]): string; + }>; + + getTokenApproval: TypedFunctionDescription<{ + encode([token, spender]: [string, string]): string; + }>; + + getTotalTokenApproval: TypedFunctionDescription<{ + encode([token]: [string]): string; + }>; + }; + + events: { + Annotation: TypedEventDescription<{ + encodeTopics([agent, txHash, metadata]: [ + string | null, + Arrayish | null, + null + ]): string[]; + }>; + + ColonyBootstrapped: TypedEventDescription<{ + encodeTopics([agent, users, amounts]: [null, null, null]): string[]; + }>; + + ColonyFundsClaimed: TypedEventDescription<{ + encodeTopics([agent, token, fee, payoutRemainder]: [ + null, + null, + null, + null + ]): string[]; + }>; + + ColonyFundsMovedBetweenFundingPots: TypedEventDescription<{ + encodeTopics([agent, fromPot, toPot, amount, token]: [ + null, + BigNumberish | null, + BigNumberish | null, + null, + null + ]): string[]; + }>; + + ColonyInitialised: TypedEventDescription<{ + encodeTopics([agent, colonyNetwork, token]: [null, null, null]): string[]; + }>; + + ColonyMetadata: TypedEventDescription<{ + encodeTopics([agent, metadata]: [null, null]): string[]; + }>; + + ColonyRewardInverseSet: TypedEventDescription<{ + encodeTopics([agent, rewardInverse]: [null, null]): string[]; + }>; + + ColonyRoleSet: TypedEventDescription<{ + encodeTopics([agent, user, domainId, role, setTo]: [ + null, + string | null, + BigNumberish | null, + BigNumberish | null, + null + ]): string[]; + }>; + + ColonyUpgraded: TypedEventDescription<{ + encodeTopics([agent, oldVersion, newVersion]: [ + null, + null, + null + ]): string[]; + }>; + + DomainAdded: TypedEventDescription<{ + encodeTopics([agent, domainId]: [null, null]): string[]; + }>; + + DomainMetadata: TypedEventDescription<{ + encodeTopics([agent, domainId, metadata]: [ + null, + BigNumberish | null, + null + ]): string[]; + }>; + + ExpenditureAdded: TypedEventDescription<{ + encodeTopics([agent, expenditureId]: [null, null]): string[]; + }>; + + ExpenditureCancelled: TypedEventDescription<{ + encodeTopics([agent, expenditureId]: [ + null, + BigNumberish | null + ]): string[]; + }>; + + ExpenditureFinalized: TypedEventDescription<{ + encodeTopics([agent, expenditureId]: [ + null, + BigNumberish | null + ]): string[]; + }>; + + ExpenditurePayoutSet: TypedEventDescription<{ + encodeTopics([agent, expenditureId, slot, token, amount]: [ + null, + BigNumberish | null, + BigNumberish | null, + string | null, + null + ]): string[]; + }>; + + ExpenditureRecipientSet: TypedEventDescription<{ + encodeTopics([agent, expenditureId, slot, recipient]: [ + null, + BigNumberish | null, + BigNumberish | null, + string | null + ]): string[]; + }>; + + ExpenditureSkillSet: TypedEventDescription<{ + encodeTopics([agent, expenditureId, slot, skillId]: [ + null, + BigNumberish | null, + BigNumberish | null, + BigNumberish | null + ]): string[]; + }>; + + ExpenditureTransferred: TypedEventDescription<{ + encodeTopics([agent, expenditureId, owner]: [ + null, + BigNumberish | null, + string | null + ]): string[]; + }>; + + FundingPotAdded: TypedEventDescription<{ + encodeTopics([fundingPotId]: [null]): string[]; + }>; + + PaymentAdded: TypedEventDescription<{ + encodeTopics([agent, paymentId]: [null, null]): string[]; + }>; + + PaymentFinalized: TypedEventDescription<{ + encodeTopics([agent, paymentId]: [null, BigNumberish | null]): string[]; + }>; + + PaymentPayoutSet: TypedEventDescription<{ + encodeTopics([agent, paymentId, token, amount]: [ + null, + BigNumberish | null, + null, + null + ]): string[]; + }>; + + PaymentRecipientSet: TypedEventDescription<{ + encodeTopics([agent, paymentId, recipient]: [ + null, + BigNumberish | null, + null + ]): string[]; + }>; + + PaymentSkillSet: TypedEventDescription<{ + encodeTopics([agent, paymentId, skillId]: [ + null, + BigNumberish | null, + null + ]): string[]; + }>; + + PayoutClaimed: TypedEventDescription<{ + encodeTopics([agent, fundingPotId, token, amount]: [ + null, + BigNumberish | null, + null, + null + ]): string[]; + }>; + + RecoveryModeEntered: TypedEventDescription<{ + encodeTopics([user]: [null]): string[]; + }>; + + RecoveryModeExitApproved: TypedEventDescription<{ + encodeTopics([user]: [null]): string[]; + }>; + + RecoveryModeExited: TypedEventDescription<{ + encodeTopics([user]: [null]): string[]; + }>; + + RecoveryRoleSet: TypedEventDescription<{ + encodeTopics([user, setTo]: [string | null, null]): string[]; + }>; + + RecoveryStorageSlotSet: TypedEventDescription<{ + encodeTopics([user, slot, fromValue, toValue]: [ + null, + null, + null, + null + ]): string[]; + }>; + + RewardPayoutClaimed: TypedEventDescription<{ + encodeTopics([rewardPayoutId, user, fee, rewardRemainder]: [ + null, + null, + null, + null + ]): string[]; + }>; + + RewardPayoutCycleEnded: TypedEventDescription<{ + encodeTopics([agent, rewardPayoutId]: [null, null]): string[]; + }>; + + RewardPayoutCycleStarted: TypedEventDescription<{ + encodeTopics([agent, rewardPayoutId]: [null, null]): string[]; + }>; + + TaskAdded: TypedEventDescription<{ + encodeTopics([agent, taskId]: [null, null]): string[]; + }>; + + TaskBriefSet: TypedEventDescription<{ + encodeTopics([taskId, specificationHash]: [ + BigNumberish | null, + null + ]): string[]; + }>; + + TaskCanceled: TypedEventDescription<{ + encodeTopics([taskId]: [BigNumberish | null]): string[]; + }>; + + TaskChangedViaSignatures: TypedEventDescription<{ + encodeTopics([reviewerAddresses]: [null]): string[]; + }>; + + TaskCompleted: TypedEventDescription<{ + encodeTopics([agent, taskId]: [null, BigNumberish | null]): string[]; + }>; + + TaskDeliverableSubmitted: TypedEventDescription<{ + encodeTopics([agent, taskId, deliverableHash]: [ + null, + BigNumberish | null, + null + ]): string[]; + }>; + + TaskDueDateSet: TypedEventDescription<{ + encodeTopics([taskId, dueDate]: [BigNumberish | null, null]): string[]; + }>; + + TaskFinalized: TypedEventDescription<{ + encodeTopics([agent, taskId]: [null, BigNumberish | null]): string[]; + }>; + + TaskPayoutSet: TypedEventDescription<{ + encodeTopics([taskId, role, token, amount]: [ + BigNumberish | null, + null, + null, + null + ]): string[]; + }>; + + TaskRoleUserSet: TypedEventDescription<{ + encodeTopics([taskId, role, user]: [ + BigNumberish | null, + null, + string | null + ]): string[]; + }>; + + TaskSkillSet: TypedEventDescription<{ + encodeTopics([taskId, skillId]: [ + BigNumberish | null, + BigNumberish | null + ]): string[]; + }>; + + TaskWorkRatingRevealed: TypedEventDescription<{ + encodeTopics([agent, taskId, role, rating]: [ + null, + BigNumberish | null, + null, + null + ]): string[]; + }>; + + TokenUnlocked: TypedEventDescription<{ encodeTopics([]: []): string[] }>; + + TokensBurned: TypedEventDescription<{ + encodeTopics([agent, token, amount]: [null, null, null]): string[]; + }>; + + TokensMinted: TypedEventDescription<{ + encodeTopics([agent, who, amount]: [null, null, 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; + + /** + * Indicate approval to exit recovery mode. Can only be called by user with recovery role. + */ + "approveExitRecovery()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * No return value, but should throw if protected.This is external, 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, + overrides?: TransactionOverrides + ): Promise; + + /** + * No return value, but should throw if protected.This is external, 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(uint256)"( + _slot: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Put colony network mining into recovery mode. Can only be called by user with recovery role. + */ + enterRecoveryMode( + overrides?: TransactionOverrides + ): Promise; + + /** + * Put colony network mining into recovery mode. Can only be called by user with recovery role. + */ + "enterRecoveryMode()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Exit recovery mode, can be called by anyone if enough whitelist approvals are given. + */ + exitRecoveryMode( + overrides?: TransactionOverrides + ): Promise; + + /** + * Exit recovery mode, can be called by anyone if enough whitelist approvals are given. + */ + "exitRecoveryMode()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Is colony network in recovery mode. + */ + isInRecoveryMode(overrides?: TransactionOverrides): Promise; + + /** + * Is colony network in recovery mode. + */ + "isInRecoveryMode()"(overrides?: TransactionOverrides): Promise; + + /** + * Return number of recovery roles. + */ + numRecoveryRoles(overrides?: TransactionOverrides): Promise; + + /** + * Return number of recovery roles. + */ + "numRecoveryRoles()"(overrides?: TransactionOverrides): 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; + + /** + * Remove colony recovery role. Can only be called by root role. + * @param _user User we want to remove recovery role from + */ + "removeRecoveryRole(address)"( + _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; + + /** + * Set new colony recovery role. Can be called by root. + * @param _user User we want to give a recovery role to + */ + "setRecoveryRole(address)"( + _user: string, + overrides?: TransactionOverrides + ): 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; + + /** + * 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(uint256,bytes32)"( + _slot: BigNumberish, + _value: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `ColonyAuthority` for the colony. + */ + authority(overrides?: TransactionOverrides): Promise; + + /** + * Get the `ColonyAuthority` for the colony. + */ + "authority()"(overrides?: TransactionOverrides): Promise; + + /** + * Used for testing. + * Get the colony `owner` address. This should be address(0x0) at all times. + */ + owner(overrides?: TransactionOverrides): Promise; + + /** + * Used for testing. + * Get the colony `owner` address. This should be address(0x0) at all times. + */ + "owner()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the Colony contract version. Starts from 1 and is incremented with every deployed contract change. + */ + version(overrides?: TransactionOverrides): Promise; + + /** + * Get the Colony contract version. Starts from 1 and is incremented with every deployed contract change. + */ + "version()"(overrides?: TransactionOverrides): 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; + + /** + * 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(uint256)"( + _newVersion: BigNumberish, + 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 external 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; + + /** + * Can only be called by the colony itself, and only expected to be called as part of the `upgrade()` call. Required to be external 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. + */ + getColonyNetwork(overrides?: TransactionOverrides): Promise; + + /** + * The colonyNetworkAddress we read here is set once, during `initialiseColony`. + * Returns the colony network address set on the Colony. + */ + "getColonyNetwork()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the colony token. + */ + getToken(overrides?: TransactionOverrides): Promise; + + /** + * Get the colony token. + */ + "getToken()"(overrides?: TransactionOverrides): Promise; + + /** + * Execute arbitrary transaction on behalf of the Colony + * @param _action Bytes array encoding the function call and arguments + * @param _to Contract to receive the function call (cannot be network or token locking) + */ + makeArbitraryTransaction( + _to: string, + _action: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Execute arbitrary transaction on behalf of the Colony + * @param _action Bytes array encoding the function call and arguments + * @param _to Contract to receive the function call (cannot be network or token locking) + */ + "makeArbitraryTransaction(address,bytes)"( + _to: string, + _action: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a metadata string for a transaction + * @param _metadata String of metadata for tx + * @param _txHash Hash of transaction being annotated (0x0 for current tx) + */ + annotateTransaction( + _txHash: Arrayish, + _metadata: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a metadata string for a transaction + * @param _metadata String of metadata for tx + * @param _txHash Hash of transaction being annotated (0x0 for current tx) + */ + "annotateTransaction(bytes32,string)"( + _txHash: Arrayish, + _metadata: string, + overrides?: TransactionOverrides + ): 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 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(address,bool)"( + _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 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(uint256,uint256,address,uint256,bool)"( + _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 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(uint256,uint256,address,uint256,bool)"( + _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 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(uint256,uint256,address,uint256,bool)"( + _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; + + /** + * 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(uint256,uint256,address,uint256,bool)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _user: string, + _domainId: BigNumberish, + _setTo: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set several roles in one transaction. 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 _roles Byte array representing the desired role setting (1 for on, 0 for off) + * @param _user User we want to give a role to + */ + setUserRoles( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _user: string, + _domainId: BigNumberish, + _roles: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set several roles in one transaction. 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 _roles Byte array representing the desired role setting (1 for on, 0 for off) + * @param _user User we want to give a role to + */ + "setUserRoles(uint256,uint256,address,uint256,bytes32)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _user: string, + _domainId: BigNumberish, + _roles: Arrayish, + 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 + */ + hasUserRole( + _user: string, + _domainId: BigNumberish, + _role: BigNumberish, + 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 + */ + "hasUserRole(address,uint256,uint8)"( + _user: string, + _domainId: BigNumberish, + _role: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Check whether a given user has a given role for the colony, in a child domain. Calls the function of the same name on the colony's authority contract and an internal inheritence validator function + * @param _childDomainId The domain where we want to use the role + * @param _childSkillIndex The index that the `_childDomainId` is relative to `_domainId` + * @param _domainId Domain in which the caller has the role + * @param _role The role we want to check for + * @param _user The user whose role we want to check + */ + hasInheritedUserRole( + _user: string, + _domainId: BigNumberish, + _role: BigNumberish, + _childSkillIndex: BigNumberish, + _childDomainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Check whether a given user has a given role for the colony, in a child domain. Calls the function of the same name on the colony's authority contract and an internal inheritence validator function + * @param _childDomainId The domain where we want to use the role + * @param _childSkillIndex The index that the `_childDomainId` is relative to `_domainId` + * @param _domainId Domain in which the caller has the role + * @param _role The role we want to check for + * @param _user The user whose role we want to check + */ + "hasInheritedUserRole(address,uint256,uint8,uint256,uint256)"( + _user: string, + _domainId: BigNumberish, + _role: BigNumberish, + _childSkillIndex: BigNumberish, + _childDomainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Check whether a given user can modify roles in the target domain `_childDomainId`. Mostly a convenience function to provide a uniform interface for extension contracts validating permissions + * @param _childDomainId The domain where we want to edit roles + * @param _childSkillIndex The index that the `_childDomainId` is relative to `_domainId` + * @param _domainId Domain in which the caller has the role (currently Root or Architecture) + * @param _user The user whose permissions we want to check + */ + userCanSetRoles( + _user: string, + _domainId: BigNumberish, + _childSkillIndex: BigNumberish, + _childDomainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Check whether a given user can modify roles in the target domain `_childDomainId`. Mostly a convenience function to provide a uniform interface for extension contracts validating permissions + * @param _childDomainId The domain where we want to edit roles + * @param _childSkillIndex The index that the `_childDomainId` is relative to `_domainId` + * @param _domainId Domain in which the caller has the role (currently Root or Architecture) + * @param _user The user whose permissions we want to check + */ + "userCanSetRoles(address,uint256,uint256,uint256)"( + _user: string, + _domainId: BigNumberish, + _childSkillIndex: BigNumberish, + _childDomainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Gets the bytes32 representation of the roles for a user in a given domain + * @param _domain The domain we want to get roles in + * @param _user The user whose roles we want to get + */ + getUserRoles( + _user: string, + _domain: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Gets the bytes32 representation of the roles for a user in a given domain + * @param _domain The domain we want to get roles in + * @param _user The user whose roles we want to get + */ + "getUserRoles(address,uint256)"( + _user: string, + _domain: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Gets the bytes32 representation of the roles authorized to call a function + * @param _sig The function signature + */ + getCapabilityRoles( + _sig: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Gets the bytes32 representation of the roles authorized to call a function + * @param _sig The function signature + */ + "getCapabilityRoles(bytes4)"( + _sig: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a positive domain reputation update. Available only to Root role holders + * @param _amount The (positive) amount of reputation to gain + * @param _domainId The domain where the user will gain reputation + * @param _user The user who will gain reputation + */ + emitDomainReputationReward( + _domainId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a positive domain reputation update. Available only to Root role holders + * @param _amount The (positive) amount of reputation to gain + * @param _domainId The domain where the user will gain reputation + * @param _user The user who will gain reputation + */ + "emitDomainReputationReward(uint256,address,int256)"( + _domainId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a positive skill reputation update. Available only to Root role holders + * @param _amount The (positive) amount of reputation to gain + * @param _skillId The skill where the user will gain reputation + * @param _user The user who will gain reputation + */ + emitSkillReputationReward( + _skillId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a positive skill reputation update. Available only to Root role holders + * @param _amount The (positive) amount of reputation to gain + * @param _skillId The skill where the user will gain reputation + * @param _user The user who will gain reputation + */ + "emitSkillReputationReward(uint256,address,int256)"( + _skillId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a negative domain reputation update. Available only to Arbitration role holders + * @param _amount The (negative) amount of reputation to lose + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId` + * @param _domainId The domain where the user will lose reputation + * @param _permissionDomainId The domainId in which I hold the Arbitration role + * @param _user The user who will lose reputation + */ + emitDomainReputationPenalty( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a negative domain reputation update. Available only to Arbitration role holders + * @param _amount The (negative) amount of reputation to lose + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId` + * @param _domainId The domain where the user will lose reputation + * @param _permissionDomainId The domainId in which I hold the Arbitration role + * @param _user The user who will lose reputation + */ + "emitDomainReputationPenalty(uint256,uint256,uint256,address,int256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a negative skill reputation update. Available only to Arbitration role holders in the root domain + * @param _amount The (negative) amount of reputation to lose + * @param _skillId The skill where the user will lose reputation + * @param _user The user who will lose reputation + */ + emitSkillReputationPenalty( + _skillId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a negative skill reputation update. Available only to Arbitration role holders in the root domain + * @param _amount The (negative) amount of reputation to lose + * @param _skillId The skill where the user will lose reputation + * @param _user The user who will lose reputation + */ + "emitSkillReputationPenalty(uint256,address,int256)"( + _skillId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): 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; + + /** + * 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(address,address)"( + _colonyNetworkAddress: string, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called to change the metadata associated with a colony. Expected to be a IPFS hash of a JSON blob, but not enforced to any degree by the contracts + * @param _metadata IPFS hash of the metadata + */ + editColony( + _metadata: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called to change the metadata associated with a colony. Expected to be a IPFS hash of a JSON blob, but not enforced to any degree by the contracts + * @param _metadata IPFS hash of the metadata + */ + "editColony(string)"( + _metadata: 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; + + /** + * 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(address[],int256[])"( + _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; + + /** + * Mint `_wad` amount of colony tokens. Secured function to authorised members. + * @param _wad Amount to mint + */ + "mintTokens(uint256)"( + _wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Mint `_wad` amount of colony tokens and send to `_guy`. Secured function to authorised members. + * @param _guy Recipient of new tokens + * @param _wad Amount to mint + */ + mintTokensFor( + _guy: string, + _wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Mint `_wad` amount of colony tokens and send to `_guy`. Secured function to authorised members. + * @param _guy Recipient of new tokens + * @param _wad Amount to mint + */ + "mintTokensFor(address,uint256)"( + _guy: string, + _wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Lock the colony's token. Can only be called by a network-managed extension. + */ + lockToken(overrides?: TransactionOverrides): Promise; + + /** + * Lock the colony's token. Can only be called by a network-managed extension. + */ + "lockToken()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Unlock the colony's token for a user. Can only be called by a network-managed extension. + * @param lockId The specific lock to unlock + * @param user The user to unlock + */ + unlockTokenForUser( + user: string, + lockId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Unlock the colony's token for a user. Can only be called by a network-managed extension. + * @param lockId The specific lock to unlock + * @param user The user to unlock + */ + "unlockTokenForUser(address,uint256)"( + user: string, + lockId: 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; + + /** + * 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(string,string)"( + 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; + + /** + * 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(string)"( + orbitdb: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Install an extension to the colony. Secured function to authorised members. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param version The new extension version to install + */ + installExtension( + extensionId: Arrayish, + version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Install an extension to the colony. Secured function to authorised members. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param version The new extension version to install + */ + "installExtension(bytes32,uint256)"( + extensionId: Arrayish, + version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Upgrade an extension in a colony. Secured function to authorised members. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param newVersion The version to upgrade to (must be one larger than the current version) + */ + upgradeExtension( + extensionId: Arrayish, + newVersion: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Upgrade an extension in a colony. Secured function to authorised members. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param newVersion The version to upgrade to (must be one larger than the current version) + */ + "upgradeExtension(bytes32,uint256)"( + extensionId: Arrayish, + newVersion: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the deprecation of an extension in a colony. Secured function to authorised members. + * @param deprecated Whether to deprecate the extension or not + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + deprecateExtension( + extensionId: Arrayish, + deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the deprecation of an extension in a colony. Secured function to authorised members. + * @param deprecated Whether to deprecate the extension or not + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + "deprecateExtension(bytes32,bool)"( + extensionId: Arrayish, + deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is a permanent action -- re-installing the extension will deploy a new contractIt is recommended to deprecate an extension before uninstalling to allow active objects to be resolved + * Uninstall an extension from a colony. Secured function to authorised members. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + uninstallExtension( + extensionId: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is a permanent action -- re-installing the extension will deploy a new contractIt is recommended to deprecate an extension before uninstalling to allow active objects to be resolved + * Uninstall an extension from a colony. Secured function to authorised members. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + "uninstallExtension(bytes32)"( + extensionId: Arrayish, + 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; + + /** + * 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(uint256,uint256,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _parentDomainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Adding new domains is currently retricted to one level only, i.e. `_parentDomainId` has to be the root domain id: `1`.We expect this function to only be used by the dapp + * 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 _metadata Metadata relating to the domain. Expected to be the IPFS hash of a JSON blob, but not enforced by the contracts. + * @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(uint256,uint256,uint256,string)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _parentDomainId: BigNumberish, + _metadata: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * 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 _domainId Id of the domain being edited + * @param _metadata Metadata relating to the domain. Expected to be the IPFS hash of a JSON blob, but not enforced by the contracts. + * @param _permissionDomainId The domainId in which I have the permission to take this action + */ + editDomain( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + _metadata: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * 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 _domainId Id of the domain being edited + * @param _metadata Metadata relating to the domain. Expected to be the IPFS hash of a JSON blob, but not enforced by the contracts. + * @param _permissionDomainId The domainId in which I have the permission to take this action + */ + "editDomain(uint256,uint256,uint256,string)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + _metadata: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a domain by id. + * @param _id Id of the domain which details to get + */ + getDomain( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber] & { skillId: BigNumber; fundingPotId: BigNumber } + >; + + /** + * Get a domain by id. + * @param _id Id of the domain which details to get + */ + "getDomain(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber] & { skillId: BigNumber; fundingPotId: BigNumber } + >; + + /** + * Get the number of domains in the colony. + */ + getDomainCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of domains in the colony. + */ + "getDomainCount()"(overrides?: TransactionOverrides): Promise; + + /** + * For more detail about branchMask and siblings, examine the PatriciaTree implementation. While external, 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. + */ + verifyReputationProof( + key: Arrayish, + value: Arrayish, + branchMask: BigNumberish, + siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * For more detail about branchMask and siblings, examine the PatriciaTree implementation. While external, 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. + */ + "verifyReputationProof(bytes,bytes,uint256,bytes32[])"( + key: Arrayish, + value: Arrayish, + branchMask: BigNumberish, + siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Add a new expenditure in the colony. Secured function to authorised members. + * @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 expenditure belongs + * @param _permissionDomainId The domainId in which I have the permission to take this action + */ + makeExpenditure( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Add a new expenditure in the colony. Secured function to authorised members. + * @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 expenditure belongs + * @param _permissionDomainId The domainId in which I have the permission to take this action + */ + "makeExpenditure(uint256,uint256,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Updates the expenditure owner. Can only be called by expenditure owner. + * @param _id Expenditure identifier + * @param _newOwner New owner of expenditure + */ + transferExpenditure( + _id: BigNumberish, + _newOwner: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Updates the expenditure owner. Can only be called by expenditure owner. + * @param _id Expenditure identifier + * @param _newOwner New owner of expenditure + */ + "transferExpenditure(uint256,address)"( + _id: BigNumberish, + _newOwner: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future version + * DEPRECATED Updates the expenditure owner. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _id Expenditure identifier + * @param _newOwner New owner of expenditure + * @param _permissionDomainId The domainId in which I have the permission to take this action + */ + transferExpenditureViaArbitration( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _newOwner: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future version + * DEPRECATED Updates the expenditure owner. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _id Expenditure identifier + * @param _newOwner New owner of expenditure + * @param _permissionDomainId The domainId in which I have the permission to take this action + */ + "transferExpenditureViaArbitration(uint256,uint256,uint256,address)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _newOwner: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Cancels the expenditure and prevents further editing. Can only be called by expenditure owner. + * @param _id Expenditure identifier + */ + cancelExpenditure( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Cancels the expenditure and prevents further editing. Can only be called by expenditure owner. + * @param _id Expenditure identifier + */ + "cancelExpenditure(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Finalizes the expenditure and prevents further editing. Can only be called by expenditure owner. + * @param _id Expenditure identifier + */ + finalizeExpenditure( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Finalizes the expenditure and prevents further editing. Can only be called by expenditure owner. + * @param _id Expenditure identifier + */ + "finalizeExpenditure(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Sets the recipient on an expenditure slot. Can only be called by expenditure owner. + * @param _id Id of the expenditure + * @param _recipient Address of the recipient + * @param _slot Slot for the recipient address + */ + setExpenditureRecipient( + _id: BigNumberish, + _slot: BigNumberish, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Sets the recipient on an expenditure slot. Can only be called by expenditure owner. + * @param _id Id of the expenditure + * @param _recipient Address of the recipient + * @param _slot Slot for the recipient address + */ + "setExpenditureRecipient(uint256,uint256,address)"( + _id: BigNumberish, + _slot: BigNumberish, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the token payout on an expenditure slot. Can only be called by expenditure owner. + * @param _amount Payout amount + * @param _id Id of the expenditure + * @param _slot Number of the slot + * @param _token Address of the token, `0x0` value indicates Ether + */ + setExpenditurePayout( + _id: BigNumberish, + _slot: BigNumberish, + _token: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the token payout on an expenditure slot. Can only be called by expenditure owner. + * @param _amount Payout amount + * @param _id Id of the expenditure + * @param _slot Number of the slot + * @param _token Address of the token, `0x0` value indicates Ether + */ + "setExpenditurePayout(uint256,uint256,address,uint256)"( + _id: BigNumberish, + _slot: BigNumberish, + _token: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Sets the skill on an expenditure slot. Can only be called by expenditure owner. + * @param _id Expenditure identifier + * @param _skillId Id of the new skill to set + * @param _slot Number of the slot + */ + setExpenditureSkill( + _id: BigNumberish, + _slot: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Sets the skill on an expenditure slot. Can only be called by expenditure owner. + * @param _id Expenditure identifier + * @param _skillId Id of the new skill to set + * @param _slot Number of the slot + */ + "setExpenditureSkill(uint256,uint256,uint256)"( + _id: BigNumberish, + _slot: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future versionNote that when determining payouts the payoutModifier is incremented by WAD and converted into payoutScalar + * DEPRECATED Set the payout modifier on an expenditure slot. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _id Expenditure identifier + * @param _payoutModifier Modifier to their payout (between -1 and 1, denominated in WADs, 0 means no modification) + * @param _permissionDomainId The domainId in which I have the permission to take this action + * @param _slot Number of the slot + */ + setExpenditurePayoutModifier( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _slot: BigNumberish, + _payoutModifier: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future versionNote that when determining payouts the payoutModifier is incremented by WAD and converted into payoutScalar + * DEPRECATED Set the payout modifier on an expenditure slot. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _id Expenditure identifier + * @param _payoutModifier Modifier to their payout (between -1 and 1, denominated in WADs, 0 means no modification) + * @param _permissionDomainId The domainId in which I have the permission to take this action + * @param _slot Number of the slot + */ + "setExpenditurePayoutModifier(uint256,uint256,uint256,uint256,int256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _slot: BigNumberish, + _payoutModifier: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future version + * DEPRECATED Set the claim delay on an expenditure slot. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _claimDelay Time (in seconds) to delay claiming payout after finalization + * @param _id Expenditure identifier + * @param _permissionDomainId The domainId in which I have the permission to take this action + * @param _slot Number of the slot + */ + setExpenditureClaimDelay( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _slot: BigNumberish, + _claimDelay: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future version + * DEPRECATED Set the claim delay on an expenditure slot. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _claimDelay Time (in seconds) to delay claiming payout after finalization + * @param _id Expenditure identifier + * @param _permissionDomainId The domainId in which I have the permission to take this action + * @param _slot Number of the slot + */ + "setExpenditureClaimDelay(uint256,uint256,uint256,uint256,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _slot: BigNumberish, + _claimDelay: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set arbitrary state on an expenditure slot. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _id Expenditure identifier + * @param _keys Array of additional keys (for mappings & arrays) + * @param _mask Array of booleans indicated whether a key is a mapping (F) or an array index (T). + * @param _permissionDomainId The domainId in which I have the permission to take this action + * @param _storageSlot Number of the top-level storage slot (25, 26, or 27) + * @param _value Value to set at location + */ + setExpenditureState( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _storageSlot: BigNumberish, + _mask: boolean[], + _keys: Arrayish[], + _value: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set arbitrary state on an expenditure slot. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _id Expenditure identifier + * @param _keys Array of additional keys (for mappings & arrays) + * @param _mask Array of booleans indicated whether a key is a mapping (F) or an array index (T). + * @param _permissionDomainId The domainId in which I have the permission to take this action + * @param _storageSlot Number of the top-level storage slot (25, 26, or 27) + * @param _value Value to set at location + */ + "setExpenditureState(uint256,uint256,uint256,uint256,bool[],bytes32[],bytes32)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _storageSlot: BigNumberish, + _mask: boolean[], + _keys: Arrayish[], + _value: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Claim the payout for an expenditure slot. Here the network receives a fee from each payout. + * @param _id Expenditure identifier + * @param _slot Number of the slot + * @param _token Address of the token, `0x0` value indicates Ether + */ + claimExpenditurePayout( + _id: BigNumberish, + _slot: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Claim the payout for an expenditure slot. Here the network receives a fee from each payout. + * @param _id Expenditure identifier + * @param _slot Number of the slot + * @param _token Address of the token, `0x0` value indicates Ether + */ + "claimExpenditurePayout(uint256,uint256,address)"( + _id: BigNumberish, + _slot: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of expenditures in the colony. + */ + getExpenditureCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of expenditures in the colony. + */ + "getExpenditureCount()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns an existing expenditure. + * @param _id Expenditure identifier + */ + getExpenditure( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [number, string, BigNumber, BigNumber, BigNumber, BigNumber] & { + status: number; + owner: string; + fundingPotId: BigNumber; + domainId: BigNumber; + finalizedTimestamp: BigNumber; + globalClaimDelay: BigNumber; + } + >; + + /** + * Returns an existing expenditure. + * @param _id Expenditure identifier + */ + "getExpenditure(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [number, string, BigNumber, BigNumber, BigNumber, BigNumber] & { + status: number; + owner: string; + fundingPotId: BigNumber; + domainId: BigNumber; + finalizedTimestamp: BigNumber; + globalClaimDelay: BigNumber; + } + >; + + /** + * Returns an existing expenditure slot. + * @param _id Expenditure identifier + * @param _slot Expenditure slot + */ + getExpenditureSlot( + _id: BigNumberish, + _slot: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [string, BigNumber, BigNumber, BigNumber[]] & { + recipient: string; + claimDelay: BigNumber; + payoutModifier: BigNumber; + skills: BigNumber[]; + } + >; + + /** + * Returns an existing expenditure slot. + * @param _id Expenditure identifier + * @param _slot Expenditure slot + */ + "getExpenditureSlot(uint256,uint256)"( + _id: BigNumberish, + _slot: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [string, BigNumber, BigNumber, BigNumber[]] & { + recipient: string; + claimDelay: BigNumber; + payoutModifier: BigNumber; + skills: BigNumber[]; + } + >; + + /** + * Returns an existing expenditure slot's payout for a token. + * @param _id Expenditure identifier + * @param _slot Expenditure slot + * @param _token Token address + */ + getExpenditureSlotPayout( + _id: BigNumberish, + _slot: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns an existing expenditure slot's payout for a token. + * @param _id Expenditure identifier + * @param _slot Expenditure slot + * @param _token Token address + */ + "getExpenditureSlotPayout(uint256,uint256,address)"( + _id: BigNumberish, + _slot: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 + */ + addPayment( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _recipient: string, + _token: string, + _amount: BigNumberish, + _domainId: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): 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 + */ + "addPayment(uint256,uint256,address,address,uint256,uint256,uint256)"( + _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; + + /** + * 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(uint256,uint256,uint256)"( + _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 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(uint256,uint256,uint256,address)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _recipient: string, + 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 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(uint256,uint256,uint256,uint256)"( + _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; + + /** + * 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(uint256,uint256,uint256,address,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _token: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns an exiting payment. + * @param _id Payment identifier + */ + getPayment( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [string, boolean, BigNumber, BigNumber, BigNumber[]] & { + recipient: string; + finalized: boolean; + fundingPotId: BigNumber; + domainId: BigNumber; + skills: BigNumber[]; + } + >; + + /** + * Returns an exiting payment. + * @param _id Payment identifier + */ + "getPayment(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [string, boolean, BigNumber, BigNumber, BigNumber[]] & { + recipient: string; + finalized: boolean; + fundingPotId: BigNumber; + domainId: BigNumber; + skills: 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; + + /** + * 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(uint256,address)"( + _id: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of payments in the colony. + */ + getPaymentCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of payments in the colony. + */ + "getPaymentCount()"(overrides?: TransactionOverrides): 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; + + /** + * 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(uint256,uint256,bytes32,uint256,uint256,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _specificationHash: Arrayish, + _domainId: BigNumberish, + _skillId: BigNumberish, + _dueDate: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of tasks in the colony. + */ + getTaskCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of tasks in the colony. + */ + "getTaskCount()"(overrides?: TransactionOverrides): Promise; + + /** + * Starts from 0 and is incremented on every co-reviewed task change via `executeTaskChange` call. + * @param _id Id of the task + */ + getTaskChangeNonce( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Starts from 0 and is incremented on every co-reviewed task change via `executeTaskChange` call. + * @param _id Id of the task + */ + "getTaskChangeNonce(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): 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; + + /** + * 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(uint8[],bytes32[],bytes32[],uint8[],uint256,bytes)"( + _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; + + /** + * 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(uint8[],bytes32[],bytes32[],uint8[],uint256,bytes)"( + _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; + + /** + * 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(uint256,uint8,bytes32)"( + _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; + + /** + * 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(uint256,uint8,uint8,bytes32)"( + _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 + */ + generateSecret( + _salt: Arrayish, + _value: BigNumberish, + 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 + */ + "generateSecret(bytes32,uint256)"( + _salt: Arrayish, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `ColonyStorage.RatingSecrets` information for task `_id`. + * @param _id Id of the task + */ + getTaskWorkRatingSecretsInfo( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber] & { + nSecrets: BigNumber; + lastSubmittedAt: BigNumber; + } + >; + + /** + * Get the `ColonyStorage.RatingSecrets` information for task `_id`. + * @param _id Id of the task + */ + "getTaskWorkRatingSecretsInfo(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber] & { + nSecrets: BigNumber; + lastSubmittedAt: 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 + */ + getTaskWorkRatingSecret( + _id: BigNumberish, + _role: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * 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 + */ + "getTaskWorkRatingSecret(uint256,uint8)"( + _id: BigNumberish, + _role: BigNumberish, + overrides?: TransactionOverrides + ): 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 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(uint256,address,uint256,uint256)"( + _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 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(uint256,address)"( + _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; + + /** + * 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(uint256,address)"( + _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 evaluator role. Agreed between manager and currently assigned evaluator. + * @param _id Id of the task + */ + "removeTaskEvaluatorRole(uint256)"( + _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; + + /** + * Removing worker role. Agreed between manager and currently assigned worker. + * @param _id Id of the task + */ + "removeTaskWorkerRole(uint256)"( + _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; + + /** + * 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(uint256,uint256)"( + _id: BigNumberish, + _skillId: 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 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(uint256,bytes32)"( + _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 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(uint256,uint256)"( + _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; + + /** + * 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(uint256,bytes32)"( + _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; + + /** + * 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(uint256,bytes32,bytes32)"( + _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.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(uint256)"( + _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; + + /** + * 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(uint256)"( + _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; + + /** + * 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(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a task with id `_id` + * @param _id Id of the task + */ + getTask( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [ + string, + string, + number, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber[] + ] & { + specificationHash: string; + deliverableHash: string; + status: number; + dueDate: BigNumber; + fundingPotId: BigNumber; + completionTimestamp: BigNumber; + domainId: BigNumber; + skillIds: BigNumber[]; + } + >; + + /** + * Get a task with id `_id` + * @param _id Id of the task + */ + "getTask(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [ + string, + string, + number, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber[] + ] & { + specificationHash: string; + deliverableHash: string; + status: number; + dueDate: BigNumber; + fundingPotId: BigNumber; + completionTimestamp: BigNumber; + domainId: BigNumber; + skillIds: 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 + */ + getTaskRole( + _id: BigNumberish, + _role: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [string, boolean, number] & { + user: string; + rateFail: boolean; + rating: number; + } + >; + + /** + * 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 + */ + "getTaskRole(uint256,uint8)"( + _id: BigNumberish, + _role: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [string, boolean, number] & { + user: string; + rateFail: boolean; + rating: 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; + + /** + * 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(uint256)"( + _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. + */ + getRewardInverse(overrides?: TransactionOverrides): Promise; + + /** + * Return 1 / the reward to pay out from revenue. e.g. if the fee is 1% (or 0.01), return 100. + */ + "getRewardInverse()"(overrides?: TransactionOverrides): 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 + */ + getTaskPayout( + _id: BigNumberish, + _role: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 + */ + "getTaskPayout(uint256,uint8,address)"( + _id: BigNumberish, + _role: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 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(uint256,address,uint256)"( + _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 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(uint256,address,uint256)"( + _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; + + /** + * 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(uint256,address,uint256)"( + _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; + + /** + * 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(uint256,address,uint256,uint256,uint256)"( + _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; + + /** + * 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(uint256,uint8,address)"( + _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; + + /** + * 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(address,bytes,bytes,uint256,bytes32[])"( + _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 (deposited in TokenLocking), `_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; + + /** + * 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 (deposited in TokenLocking), `_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(uint256,uint256[7],bytes,bytes,uint256,bytes32[])"( + _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 + */ + getRewardPayoutInfo( + _payoutId: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [ + string, + BigNumber, + BigNumber, + BigNumber, + string, + BigNumber, + BigNumber, + boolean + ] & { + reputationState: string; + colonyWideReputation: BigNumber; + totalTokens: BigNumber; + amount: BigNumber; + tokenAddress: string; + blockTimestamp: BigNumber; + amountRemaining: BigNumber; + finalized: boolean; + } + >; + + /** + * Get useful information about specific reward payout. + * @param _payoutId Id of the reward payout + */ + "getRewardPayoutInfo(uint256)"( + _payoutId: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [ + string, + BigNumber, + BigNumber, + BigNumber, + string, + BigNumber, + BigNumber, + boolean + ] & { + reputationState: string; + colonyWideReputation: BigNumber; + totalTokens: BigNumber; + amount: BigNumber; + tokenAddress: string; + blockTimestamp: BigNumber; + amountRemaining: BigNumber; + finalized: boolean; + } + >; + + /** + * 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; + + /** + * 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(uint256)"( + _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 + */ + getFundingPot( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [number, BigNumber, BigNumber] & { + associatedType: number; + associatedTypeId: BigNumber; + payoutsWeCannotMake: BigNumber; + } + >; + + /** + * For the reward funding pot (e.g. id: 0) this returns (0, 0, 0). + * Get the non-mapping properties of a pot by id. + * @param _id Id of the pot which details to get + */ + "getFundingPot(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [number, BigNumber, BigNumber] & { + associatedType: number; + associatedTypeId: BigNumber; + payoutsWeCannotMake: BigNumber; + } + >; + + /** + * Get the number of funding pots in the colony. + */ + getFundingPotCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of funding pots in the colony. + */ + "getFundingPotCount()"( + overrides?: TransactionOverrides + ): 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 + */ + getFundingPotBalance( + _potId: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 + */ + "getFundingPotBalance(uint256,address)"( + _potId: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 + */ + getFundingPotPayout( + _potId: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 + */ + "getFundingPotPayout(uint256,address)"( + _potId: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 _childSkillIndex The child index in _permissionDomainId where I will be taking this action + * @param _domainId The domain where I am taking this action, pointed to by _permissionDomainId and _childSkillIndex + * @param _fromChildSkillIndex In the array of child skills for the skill associated with the domain pointed to by _permissionDomainId + _childSkillIndex, the index of the skill associated with the domain that contains _fromPot + * @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 same, but for the _toPot which the funds are being moved to + * @param _toPot Funding pot id receiving the funds + * @param _token Address of the token, `0x0` value indicates Ether + */ + moveFundsBetweenPots( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + _fromChildSkillIndex: BigNumberish, + _toChildSkillIndex: BigNumberish, + _fromPot: BigNumberish, + _toPot: BigNumberish, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 _childSkillIndex The child index in _permissionDomainId where I will be taking this action + * @param _domainId The domain where I am taking this action, pointed to by _permissionDomainId and _childSkillIndex + * @param _fromChildSkillIndex In the array of child skills for the skill associated with the domain pointed to by _permissionDomainId + _childSkillIndex, the index of the skill associated with the domain that contains _fromPot + * @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 same, but for the _toPot which the funds are being moved to + * @param _toPot Funding pot id receiving the funds + * @param _token Address of the token, `0x0` value indicates Ether + */ + "moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + _fromChildSkillIndex: BigNumberish, + _toChildSkillIndex: BigNumberish, + _fromPot: BigNumberish, + _toPot: BigNumberish, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * DEPRECATEDMove 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(uint256,uint256,uint256,uint256,uint256,uint256,address)"( + _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; + + /** + * 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(address)"( + _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 + */ + getNonRewardPotsTotal( + _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 + */ + "getNonRewardPotsTotal(address)"( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Allow the _approvee to obligate some amount of tokens as a stake. + * @param _amount Amount of internal token up to which we are willing to be obligated. + * @param _approvee Address of the account we are willing to let obligate us. + * @param _domainId Domain in which we are willing to be obligated. + */ + approveStake( + _approvee: string, + _domainId: BigNumberish, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Allow the _approvee to obligate some amount of tokens as a stake. + * @param _amount Amount of internal token up to which we are willing to be obligated. + * @param _approvee Address of the account we are willing to let obligate us. + * @param _domainId Domain in which we are willing to be obligated. + */ + "approveStake(address,uint256,uint256)"( + _approvee: string, + _domainId: BigNumberish, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Obligate the user some amount of tokens as a stake. + * @param _amount Amount of internal token we are obligating. + * @param _domainId Domain in which we are obligating the user. + * @param _user Address of the account we are obligating. + */ + obligateStake( + _user: string, + _domainId: BigNumberish, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Obligate the user some amount of tokens as a stake. + * @param _amount Amount of internal token we are obligating. + * @param _domainId Domain in which we are obligating the user. + * @param _user Address of the account we are obligating. + */ + "obligateStake(address,uint256,uint256)"( + _user: string, + _domainId: BigNumberish, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Deobligate the user some amount of tokens, releasing the stake. + * @param _amount Amount of internal token we are deobligating. + * @param _domainId Domain in which we are deobligating the user. + * @param _user Address of the account we are deobligating. + */ + deobligateStake( + _user: string, + _domainId: BigNumberish, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Deobligate the user some amount of tokens, releasing the stake. + * @param _amount Amount of internal token we are deobligating. + * @param _domainId Domain in which we are deobligating the user. + * @param _user Address of the account we are deobligating. + */ + "deobligateStake(address,uint256,uint256)"( + _user: string, + _domainId: BigNumberish, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Transfer some amount of obligated tokens. Can be called by the arbitration role. + * @param _amount Amount of internal token we are transferring. + * @param _childSkillIndex The child index in `_permissionDomainId` where we can find `_domainId`. + * @param _domainId Domain in which we are transferring the tokens. + * @param _obligator Address of the account who set the obligation. + * @param _permissionDomainId The domainId in which I have the permission to take this action. + * @param _recipient Recipient of the transferred tokens. + * @param _user Address of the account we are transferring. + */ + transferStake( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _obligator: string, + _user: string, + _domainId: BigNumberish, + _amount: BigNumberish, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Transfer some amount of obligated tokens. Can be called by the arbitration role. + * @param _amount Amount of internal token we are transferring. + * @param _childSkillIndex The child index in `_permissionDomainId` where we can find `_domainId`. + * @param _domainId Domain in which we are transferring the tokens. + * @param _obligator Address of the account who set the obligation. + * @param _permissionDomainId The domainId in which I have the permission to take this action. + * @param _recipient Recipient of the transferred tokens. + * @param _user Address of the account we are transferring. + */ + "transferStake(uint256,uint256,address,address,uint256,uint256,address)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _obligator: string, + _user: string, + _domainId: BigNumberish, + _amount: BigNumberish, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * View an approval to obligate tokens. + * @param _domainId Domain in which we are willing to be obligated. + * @param _obligator Address of the account we are willing to let obligate us. + * @param _user User allowing their tokens to be obligated. + */ + getApproval( + _user: string, + _obligator: string, + _domainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * View an approval to obligate tokens. + * @param _domainId Domain in which we are willing to be obligated. + * @param _obligator Address of the account we are willing to let obligate us. + * @param _user User allowing their tokens to be obligated. + */ + "getApproval(address,address,uint256)"( + _user: string, + _obligator: string, + _domainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * View an obligation of tokens. + * @param _domainId Domain in which we are obligated. + * @param _obligator Address of the account who obligated us. + * @param _user User whose tokens are obligated. + */ + getObligation( + _user: string, + _obligator: string, + _domainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * View an obligation of tokens. + * @param _domainId Domain in which we are obligated. + * @param _obligator Address of the account who obligated us. + * @param _user User whose tokens are obligated. + */ + "getObligation(address,address,uint256)"( + _user: string, + _obligator: string, + _domainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the domain corresponding to a funding pot + * @param _fundingPotId Id of the funding pot + */ + getDomainFromFundingPot( + _fundingPotId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the domain corresponding to a funding pot + * @param _fundingPotId Id of the funding pot + */ + "getDomainFromFundingPot(uint256)"( + _fundingPotId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Burn tokens held by the colony. Can only burn tokens held in the root funding pot. + * @param amount The amount of tokens to burn + * @param token The address of the token to burn + */ + burnTokens( + token: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Burn tokens held by the colony. Can only burn tokens held in the root funding pot. + * @param amount The amount of tokens to burn + * @param token The address of the token to burn + */ + "burnTokens(address,uint256)"( + token: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * unlock the native colony token, if possible + */ + unlockToken(overrides?: TransactionOverrides): Promise; + + /** + * unlock the native colony token, if possible + */ + "unlockToken()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Update the internal bookkeeping around external ERC20 approvals + * @param spender The account we have approved + * @param token The address of the token which was approved + */ + updateApprovalAmount( + token: string, + spender: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Update the internal bookkeeping around external ERC20 approvals + * @param spender The account we have approved + * @param token The address of the token which was approved + */ + "updateApprovalAmount(address,address)"( + token: string, + spender: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the current approval amount + * @param spender The account we have approved + * @param token The address of the token which was approved + */ + getTokenApproval( + token: string, + spender: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the current approval amount + * @param spender The account we have approved + * @param token The address of the token which was approved + */ + "getTokenApproval(address,address)"( + token: string, + spender: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the current total approval amount across all spenders + * @param token The address of the token which was approved + */ + getTotalTokenApproval( + token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the current total approval amount across all spenders + * @param token The address of the token which was approved + */ + "getTotalTokenApproval(address)"( + token: string, + overrides?: TransactionOverrides + ): Promise; + }; + + /** + * Indicate approval to exit recovery mode. Can only be called by user with recovery role. + */ + approveExitRecovery( + overrides?: TransactionOverrides + ): Promise; + + /** + * Indicate approval to exit recovery mode. Can only be called by user with recovery role. + */ + "approveExitRecovery()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * No return value, but should throw if protected.This is external, 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, + overrides?: TransactionOverrides + ): Promise; + + /** + * No return value, but should throw if protected.This is external, 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(uint256)"( + _slot: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Put colony network mining into recovery mode. Can only be called by user with recovery role. + */ + enterRecoveryMode( + overrides?: TransactionOverrides + ): Promise; + + /** + * Put colony network mining into recovery mode. Can only be called by user with recovery role. + */ + "enterRecoveryMode()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Exit recovery mode, can be called by anyone if enough whitelist approvals are given. + */ + exitRecoveryMode( + overrides?: TransactionOverrides + ): Promise; + + /** + * Exit recovery mode, can be called by anyone if enough whitelist approvals are given. + */ + "exitRecoveryMode()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Is colony network in recovery mode. + */ + isInRecoveryMode(overrides?: TransactionOverrides): Promise; + + /** + * Is colony network in recovery mode. + */ + "isInRecoveryMode()"(overrides?: TransactionOverrides): Promise; + + /** + * Return number of recovery roles. + */ + numRecoveryRoles(overrides?: TransactionOverrides): Promise; + + /** + * Return number of recovery roles. + */ + "numRecoveryRoles()"(overrides?: TransactionOverrides): 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; + + /** + * Remove colony recovery role. Can only be called by root role. + * @param _user User we want to remove recovery role from + */ + "removeRecoveryRole(address)"( + _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; + + /** + * Set new colony recovery role. Can be called by root. + * @param _user User we want to give a recovery role to + */ + "setRecoveryRole(address)"( + _user: string, + overrides?: TransactionOverrides + ): 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; + + /** + * 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(uint256,bytes32)"( + _slot: BigNumberish, + _value: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `ColonyAuthority` for the colony. + */ + authority(overrides?: TransactionOverrides): Promise; + + /** + * Get the `ColonyAuthority` for the colony. + */ + "authority()"(overrides?: TransactionOverrides): Promise; + + /** + * Used for testing. + * Get the colony `owner` address. This should be address(0x0) at all times. + */ + owner(overrides?: TransactionOverrides): Promise; + + /** + * Used for testing. + * Get the colony `owner` address. This should be address(0x0) at all times. + */ + "owner()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the Colony contract version. Starts from 1 and is incremented with every deployed contract change. + */ + version(overrides?: TransactionOverrides): Promise; + + /** + * Get the Colony contract version. Starts from 1 and is incremented with every deployed contract change. + */ + "version()"(overrides?: TransactionOverrides): 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; + + /** + * 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(uint256)"( + _newVersion: BigNumberish, + 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 external 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; + + /** + * Can only be called by the colony itself, and only expected to be called as part of the `upgrade()` call. Required to be external 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. + */ + getColonyNetwork(overrides?: TransactionOverrides): Promise; + + /** + * The colonyNetworkAddress we read here is set once, during `initialiseColony`. + * Returns the colony network address set on the Colony. + */ + "getColonyNetwork()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the colony token. + */ + getToken(overrides?: TransactionOverrides): Promise; + + /** + * Get the colony token. + */ + "getToken()"(overrides?: TransactionOverrides): Promise; + + /** + * Execute arbitrary transaction on behalf of the Colony + * @param _action Bytes array encoding the function call and arguments + * @param _to Contract to receive the function call (cannot be network or token locking) + */ + makeArbitraryTransaction( + _to: string, + _action: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Execute arbitrary transaction on behalf of the Colony + * @param _action Bytes array encoding the function call and arguments + * @param _to Contract to receive the function call (cannot be network or token locking) + */ + "makeArbitraryTransaction(address,bytes)"( + _to: string, + _action: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a metadata string for a transaction + * @param _metadata String of metadata for tx + * @param _txHash Hash of transaction being annotated (0x0 for current tx) + */ + annotateTransaction( + _txHash: Arrayish, + _metadata: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a metadata string for a transaction + * @param _metadata String of metadata for tx + * @param _txHash Hash of transaction being annotated (0x0 for current tx) + */ + "annotateTransaction(bytes32,string)"( + _txHash: Arrayish, + _metadata: string, + overrides?: TransactionOverrides + ): 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 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(address,bool)"( + _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 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(uint256,uint256,address,uint256,bool)"( + _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 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(uint256,uint256,address,uint256,bool)"( + _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 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(uint256,uint256,address,uint256,bool)"( + _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; + + /** + * 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(uint256,uint256,address,uint256,bool)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _user: string, + _domainId: BigNumberish, + _setTo: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set several roles in one transaction. 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 _roles Byte array representing the desired role setting (1 for on, 0 for off) + * @param _user User we want to give a role to + */ + setUserRoles( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _user: string, + _domainId: BigNumberish, + _roles: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set several roles in one transaction. 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 _roles Byte array representing the desired role setting (1 for on, 0 for off) + * @param _user User we want to give a role to + */ + "setUserRoles(uint256,uint256,address,uint256,bytes32)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _user: string, + _domainId: BigNumberish, + _roles: Arrayish, + 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 + */ + hasUserRole( + _user: string, + _domainId: BigNumberish, + _role: BigNumberish, + 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 + */ + "hasUserRole(address,uint256,uint8)"( + _user: string, + _domainId: BigNumberish, + _role: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Check whether a given user has a given role for the colony, in a child domain. Calls the function of the same name on the colony's authority contract and an internal inheritence validator function + * @param _childDomainId The domain where we want to use the role + * @param _childSkillIndex The index that the `_childDomainId` is relative to `_domainId` + * @param _domainId Domain in which the caller has the role + * @param _role The role we want to check for + * @param _user The user whose role we want to check + */ + hasInheritedUserRole( + _user: string, + _domainId: BigNumberish, + _role: BigNumberish, + _childSkillIndex: BigNumberish, + _childDomainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Check whether a given user has a given role for the colony, in a child domain. Calls the function of the same name on the colony's authority contract and an internal inheritence validator function + * @param _childDomainId The domain where we want to use the role + * @param _childSkillIndex The index that the `_childDomainId` is relative to `_domainId` + * @param _domainId Domain in which the caller has the role + * @param _role The role we want to check for + * @param _user The user whose role we want to check + */ + "hasInheritedUserRole(address,uint256,uint8,uint256,uint256)"( + _user: string, + _domainId: BigNumberish, + _role: BigNumberish, + _childSkillIndex: BigNumberish, + _childDomainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Check whether a given user can modify roles in the target domain `_childDomainId`. Mostly a convenience function to provide a uniform interface for extension contracts validating permissions + * @param _childDomainId The domain where we want to edit roles + * @param _childSkillIndex The index that the `_childDomainId` is relative to `_domainId` + * @param _domainId Domain in which the caller has the role (currently Root or Architecture) + * @param _user The user whose permissions we want to check + */ + userCanSetRoles( + _user: string, + _domainId: BigNumberish, + _childSkillIndex: BigNumberish, + _childDomainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Check whether a given user can modify roles in the target domain `_childDomainId`. Mostly a convenience function to provide a uniform interface for extension contracts validating permissions + * @param _childDomainId The domain where we want to edit roles + * @param _childSkillIndex The index that the `_childDomainId` is relative to `_domainId` + * @param _domainId Domain in which the caller has the role (currently Root or Architecture) + * @param _user The user whose permissions we want to check + */ + "userCanSetRoles(address,uint256,uint256,uint256)"( + _user: string, + _domainId: BigNumberish, + _childSkillIndex: BigNumberish, + _childDomainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Gets the bytes32 representation of the roles for a user in a given domain + * @param _domain The domain we want to get roles in + * @param _user The user whose roles we want to get + */ + getUserRoles( + _user: string, + _domain: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Gets the bytes32 representation of the roles for a user in a given domain + * @param _domain The domain we want to get roles in + * @param _user The user whose roles we want to get + */ + "getUserRoles(address,uint256)"( + _user: string, + _domain: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Gets the bytes32 representation of the roles authorized to call a function + * @param _sig The function signature + */ + getCapabilityRoles( + _sig: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Gets the bytes32 representation of the roles authorized to call a function + * @param _sig The function signature + */ + "getCapabilityRoles(bytes4)"( + _sig: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a positive domain reputation update. Available only to Root role holders + * @param _amount The (positive) amount of reputation to gain + * @param _domainId The domain where the user will gain reputation + * @param _user The user who will gain reputation + */ + emitDomainReputationReward( + _domainId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a positive domain reputation update. Available only to Root role holders + * @param _amount The (positive) amount of reputation to gain + * @param _domainId The domain where the user will gain reputation + * @param _user The user who will gain reputation + */ + "emitDomainReputationReward(uint256,address,int256)"( + _domainId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a positive skill reputation update. Available only to Root role holders + * @param _amount The (positive) amount of reputation to gain + * @param _skillId The skill where the user will gain reputation + * @param _user The user who will gain reputation + */ + emitSkillReputationReward( + _skillId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a positive skill reputation update. Available only to Root role holders + * @param _amount The (positive) amount of reputation to gain + * @param _skillId The skill where the user will gain reputation + * @param _user The user who will gain reputation + */ + "emitSkillReputationReward(uint256,address,int256)"( + _skillId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a negative domain reputation update. Available only to Arbitration role holders + * @param _amount The (negative) amount of reputation to lose + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId` + * @param _domainId The domain where the user will lose reputation + * @param _permissionDomainId The domainId in which I hold the Arbitration role + * @param _user The user who will lose reputation + */ + emitDomainReputationPenalty( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a negative domain reputation update. Available only to Arbitration role holders + * @param _amount The (negative) amount of reputation to lose + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId` + * @param _domainId The domain where the user will lose reputation + * @param _permissionDomainId The domainId in which I hold the Arbitration role + * @param _user The user who will lose reputation + */ + "emitDomainReputationPenalty(uint256,uint256,uint256,address,int256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a negative skill reputation update. Available only to Arbitration role holders in the root domain + * @param _amount The (negative) amount of reputation to lose + * @param _skillId The skill where the user will lose reputation + * @param _user The user who will lose reputation + */ + emitSkillReputationPenalty( + _skillId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a negative skill reputation update. Available only to Arbitration role holders in the root domain + * @param _amount The (negative) amount of reputation to lose + * @param _skillId The skill where the user will lose reputation + * @param _user The user who will lose reputation + */ + "emitSkillReputationPenalty(uint256,address,int256)"( + _skillId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): 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; + + /** + * 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(address,address)"( + _colonyNetworkAddress: string, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called to change the metadata associated with a colony. Expected to be a IPFS hash of a JSON blob, but not enforced to any degree by the contracts + * @param _metadata IPFS hash of the metadata + */ + editColony( + _metadata: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called to change the metadata associated with a colony. Expected to be a IPFS hash of a JSON blob, but not enforced to any degree by the contracts + * @param _metadata IPFS hash of the metadata + */ + "editColony(string)"( + _metadata: 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; + + /** + * 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(address[],int256[])"( + _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; + + /** + * Mint `_wad` amount of colony tokens. Secured function to authorised members. + * @param _wad Amount to mint + */ + "mintTokens(uint256)"( + _wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Mint `_wad` amount of colony tokens and send to `_guy`. Secured function to authorised members. + * @param _guy Recipient of new tokens + * @param _wad Amount to mint + */ + mintTokensFor( + _guy: string, + _wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Mint `_wad` amount of colony tokens and send to `_guy`. Secured function to authorised members. + * @param _guy Recipient of new tokens + * @param _wad Amount to mint + */ + "mintTokensFor(address,uint256)"( + _guy: string, + _wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Lock the colony's token. Can only be called by a network-managed extension. + */ + lockToken(overrides?: TransactionOverrides): Promise; + + /** + * Lock the colony's token. Can only be called by a network-managed extension. + */ + "lockToken()"(overrides?: TransactionOverrides): Promise; + + /** + * Unlock the colony's token for a user. Can only be called by a network-managed extension. + * @param lockId The specific lock to unlock + * @param user The user to unlock + */ + unlockTokenForUser( + user: string, + lockId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Unlock the colony's token for a user. Can only be called by a network-managed extension. + * @param lockId The specific lock to unlock + * @param user The user to unlock + */ + "unlockTokenForUser(address,uint256)"( + user: string, + lockId: 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; + + /** + * 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(string,string)"( + 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; + + /** + * 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(string)"( + orbitdb: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Install an extension to the colony. Secured function to authorised members. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param version The new extension version to install + */ + installExtension( + extensionId: Arrayish, + version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Install an extension to the colony. Secured function to authorised members. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param version The new extension version to install + */ + "installExtension(bytes32,uint256)"( + extensionId: Arrayish, + version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Upgrade an extension in a colony. Secured function to authorised members. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param newVersion The version to upgrade to (must be one larger than the current version) + */ + upgradeExtension( + extensionId: Arrayish, + newVersion: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Upgrade an extension in a colony. Secured function to authorised members. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param newVersion The version to upgrade to (must be one larger than the current version) + */ + "upgradeExtension(bytes32,uint256)"( + extensionId: Arrayish, + newVersion: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the deprecation of an extension in a colony. Secured function to authorised members. + * @param deprecated Whether to deprecate the extension or not + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + deprecateExtension( + extensionId: Arrayish, + deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the deprecation of an extension in a colony. Secured function to authorised members. + * @param deprecated Whether to deprecate the extension or not + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + "deprecateExtension(bytes32,bool)"( + extensionId: Arrayish, + deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is a permanent action -- re-installing the extension will deploy a new contractIt is recommended to deprecate an extension before uninstalling to allow active objects to be resolved + * Uninstall an extension from a colony. Secured function to authorised members. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + uninstallExtension( + extensionId: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is a permanent action -- re-installing the extension will deploy a new contractIt is recommended to deprecate an extension before uninstalling to allow active objects to be resolved + * Uninstall an extension from a colony. Secured function to authorised members. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + "uninstallExtension(bytes32)"( + extensionId: Arrayish, + 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; + + /** + * 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(uint256,uint256,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _parentDomainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Adding new domains is currently retricted to one level only, i.e. `_parentDomainId` has to be the root domain id: `1`.We expect this function to only be used by the dapp + * 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 _metadata Metadata relating to the domain. Expected to be the IPFS hash of a JSON blob, but not enforced by the contracts. + * @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(uint256,uint256,uint256,string)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _parentDomainId: BigNumberish, + _metadata: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * 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 _domainId Id of the domain being edited + * @param _metadata Metadata relating to the domain. Expected to be the IPFS hash of a JSON blob, but not enforced by the contracts. + * @param _permissionDomainId The domainId in which I have the permission to take this action + */ + editDomain( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + _metadata: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * 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 _domainId Id of the domain being edited + * @param _metadata Metadata relating to the domain. Expected to be the IPFS hash of a JSON blob, but not enforced by the contracts. + * @param _permissionDomainId The domainId in which I have the permission to take this action + */ + "editDomain(uint256,uint256,uint256,string)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + _metadata: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a domain by id. + * @param _id Id of the domain which details to get + */ + getDomain( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber] & { skillId: BigNumber; fundingPotId: BigNumber } + >; + + /** + * Get a domain by id. + * @param _id Id of the domain which details to get + */ + "getDomain(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber] & { skillId: BigNumber; fundingPotId: BigNumber } + >; + + /** + * Get the number of domains in the colony. + */ + getDomainCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of domains in the colony. + */ + "getDomainCount()"(overrides?: TransactionOverrides): Promise; + + /** + * For more detail about branchMask and siblings, examine the PatriciaTree implementation. While external, 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. + */ + verifyReputationProof( + key: Arrayish, + value: Arrayish, + branchMask: BigNumberish, + siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * For more detail about branchMask and siblings, examine the PatriciaTree implementation. While external, 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. + */ + "verifyReputationProof(bytes,bytes,uint256,bytes32[])"( + key: Arrayish, + value: Arrayish, + branchMask: BigNumberish, + siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Add a new expenditure in the colony. Secured function to authorised members. + * @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 expenditure belongs + * @param _permissionDomainId The domainId in which I have the permission to take this action + */ + makeExpenditure( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Add a new expenditure in the colony. Secured function to authorised members. + * @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 expenditure belongs + * @param _permissionDomainId The domainId in which I have the permission to take this action + */ + "makeExpenditure(uint256,uint256,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Updates the expenditure owner. Can only be called by expenditure owner. + * @param _id Expenditure identifier + * @param _newOwner New owner of expenditure + */ + transferExpenditure( + _id: BigNumberish, + _newOwner: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Updates the expenditure owner. Can only be called by expenditure owner. + * @param _id Expenditure identifier + * @param _newOwner New owner of expenditure + */ + "transferExpenditure(uint256,address)"( + _id: BigNumberish, + _newOwner: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future version + * DEPRECATED Updates the expenditure owner. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _id Expenditure identifier + * @param _newOwner New owner of expenditure + * @param _permissionDomainId The domainId in which I have the permission to take this action + */ + transferExpenditureViaArbitration( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _newOwner: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future version + * DEPRECATED Updates the expenditure owner. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _id Expenditure identifier + * @param _newOwner New owner of expenditure + * @param _permissionDomainId The domainId in which I have the permission to take this action + */ + "transferExpenditureViaArbitration(uint256,uint256,uint256,address)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _newOwner: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Cancels the expenditure and prevents further editing. Can only be called by expenditure owner. + * @param _id Expenditure identifier + */ + cancelExpenditure( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Cancels the expenditure and prevents further editing. Can only be called by expenditure owner. + * @param _id Expenditure identifier + */ + "cancelExpenditure(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Finalizes the expenditure and prevents further editing. Can only be called by expenditure owner. + * @param _id Expenditure identifier + */ + finalizeExpenditure( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Finalizes the expenditure and prevents further editing. Can only be called by expenditure owner. + * @param _id Expenditure identifier + */ + "finalizeExpenditure(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Sets the recipient on an expenditure slot. Can only be called by expenditure owner. + * @param _id Id of the expenditure + * @param _recipient Address of the recipient + * @param _slot Slot for the recipient address + */ + setExpenditureRecipient( + _id: BigNumberish, + _slot: BigNumberish, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Sets the recipient on an expenditure slot. Can only be called by expenditure owner. + * @param _id Id of the expenditure + * @param _recipient Address of the recipient + * @param _slot Slot for the recipient address + */ + "setExpenditureRecipient(uint256,uint256,address)"( + _id: BigNumberish, + _slot: BigNumberish, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the token payout on an expenditure slot. Can only be called by expenditure owner. + * @param _amount Payout amount + * @param _id Id of the expenditure + * @param _slot Number of the slot + * @param _token Address of the token, `0x0` value indicates Ether + */ + setExpenditurePayout( + _id: BigNumberish, + _slot: BigNumberish, + _token: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the token payout on an expenditure slot. Can only be called by expenditure owner. + * @param _amount Payout amount + * @param _id Id of the expenditure + * @param _slot Number of the slot + * @param _token Address of the token, `0x0` value indicates Ether + */ + "setExpenditurePayout(uint256,uint256,address,uint256)"( + _id: BigNumberish, + _slot: BigNumberish, + _token: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Sets the skill on an expenditure slot. Can only be called by expenditure owner. + * @param _id Expenditure identifier + * @param _skillId Id of the new skill to set + * @param _slot Number of the slot + */ + setExpenditureSkill( + _id: BigNumberish, + _slot: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Sets the skill on an expenditure slot. Can only be called by expenditure owner. + * @param _id Expenditure identifier + * @param _skillId Id of the new skill to set + * @param _slot Number of the slot + */ + "setExpenditureSkill(uint256,uint256,uint256)"( + _id: BigNumberish, + _slot: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future versionNote that when determining payouts the payoutModifier is incremented by WAD and converted into payoutScalar + * DEPRECATED Set the payout modifier on an expenditure slot. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _id Expenditure identifier + * @param _payoutModifier Modifier to their payout (between -1 and 1, denominated in WADs, 0 means no modification) + * @param _permissionDomainId The domainId in which I have the permission to take this action + * @param _slot Number of the slot + */ + setExpenditurePayoutModifier( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _slot: BigNumberish, + _payoutModifier: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future versionNote that when determining payouts the payoutModifier is incremented by WAD and converted into payoutScalar + * DEPRECATED Set the payout modifier on an expenditure slot. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _id Expenditure identifier + * @param _payoutModifier Modifier to their payout (between -1 and 1, denominated in WADs, 0 means no modification) + * @param _permissionDomainId The domainId in which I have the permission to take this action + * @param _slot Number of the slot + */ + "setExpenditurePayoutModifier(uint256,uint256,uint256,uint256,int256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _slot: BigNumberish, + _payoutModifier: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future version + * DEPRECATED Set the claim delay on an expenditure slot. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _claimDelay Time (in seconds) to delay claiming payout after finalization + * @param _id Expenditure identifier + * @param _permissionDomainId The domainId in which I have the permission to take this action + * @param _slot Number of the slot + */ + setExpenditureClaimDelay( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _slot: BigNumberish, + _claimDelay: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future version + * DEPRECATED Set the claim delay on an expenditure slot. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _claimDelay Time (in seconds) to delay claiming payout after finalization + * @param _id Expenditure identifier + * @param _permissionDomainId The domainId in which I have the permission to take this action + * @param _slot Number of the slot + */ + "setExpenditureClaimDelay(uint256,uint256,uint256,uint256,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _slot: BigNumberish, + _claimDelay: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set arbitrary state on an expenditure slot. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _id Expenditure identifier + * @param _keys Array of additional keys (for mappings & arrays) + * @param _mask Array of booleans indicated whether a key is a mapping (F) or an array index (T). + * @param _permissionDomainId The domainId in which I have the permission to take this action + * @param _storageSlot Number of the top-level storage slot (25, 26, or 27) + * @param _value Value to set at location + */ + setExpenditureState( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _storageSlot: BigNumberish, + _mask: boolean[], + _keys: Arrayish[], + _value: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set arbitrary state on an expenditure slot. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _id Expenditure identifier + * @param _keys Array of additional keys (for mappings & arrays) + * @param _mask Array of booleans indicated whether a key is a mapping (F) or an array index (T). + * @param _permissionDomainId The domainId in which I have the permission to take this action + * @param _storageSlot Number of the top-level storage slot (25, 26, or 27) + * @param _value Value to set at location + */ + "setExpenditureState(uint256,uint256,uint256,uint256,bool[],bytes32[],bytes32)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _storageSlot: BigNumberish, + _mask: boolean[], + _keys: Arrayish[], + _value: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Claim the payout for an expenditure slot. Here the network receives a fee from each payout. + * @param _id Expenditure identifier + * @param _slot Number of the slot + * @param _token Address of the token, `0x0` value indicates Ether + */ + claimExpenditurePayout( + _id: BigNumberish, + _slot: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Claim the payout for an expenditure slot. Here the network receives a fee from each payout. + * @param _id Expenditure identifier + * @param _slot Number of the slot + * @param _token Address of the token, `0x0` value indicates Ether + */ + "claimExpenditurePayout(uint256,uint256,address)"( + _id: BigNumberish, + _slot: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of expenditures in the colony. + */ + getExpenditureCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of expenditures in the colony. + */ + "getExpenditureCount()"(overrides?: TransactionOverrides): Promise; + + /** + * Returns an existing expenditure. + * @param _id Expenditure identifier + */ + getExpenditure( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [number, string, BigNumber, BigNumber, BigNumber, BigNumber] & { + status: number; + owner: string; + fundingPotId: BigNumber; + domainId: BigNumber; + finalizedTimestamp: BigNumber; + globalClaimDelay: BigNumber; + } + >; + + /** + * Returns an existing expenditure. + * @param _id Expenditure identifier + */ + "getExpenditure(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [number, string, BigNumber, BigNumber, BigNumber, BigNumber] & { + status: number; + owner: string; + fundingPotId: BigNumber; + domainId: BigNumber; + finalizedTimestamp: BigNumber; + globalClaimDelay: BigNumber; + } + >; + + /** + * Returns an existing expenditure slot. + * @param _id Expenditure identifier + * @param _slot Expenditure slot + */ + getExpenditureSlot( + _id: BigNumberish, + _slot: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [string, BigNumber, BigNumber, BigNumber[]] & { + recipient: string; + claimDelay: BigNumber; + payoutModifier: BigNumber; + skills: BigNumber[]; + } + >; + + /** + * Returns an existing expenditure slot. + * @param _id Expenditure identifier + * @param _slot Expenditure slot + */ + "getExpenditureSlot(uint256,uint256)"( + _id: BigNumberish, + _slot: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [string, BigNumber, BigNumber, BigNumber[]] & { + recipient: string; + claimDelay: BigNumber; + payoutModifier: BigNumber; + skills: BigNumber[]; + } + >; + + /** + * Returns an existing expenditure slot's payout for a token. + * @param _id Expenditure identifier + * @param _slot Expenditure slot + * @param _token Token address + */ + getExpenditureSlotPayout( + _id: BigNumberish, + _slot: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns an existing expenditure slot's payout for a token. + * @param _id Expenditure identifier + * @param _slot Expenditure slot + * @param _token Token address + */ + "getExpenditureSlotPayout(uint256,uint256,address)"( + _id: BigNumberish, + _slot: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 + */ + addPayment( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _recipient: string, + _token: string, + _amount: BigNumberish, + _domainId: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): 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 + */ + "addPayment(uint256,uint256,address,address,uint256,uint256,uint256)"( + _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; + + /** + * 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(uint256,uint256,uint256)"( + _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 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(uint256,uint256,uint256,address)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _recipient: string, + 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 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(uint256,uint256,uint256,uint256)"( + _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; + + /** + * 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(uint256,uint256,uint256,address,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _token: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns an exiting payment. + * @param _id Payment identifier + */ + getPayment( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [string, boolean, BigNumber, BigNumber, BigNumber[]] & { + recipient: string; + finalized: boolean; + fundingPotId: BigNumber; + domainId: BigNumber; + skills: BigNumber[]; + } + >; + + /** + * Returns an exiting payment. + * @param _id Payment identifier + */ + "getPayment(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [string, boolean, BigNumber, BigNumber, BigNumber[]] & { + recipient: string; + finalized: boolean; + fundingPotId: BigNumber; + domainId: BigNumber; + skills: 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; + + /** + * 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(uint256,address)"( + _id: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of payments in the colony. + */ + getPaymentCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of payments in the colony. + */ + "getPaymentCount()"(overrides?: TransactionOverrides): 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; + + /** + * 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(uint256,uint256,bytes32,uint256,uint256,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _specificationHash: Arrayish, + _domainId: BigNumberish, + _skillId: BigNumberish, + _dueDate: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of tasks in the colony. + */ + getTaskCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of tasks in the colony. + */ + "getTaskCount()"(overrides?: TransactionOverrides): Promise; + + /** + * Starts from 0 and is incremented on every co-reviewed task change via `executeTaskChange` call. + * @param _id Id of the task + */ + getTaskChangeNonce( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Starts from 0 and is incremented on every co-reviewed task change via `executeTaskChange` call. + * @param _id Id of the task + */ + "getTaskChangeNonce(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): 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; + + /** + * 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(uint8[],bytes32[],bytes32[],uint8[],uint256,bytes)"( + _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; + + /** + * 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(uint8[],bytes32[],bytes32[],uint8[],uint256,bytes)"( + _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; + + /** + * 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(uint256,uint8,bytes32)"( + _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; + + /** + * 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(uint256,uint8,uint8,bytes32)"( + _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 + */ + generateSecret( + _salt: Arrayish, + _value: BigNumberish, + 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 + */ + "generateSecret(bytes32,uint256)"( + _salt: Arrayish, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `ColonyStorage.RatingSecrets` information for task `_id`. + * @param _id Id of the task + */ + getTaskWorkRatingSecretsInfo( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber] & { nSecrets: BigNumber; lastSubmittedAt: BigNumber } + >; + + /** + * Get the `ColonyStorage.RatingSecrets` information for task `_id`. + * @param _id Id of the task + */ + "getTaskWorkRatingSecretsInfo(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber] & { nSecrets: BigNumber; lastSubmittedAt: 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 + */ + getTaskWorkRatingSecret( + _id: BigNumberish, + _role: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * 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 + */ + "getTaskWorkRatingSecret(uint256,uint8)"( + _id: BigNumberish, + _role: BigNumberish, + overrides?: TransactionOverrides + ): 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 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(uint256,address,uint256,uint256)"( + _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 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(uint256,address)"( + _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; + + /** + * 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(uint256,address)"( + _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 evaluator role. Agreed between manager and currently assigned evaluator. + * @param _id Id of the task + */ + "removeTaskEvaluatorRole(uint256)"( + _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; + + /** + * Removing worker role. Agreed between manager and currently assigned worker. + * @param _id Id of the task + */ + "removeTaskWorkerRole(uint256)"( + _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; + + /** + * 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(uint256,uint256)"( + _id: BigNumberish, + _skillId: 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 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(uint256,bytes32)"( + _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 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(uint256,uint256)"( + _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; + + /** + * 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(uint256,bytes32)"( + _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; + + /** + * 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(uint256,bytes32,bytes32)"( + _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.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(uint256)"( + _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; + + /** + * 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(uint256)"( + _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; + + /** + * 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(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a task with id `_id` + * @param _id Id of the task + */ + getTask( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [ + string, + string, + number, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber[] + ] & { + specificationHash: string; + deliverableHash: string; + status: number; + dueDate: BigNumber; + fundingPotId: BigNumber; + completionTimestamp: BigNumber; + domainId: BigNumber; + skillIds: BigNumber[]; + } + >; + + /** + * Get a task with id `_id` + * @param _id Id of the task + */ + "getTask(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [ + string, + string, + number, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber[] + ] & { + specificationHash: string; + deliverableHash: string; + status: number; + dueDate: BigNumber; + fundingPotId: BigNumber; + completionTimestamp: BigNumber; + domainId: BigNumber; + skillIds: 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 + */ + getTaskRole( + _id: BigNumberish, + _role: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [string, boolean, number] & { + user: string; + rateFail: boolean; + rating: number; + } + >; + + /** + * 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 + */ + "getTaskRole(uint256,uint8)"( + _id: BigNumberish, + _role: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [string, boolean, number] & { + user: string; + rateFail: boolean; + rating: 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; + + /** + * 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(uint256)"( + _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. + */ + getRewardInverse(overrides?: TransactionOverrides): Promise; + + /** + * Return 1 / the reward to pay out from revenue. e.g. if the fee is 1% (or 0.01), return 100. + */ + "getRewardInverse()"(overrides?: TransactionOverrides): 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 + */ + getTaskPayout( + _id: BigNumberish, + _role: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 + */ + "getTaskPayout(uint256,uint8,address)"( + _id: BigNumberish, + _role: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 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(uint256,address,uint256)"( + _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 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(uint256,address,uint256)"( + _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; + + /** + * 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(uint256,address,uint256)"( + _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; + + /** + * 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(uint256,address,uint256,uint256,uint256)"( + _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; + + /** + * 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(uint256,uint8,address)"( + _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; + + /** + * 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(address,bytes,bytes,uint256,bytes32[])"( + _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 (deposited in TokenLocking), `_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; + + /** + * 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 (deposited in TokenLocking), `_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(uint256,uint256[7],bytes,bytes,uint256,bytes32[])"( + _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 + */ + getRewardPayoutInfo( + _payoutId: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [ + string, + BigNumber, + BigNumber, + BigNumber, + string, + BigNumber, + BigNumber, + boolean + ] & { + reputationState: string; + colonyWideReputation: BigNumber; + totalTokens: BigNumber; + amount: BigNumber; + tokenAddress: string; + blockTimestamp: BigNumber; + amountRemaining: BigNumber; + finalized: boolean; + } + >; + + /** + * Get useful information about specific reward payout. + * @param _payoutId Id of the reward payout + */ + "getRewardPayoutInfo(uint256)"( + _payoutId: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [ + string, + BigNumber, + BigNumber, + BigNumber, + string, + BigNumber, + BigNumber, + boolean + ] & { + reputationState: string; + colonyWideReputation: BigNumber; + totalTokens: BigNumber; + amount: BigNumber; + tokenAddress: string; + blockTimestamp: BigNumber; + amountRemaining: BigNumber; + finalized: boolean; + } + >; + + /** + * 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; + + /** + * 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(uint256)"( + _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 + */ + getFundingPot( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [number, BigNumber, BigNumber] & { + associatedType: number; + associatedTypeId: BigNumber; + payoutsWeCannotMake: BigNumber; + } + >; + + /** + * For the reward funding pot (e.g. id: 0) this returns (0, 0, 0). + * Get the non-mapping properties of a pot by id. + * @param _id Id of the pot which details to get + */ + "getFundingPot(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [number, BigNumber, BigNumber] & { + associatedType: number; + associatedTypeId: BigNumber; + payoutsWeCannotMake: BigNumber; + } + >; + + /** + * Get the number of funding pots in the colony. + */ + getFundingPotCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of funding pots in the colony. + */ + "getFundingPotCount()"(overrides?: TransactionOverrides): 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 + */ + getFundingPotBalance( + _potId: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 + */ + "getFundingPotBalance(uint256,address)"( + _potId: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 + */ + getFundingPotPayout( + _potId: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 + */ + "getFundingPotPayout(uint256,address)"( + _potId: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 _childSkillIndex The child index in _permissionDomainId where I will be taking this action + * @param _domainId The domain where I am taking this action, pointed to by _permissionDomainId and _childSkillIndex + * @param _fromChildSkillIndex In the array of child skills for the skill associated with the domain pointed to by _permissionDomainId + _childSkillIndex, the index of the skill associated with the domain that contains _fromPot + * @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 same, but for the _toPot which the funds are being moved to + * @param _toPot Funding pot id receiving the funds + * @param _token Address of the token, `0x0` value indicates Ether + */ + moveFundsBetweenPots( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + _fromChildSkillIndex: BigNumberish, + _toChildSkillIndex: BigNumberish, + _fromPot: BigNumberish, + _toPot: BigNumberish, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 _childSkillIndex The child index in _permissionDomainId where I will be taking this action + * @param _domainId The domain where I am taking this action, pointed to by _permissionDomainId and _childSkillIndex + * @param _fromChildSkillIndex In the array of child skills for the skill associated with the domain pointed to by _permissionDomainId + _childSkillIndex, the index of the skill associated with the domain that contains _fromPot + * @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 same, but for the _toPot which the funds are being moved to + * @param _toPot Funding pot id receiving the funds + * @param _token Address of the token, `0x0` value indicates Ether + */ + "moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + _fromChildSkillIndex: BigNumberish, + _toChildSkillIndex: BigNumberish, + _fromPot: BigNumberish, + _toPot: BigNumberish, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * DEPRECATEDMove 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(uint256,uint256,uint256,uint256,uint256,uint256,address)"( + _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; + + /** + * 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(address)"( + _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 + */ + getNonRewardPotsTotal( + _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 + */ + "getNonRewardPotsTotal(address)"( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Allow the _approvee to obligate some amount of tokens as a stake. + * @param _amount Amount of internal token up to which we are willing to be obligated. + * @param _approvee Address of the account we are willing to let obligate us. + * @param _domainId Domain in which we are willing to be obligated. + */ + approveStake( + _approvee: string, + _domainId: BigNumberish, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Allow the _approvee to obligate some amount of tokens as a stake. + * @param _amount Amount of internal token up to which we are willing to be obligated. + * @param _approvee Address of the account we are willing to let obligate us. + * @param _domainId Domain in which we are willing to be obligated. + */ + "approveStake(address,uint256,uint256)"( + _approvee: string, + _domainId: BigNumberish, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Obligate the user some amount of tokens as a stake. + * @param _amount Amount of internal token we are obligating. + * @param _domainId Domain in which we are obligating the user. + * @param _user Address of the account we are obligating. + */ + obligateStake( + _user: string, + _domainId: BigNumberish, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Obligate the user some amount of tokens as a stake. + * @param _amount Amount of internal token we are obligating. + * @param _domainId Domain in which we are obligating the user. + * @param _user Address of the account we are obligating. + */ + "obligateStake(address,uint256,uint256)"( + _user: string, + _domainId: BigNumberish, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Deobligate the user some amount of tokens, releasing the stake. + * @param _amount Amount of internal token we are deobligating. + * @param _domainId Domain in which we are deobligating the user. + * @param _user Address of the account we are deobligating. + */ + deobligateStake( + _user: string, + _domainId: BigNumberish, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Deobligate the user some amount of tokens, releasing the stake. + * @param _amount Amount of internal token we are deobligating. + * @param _domainId Domain in which we are deobligating the user. + * @param _user Address of the account we are deobligating. + */ + "deobligateStake(address,uint256,uint256)"( + _user: string, + _domainId: BigNumberish, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Transfer some amount of obligated tokens. Can be called by the arbitration role. + * @param _amount Amount of internal token we are transferring. + * @param _childSkillIndex The child index in `_permissionDomainId` where we can find `_domainId`. + * @param _domainId Domain in which we are transferring the tokens. + * @param _obligator Address of the account who set the obligation. + * @param _permissionDomainId The domainId in which I have the permission to take this action. + * @param _recipient Recipient of the transferred tokens. + * @param _user Address of the account we are transferring. + */ + transferStake( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _obligator: string, + _user: string, + _domainId: BigNumberish, + _amount: BigNumberish, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Transfer some amount of obligated tokens. Can be called by the arbitration role. + * @param _amount Amount of internal token we are transferring. + * @param _childSkillIndex The child index in `_permissionDomainId` where we can find `_domainId`. + * @param _domainId Domain in which we are transferring the tokens. + * @param _obligator Address of the account who set the obligation. + * @param _permissionDomainId The domainId in which I have the permission to take this action. + * @param _recipient Recipient of the transferred tokens. + * @param _user Address of the account we are transferring. + */ + "transferStake(uint256,uint256,address,address,uint256,uint256,address)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _obligator: string, + _user: string, + _domainId: BigNumberish, + _amount: BigNumberish, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * View an approval to obligate tokens. + * @param _domainId Domain in which we are willing to be obligated. + * @param _obligator Address of the account we are willing to let obligate us. + * @param _user User allowing their tokens to be obligated. + */ + getApproval( + _user: string, + _obligator: string, + _domainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * View an approval to obligate tokens. + * @param _domainId Domain in which we are willing to be obligated. + * @param _obligator Address of the account we are willing to let obligate us. + * @param _user User allowing their tokens to be obligated. + */ + "getApproval(address,address,uint256)"( + _user: string, + _obligator: string, + _domainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * View an obligation of tokens. + * @param _domainId Domain in which we are obligated. + * @param _obligator Address of the account who obligated us. + * @param _user User whose tokens are obligated. + */ + getObligation( + _user: string, + _obligator: string, + _domainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * View an obligation of tokens. + * @param _domainId Domain in which we are obligated. + * @param _obligator Address of the account who obligated us. + * @param _user User whose tokens are obligated. + */ + "getObligation(address,address,uint256)"( + _user: string, + _obligator: string, + _domainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the domain corresponding to a funding pot + * @param _fundingPotId Id of the funding pot + */ + getDomainFromFundingPot( + _fundingPotId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the domain corresponding to a funding pot + * @param _fundingPotId Id of the funding pot + */ + "getDomainFromFundingPot(uint256)"( + _fundingPotId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Burn tokens held by the colony. Can only burn tokens held in the root funding pot. + * @param amount The amount of tokens to burn + * @param token The address of the token to burn + */ + burnTokens( + token: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Burn tokens held by the colony. Can only burn tokens held in the root funding pot. + * @param amount The amount of tokens to burn + * @param token The address of the token to burn + */ + "burnTokens(address,uint256)"( + token: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * unlock the native colony token, if possible + */ + unlockToken(overrides?: TransactionOverrides): Promise; + + /** + * unlock the native colony token, if possible + */ + "unlockToken()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Update the internal bookkeeping around external ERC20 approvals + * @param spender The account we have approved + * @param token The address of the token which was approved + */ + updateApprovalAmount( + token: string, + spender: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Update the internal bookkeeping around external ERC20 approvals + * @param spender The account we have approved + * @param token The address of the token which was approved + */ + "updateApprovalAmount(address,address)"( + token: string, + spender: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the current approval amount + * @param spender The account we have approved + * @param token The address of the token which was approved + */ + getTokenApproval( + token: string, + spender: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the current approval amount + * @param spender The account we have approved + * @param token The address of the token which was approved + */ + "getTokenApproval(address,address)"( + token: string, + spender: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the current total approval amount across all spenders + * @param token The address of the token which was approved + */ + getTotalTokenApproval( + token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the current total approval amount across all spenders + * @param token The address of the token which was approved + */ + "getTotalTokenApproval(address)"( + token: string, + overrides?: TransactionOverrides + ): Promise; + + filters: { + Annotation( + agent: string | null, + txHash: Arrayish | null, + metadata: null + ): EventFilter; + + ColonyBootstrapped(agent: null, users: null, amounts: null): EventFilter; + + ColonyFundsClaimed( + agent: null, + token: null, + fee: null, + payoutRemainder: null + ): EventFilter; + + ColonyFundsMovedBetweenFundingPots( + agent: null, + fromPot: BigNumberish | null, + toPot: BigNumberish | null, + amount: null, + token: null + ): EventFilter; + + ColonyInitialised( + agent: null, + colonyNetwork: null, + token: null + ): EventFilter; + + ColonyMetadata(agent: null, metadata: null): EventFilter; + + ColonyRewardInverseSet(agent: null, rewardInverse: null): EventFilter; + + ColonyRoleSet( + agent: null, + user: string | null, + domainId: BigNumberish | null, + role: BigNumberish | null, + setTo: null + ): EventFilter; + + ColonyUpgraded( + agent: null, + oldVersion: null, + newVersion: null + ): EventFilter; + + DomainAdded(agent: null, domainId: null): EventFilter; + + DomainMetadata( + agent: null, + domainId: BigNumberish | null, + metadata: null + ): EventFilter; + + ExpenditureAdded(agent: null, expenditureId: null): EventFilter; + + ExpenditureCancelled( + agent: null, + expenditureId: BigNumberish | null + ): EventFilter; + + ExpenditureFinalized( + agent: null, + expenditureId: BigNumberish | null + ): EventFilter; + + ExpenditurePayoutSet( + agent: null, + expenditureId: BigNumberish | null, + slot: BigNumberish | null, + token: string | null, + amount: null + ): EventFilter; + + ExpenditureRecipientSet( + agent: null, + expenditureId: BigNumberish | null, + slot: BigNumberish | null, + recipient: string | null + ): EventFilter; + + ExpenditureSkillSet( + agent: null, + expenditureId: BigNumberish | null, + slot: BigNumberish | null, + skillId: BigNumberish | null + ): EventFilter; + + ExpenditureTransferred( + agent: null, + expenditureId: BigNumberish | null, + owner: string | null + ): EventFilter; + + FundingPotAdded(fundingPotId: null): EventFilter; + + PaymentAdded(agent: null, paymentId: null): EventFilter; + + PaymentFinalized(agent: null, paymentId: BigNumberish | null): EventFilter; + + PaymentPayoutSet( + agent: null, + paymentId: BigNumberish | null, + token: null, + amount: null + ): EventFilter; + + PaymentRecipientSet( + agent: null, + paymentId: BigNumberish | null, + recipient: null + ): EventFilter; + + PaymentSkillSet( + agent: null, + paymentId: BigNumberish | null, + skillId: null + ): EventFilter; + + PayoutClaimed( + agent: null, + fundingPotId: BigNumberish | null, + token: null, + amount: null + ): EventFilter; + + RecoveryModeEntered(user: null): EventFilter; + + RecoveryModeExitApproved(user: null): EventFilter; + + RecoveryModeExited(user: null): EventFilter; + + RecoveryRoleSet(user: string | null, setTo: null): EventFilter; + + RecoveryStorageSlotSet( + user: null, + slot: null, + fromValue: null, + toValue: null + ): EventFilter; + + RewardPayoutClaimed( + rewardPayoutId: null, + user: null, + fee: null, + rewardRemainder: null + ): EventFilter; + + RewardPayoutCycleEnded(agent: null, rewardPayoutId: null): EventFilter; + + RewardPayoutCycleStarted(agent: null, rewardPayoutId: null): EventFilter; + + TaskAdded(agent: null, taskId: null): EventFilter; + + TaskBriefSet( + taskId: BigNumberish | null, + specificationHash: null + ): EventFilter; + + TaskCanceled(taskId: BigNumberish | null): EventFilter; + + TaskChangedViaSignatures(reviewerAddresses: null): EventFilter; + + TaskCompleted(agent: null, taskId: BigNumberish | null): EventFilter; + + TaskDeliverableSubmitted( + agent: null, + taskId: BigNumberish | null, + deliverableHash: null + ): EventFilter; + + TaskDueDateSet(taskId: BigNumberish | null, dueDate: null): EventFilter; + + TaskFinalized(agent: null, taskId: BigNumberish | null): EventFilter; + + TaskPayoutSet( + taskId: BigNumberish | null, + role: null, + token: null, + amount: null + ): EventFilter; + + TaskRoleUserSet( + taskId: BigNumberish | null, + role: null, + user: string | null + ): EventFilter; + + TaskSkillSet( + taskId: BigNumberish | null, + skillId: BigNumberish | null + ): EventFilter; + + TaskWorkRatingRevealed( + agent: null, + taskId: BigNumberish | null, + role: null, + rating: null + ): EventFilter; + + TokenUnlocked(): EventFilter; + + TokensBurned(agent: null, token: null, amount: null): EventFilter; + + TokensMinted(agent: null, who: null, amount: null): EventFilter; + }; + + estimate: { + /** + * Indicate approval to exit recovery mode. Can only be called by user with recovery role. + */ + approveExitRecovery(overrides?: TransactionOverrides): Promise; + + /** + * Indicate approval to exit recovery mode. Can only be called by user with recovery role. + */ + "approveExitRecovery()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * No return value, but should throw if protected.This is external, 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, + overrides?: TransactionOverrides + ): Promise; + + /** + * No return value, but should throw if protected.This is external, 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(uint256)"( + _slot: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Put colony network mining into recovery mode. Can only be called by user with recovery role. + */ + enterRecoveryMode(overrides?: TransactionOverrides): Promise; + + /** + * Put colony network mining into recovery mode. Can only be called by user with recovery role. + */ + "enterRecoveryMode()"(overrides?: TransactionOverrides): Promise; + + /** + * Exit recovery mode, can be called by anyone if enough whitelist approvals are given. + */ + exitRecoveryMode(overrides?: TransactionOverrides): Promise; + + /** + * Exit recovery mode, can be called by anyone if enough whitelist approvals are given. + */ + "exitRecoveryMode()"(overrides?: TransactionOverrides): Promise; + + /** + * Is colony network in recovery mode. + */ + isInRecoveryMode(overrides?: TransactionOverrides): Promise; + + /** + * Is colony network in recovery mode. + */ + "isInRecoveryMode()"(overrides?: TransactionOverrides): Promise; + + /** + * Return number of recovery roles. + */ + numRecoveryRoles(overrides?: TransactionOverrides): Promise; + + /** + * Return number of recovery roles. + */ + "numRecoveryRoles()"(overrides?: TransactionOverrides): 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; + + /** + * Remove colony recovery role. Can only be called by root role. + * @param _user User we want to remove recovery role from + */ + "removeRecoveryRole(address)"( + _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; + + /** + * Set new colony recovery role. Can be called by root. + * @param _user User we want to give a recovery role to + */ + "setRecoveryRole(address)"( + _user: string, + overrides?: TransactionOverrides + ): 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; + + /** + * 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(uint256,bytes32)"( + _slot: BigNumberish, + _value: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `ColonyAuthority` for the colony. + */ + authority(overrides?: TransactionOverrides): Promise; + + /** + * Get the `ColonyAuthority` for the colony. + */ + "authority()"(overrides?: TransactionOverrides): Promise; + + /** + * Used for testing. + * Get the colony `owner` address. This should be address(0x0) at all times. + */ + owner(overrides?: TransactionOverrides): Promise; + + /** + * Used for testing. + * Get the colony `owner` address. This should be address(0x0) at all times. + */ + "owner()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the Colony contract version. Starts from 1 and is incremented with every deployed contract change. + */ + version(overrides?: TransactionOverrides): Promise; + + /** + * Get the Colony contract version. Starts from 1 and is incremented with every deployed contract change. + */ + "version()"(overrides?: TransactionOverrides): 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; + + /** + * 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(uint256)"( + _newVersion: BigNumberish, + 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 external 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; + + /** + * Can only be called by the colony itself, and only expected to be called as part of the `upgrade()` call. Required to be external 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. + */ + getColonyNetwork(overrides?: TransactionOverrides): Promise; + + /** + * The colonyNetworkAddress we read here is set once, during `initialiseColony`. + * Returns the colony network address set on the Colony. + */ + "getColonyNetwork()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the colony token. + */ + getToken(overrides?: TransactionOverrides): Promise; + + /** + * Get the colony token. + */ + "getToken()"(overrides?: TransactionOverrides): Promise; + + /** + * Execute arbitrary transaction on behalf of the Colony + * @param _action Bytes array encoding the function call and arguments + * @param _to Contract to receive the function call (cannot be network or token locking) + */ + makeArbitraryTransaction( + _to: string, + _action: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Execute arbitrary transaction on behalf of the Colony + * @param _action Bytes array encoding the function call and arguments + * @param _to Contract to receive the function call (cannot be network or token locking) + */ + "makeArbitraryTransaction(address,bytes)"( + _to: string, + _action: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a metadata string for a transaction + * @param _metadata String of metadata for tx + * @param _txHash Hash of transaction being annotated (0x0 for current tx) + */ + annotateTransaction( + _txHash: Arrayish, + _metadata: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a metadata string for a transaction + * @param _metadata String of metadata for tx + * @param _txHash Hash of transaction being annotated (0x0 for current tx) + */ + "annotateTransaction(bytes32,string)"( + _txHash: Arrayish, + _metadata: string, + overrides?: TransactionOverrides + ): 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 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(address,bool)"( + _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 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(uint256,uint256,address,uint256,bool)"( + _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 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(uint256,uint256,address,uint256,bool)"( + _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 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(uint256,uint256,address,uint256,bool)"( + _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; + + /** + * 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(uint256,uint256,address,uint256,bool)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _user: string, + _domainId: BigNumberish, + _setTo: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set several roles in one transaction. 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 _roles Byte array representing the desired role setting (1 for on, 0 for off) + * @param _user User we want to give a role to + */ + setUserRoles( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _user: string, + _domainId: BigNumberish, + _roles: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set several roles in one transaction. 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 _roles Byte array representing the desired role setting (1 for on, 0 for off) + * @param _user User we want to give a role to + */ + "setUserRoles(uint256,uint256,address,uint256,bytes32)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _user: string, + _domainId: BigNumberish, + _roles: Arrayish, + 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 + */ + hasUserRole( + _user: string, + _domainId: BigNumberish, + _role: BigNumberish, + 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 + */ + "hasUserRole(address,uint256,uint8)"( + _user: string, + _domainId: BigNumberish, + _role: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Check whether a given user has a given role for the colony, in a child domain. Calls the function of the same name on the colony's authority contract and an internal inheritence validator function + * @param _childDomainId The domain where we want to use the role + * @param _childSkillIndex The index that the `_childDomainId` is relative to `_domainId` + * @param _domainId Domain in which the caller has the role + * @param _role The role we want to check for + * @param _user The user whose role we want to check + */ + hasInheritedUserRole( + _user: string, + _domainId: BigNumberish, + _role: BigNumberish, + _childSkillIndex: BigNumberish, + _childDomainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Check whether a given user has a given role for the colony, in a child domain. Calls the function of the same name on the colony's authority contract and an internal inheritence validator function + * @param _childDomainId The domain where we want to use the role + * @param _childSkillIndex The index that the `_childDomainId` is relative to `_domainId` + * @param _domainId Domain in which the caller has the role + * @param _role The role we want to check for + * @param _user The user whose role we want to check + */ + "hasInheritedUserRole(address,uint256,uint8,uint256,uint256)"( + _user: string, + _domainId: BigNumberish, + _role: BigNumberish, + _childSkillIndex: BigNumberish, + _childDomainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Check whether a given user can modify roles in the target domain `_childDomainId`. Mostly a convenience function to provide a uniform interface for extension contracts validating permissions + * @param _childDomainId The domain where we want to edit roles + * @param _childSkillIndex The index that the `_childDomainId` is relative to `_domainId` + * @param _domainId Domain in which the caller has the role (currently Root or Architecture) + * @param _user The user whose permissions we want to check + */ + userCanSetRoles( + _user: string, + _domainId: BigNumberish, + _childSkillIndex: BigNumberish, + _childDomainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Check whether a given user can modify roles in the target domain `_childDomainId`. Mostly a convenience function to provide a uniform interface for extension contracts validating permissions + * @param _childDomainId The domain where we want to edit roles + * @param _childSkillIndex The index that the `_childDomainId` is relative to `_domainId` + * @param _domainId Domain in which the caller has the role (currently Root or Architecture) + * @param _user The user whose permissions we want to check + */ + "userCanSetRoles(address,uint256,uint256,uint256)"( + _user: string, + _domainId: BigNumberish, + _childSkillIndex: BigNumberish, + _childDomainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Gets the bytes32 representation of the roles for a user in a given domain + * @param _domain The domain we want to get roles in + * @param _user The user whose roles we want to get + */ + getUserRoles( + _user: string, + _domain: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Gets the bytes32 representation of the roles for a user in a given domain + * @param _domain The domain we want to get roles in + * @param _user The user whose roles we want to get + */ + "getUserRoles(address,uint256)"( + _user: string, + _domain: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Gets the bytes32 representation of the roles authorized to call a function + * @param _sig The function signature + */ + getCapabilityRoles( + _sig: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Gets the bytes32 representation of the roles authorized to call a function + * @param _sig The function signature + */ + "getCapabilityRoles(bytes4)"( + _sig: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a positive domain reputation update. Available only to Root role holders + * @param _amount The (positive) amount of reputation to gain + * @param _domainId The domain where the user will gain reputation + * @param _user The user who will gain reputation + */ + emitDomainReputationReward( + _domainId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a positive domain reputation update. Available only to Root role holders + * @param _amount The (positive) amount of reputation to gain + * @param _domainId The domain where the user will gain reputation + * @param _user The user who will gain reputation + */ + "emitDomainReputationReward(uint256,address,int256)"( + _domainId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a positive skill reputation update. Available only to Root role holders + * @param _amount The (positive) amount of reputation to gain + * @param _skillId The skill where the user will gain reputation + * @param _user The user who will gain reputation + */ + emitSkillReputationReward( + _skillId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a positive skill reputation update. Available only to Root role holders + * @param _amount The (positive) amount of reputation to gain + * @param _skillId The skill where the user will gain reputation + * @param _user The user who will gain reputation + */ + "emitSkillReputationReward(uint256,address,int256)"( + _skillId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a negative domain reputation update. Available only to Arbitration role holders + * @param _amount The (negative) amount of reputation to lose + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId` + * @param _domainId The domain where the user will lose reputation + * @param _permissionDomainId The domainId in which I hold the Arbitration role + * @param _user The user who will lose reputation + */ + emitDomainReputationPenalty( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a negative domain reputation update. Available only to Arbitration role holders + * @param _amount The (negative) amount of reputation to lose + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId` + * @param _domainId The domain where the user will lose reputation + * @param _permissionDomainId The domainId in which I hold the Arbitration role + * @param _user The user who will lose reputation + */ + "emitDomainReputationPenalty(uint256,uint256,uint256,address,int256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a negative skill reputation update. Available only to Arbitration role holders in the root domain + * @param _amount The (negative) amount of reputation to lose + * @param _skillId The skill where the user will lose reputation + * @param _user The user who will lose reputation + */ + emitSkillReputationPenalty( + _skillId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Emit a negative skill reputation update. Available only to Arbitration role holders in the root domain + * @param _amount The (negative) amount of reputation to lose + * @param _skillId The skill where the user will lose reputation + * @param _user The user who will lose reputation + */ + "emitSkillReputationPenalty(uint256,address,int256)"( + _skillId: BigNumberish, + _user: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): 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; + + /** + * 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(address,address)"( + _colonyNetworkAddress: string, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called to change the metadata associated with a colony. Expected to be a IPFS hash of a JSON blob, but not enforced to any degree by the contracts + * @param _metadata IPFS hash of the metadata + */ + editColony( + _metadata: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called to change the metadata associated with a colony. Expected to be a IPFS hash of a JSON blob, but not enforced to any degree by the contracts + * @param _metadata IPFS hash of the metadata + */ + "editColony(string)"( + _metadata: 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; + + /** + * 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(address[],int256[])"( + _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; + + /** + * Mint `_wad` amount of colony tokens. Secured function to authorised members. + * @param _wad Amount to mint + */ + "mintTokens(uint256)"( + _wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Mint `_wad` amount of colony tokens and send to `_guy`. Secured function to authorised members. + * @param _guy Recipient of new tokens + * @param _wad Amount to mint + */ + mintTokensFor( + _guy: string, + _wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Mint `_wad` amount of colony tokens and send to `_guy`. Secured function to authorised members. + * @param _guy Recipient of new tokens + * @param _wad Amount to mint + */ + "mintTokensFor(address,uint256)"( + _guy: string, + _wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Lock the colony's token. Can only be called by a network-managed extension. + */ + lockToken(overrides?: TransactionOverrides): Promise; + + /** + * Lock the colony's token. Can only be called by a network-managed extension. + */ + "lockToken()"(overrides?: TransactionOverrides): Promise; + + /** + * Unlock the colony's token for a user. Can only be called by a network-managed extension. + * @param lockId The specific lock to unlock + * @param user The user to unlock + */ + unlockTokenForUser( + user: string, + lockId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Unlock the colony's token for a user. Can only be called by a network-managed extension. + * @param lockId The specific lock to unlock + * @param user The user to unlock + */ + "unlockTokenForUser(address,uint256)"( + user: string, + lockId: 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; + + /** + * 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(string,string)"( + 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; + + /** + * 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(string)"( + orbitdb: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Install an extension to the colony. Secured function to authorised members. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param version The new extension version to install + */ + installExtension( + extensionId: Arrayish, + version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Install an extension to the colony. Secured function to authorised members. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param version The new extension version to install + */ + "installExtension(bytes32,uint256)"( + extensionId: Arrayish, + version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Upgrade an extension in a colony. Secured function to authorised members. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param newVersion The version to upgrade to (must be one larger than the current version) + */ + upgradeExtension( + extensionId: Arrayish, + newVersion: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Upgrade an extension in a colony. Secured function to authorised members. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param newVersion The version to upgrade to (must be one larger than the current version) + */ + "upgradeExtension(bytes32,uint256)"( + extensionId: Arrayish, + newVersion: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the deprecation of an extension in a colony. Secured function to authorised members. + * @param deprecated Whether to deprecate the extension or not + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + deprecateExtension( + extensionId: Arrayish, + deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the deprecation of an extension in a colony. Secured function to authorised members. + * @param deprecated Whether to deprecate the extension or not + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + "deprecateExtension(bytes32,bool)"( + extensionId: Arrayish, + deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is a permanent action -- re-installing the extension will deploy a new contractIt is recommended to deprecate an extension before uninstalling to allow active objects to be resolved + * Uninstall an extension from a colony. Secured function to authorised members. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + uninstallExtension( + extensionId: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is a permanent action -- re-installing the extension will deploy a new contractIt is recommended to deprecate an extension before uninstalling to allow active objects to be resolved + * Uninstall an extension from a colony. Secured function to authorised members. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + "uninstallExtension(bytes32)"( + extensionId: Arrayish, + 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; + + /** + * 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(uint256,uint256,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _parentDomainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Adding new domains is currently retricted to one level only, i.e. `_parentDomainId` has to be the root domain id: `1`.We expect this function to only be used by the dapp + * 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 _metadata Metadata relating to the domain. Expected to be the IPFS hash of a JSON blob, but not enforced by the contracts. + * @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(uint256,uint256,uint256,string)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _parentDomainId: BigNumberish, + _metadata: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * 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 _domainId Id of the domain being edited + * @param _metadata Metadata relating to the domain. Expected to be the IPFS hash of a JSON blob, but not enforced by the contracts. + * @param _permissionDomainId The domainId in which I have the permission to take this action + */ + editDomain( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + _metadata: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * 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 _domainId Id of the domain being edited + * @param _metadata Metadata relating to the domain. Expected to be the IPFS hash of a JSON blob, but not enforced by the contracts. + * @param _permissionDomainId The domainId in which I have the permission to take this action + */ + "editDomain(uint256,uint256,uint256,string)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + _metadata: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a domain by id. + * @param _id Id of the domain which details to get + */ + getDomain( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a domain by id. + * @param _id Id of the domain which details to get + */ + "getDomain(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of domains in the colony. + */ + getDomainCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of domains in the colony. + */ + "getDomainCount()"(overrides?: TransactionOverrides): Promise; + + /** + * For more detail about branchMask and siblings, examine the PatriciaTree implementation. While external, 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. + */ + verifyReputationProof( + key: Arrayish, + value: Arrayish, + branchMask: BigNumberish, + siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * For more detail about branchMask and siblings, examine the PatriciaTree implementation. While external, 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. + */ + "verifyReputationProof(bytes,bytes,uint256,bytes32[])"( + key: Arrayish, + value: Arrayish, + branchMask: BigNumberish, + siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Add a new expenditure in the colony. Secured function to authorised members. + * @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 expenditure belongs + * @param _permissionDomainId The domainId in which I have the permission to take this action + */ + makeExpenditure( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Add a new expenditure in the colony. Secured function to authorised members. + * @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 expenditure belongs + * @param _permissionDomainId The domainId in which I have the permission to take this action + */ + "makeExpenditure(uint256,uint256,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Updates the expenditure owner. Can only be called by expenditure owner. + * @param _id Expenditure identifier + * @param _newOwner New owner of expenditure + */ + transferExpenditure( + _id: BigNumberish, + _newOwner: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Updates the expenditure owner. Can only be called by expenditure owner. + * @param _id Expenditure identifier + * @param _newOwner New owner of expenditure + */ + "transferExpenditure(uint256,address)"( + _id: BigNumberish, + _newOwner: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future version + * DEPRECATED Updates the expenditure owner. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _id Expenditure identifier + * @param _newOwner New owner of expenditure + * @param _permissionDomainId The domainId in which I have the permission to take this action + */ + transferExpenditureViaArbitration( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _newOwner: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future version + * DEPRECATED Updates the expenditure owner. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _id Expenditure identifier + * @param _newOwner New owner of expenditure + * @param _permissionDomainId The domainId in which I have the permission to take this action + */ + "transferExpenditureViaArbitration(uint256,uint256,uint256,address)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _newOwner: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Cancels the expenditure and prevents further editing. Can only be called by expenditure owner. + * @param _id Expenditure identifier + */ + cancelExpenditure( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Cancels the expenditure and prevents further editing. Can only be called by expenditure owner. + * @param _id Expenditure identifier + */ + "cancelExpenditure(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Finalizes the expenditure and prevents further editing. Can only be called by expenditure owner. + * @param _id Expenditure identifier + */ + finalizeExpenditure( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Finalizes the expenditure and prevents further editing. Can only be called by expenditure owner. + * @param _id Expenditure identifier + */ + "finalizeExpenditure(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Sets the recipient on an expenditure slot. Can only be called by expenditure owner. + * @param _id Id of the expenditure + * @param _recipient Address of the recipient + * @param _slot Slot for the recipient address + */ + setExpenditureRecipient( + _id: BigNumberish, + _slot: BigNumberish, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Sets the recipient on an expenditure slot. Can only be called by expenditure owner. + * @param _id Id of the expenditure + * @param _recipient Address of the recipient + * @param _slot Slot for the recipient address + */ + "setExpenditureRecipient(uint256,uint256,address)"( + _id: BigNumberish, + _slot: BigNumberish, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the token payout on an expenditure slot. Can only be called by expenditure owner. + * @param _amount Payout amount + * @param _id Id of the expenditure + * @param _slot Number of the slot + * @param _token Address of the token, `0x0` value indicates Ether + */ + setExpenditurePayout( + _id: BigNumberish, + _slot: BigNumberish, + _token: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the token payout on an expenditure slot. Can only be called by expenditure owner. + * @param _amount Payout amount + * @param _id Id of the expenditure + * @param _slot Number of the slot + * @param _token Address of the token, `0x0` value indicates Ether + */ + "setExpenditurePayout(uint256,uint256,address,uint256)"( + _id: BigNumberish, + _slot: BigNumberish, + _token: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Sets the skill on an expenditure slot. Can only be called by expenditure owner. + * @param _id Expenditure identifier + * @param _skillId Id of the new skill to set + * @param _slot Number of the slot + */ + setExpenditureSkill( + _id: BigNumberish, + _slot: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Sets the skill on an expenditure slot. Can only be called by expenditure owner. + * @param _id Expenditure identifier + * @param _skillId Id of the new skill to set + * @param _slot Number of the slot + */ + "setExpenditureSkill(uint256,uint256,uint256)"( + _id: BigNumberish, + _slot: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future versionNote that when determining payouts the payoutModifier is incremented by WAD and converted into payoutScalar + * DEPRECATED Set the payout modifier on an expenditure slot. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _id Expenditure identifier + * @param _payoutModifier Modifier to their payout (between -1 and 1, denominated in WADs, 0 means no modification) + * @param _permissionDomainId The domainId in which I have the permission to take this action + * @param _slot Number of the slot + */ + setExpenditurePayoutModifier( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _slot: BigNumberish, + _payoutModifier: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future versionNote that when determining payouts the payoutModifier is incremented by WAD and converted into payoutScalar + * DEPRECATED Set the payout modifier on an expenditure slot. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _id Expenditure identifier + * @param _payoutModifier Modifier to their payout (between -1 and 1, denominated in WADs, 0 means no modification) + * @param _permissionDomainId The domainId in which I have the permission to take this action + * @param _slot Number of the slot + */ + "setExpenditurePayoutModifier(uint256,uint256,uint256,uint256,int256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _slot: BigNumberish, + _payoutModifier: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future version + * DEPRECATED Set the claim delay on an expenditure slot. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _claimDelay Time (in seconds) to delay claiming payout after finalization + * @param _id Expenditure identifier + * @param _permissionDomainId The domainId in which I have the permission to take this action + * @param _slot Number of the slot + */ + setExpenditureClaimDelay( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _slot: BigNumberish, + _claimDelay: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future version + * DEPRECATED Set the claim delay on an expenditure slot. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _claimDelay Time (in seconds) to delay claiming payout after finalization + * @param _id Expenditure identifier + * @param _permissionDomainId The domainId in which I have the permission to take this action + * @param _slot Number of the slot + */ + "setExpenditureClaimDelay(uint256,uint256,uint256,uint256,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _slot: BigNumberish, + _claimDelay: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set arbitrary state on an expenditure slot. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _id Expenditure identifier + * @param _keys Array of additional keys (for mappings & arrays) + * @param _mask Array of booleans indicated whether a key is a mapping (F) or an array index (T). + * @param _permissionDomainId The domainId in which I have the permission to take this action + * @param _storageSlot Number of the top-level storage slot (25, 26, or 27) + * @param _value Value to set at location + */ + setExpenditureState( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _storageSlot: BigNumberish, + _mask: boolean[], + _keys: Arrayish[], + _value: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set arbitrary state on an expenditure slot. Can only be called by Arbitration role. + * @param _childSkillIndex The index that the `_domainId` is relative to `_permissionDomainId`, (only used if `_permissionDomainId` is different to `_domainId`) + * @param _id Expenditure identifier + * @param _keys Array of additional keys (for mappings & arrays) + * @param _mask Array of booleans indicated whether a key is a mapping (F) or an array index (T). + * @param _permissionDomainId The domainId in which I have the permission to take this action + * @param _storageSlot Number of the top-level storage slot (25, 26, or 27) + * @param _value Value to set at location + */ + "setExpenditureState(uint256,uint256,uint256,uint256,bool[],bytes32[],bytes32)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _storageSlot: BigNumberish, + _mask: boolean[], + _keys: Arrayish[], + _value: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Claim the payout for an expenditure slot. Here the network receives a fee from each payout. + * @param _id Expenditure identifier + * @param _slot Number of the slot + * @param _token Address of the token, `0x0` value indicates Ether + */ + claimExpenditurePayout( + _id: BigNumberish, + _slot: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Claim the payout for an expenditure slot. Here the network receives a fee from each payout. + * @param _id Expenditure identifier + * @param _slot Number of the slot + * @param _token Address of the token, `0x0` value indicates Ether + */ + "claimExpenditurePayout(uint256,uint256,address)"( + _id: BigNumberish, + _slot: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of expenditures in the colony. + */ + getExpenditureCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of expenditures in the colony. + */ + "getExpenditureCount()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns an existing expenditure. + * @param _id Expenditure identifier + */ + getExpenditure( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns an existing expenditure. + * @param _id Expenditure identifier + */ + "getExpenditure(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns an existing expenditure slot. + * @param _id Expenditure identifier + * @param _slot Expenditure slot + */ + getExpenditureSlot( + _id: BigNumberish, + _slot: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns an existing expenditure slot. + * @param _id Expenditure identifier + * @param _slot Expenditure slot + */ + "getExpenditureSlot(uint256,uint256)"( + _id: BigNumberish, + _slot: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns an existing expenditure slot's payout for a token. + * @param _id Expenditure identifier + * @param _slot Expenditure slot + * @param _token Token address + */ + getExpenditureSlotPayout( + _id: BigNumberish, + _slot: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns an existing expenditure slot's payout for a token. + * @param _id Expenditure identifier + * @param _slot Expenditure slot + * @param _token Token address + */ + "getExpenditureSlotPayout(uint256,uint256,address)"( + _id: BigNumberish, + _slot: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 + */ + addPayment( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _recipient: string, + _token: string, + _amount: BigNumberish, + _domainId: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): 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 + */ + "addPayment(uint256,uint256,address,address,uint256,uint256,uint256)"( + _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; + + /** + * 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(uint256,uint256,uint256)"( + _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 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(uint256,uint256,uint256,address)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _recipient: string, + 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 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(uint256,uint256,uint256,uint256)"( + _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; + + /** + * 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(uint256,uint256,uint256,address,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _id: BigNumberish, + _token: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns an exiting payment. + * @param _id Payment identifier + */ + getPayment( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns an exiting payment. + * @param _id Payment identifier + */ + "getPayment(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * 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; + + /** + * 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(uint256,address)"( + _id: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of payments in the colony. + */ + getPaymentCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of payments in the colony. + */ + "getPaymentCount()"(overrides?: TransactionOverrides): 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; + + /** + * 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(uint256,uint256,bytes32,uint256,uint256,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _specificationHash: Arrayish, + _domainId: BigNumberish, + _skillId: BigNumberish, + _dueDate: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of tasks in the colony. + */ + getTaskCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of tasks in the colony. + */ + "getTaskCount()"(overrides?: TransactionOverrides): Promise; + + /** + * Starts from 0 and is incremented on every co-reviewed task change via `executeTaskChange` call. + * @param _id Id of the task + */ + getTaskChangeNonce( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Starts from 0 and is incremented on every co-reviewed task change via `executeTaskChange` call. + * @param _id Id of the task + */ + "getTaskChangeNonce(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): 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; + + /** + * 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(uint8[],bytes32[],bytes32[],uint8[],uint256,bytes)"( + _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; + + /** + * 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(uint8[],bytes32[],bytes32[],uint8[],uint256,bytes)"( + _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; + + /** + * 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(uint256,uint8,bytes32)"( + _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; + + /** + * 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(uint256,uint8,uint8,bytes32)"( + _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 + */ + generateSecret( + _salt: Arrayish, + _value: BigNumberish, + 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 + */ + "generateSecret(bytes32,uint256)"( + _salt: Arrayish, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `ColonyStorage.RatingSecrets` information for task `_id`. + * @param _id Id of the task + */ + getTaskWorkRatingSecretsInfo( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `ColonyStorage.RatingSecrets` information for task `_id`. + * @param _id Id of the task + */ + "getTaskWorkRatingSecretsInfo(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * 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 + */ + getTaskWorkRatingSecret( + _id: BigNumberish, + _role: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * 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 + */ + "getTaskWorkRatingSecret(uint256,uint8)"( + _id: BigNumberish, + _role: BigNumberish, + overrides?: TransactionOverrides + ): 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 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(uint256,address,uint256,uint256)"( + _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 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(uint256,address)"( + _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; + + /** + * 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(uint256,address)"( + _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 evaluator role. Agreed between manager and currently assigned evaluator. + * @param _id Id of the task + */ + "removeTaskEvaluatorRole(uint256)"( + _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; + + /** + * Removing worker role. Agreed between manager and currently assigned worker. + * @param _id Id of the task + */ + "removeTaskWorkerRole(uint256)"( + _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; + + /** + * 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(uint256,uint256)"( + _id: BigNumberish, + _skillId: 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 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(uint256,bytes32)"( + _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 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(uint256,uint256)"( + _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; + + /** + * 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(uint256,bytes32)"( + _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; + + /** + * 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(uint256,bytes32,bytes32)"( + _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.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(uint256)"( + _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; + + /** + * 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(uint256)"( + _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; + + /** + * 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(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a task with id `_id` + * @param _id Id of the task + */ + getTask( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a task with id `_id` + * @param _id Id of the task + */ + "getTask(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * 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 + */ + getTaskRole( + _id: BigNumberish, + _role: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * 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 + */ + "getTaskRole(uint256,uint8)"( + _id: BigNumberish, + _role: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * 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; + + /** + * 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(uint256)"( + _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. + */ + getRewardInverse(overrides?: TransactionOverrides): Promise; + + /** + * Return 1 / the reward to pay out from revenue. e.g. if the fee is 1% (or 0.01), return 100. + */ + "getRewardInverse()"(overrides?: TransactionOverrides): 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 + */ + getTaskPayout( + _id: BigNumberish, + _role: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 + */ + "getTaskPayout(uint256,uint8,address)"( + _id: BigNumberish, + _role: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 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(uint256,address,uint256)"( + _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 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(uint256,address,uint256)"( + _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; + + /** + * 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(uint256,address,uint256)"( + _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; + + /** + * 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(uint256,address,uint256,uint256,uint256)"( + _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; + + /** + * 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(uint256,uint8,address)"( + _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; + + /** + * 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(address,bytes,bytes,uint256,bytes32[])"( + _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 (deposited in TokenLocking), `_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; + + /** + * 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 (deposited in TokenLocking), `_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(uint256,uint256[7],bytes,bytes,uint256,bytes32[])"( + _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 + */ + getRewardPayoutInfo( + _payoutId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get useful information about specific reward payout. + * @param _payoutId Id of the reward payout + */ + "getRewardPayoutInfo(uint256)"( + _payoutId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * 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; + + /** + * 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(uint256)"( + _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 + */ + getFundingPot( + _id: 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 + */ + "getFundingPot(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of funding pots in the colony. + */ + getFundingPotCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of funding pots in the colony. + */ + "getFundingPotCount()"( + overrides?: TransactionOverrides + ): 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 + */ + getFundingPotBalance( + _potId: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 + */ + "getFundingPotBalance(uint256,address)"( + _potId: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 + */ + getFundingPotPayout( + _potId: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 + */ + "getFundingPotPayout(uint256,address)"( + _potId: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 _childSkillIndex The child index in _permissionDomainId where I will be taking this action + * @param _domainId The domain where I am taking this action, pointed to by _permissionDomainId and _childSkillIndex + * @param _fromChildSkillIndex In the array of child skills for the skill associated with the domain pointed to by _permissionDomainId + _childSkillIndex, the index of the skill associated with the domain that contains _fromPot + * @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 same, but for the _toPot which the funds are being moved to + * @param _toPot Funding pot id receiving the funds + * @param _token Address of the token, `0x0` value indicates Ether + */ + moveFundsBetweenPots( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + _fromChildSkillIndex: BigNumberish, + _toChildSkillIndex: BigNumberish, + _fromPot: BigNumberish, + _toPot: BigNumberish, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): 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 _childSkillIndex The child index in _permissionDomainId where I will be taking this action + * @param _domainId The domain where I am taking this action, pointed to by _permissionDomainId and _childSkillIndex + * @param _fromChildSkillIndex In the array of child skills for the skill associated with the domain pointed to by _permissionDomainId + _childSkillIndex, the index of the skill associated with the domain that contains _fromPot + * @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 same, but for the _toPot which the funds are being moved to + * @param _toPot Funding pot id receiving the funds + * @param _token Address of the token, `0x0` value indicates Ether + */ + "moveFundsBetweenPots(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _domainId: BigNumberish, + _fromChildSkillIndex: BigNumberish, + _toChildSkillIndex: BigNumberish, + _fromPot: BigNumberish, + _toPot: BigNumberish, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * DEPRECATEDMove 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(uint256,uint256,uint256,uint256,uint256,uint256,address)"( + _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; + + /** + * 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(address)"( + _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 + */ + getNonRewardPotsTotal( + _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 + */ + "getNonRewardPotsTotal(address)"( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Allow the _approvee to obligate some amount of tokens as a stake. + * @param _amount Amount of internal token up to which we are willing to be obligated. + * @param _approvee Address of the account we are willing to let obligate us. + * @param _domainId Domain in which we are willing to be obligated. + */ + approveStake( + _approvee: string, + _domainId: BigNumberish, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Allow the _approvee to obligate some amount of tokens as a stake. + * @param _amount Amount of internal token up to which we are willing to be obligated. + * @param _approvee Address of the account we are willing to let obligate us. + * @param _domainId Domain in which we are willing to be obligated. + */ + "approveStake(address,uint256,uint256)"( + _approvee: string, + _domainId: BigNumberish, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Obligate the user some amount of tokens as a stake. + * @param _amount Amount of internal token we are obligating. + * @param _domainId Domain in which we are obligating the user. + * @param _user Address of the account we are obligating. + */ + obligateStake( + _user: string, + _domainId: BigNumberish, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Obligate the user some amount of tokens as a stake. + * @param _amount Amount of internal token we are obligating. + * @param _domainId Domain in which we are obligating the user. + * @param _user Address of the account we are obligating. + */ + "obligateStake(address,uint256,uint256)"( + _user: string, + _domainId: BigNumberish, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Deobligate the user some amount of tokens, releasing the stake. + * @param _amount Amount of internal token we are deobligating. + * @param _domainId Domain in which we are deobligating the user. + * @param _user Address of the account we are deobligating. + */ + deobligateStake( + _user: string, + _domainId: BigNumberish, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Deobligate the user some amount of tokens, releasing the stake. + * @param _amount Amount of internal token we are deobligating. + * @param _domainId Domain in which we are deobligating the user. + * @param _user Address of the account we are deobligating. + */ + "deobligateStake(address,uint256,uint256)"( + _user: string, + _domainId: BigNumberish, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Transfer some amount of obligated tokens. Can be called by the arbitration role. + * @param _amount Amount of internal token we are transferring. + * @param _childSkillIndex The child index in `_permissionDomainId` where we can find `_domainId`. + * @param _domainId Domain in which we are transferring the tokens. + * @param _obligator Address of the account who set the obligation. + * @param _permissionDomainId The domainId in which I have the permission to take this action. + * @param _recipient Recipient of the transferred tokens. + * @param _user Address of the account we are transferring. + */ + transferStake( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _obligator: string, + _user: string, + _domainId: BigNumberish, + _amount: BigNumberish, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Transfer some amount of obligated tokens. Can be called by the arbitration role. + * @param _amount Amount of internal token we are transferring. + * @param _childSkillIndex The child index in `_permissionDomainId` where we can find `_domainId`. + * @param _domainId Domain in which we are transferring the tokens. + * @param _obligator Address of the account who set the obligation. + * @param _permissionDomainId The domainId in which I have the permission to take this action. + * @param _recipient Recipient of the transferred tokens. + * @param _user Address of the account we are transferring. + */ + "transferStake(uint256,uint256,address,address,uint256,uint256,address)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _obligator: string, + _user: string, + _domainId: BigNumberish, + _amount: BigNumberish, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * View an approval to obligate tokens. + * @param _domainId Domain in which we are willing to be obligated. + * @param _obligator Address of the account we are willing to let obligate us. + * @param _user User allowing their tokens to be obligated. + */ + getApproval( + _user: string, + _obligator: string, + _domainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * View an approval to obligate tokens. + * @param _domainId Domain in which we are willing to be obligated. + * @param _obligator Address of the account we are willing to let obligate us. + * @param _user User allowing their tokens to be obligated. + */ + "getApproval(address,address,uint256)"( + _user: string, + _obligator: string, + _domainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * View an obligation of tokens. + * @param _domainId Domain in which we are obligated. + * @param _obligator Address of the account who obligated us. + * @param _user User whose tokens are obligated. + */ + getObligation( + _user: string, + _obligator: string, + _domainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * View an obligation of tokens. + * @param _domainId Domain in which we are obligated. + * @param _obligator Address of the account who obligated us. + * @param _user User whose tokens are obligated. + */ + "getObligation(address,address,uint256)"( + _user: string, + _obligator: string, + _domainId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the domain corresponding to a funding pot + * @param _fundingPotId Id of the funding pot + */ + getDomainFromFundingPot( + _fundingPotId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the domain corresponding to a funding pot + * @param _fundingPotId Id of the funding pot + */ + "getDomainFromFundingPot(uint256)"( + _fundingPotId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Burn tokens held by the colony. Can only burn tokens held in the root funding pot. + * @param amount The amount of tokens to burn + * @param token The address of the token to burn + */ + burnTokens( + token: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Burn tokens held by the colony. Can only burn tokens held in the root funding pot. + * @param amount The amount of tokens to burn + * @param token The address of the token to burn + */ + "burnTokens(address,uint256)"( + token: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * unlock the native colony token, if possible + */ + unlockToken(overrides?: TransactionOverrides): Promise; + + /** + * unlock the native colony token, if possible + */ + "unlockToken()"(overrides?: TransactionOverrides): Promise; + + /** + * Update the internal bookkeeping around external ERC20 approvals + * @param spender The account we have approved + * @param token The address of the token which was approved + */ + updateApprovalAmount( + token: string, + spender: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Update the internal bookkeeping around external ERC20 approvals + * @param spender The account we have approved + * @param token The address of the token which was approved + */ + "updateApprovalAmount(address,address)"( + token: string, + spender: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the current approval amount + * @param spender The account we have approved + * @param token The address of the token which was approved + */ + getTokenApproval( + token: string, + spender: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the current approval amount + * @param spender The account we have approved + * @param token The address of the token which was approved + */ + "getTokenApproval(address,address)"( + token: string, + spender: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the current total approval amount across all spenders + * @param token The address of the token which was approved + */ + getTotalTokenApproval( + token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the current total approval amount across all spenders + * @param token The address of the token which was approved + */ + "getTotalTokenApproval(address)"( + token: string, + overrides?: TransactionOverrides + ): Promise; + }; +} diff --git a/src/contracts/colony/7/IColonyNetwork.d.ts b/src/contracts/colony/7/IColonyNetwork.d.ts new file mode 100644 index 000000000..896600644 --- /dev/null +++ b/src/contracts/colony/7/IColonyNetwork.d.ts @@ -0,0 +1,4852 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-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 IColonyNetworkInterface extends Interface { + functions: { + approveExitRecovery: TypedFunctionDescription<{ encode([]: []): string }>; + + checkNotAdditionalProtectedVariable: TypedFunctionDescription<{ + encode([_slot]: [BigNumberish]): string; + }>; + + enterRecoveryMode: TypedFunctionDescription<{ encode([]: []): string }>; + + exitRecoveryMode: TypedFunctionDescription<{ encode([]: []): string }>; + + isInRecoveryMode: TypedFunctionDescription<{ encode([]: []): string }>; + + numRecoveryRoles: TypedFunctionDescription<{ encode([]: []): string }>; + + removeRecoveryRole: TypedFunctionDescription<{ + encode([_user]: [string]): string; + }>; + + setRecoveryRole: TypedFunctionDescription<{ + encode([_user]: [string]): string; + }>; + + setStorageSlotRecovery: TypedFunctionDescription<{ + encode([_slot, _value]: [BigNumberish, Arrayish]): string; + }>; + + supportsInterface: TypedFunctionDescription<{ + encode([interfaceID]: [Arrayish]): string; + }>; + + setReplacementReputationUpdateLogEntry: TypedFunctionDescription<{ + encode([ + _reputationMiningCycle, + _id, + _user, + _amount, + _skillId, + _colony, + _nUpdates, + _nPreviousUpdates, + ]: [ + string, + BigNumberish, + string, + BigNumberish, + BigNumberish, + string, + BigNumberish, + BigNumberish + ]): string; + }>; + + getReplacementReputationUpdateLogEntry: TypedFunctionDescription<{ + encode([_reputationMiningCycle, _id]: [string, BigNumberish]): string; + }>; + + getReplacementReputationUpdateLogsExist: TypedFunctionDescription<{ + encode([_reputationMiningCycle]: [string]): string; + }>; + + getMetaColony: TypedFunctionDescription<{ encode([]: []): string }>; + + getColonyCount: TypedFunctionDescription<{ encode([]: []): string }>; + + isColony: TypedFunctionDescription<{ encode([_colony]: [string]): string }>; + + addSkill: TypedFunctionDescription<{ + encode([_parentSkillId]: [BigNumberish]): string; + }>; + + getSkill: TypedFunctionDescription<{ + encode([_skillId]: [BigNumberish]): string; + }>; + + deprecateSkill: TypedFunctionDescription<{ + encode([_skillId]: [BigNumberish]): string; + }>; + + appendReputationUpdateLog: TypedFunctionDescription<{ + encode([_user, _amount, _skillId]: [ + string, + BigNumberish, + BigNumberish + ]): string; + }>; + + getSkillCount: TypedFunctionDescription<{ encode([]: []): string }>; + + getReputationMiningSkillId: TypedFunctionDescription<{ + encode([]: []): string; + }>; + + setTokenLocking: TypedFunctionDescription<{ + encode([_tokenLockingAddress]: [string]): string; + }>; + + getTokenLocking: TypedFunctionDescription<{ encode([]: []): string }>; + + createMetaColony: TypedFunctionDescription<{ + encode([_tokenAddress]: [string]): string; + }>; + + createColony: TypedFunctionDescription<{ + encode([_tokenAddress]: [string]): string; + }>; + + addColonyVersion: TypedFunctionDescription<{ + encode([_version, _resolver]: [BigNumberish, string]): string; + }>; + + initialise: TypedFunctionDescription<{ + encode([_resolver, _version]: [string, BigNumberish]): string; + }>; + + getColony: TypedFunctionDescription<{ + encode([_id]: [BigNumberish]): string; + }>; + + getCurrentColonyVersion: TypedFunctionDescription<{ + encode([]: []): string; + }>; + + getParentSkillId: TypedFunctionDescription<{ + encode([_skillId, _parentSkillIndex]: [ + BigNumberish, + BigNumberish + ]): string; + }>; + + getChildSkillId: TypedFunctionDescription<{ + encode([_skillId, _childSkillIndex]: [ + BigNumberish, + BigNumberish + ]): string; + }>; + + getReputationMiningCycle: TypedFunctionDescription<{ + encode([_active]: [boolean]): string; + }>; + + calculateMinerWeight: TypedFunctionDescription<{ + encode([_timeStaked, _submissonIndex]: [ + BigNumberish, + BigNumberish + ]): string; + }>; + + getColonyVersionResolver: TypedFunctionDescription<{ + encode([_version]: [BigNumberish]): string; + }>; + + setReputationRootHash: TypedFunctionDescription<{ + encode([newHash, newNLeaves, stakers]: [ + Arrayish, + BigNumberish, + string[] + ]): string; + }>; + + startNextCycle: TypedFunctionDescription<{ encode([]: []): string }>; + + initialiseReputationMining: TypedFunctionDescription<{ + encode([]: []): string; + }>; + + getReputationRootHash: TypedFunctionDescription<{ encode([]: []): string }>; + + getReputationRootHashNLeaves: TypedFunctionDescription<{ + encode([]: []): string; + }>; + + getReputationRootHashNNodes: TypedFunctionDescription<{ + encode([]: []): string; + }>; + + startTokenAuction: TypedFunctionDescription<{ + encode([_token]: [string]): string; + }>; + + setupRegistrar: TypedFunctionDescription<{ + encode([_ens, _rootNode]: [string, Arrayish]): string; + }>; + + registerUserLabel: TypedFunctionDescription<{ + encode([username, orbitdb]: [string, string]): string; + }>; + + registerColonyLabel: TypedFunctionDescription<{ + encode([colonyName, orbitdb]: [string, string]): string; + }>; + + updateColonyOrbitDB: TypedFunctionDescription<{ + encode([orbitdb]: [string]): string; + }>; + + updateUserOrbitDB: TypedFunctionDescription<{ + encode([orbitdb]: [string]): string; + }>; + + getProfileDBAddress: TypedFunctionDescription<{ + encode([node]: [Arrayish]): string; + }>; + + lookupRegisteredENSDomain: TypedFunctionDescription<{ + encode([addr]: [string]): string; + }>; + + addr: TypedFunctionDescription<{ encode([node]: [Arrayish]): string }>; + + getENSRegistrar: TypedFunctionDescription<{ encode([]: []): string }>; + + setMiningResolver: TypedFunctionDescription<{ + encode([miningResolverAddress]: [string]): string; + }>; + + getMiningResolver: TypedFunctionDescription<{ encode([]: []): string }>; + + addExtensionToNetwork: TypedFunctionDescription<{ + encode([extensionId, resolver]: [Arrayish, string]): string; + }>; + + installExtension: TypedFunctionDescription<{ + encode([extensionId, version]: [Arrayish, BigNumberish]): string; + }>; + + upgradeExtension: TypedFunctionDescription<{ + encode([extensionId, newVersion]: [Arrayish, BigNumberish]): string; + }>; + + deprecateExtension: TypedFunctionDescription<{ + encode([extensionId, deprecated]: [Arrayish, boolean]): string; + }>; + + uninstallExtension: TypedFunctionDescription<{ + encode([extensionId]: [Arrayish]): string; + }>; + + getExtensionResolver: TypedFunctionDescription<{ + encode([extensionId, version]: [Arrayish, BigNumberish]): string; + }>; + + getExtensionInstallation: TypedFunctionDescription<{ + encode([extensionId, colony]: [Arrayish, string]): string; + }>; + + getFeeInverse: TypedFunctionDescription<{ encode([]: []): string }>; + + setFeeInverse: TypedFunctionDescription<{ + encode([_feeInverse]: [BigNumberish]): string; + }>; + + getPayoutWhitelist: TypedFunctionDescription<{ + encode([_token]: [string]): string; + }>; + + setPayoutWhitelist: TypedFunctionDescription<{ + encode([_token, _status]: [string, boolean]): string; + }>; + + punishStakers: TypedFunctionDescription<{ + encode([_stakers, _amount]: [string[], BigNumberish]): string; + }>; + + stakeForMining: TypedFunctionDescription<{ + encode([_amount]: [BigNumberish]): string; + }>; + + unstakeForMining: TypedFunctionDescription<{ + encode([_amount]: [BigNumberish]): string; + }>; + + getMiningStake: TypedFunctionDescription<{ + encode([_user]: [string]): string; + }>; + + reward: TypedFunctionDescription<{ + encode([_recipient, _amount]: [string, BigNumberish]): string; + }>; + + burnUnneededRewards: TypedFunctionDescription<{ + encode([_amount]: [BigNumberish]): string; + }>; + + claimMiningReward: TypedFunctionDescription<{ + encode([_recipient]: [string]): string; + }>; + + setReputationMiningCycleReward: TypedFunctionDescription<{ + encode([_amount]: [BigNumberish]): string; + }>; + + getReputationMiningCycleReward: TypedFunctionDescription<{ + encode([]: []): string; + }>; + }; + + events: { + AuctionCreated: TypedEventDescription<{ + encodeTopics([auction, token, quantity]: [null, null, null]): string[]; + }>; + + ColonyAdded: TypedEventDescription<{ + encodeTopics([colonyId, colonyAddress, token]: [ + BigNumberish | null, + string | null, + null + ]): string[]; + }>; + + ColonyLabelRegistered: TypedEventDescription<{ + encodeTopics([colony, label]: [string | null, null]): string[]; + }>; + + ColonyNetworkInitialised: TypedEventDescription<{ + encodeTopics([resolver]: [null]): string[]; + }>; + + ColonyVersionAdded: TypedEventDescription<{ + encodeTopics([version, resolver]: [null, null]): string[]; + }>; + + ExtensionAddedToNetwork: TypedEventDescription<{ + encodeTopics([extensionId, version]: [Arrayish | null, null]): string[]; + }>; + + ExtensionDeprecated: TypedEventDescription<{ + encodeTopics([extensionId, colony, deprecated]: [ + Arrayish | null, + string | null, + null + ]): string[]; + }>; + + ExtensionInstalled: TypedEventDescription<{ + encodeTopics([extensionId, colony, version]: [ + Arrayish | null, + string | null, + null + ]): string[]; + }>; + + ExtensionUninstalled: TypedEventDescription<{ + encodeTopics([extensionId, colony]: [ + Arrayish | null, + string | null + ]): string[]; + }>; + + ExtensionUpgraded: TypedEventDescription<{ + encodeTopics([extensionId, colony, version]: [ + Arrayish | null, + string | null, + null + ]): string[]; + }>; + + MetaColonyCreated: TypedEventDescription<{ + encodeTopics([metaColony, token, rootSkillId]: [ + null, + null, + null + ]): string[]; + }>; + + MiningCycleResolverSet: TypedEventDescription<{ + encodeTopics([miningCycleResolver]: [null]): string[]; + }>; + + NetworkFeeInverseSet: TypedEventDescription<{ + encodeTopics([feeInverse]: [null]): string[]; + }>; + + RecoveryModeEntered: TypedEventDescription<{ + encodeTopics([user]: [null]): string[]; + }>; + + RecoveryModeExitApproved: TypedEventDescription<{ + encodeTopics([user]: [null]): string[]; + }>; + + RecoveryModeExited: TypedEventDescription<{ + encodeTopics([user]: [null]): string[]; + }>; + + RecoveryRoleSet: TypedEventDescription<{ + encodeTopics([user, setTo]: [string | null, null]): string[]; + }>; + + RecoveryStorageSlotSet: TypedEventDescription<{ + encodeTopics([user, slot, fromValue, toValue]: [ + null, + null, + null, + null + ]): string[]; + }>; + + RegistrarInitialised: TypedEventDescription<{ + encodeTopics([ens, rootNode]: [null, null]): string[]; + }>; + + ReputationMinerPenalised: TypedEventDescription<{ + encodeTopics([miner, tokensLost]: [null, null]): string[]; + }>; + + ReputationMiningCycleComplete: TypedEventDescription<{ + encodeTopics([hash, nLeaves]: [null, null]): string[]; + }>; + + ReputationMiningInitialised: TypedEventDescription<{ + encodeTopics([inactiveReputationMiningCycle]: [null]): string[]; + }>; + + ReputationMiningRewardSet: TypedEventDescription<{ + encodeTopics([amount]: [null]): string[]; + }>; + + ReputationRootHashSet: TypedEventDescription<{ + encodeTopics([newHash, newNLeaves, stakers, reward]: [ + null, + null, + null, + null + ]): string[]; + }>; + + SkillAdded: TypedEventDescription<{ + encodeTopics([skillId, parentSkillId]: [null, null]): string[]; + }>; + + TokenLockingAddressSet: TypedEventDescription<{ + encodeTopics([tokenLocking]: [null]): string[]; + }>; + + TokenWhitelisted: TypedEventDescription<{ + encodeTopics([token, status]: [null, null]): string[]; + }>; + + UserLabelRegistered: TypedEventDescription<{ + encodeTopics([user, label]: [string | null, null]): string[]; + }>; + }; +} + +export class IColonyNetwork extends Contract { + connect(signerOrProvider: Signer | Provider | string): IColonyNetwork; + attach(addressOrName: string): IColonyNetwork; + deployed(): Promise; + + on(event: EventFilter | string, listener: Listener): IColonyNetwork; + once(event: EventFilter | string, listener: Listener): IColonyNetwork; + addListener( + eventName: EventFilter | string, + listener: Listener + ): IColonyNetwork; + removeAllListeners(eventName: EventFilter | string): IColonyNetwork; + removeListener(eventName: any, listener: Listener): IColonyNetwork; + + interface: IColonyNetworkInterface; + + functions: { + /** + * Indicate approval to exit recovery mode. Can only be called by user with recovery role. + */ + approveExitRecovery( + overrides?: TransactionOverrides + ): Promise; + + /** + * Indicate approval to exit recovery mode. Can only be called by user with recovery role. + */ + "approveExitRecovery()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * No return value, but should throw if protected.This is external, 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, + overrides?: TransactionOverrides + ): Promise; + + /** + * No return value, but should throw if protected.This is external, 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(uint256)"( + _slot: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Put colony network mining into recovery mode. Can only be called by user with recovery role. + */ + enterRecoveryMode( + overrides?: TransactionOverrides + ): Promise; + + /** + * Put colony network mining into recovery mode. Can only be called by user with recovery role. + */ + "enterRecoveryMode()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Exit recovery mode, can be called by anyone if enough whitelist approvals are given. + */ + exitRecoveryMode( + overrides?: TransactionOverrides + ): Promise; + + /** + * Exit recovery mode, can be called by anyone if enough whitelist approvals are given. + */ + "exitRecoveryMode()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Is colony network in recovery mode. + */ + isInRecoveryMode(overrides?: TransactionOverrides): Promise; + + /** + * Is colony network in recovery mode. + */ + "isInRecoveryMode()"(overrides?: TransactionOverrides): Promise; + + /** + * Return number of recovery roles. + */ + numRecoveryRoles(overrides?: TransactionOverrides): Promise; + + /** + * Return number of recovery roles. + */ + "numRecoveryRoles()"(overrides?: TransactionOverrides): 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; + + /** + * Remove colony recovery role. Can only be called by root role. + * @param _user User we want to remove recovery role from + */ + "removeRecoveryRole(address)"( + _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; + + /** + * Set new colony recovery role. Can be called by root. + * @param _user User we want to give a recovery role to + */ + "setRecoveryRole(address)"( + _user: string, + overrides?: TransactionOverrides + ): 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; + + /** + * 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(uint256,bytes32)"( + _slot: BigNumberish, + _value: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Interface identification is specified in ERC-165. + * Query if a contract implements an interface + * @param interfaceID The interface identifier, as specified in ERC-165 + */ + supportsInterface( + interfaceID: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Interface identification is specified in ERC-165. + * Query if a contract implements an interface + * @param interfaceID The interface identifier, as specified in ERC-165 + */ + "supportsInterface(bytes4)"( + interfaceID: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Note that strictly, `_nUpdates` and `_nPreviousUpdates` don't need to be set - they're only used during dispute resolution, which these replacement log entries are never used for. However, for ease of resyncing the client, we have decided to include them for now. + * Set a replacement log entry if we're in recovery mode. + * @param _amount The amount of reputation being earned / lost + * @param _colony The address of the colony being updated + * @param _id The number of the log entry in the reputation mining cycle in question. + * @param _nPreviousUpdates The number of updates in the log before this entry + * @param _nUpdates The number of updates the log entry corresponds to + * @param _reputationMiningCycle The address of the reputation mining cycle that the log was in. + * @param _skillId The id of the origin skill for the reputation update + * @param _user The address of the user earning / losing the reputation + */ + setReplacementReputationUpdateLogEntry( + _reputationMiningCycle: string, + _id: BigNumberish, + _user: string, + _amount: BigNumberish, + _skillId: BigNumberish, + _colony: string, + _nUpdates: BigNumberish, + _nPreviousUpdates: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Note that strictly, `_nUpdates` and `_nPreviousUpdates` don't need to be set - they're only used during dispute resolution, which these replacement log entries are never used for. However, for ease of resyncing the client, we have decided to include them for now. + * Set a replacement log entry if we're in recovery mode. + * @param _amount The amount of reputation being earned / lost + * @param _colony The address of the colony being updated + * @param _id The number of the log entry in the reputation mining cycle in question. + * @param _nPreviousUpdates The number of updates in the log before this entry + * @param _nUpdates The number of updates the log entry corresponds to + * @param _reputationMiningCycle The address of the reputation mining cycle that the log was in. + * @param _skillId The id of the origin skill for the reputation update + * @param _user The address of the user earning / losing the reputation + */ + "setReplacementReputationUpdateLogEntry(address,uint256,address,int256,uint256,address,uint128,uint128)"( + _reputationMiningCycle: string, + _id: BigNumberish, + _user: string, + _amount: BigNumberish, + _skillId: BigNumberish, + _colony: string, + _nUpdates: BigNumberish, + _nPreviousUpdates: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a replacement log entry (if set) for the log entry `_id` in the mining cycle that was at the address `_reputationMiningCycle`. + * @param _id The log entry number we wish to see if there is a replacement for + * @param _reputationMiningCycle The address of the reputation mining cycle we are asking about + */ + getReplacementReputationUpdateLogEntry( + _reputationMiningCycle: string, + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [string, BigNumber, BigNumber, string, BigNumber, BigNumber] & { + user: string; + amount: BigNumber; + skillId: BigNumber; + colony: string; + nUpdates: BigNumber; + nPreviousUpdates: BigNumber; + } + >; + + /** + * Get a replacement log entry (if set) for the log entry `_id` in the mining cycle that was at the address `_reputationMiningCycle`. + * @param _id The log entry number we wish to see if there is a replacement for + * @param _reputationMiningCycle The address of the reputation mining cycle we are asking about + */ + "getReplacementReputationUpdateLogEntry(address,uint256)"( + _reputationMiningCycle: string, + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [string, BigNumber, BigNumber, string, BigNumber, BigNumber] & { + user: string; + amount: BigNumber; + skillId: BigNumber; + colony: string; + nUpdates: BigNumber; + nPreviousUpdates: BigNumber; + } + >; + + /** + * Get whether any replacement log entries have been set for the supplied reputation mining cycle.Used by the client to avoid doubling the number of RPC calls when syncing from scratch. + * @param _reputationMiningCycle The reputation mining cycle address we want to know if any entries have been replaced in. + */ + getReplacementReputationUpdateLogsExist( + _reputationMiningCycle: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get whether any replacement log entries have been set for the supplied reputation mining cycle.Used by the client to avoid doubling the number of RPC calls when syncing from scratch. + * @param _reputationMiningCycle The reputation mining cycle address we want to know if any entries have been replaced in. + */ + "getReplacementReputationUpdateLogsExist(address)"( + _reputationMiningCycle: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the Meta Colony address. + */ + getMetaColony(overrides?: TransactionOverrides): Promise; + + /** + * Get the Meta Colony address. + */ + "getMetaColony()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of colonies in the network. + */ + getColonyCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of colonies in the network. + */ + "getColonyCount()"(overrides?: TransactionOverrides): Promise; + + /** + * Check if specific address is a colony created on colony network. + * @param _colony Address of the colony + */ + isColony( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Check if specific address is a colony created on colony network. + * @param _colony Address of the colony + */ + "isColony(address)"( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Errors if the parent skill does not exist or if this is called by an unauthorised sender. + * Adds a new skill to the global or local skills tree, under skill `_parentSkillId`. Only the Meta Colony is allowed to add a global skill, called via `IColony.addGlobalSkill`. Any colony is allowed to add a local skill and which is associated with a new domain via `IColony.addDomain`. + * @param _parentSkillId Id of the skill under which the new skill will be added. If 0, a global skill is added with no parent. + */ + addSkill( + _parentSkillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Errors if the parent skill does not exist or if this is called by an unauthorised sender. + * Adds a new skill to the global or local skills tree, under skill `_parentSkillId`. Only the Meta Colony is allowed to add a global skill, called via `IColony.addGlobalSkill`. Any colony is allowed to add a local skill and which is associated with a new domain via `IColony.addDomain`. + * @param _parentSkillId Id of the skill under which the new skill will be added. If 0, a global skill is added with no parent. + */ + "addSkill(uint256)"( + _parentSkillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `nParents` and `nChildren` of skill with id `_skillId`. + * @param _skillId Id of the skill + */ + getSkill( + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber[], BigNumber[], boolean, boolean] & { + nParents: BigNumber; + nChildren: BigNumber; + parents: BigNumber[]; + children: BigNumber[]; + globalSkill: boolean; + deprecated: boolean; + } + >; + + /** + * Get the `nParents` and `nChildren` of skill with id `_skillId`. + * @param _skillId Id of the skill + */ + "getSkill(uint256)"( + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber[], BigNumber[], boolean, boolean] & { + nParents: BigNumber; + nChildren: BigNumber; + parents: BigNumber[]; + children: BigNumber[]; + globalSkill: boolean; + deprecated: boolean; + } + >; + + /** + * Mark a global skill as deprecated which stops new tasks and payments from using it. + * @param _skillId Id of the skill + */ + deprecateSkill( + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Mark a global skill as deprecated which stops new tasks and payments from using it. + * @param _skillId Id of the skill + */ + "deprecateSkill(uint256)"( + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Errors if it is called by anyone but a colony or if skill with id `_skillId` does not exist or. + * Adds a reputation update entry to log. + * @param _amount The amount of reputation change for the update, this can be a negative as well as a positive value + * @param _skillId The skill for the reputation update + * @param _user The address of the user for the reputation update + */ + appendReputationUpdateLog( + _user: string, + _amount: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Errors if it is called by anyone but a colony or if skill with id `_skillId` does not exist or. + * Adds a reputation update entry to log. + * @param _amount The amount of reputation change for the update, this can be a negative as well as a positive value + * @param _skillId The skill for the reputation update + * @param _user The address of the user for the reputation update + */ + "appendReputationUpdateLog(address,int256,uint256)"( + _user: string, + _amount: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of skills in the network including both global and local skills. + */ + getSkillCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of skills in the network including both global and local skills. + */ + "getSkillCount()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the `skillId` of the reputation mining skill. Only set once the metacolony is set up. + */ + getReputationMiningSkillId( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `skillId` of the reputation mining skill. Only set once the metacolony is set up. + */ + "getReputationMiningSkillId()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Sets the token locking address. This is only set once, and can't be changed afterwards. + * @param _tokenLockingAddress Address of the locking contract + */ + setTokenLocking( + _tokenLockingAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Sets the token locking address. This is only set once, and can't be changed afterwards. + * @param _tokenLockingAddress Address of the locking contract + */ + "setTokenLocking(address)"( + _tokenLockingAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get token locking contract address. + */ + getTokenLocking(overrides?: TransactionOverrides): Promise; + + /** + * Get token locking contract address. + */ + "getTokenLocking()"(overrides?: TransactionOverrides): Promise; + + /** + * Create the Meta Colony, same as a normal colony plus the root skill. + * @param _tokenAddress Address of the CLNY token + */ + createMetaColony( + _tokenAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Create the Meta Colony, same as a normal colony plus the root skill. + * @param _tokenAddress Address of the CLNY token + */ + "createMetaColony(address)"( + _tokenAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future versionFor the colony to mint tokens, token ownership must be transferred to the new colony + * Creates a new colony in the network, at version 3 + * @param _tokenAddress Address of an ERC20 token to serve as the colony token. + */ + createColony( + _tokenAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future versionFor the colony to mint tokens, token ownership must be transferred to the new colony + * Creates a new colony in the network, at version 3 + * @param _tokenAddress Address of an ERC20 token to serve as the colony token. + */ + "createColony(address)"( + _tokenAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * For the colony to mint tokens, token ownership must be transferred to the new colonyWe expect this function to only be used by the dapp + * Creates a new colony in the network, with an optional ENS name + * @param _colonyName The label to register (if null, no label is registered) + * @param _metadata The metadata associated with the new colony + * @param _tokenAddress Address of an ERC20 token to serve as the colony token + * @param _version The version of colony to deploy (pass 0 for the current version) + */ + "createColony(address,uint256,string,string)"( + _tokenAddress: string, + _version: BigNumberish, + _colonyName: string, + _metadata: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * For the colony to mint tokens, token ownership must be transferred to the new colony + * Creates a new colony in the network, with an optional ENS name + * @param _colonyName The label to register (if null, no label is registered) + * @param _tokenAddress Address of an ERC20 token to serve as the colony token + * @param _version The version of colony to deploy (pass 0 for the current version) + */ + "createColony(address,uint256,string)"( + _tokenAddress: string, + _version: BigNumberish, + _colonyName: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future versionFor the colony to mint tokens, token ownership must be transferred to the new colony + * Overload of the simpler `createColony` -- creates a new colony in the network with a variety of options, at version 4 + * @param _colonyName The label to register (if null, no label is registered) + * @param _orbitdb DEPRECATED Currently a no-op + * @param _tokenAddress Address of an ERC20 token to serve as the colony token + * @param _useExtensionManager DEPRECATED Currently a no-op + * @param _version The version of colony to deploy (pass 0 for the current version) + */ + "createColony(address,uint256,string,string,bool)"( + _tokenAddress: string, + _version: BigNumberish, + _colonyName: string, + _orbitdb: string, + _useExtensionManager: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Adds a new Colony contract version and the address of associated `_resolver` contract. Secured function to authorised members. Allowed to be called by the Meta Colony only. + * @param _resolver Address of the `Resolver` contract which will be used with the underlying `EtherRouter` contract + * @param _version The new Colony contract version + */ + addColonyVersion( + _version: BigNumberish, + _resolver: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Adds a new Colony contract version and the address of associated `_resolver` contract. Secured function to authorised members. Allowed to be called by the Meta Colony only. + * @param _resolver Address of the `Resolver` contract which will be used with the underlying `EtherRouter` contract + * @param _version The new Colony contract version + */ + "addColonyVersion(uint256,address)"( + _version: BigNumberish, + _resolver: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Only allowed to be run once, by the Network owner before any Colony versions are added. + * Initialises the colony network by setting the first Colony version resolver to `_resolver` address. + * @param _resolver Address of the resolver for Colony contract + * @param _version Version of the Colony contract the resolver represents + */ + initialise( + _resolver: string, + _version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Only allowed to be run once, by the Network owner before any Colony versions are added. + * Initialises the colony network by setting the first Colony version resolver to `_resolver` address. + * @param _resolver Address of the resolver for Colony contract + * @param _version Version of the Colony contract the resolver represents + */ + "initialise(address,uint256)"( + _resolver: string, + _version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a colony address by its Id in the network. + * @param _id Id of the colony to get + */ + getColony( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a colony address by its Id in the network. + * @param _id Id of the colony to get + */ + "getColony(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the latest Colony contract version. This is the version used to create all new colonies. + */ + getCurrentColonyVersion( + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the latest Colony contract version. This is the version used to create all new colonies. + */ + "getCurrentColonyVersion()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the id of the parent skill at index `_parentSkillIndex` for skill with Id `_skillId`. + * @param _parentSkillIndex Index of the `skill.parents` array to get Note that not all parent skill ids are stored here. See `Skill.parents` member for definition on which parents are stored + * @param _skillId Id of the skill + */ + getParentSkillId( + _skillId: BigNumberish, + _parentSkillIndex: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the id of the parent skill at index `_parentSkillIndex` for skill with Id `_skillId`. + * @param _parentSkillIndex Index of the `skill.parents` array to get Note that not all parent skill ids are stored here. See `Skill.parents` member for definition on which parents are stored + * @param _skillId Id of the skill + */ + "getParentSkillId(uint256,uint256)"( + _skillId: BigNumberish, + _parentSkillIndex: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the id of the child skill at index `_childSkillIndex` for skill with Id `_skillId`. + * @param _childSkillIndex Index of the `skill.children` array to get + * @param _skillId Id of the skill + */ + getChildSkillId( + _skillId: BigNumberish, + _childSkillIndex: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the id of the child skill at index `_childSkillIndex` for skill with Id `_skillId`. + * @param _childSkillIndex Index of the `skill.children` array to get + * @param _skillId Id of the skill + */ + "getChildSkillId(uint256,uint256)"( + _skillId: BigNumberish, + _childSkillIndex: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the address of either the active or inactive reputation mining cycle, based on `active`. The active reputation mining cycle is the one currently under consideration by reputation miners. The inactive reputation cycle is the one with the log that is being appended to. + * @param _active Whether the user wants the active or inactive reputation mining cycle + */ + getReputationMiningCycle( + _active: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the address of either the active or inactive reputation mining cycle, based on `active`. The active reputation mining cycle is the one currently under consideration by reputation miners. The inactive reputation cycle is the one with the log that is being appended to. + * @param _active Whether the user wants the active or inactive reputation mining cycle + */ + "getReputationMiningCycle(bool)"( + _active: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Calculate raw miner weight in WADs. + * @param _submissonIndex Index of reputation hash submission (between 0 and 11) + * @param _timeStaked Amount of time (in seconds) that the miner has staked their CLNY + */ + calculateMinerWeight( + _timeStaked: BigNumberish, + _submissonIndex: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Calculate raw miner weight in WADs. + * @param _submissonIndex Index of reputation hash submission (between 0 and 11) + * @param _timeStaked Amount of time (in seconds) that the miner has staked their CLNY + */ + "calculateMinerWeight(uint256,uint256)"( + _timeStaked: BigNumberish, + _submissonIndex: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `Resolver` address for Colony contract version `_version`. + * @param _version The Colony contract version + */ + getColonyVersionResolver( + _version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `Resolver` address for Colony contract version `_version`. + * @param _version The Colony contract version + */ + "getColonyVersionResolver(uint256)"( + _version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set a new Reputation root hash and starts a new mining cycle. Can only be called by the ReputationMiningCycle contract. + * @param newHash The reputation root hash + * @param newNLeaves The updated leaves count value + * @param stakers Array of users who submitted or backed the hash, being accepted here as the new reputation root hash + */ + setReputationRootHash( + newHash: Arrayish, + newNLeaves: BigNumberish, + stakers: string[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Set a new Reputation root hash and starts a new mining cycle. Can only be called by the ReputationMiningCycle contract. + * @param newHash The reputation root hash + * @param newNLeaves The updated leaves count value + * @param stakers Array of users who submitted or backed the hash, being accepted here as the new reputation root hash + */ + "setReputationRootHash(bytes32,uint256,address[])"( + newHash: Arrayish, + newNLeaves: BigNumberish, + stakers: string[], + overrides?: TransactionOverrides + ): Promise; + + /** + * This version of setReputationRootHash is deprecated and will be removed in a future release. It transparently calls the new version if it is called (essentially, removing the `reward` parameter. + * @param newHash The reputation root hash + * @param newNLeaves The updated leaves count value + * @param reward Amount of CLNY to be distributed as reward to miners (not used) + * @param stakers Array of users who submitted or backed the hash, being accepted here as the new reputation root hash + */ + "setReputationRootHash(bytes32,uint256,address[],uint256)"( + newHash: Arrayish, + newNLeaves: BigNumberish, + stakers: string[], + reward: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Starts a new Reputation Mining cycle. Explicitly called only the first time, subsequently called from within `setReputationRootHash`. + */ + startNextCycle( + overrides?: TransactionOverrides + ): Promise; + + /** + * Starts a new Reputation Mining cycle. Explicitly called only the first time, subsequently called from within `setReputationRootHash`. + */ + "startNextCycle()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Creates initial inactive reputation mining cycle. + */ + initialiseReputationMining( + overrides?: TransactionOverrides + ): Promise; + + /** + * Creates initial inactive reputation mining cycle. + */ + "initialiseReputationMining()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the root hash of the current reputation state tree. + */ + getReputationRootHash(overrides?: TransactionOverrides): Promise; + + /** + * Get the root hash of the current reputation state tree. + */ + "getReputationRootHash()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * I cannot see a reason why a user's client would need to call this - only stored to help with some edge cases in reputation mining dispute resolution. + * Get the number of leaves in the current reputation state tree. + */ + getReputationRootHashNLeaves( + overrides?: TransactionOverrides + ): Promise; + + /** + * I cannot see a reason why a user's client would need to call this - only stored to help with some edge cases in reputation mining dispute resolution. + * Get the number of leaves in the current reputation state tree. + */ + "getReputationRootHashNLeaves()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Deprecated, replaced by getReputationRootHashNLeaves which does the same thing but is more accurately named.will be removed in a later version. + * Get the number of leaves in the current reputation state tree. + */ + getReputationRootHashNNodes( + overrides?: TransactionOverrides + ): Promise; + + /** + * Deprecated, replaced by getReputationRootHashNLeaves which does the same thing but is more accurately named.will be removed in a later version. + * Get the number of leaves in the current reputation state tree. + */ + "getReputationRootHashNNodes()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Create and start a new `DutchAuction` for the entire amount of `_token` owned by the Colony Network. + * @param _token Address of the token held by the network to be auctioned + */ + startTokenAuction( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Create and start a new `DutchAuction` for the entire amount of `_token` owned by the Colony Network. + * @param _token Address of the token held by the network to be auctioned + */ + "startTokenAuction(address)"( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Setup registrar with ENS and root node. + * @param _ens Address of ENS registrar + * @param _rootNode Namehash of the root node for the domain + */ + setupRegistrar( + _ens: string, + _rootNode: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Setup registrar with ENS and root node. + * @param _ens Address of ENS registrar + * @param _rootNode Namehash of the root node for the domain + */ + "setupRegistrar(address,bytes32)"( + _ens: string, + _rootNode: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Register a "user.joincolony.eth" label. + * @param orbitdb The path of the orbitDB database associated with the user profile + * @param username The label to register + */ + registerUserLabel( + username: string, + orbitdb: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Register a "user.joincolony.eth" label. + * @param orbitdb The path of the orbitDB database associated with the user profile + * @param username The label to register + */ + "registerUserLabel(string,string)"( + username: string, + orbitdb: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Register a "colony.joincolony.eth" label. Can only be called by a Colony. + * @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; + + /** + * Register a "colony.joincolony.eth" label. Can only be called by a Colony. + * @param colonyName The label to register. + * @param orbitdb The path of the orbitDB database associated with the colony name + */ + "registerColonyLabel(string,string)"( + 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; + + /** + * 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(string)"( + orbitdb: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Update a user's orbitdb address. Can only be called by a user with a registered subdomain + * @param orbitdb The path of the orbitDB database to be associated with the user + */ + updateUserOrbitDB( + orbitdb: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Update a user's orbitdb address. Can only be called by a user with a registered subdomain + * @param orbitdb The path of the orbitDB database to be associated with the user + */ + "updateUserOrbitDB(string)"( + orbitdb: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Retrieve the orbitdb address corresponding to a registered account. + * @param node The Namehash of the account being queried. + */ + getProfileDBAddress( + node: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Retrieve the orbitdb address corresponding to a registered account. + * @param node The Namehash of the account being queried. + */ + "getProfileDBAddress(bytes32)"( + node: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Reverse lookup a username from an address. + * @param addr The address we wish to find the corresponding ENS domain for (if any) + */ + lookupRegisteredENSDomain( + addr: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Reverse lookup a username from an address. + * @param addr The address we wish to find the corresponding ENS domain for (if any) + */ + "lookupRegisteredENSDomain(address)"( + addr: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the address the supplied node resolves do, if we are the resolver. + * @param node The namehash of the ENS address being requested + */ + addr(node: Arrayish, overrides?: TransactionOverrides): Promise; + + /** + * Returns the address the supplied node resolves do, if we are the resolver. + * @param node The namehash of the ENS address being requested + */ + "addr(bytes32)"( + node: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the address of the ENSRegistrar for the Network. + */ + getENSRegistrar(overrides?: TransactionOverrides): Promise; + + /** + * Returns the address of the ENSRegistrar for the Network. + */ + "getENSRegistrar()"(overrides?: TransactionOverrides): Promise; + + /** + * Set the resolver to be used by new instances of ReputationMiningCycle. + * @param miningResolverAddress The address of the Resolver contract with the functions correctly wired. + */ + setMiningResolver( + miningResolverAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the resolver to be used by new instances of ReputationMiningCycle. + * @param miningResolverAddress The address of the Resolver contract with the functions correctly wired. + */ + "setMiningResolver(address)"( + miningResolverAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the resolver to be used by new instances of ReputationMiningCycle. + */ + getMiningResolver(overrides?: TransactionOverrides): Promise; + + /** + * Get the resolver to be used by new instances of ReputationMiningCycle. + */ + "getMiningResolver()"(overrides?: TransactionOverrides): Promise; + + /** + * Can only be called by the MetaColony.The extension version is queried from the resolver itself. + * Add a new extension resolver to the Extensions repository. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param resolver The deployed resolver containing the extension contract logic + */ + addExtensionToNetwork( + extensionId: Arrayish, + resolver: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Can only be called by the MetaColony.The extension version is queried from the resolver itself. + * Add a new extension resolver to the Extensions repository. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param resolver The deployed resolver containing the extension contract logic + */ + "addExtensionToNetwork(bytes32,address)"( + extensionId: Arrayish, + resolver: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Install an extension in a colony. Can only be called by a Colony. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param version Version of the extension to install + */ + installExtension( + extensionId: Arrayish, + version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Install an extension in a colony. Can only be called by a Colony. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param version Version of the extension to install + */ + "installExtension(bytes32,uint256)"( + extensionId: Arrayish, + version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Upgrade an extension in a colony. Can only be called by a Colony. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param newVersion Version of the extension to upgrade to (must be one greater than current) + */ + upgradeExtension( + extensionId: Arrayish, + newVersion: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Upgrade an extension in a colony. Can only be called by a Colony. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param newVersion Version of the extension to upgrade to (must be one greater than current) + */ + "upgradeExtension(bytes32,uint256)"( + extensionId: Arrayish, + newVersion: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the deprecation of an extension in a colony. Can only be called by a Colony. + * @param deprecated Whether to deprecate the extension or not + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + deprecateExtension( + extensionId: Arrayish, + deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the deprecation of an extension in a colony. Can only be called by a Colony. + * @param deprecated Whether to deprecate the extension or not + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + "deprecateExtension(bytes32,bool)"( + extensionId: Arrayish, + deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Uninstall an extension in a colony. Can only be called by a Colony. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + uninstallExtension( + extensionId: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Uninstall an extension in a colony. Can only be called by a Colony. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + "uninstallExtension(bytes32)"( + extensionId: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get an extension's resolver. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param version Version of the extension + */ + getExtensionResolver( + extensionId: Arrayish, + version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get an extension's resolver. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param version Version of the extension + */ + "getExtensionResolver(bytes32,uint256)"( + extensionId: Arrayish, + version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get an extension's installation. + * @param colony Address of the colony the extension is installed in + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + getExtensionInstallation( + extensionId: Arrayish, + colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get an extension's installation. + * @param colony Address of the colony the extension is installed in + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + "getExtensionInstallation(bytes32,address)"( + extensionId: Arrayish, + colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Return 1 / the fee to pay to the network. e.g. if the fee is 1% (or 0.01), return 100. + */ + getFeeInverse(overrides?: TransactionOverrides): Promise; + + /** + * Return 1 / the fee to pay to the network. e.g. if the fee is 1% (or 0.01), return 100. + */ + "getFeeInverse()"(overrides?: TransactionOverrides): Promise; + + /** + * Set the colony network fee to pay. e.g. if the fee is 1% (or 0.01), pass 100 as `_feeInverse`. + * @param _feeInverse The inverse of the network fee to set + */ + setFeeInverse( + _feeInverse: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the colony network fee to pay. e.g. if the fee is 1% (or 0.01), pass 100 as `_feeInverse`. + * @param _feeInverse The inverse of the network fee to set + */ + "setFeeInverse(uint256)"( + _feeInverse: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a token's status in the payout whitelist + * @param _token The token being queried + */ + getPayoutWhitelist( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a token's status in the payout whitelist + * @param _token The token being queried + */ + "getPayoutWhitelist(address)"( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set a token's status in the payout whitelist + * @param _status The whitelist status + * @param _token The token being set + */ + setPayoutWhitelist( + _token: string, + _status: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set a token's status in the payout whitelist + * @param _status The whitelist status + * @param _token The token being set + */ + "setPayoutWhitelist(address,bool)"( + _token: string, + _status: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * While external, it can only be called successfully by the current ReputationMiningCycle. + * Function called to punish people who staked against a new reputation root hash that turned out to be incorrect. + * @param _amount Amount of stake to slash + * @param _stakers Array of the addresses of stakers to punish + */ + punishStakers( + _stakers: string[], + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * While external, it can only be called successfully by the current ReputationMiningCycle. + * Function called to punish people who staked against a new reputation root hash that turned out to be incorrect. + * @param _amount Amount of stake to slash + * @param _stakers Array of the addresses of stakers to punish + */ + "punishStakers(address[],uint256)"( + _stakers: string[], + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Stake CLNY to allow the staker to participate in reputation mining. + * @param _amount Amount of CLNY to stake for the purposes of mining + */ + stakeForMining( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Stake CLNY to allow the staker to participate in reputation mining. + * @param _amount Amount of CLNY to stake for the purposes of mining + */ + "stakeForMining(uint256)"( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Unstake CLNY currently staked for reputation mining. + * @param _amount Amount of CLNY staked for mining to unstake + */ + unstakeForMining( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Unstake CLNY currently staked for reputation mining. + * @param _amount Amount of CLNY staked for mining to unstake + */ + "unstakeForMining(uint256)"( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * returns how much CLNY _user has staked for the purposes of reputation mining + * @param _user The user to query + */ + getMiningStake( + _user: string, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber] & { amount: BigNumber; timestamp: BigNumber } + >; + + /** + * returns how much CLNY _user has staked for the purposes of reputation mining + * @param _user The user to query + */ + "getMiningStake(address)"( + _user: string, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber] & { amount: BigNumber; timestamp: BigNumber } + >; + + /** + * Only callable by the active reputation mining cycle + * Used to track that a user is eligible to claim a reward + * @param _amount The amount of CLNY to be awarded + * @param _recipient The address receiving the award + */ + reward( + _recipient: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Only callable by the active reputation mining cycle + * Used to track that a user is eligible to claim a reward + * @param _amount The amount of CLNY to be awarded + * @param _recipient The address receiving the award + */ + "reward(address,uint256)"( + _recipient: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Only callable by the active reputation mining cycle + * Used to burn tokens that are not needed to pay out rewards (because not every possible defence was made for all submissions) + * @param _amount The amount of CLNY to burn + */ + burnUnneededRewards( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Only callable by the active reputation mining cycle + * Used to burn tokens that are not needed to pay out rewards (because not every possible defence was made for all submissions) + * @param _amount The amount of CLNY to burn + */ + "burnUnneededRewards(uint256)"( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Can be called by anyone, not just _recipient + * Used by a user to claim any mining rewards due to them. This will place them in their balance or pending balance, as appropriate. + * @param _recipient The user whose rewards to claim + */ + claimMiningReward( + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Can be called by anyone, not just _recipient + * Used by a user to claim any mining rewards due to them. This will place them in their balance or pending balance, as appropriate. + * @param _recipient The user whose rewards to claim + */ + "claimMiningReward(address)"( + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Can only be called by the MetaColony. + * Called to set the total per-cycle reputation reward, which will be split between all miners. + */ + setReputationMiningCycleReward( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Can only be called by the MetaColony. + * Called to set the total per-cycle reputation reward, which will be split between all miners. + */ + "setReputationMiningCycleReward(uint256)"( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called to get the total per-cycle reputation mining reward. + */ + getReputationMiningCycleReward( + overrides?: TransactionOverrides + ): Promise; + + /** + * Called to get the total per-cycle reputation mining reward. + */ + "getReputationMiningCycleReward()"( + overrides?: TransactionOverrides + ): Promise; + }; + + /** + * Indicate approval to exit recovery mode. Can only be called by user with recovery role. + */ + approveExitRecovery( + overrides?: TransactionOverrides + ): Promise; + + /** + * Indicate approval to exit recovery mode. Can only be called by user with recovery role. + */ + "approveExitRecovery()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * No return value, but should throw if protected.This is external, 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, + overrides?: TransactionOverrides + ): Promise; + + /** + * No return value, but should throw if protected.This is external, 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(uint256)"( + _slot: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Put colony network mining into recovery mode. Can only be called by user with recovery role. + */ + enterRecoveryMode( + overrides?: TransactionOverrides + ): Promise; + + /** + * Put colony network mining into recovery mode. Can only be called by user with recovery role. + */ + "enterRecoveryMode()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Exit recovery mode, can be called by anyone if enough whitelist approvals are given. + */ + exitRecoveryMode( + overrides?: TransactionOverrides + ): Promise; + + /** + * Exit recovery mode, can be called by anyone if enough whitelist approvals are given. + */ + "exitRecoveryMode()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Is colony network in recovery mode. + */ + isInRecoveryMode(overrides?: TransactionOverrides): Promise; + + /** + * Is colony network in recovery mode. + */ + "isInRecoveryMode()"(overrides?: TransactionOverrides): Promise; + + /** + * Return number of recovery roles. + */ + numRecoveryRoles(overrides?: TransactionOverrides): Promise; + + /** + * Return number of recovery roles. + */ + "numRecoveryRoles()"(overrides?: TransactionOverrides): 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; + + /** + * Remove colony recovery role. Can only be called by root role. + * @param _user User we want to remove recovery role from + */ + "removeRecoveryRole(address)"( + _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; + + /** + * Set new colony recovery role. Can be called by root. + * @param _user User we want to give a recovery role to + */ + "setRecoveryRole(address)"( + _user: string, + overrides?: TransactionOverrides + ): 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; + + /** + * 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(uint256,bytes32)"( + _slot: BigNumberish, + _value: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Interface identification is specified in ERC-165. + * Query if a contract implements an interface + * @param interfaceID The interface identifier, as specified in ERC-165 + */ + supportsInterface( + interfaceID: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Interface identification is specified in ERC-165. + * Query if a contract implements an interface + * @param interfaceID The interface identifier, as specified in ERC-165 + */ + "supportsInterface(bytes4)"( + interfaceID: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Note that strictly, `_nUpdates` and `_nPreviousUpdates` don't need to be set - they're only used during dispute resolution, which these replacement log entries are never used for. However, for ease of resyncing the client, we have decided to include them for now. + * Set a replacement log entry if we're in recovery mode. + * @param _amount The amount of reputation being earned / lost + * @param _colony The address of the colony being updated + * @param _id The number of the log entry in the reputation mining cycle in question. + * @param _nPreviousUpdates The number of updates in the log before this entry + * @param _nUpdates The number of updates the log entry corresponds to + * @param _reputationMiningCycle The address of the reputation mining cycle that the log was in. + * @param _skillId The id of the origin skill for the reputation update + * @param _user The address of the user earning / losing the reputation + */ + setReplacementReputationUpdateLogEntry( + _reputationMiningCycle: string, + _id: BigNumberish, + _user: string, + _amount: BigNumberish, + _skillId: BigNumberish, + _colony: string, + _nUpdates: BigNumberish, + _nPreviousUpdates: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Note that strictly, `_nUpdates` and `_nPreviousUpdates` don't need to be set - they're only used during dispute resolution, which these replacement log entries are never used for. However, for ease of resyncing the client, we have decided to include them for now. + * Set a replacement log entry if we're in recovery mode. + * @param _amount The amount of reputation being earned / lost + * @param _colony The address of the colony being updated + * @param _id The number of the log entry in the reputation mining cycle in question. + * @param _nPreviousUpdates The number of updates in the log before this entry + * @param _nUpdates The number of updates the log entry corresponds to + * @param _reputationMiningCycle The address of the reputation mining cycle that the log was in. + * @param _skillId The id of the origin skill for the reputation update + * @param _user The address of the user earning / losing the reputation + */ + "setReplacementReputationUpdateLogEntry(address,uint256,address,int256,uint256,address,uint128,uint128)"( + _reputationMiningCycle: string, + _id: BigNumberish, + _user: string, + _amount: BigNumberish, + _skillId: BigNumberish, + _colony: string, + _nUpdates: BigNumberish, + _nPreviousUpdates: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a replacement log entry (if set) for the log entry `_id` in the mining cycle that was at the address `_reputationMiningCycle`. + * @param _id The log entry number we wish to see if there is a replacement for + * @param _reputationMiningCycle The address of the reputation mining cycle we are asking about + */ + getReplacementReputationUpdateLogEntry( + _reputationMiningCycle: string, + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [string, BigNumber, BigNumber, string, BigNumber, BigNumber] & { + user: string; + amount: BigNumber; + skillId: BigNumber; + colony: string; + nUpdates: BigNumber; + nPreviousUpdates: BigNumber; + } + >; + + /** + * Get a replacement log entry (if set) for the log entry `_id` in the mining cycle that was at the address `_reputationMiningCycle`. + * @param _id The log entry number we wish to see if there is a replacement for + * @param _reputationMiningCycle The address of the reputation mining cycle we are asking about + */ + "getReplacementReputationUpdateLogEntry(address,uint256)"( + _reputationMiningCycle: string, + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [string, BigNumber, BigNumber, string, BigNumber, BigNumber] & { + user: string; + amount: BigNumber; + skillId: BigNumber; + colony: string; + nUpdates: BigNumber; + nPreviousUpdates: BigNumber; + } + >; + + /** + * Get whether any replacement log entries have been set for the supplied reputation mining cycle.Used by the client to avoid doubling the number of RPC calls when syncing from scratch. + * @param _reputationMiningCycle The reputation mining cycle address we want to know if any entries have been replaced in. + */ + getReplacementReputationUpdateLogsExist( + _reputationMiningCycle: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get whether any replacement log entries have been set for the supplied reputation mining cycle.Used by the client to avoid doubling the number of RPC calls when syncing from scratch. + * @param _reputationMiningCycle The reputation mining cycle address we want to know if any entries have been replaced in. + */ + "getReplacementReputationUpdateLogsExist(address)"( + _reputationMiningCycle: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the Meta Colony address. + */ + getMetaColony(overrides?: TransactionOverrides): Promise; + + /** + * Get the Meta Colony address. + */ + "getMetaColony()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of colonies in the network. + */ + getColonyCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of colonies in the network. + */ + "getColonyCount()"(overrides?: TransactionOverrides): Promise; + + /** + * Check if specific address is a colony created on colony network. + * @param _colony Address of the colony + */ + isColony(_colony: string, overrides?: TransactionOverrides): Promise; + + /** + * Check if specific address is a colony created on colony network. + * @param _colony Address of the colony + */ + "isColony(address)"( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Errors if the parent skill does not exist or if this is called by an unauthorised sender. + * Adds a new skill to the global or local skills tree, under skill `_parentSkillId`. Only the Meta Colony is allowed to add a global skill, called via `IColony.addGlobalSkill`. Any colony is allowed to add a local skill and which is associated with a new domain via `IColony.addDomain`. + * @param _parentSkillId Id of the skill under which the new skill will be added. If 0, a global skill is added with no parent. + */ + addSkill( + _parentSkillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Errors if the parent skill does not exist or if this is called by an unauthorised sender. + * Adds a new skill to the global or local skills tree, under skill `_parentSkillId`. Only the Meta Colony is allowed to add a global skill, called via `IColony.addGlobalSkill`. Any colony is allowed to add a local skill and which is associated with a new domain via `IColony.addDomain`. + * @param _parentSkillId Id of the skill under which the new skill will be added. If 0, a global skill is added with no parent. + */ + "addSkill(uint256)"( + _parentSkillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `nParents` and `nChildren` of skill with id `_skillId`. + * @param _skillId Id of the skill + */ + getSkill( + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber[], BigNumber[], boolean, boolean] & { + nParents: BigNumber; + nChildren: BigNumber; + parents: BigNumber[]; + children: BigNumber[]; + globalSkill: boolean; + deprecated: boolean; + } + >; + + /** + * Get the `nParents` and `nChildren` of skill with id `_skillId`. + * @param _skillId Id of the skill + */ + "getSkill(uint256)"( + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber[], BigNumber[], boolean, boolean] & { + nParents: BigNumber; + nChildren: BigNumber; + parents: BigNumber[]; + children: BigNumber[]; + globalSkill: boolean; + deprecated: boolean; + } + >; + + /** + * Mark a global skill as deprecated which stops new tasks and payments from using it. + * @param _skillId Id of the skill + */ + deprecateSkill( + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Mark a global skill as deprecated which stops new tasks and payments from using it. + * @param _skillId Id of the skill + */ + "deprecateSkill(uint256)"( + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Errors if it is called by anyone but a colony or if skill with id `_skillId` does not exist or. + * Adds a reputation update entry to log. + * @param _amount The amount of reputation change for the update, this can be a negative as well as a positive value + * @param _skillId The skill for the reputation update + * @param _user The address of the user for the reputation update + */ + appendReputationUpdateLog( + _user: string, + _amount: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Errors if it is called by anyone but a colony or if skill with id `_skillId` does not exist or. + * Adds a reputation update entry to log. + * @param _amount The amount of reputation change for the update, this can be a negative as well as a positive value + * @param _skillId The skill for the reputation update + * @param _user The address of the user for the reputation update + */ + "appendReputationUpdateLog(address,int256,uint256)"( + _user: string, + _amount: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of skills in the network including both global and local skills. + */ + getSkillCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of skills in the network including both global and local skills. + */ + "getSkillCount()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the `skillId` of the reputation mining skill. Only set once the metacolony is set up. + */ + getReputationMiningSkillId( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `skillId` of the reputation mining skill. Only set once the metacolony is set up. + */ + "getReputationMiningSkillId()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Sets the token locking address. This is only set once, and can't be changed afterwards. + * @param _tokenLockingAddress Address of the locking contract + */ + setTokenLocking( + _tokenLockingAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Sets the token locking address. This is only set once, and can't be changed afterwards. + * @param _tokenLockingAddress Address of the locking contract + */ + "setTokenLocking(address)"( + _tokenLockingAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get token locking contract address. + */ + getTokenLocking(overrides?: TransactionOverrides): Promise; + + /** + * Get token locking contract address. + */ + "getTokenLocking()"(overrides?: TransactionOverrides): Promise; + + /** + * Create the Meta Colony, same as a normal colony plus the root skill. + * @param _tokenAddress Address of the CLNY token + */ + createMetaColony( + _tokenAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Create the Meta Colony, same as a normal colony plus the root skill. + * @param _tokenAddress Address of the CLNY token + */ + "createMetaColony(address)"( + _tokenAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future versionFor the colony to mint tokens, token ownership must be transferred to the new colony + * Creates a new colony in the network, at version 3 + * @param _tokenAddress Address of an ERC20 token to serve as the colony token. + */ + createColony( + _tokenAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future versionFor the colony to mint tokens, token ownership must be transferred to the new colony + * Creates a new colony in the network, at version 3 + * @param _tokenAddress Address of an ERC20 token to serve as the colony token. + */ + "createColony(address)"( + _tokenAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * For the colony to mint tokens, token ownership must be transferred to the new colonyWe expect this function to only be used by the dapp + * Creates a new colony in the network, with an optional ENS name + * @param _colonyName The label to register (if null, no label is registered) + * @param _metadata The metadata associated with the new colony + * @param _tokenAddress Address of an ERC20 token to serve as the colony token + * @param _version The version of colony to deploy (pass 0 for the current version) + */ + "createColony(address,uint256,string,string)"( + _tokenAddress: string, + _version: BigNumberish, + _colonyName: string, + _metadata: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * For the colony to mint tokens, token ownership must be transferred to the new colony + * Creates a new colony in the network, with an optional ENS name + * @param _colonyName The label to register (if null, no label is registered) + * @param _tokenAddress Address of an ERC20 token to serve as the colony token + * @param _version The version of colony to deploy (pass 0 for the current version) + */ + "createColony(address,uint256,string)"( + _tokenAddress: string, + _version: BigNumberish, + _colonyName: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future versionFor the colony to mint tokens, token ownership must be transferred to the new colony + * Overload of the simpler `createColony` -- creates a new colony in the network with a variety of options, at version 4 + * @param _colonyName The label to register (if null, no label is registered) + * @param _orbitdb DEPRECATED Currently a no-op + * @param _tokenAddress Address of an ERC20 token to serve as the colony token + * @param _useExtensionManager DEPRECATED Currently a no-op + * @param _version The version of colony to deploy (pass 0 for the current version) + */ + "createColony(address,uint256,string,string,bool)"( + _tokenAddress: string, + _version: BigNumberish, + _colonyName: string, + _orbitdb: string, + _useExtensionManager: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Adds a new Colony contract version and the address of associated `_resolver` contract. Secured function to authorised members. Allowed to be called by the Meta Colony only. + * @param _resolver Address of the `Resolver` contract which will be used with the underlying `EtherRouter` contract + * @param _version The new Colony contract version + */ + addColonyVersion( + _version: BigNumberish, + _resolver: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Adds a new Colony contract version and the address of associated `_resolver` contract. Secured function to authorised members. Allowed to be called by the Meta Colony only. + * @param _resolver Address of the `Resolver` contract which will be used with the underlying `EtherRouter` contract + * @param _version The new Colony contract version + */ + "addColonyVersion(uint256,address)"( + _version: BigNumberish, + _resolver: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Only allowed to be run once, by the Network owner before any Colony versions are added. + * Initialises the colony network by setting the first Colony version resolver to `_resolver` address. + * @param _resolver Address of the resolver for Colony contract + * @param _version Version of the Colony contract the resolver represents + */ + initialise( + _resolver: string, + _version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Only allowed to be run once, by the Network owner before any Colony versions are added. + * Initialises the colony network by setting the first Colony version resolver to `_resolver` address. + * @param _resolver Address of the resolver for Colony contract + * @param _version Version of the Colony contract the resolver represents + */ + "initialise(address,uint256)"( + _resolver: string, + _version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a colony address by its Id in the network. + * @param _id Id of the colony to get + */ + getColony( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a colony address by its Id in the network. + * @param _id Id of the colony to get + */ + "getColony(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the latest Colony contract version. This is the version used to create all new colonies. + */ + getCurrentColonyVersion(overrides?: TransactionOverrides): Promise; + + /** + * Returns the latest Colony contract version. This is the version used to create all new colonies. + */ + "getCurrentColonyVersion()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the id of the parent skill at index `_parentSkillIndex` for skill with Id `_skillId`. + * @param _parentSkillIndex Index of the `skill.parents` array to get Note that not all parent skill ids are stored here. See `Skill.parents` member for definition on which parents are stored + * @param _skillId Id of the skill + */ + getParentSkillId( + _skillId: BigNumberish, + _parentSkillIndex: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the id of the parent skill at index `_parentSkillIndex` for skill with Id `_skillId`. + * @param _parentSkillIndex Index of the `skill.parents` array to get Note that not all parent skill ids are stored here. See `Skill.parents` member for definition on which parents are stored + * @param _skillId Id of the skill + */ + "getParentSkillId(uint256,uint256)"( + _skillId: BigNumberish, + _parentSkillIndex: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the id of the child skill at index `_childSkillIndex` for skill with Id `_skillId`. + * @param _childSkillIndex Index of the `skill.children` array to get + * @param _skillId Id of the skill + */ + getChildSkillId( + _skillId: BigNumberish, + _childSkillIndex: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the id of the child skill at index `_childSkillIndex` for skill with Id `_skillId`. + * @param _childSkillIndex Index of the `skill.children` array to get + * @param _skillId Id of the skill + */ + "getChildSkillId(uint256,uint256)"( + _skillId: BigNumberish, + _childSkillIndex: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the address of either the active or inactive reputation mining cycle, based on `active`. The active reputation mining cycle is the one currently under consideration by reputation miners. The inactive reputation cycle is the one with the log that is being appended to. + * @param _active Whether the user wants the active or inactive reputation mining cycle + */ + getReputationMiningCycle( + _active: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the address of either the active or inactive reputation mining cycle, based on `active`. The active reputation mining cycle is the one currently under consideration by reputation miners. The inactive reputation cycle is the one with the log that is being appended to. + * @param _active Whether the user wants the active or inactive reputation mining cycle + */ + "getReputationMiningCycle(bool)"( + _active: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Calculate raw miner weight in WADs. + * @param _submissonIndex Index of reputation hash submission (between 0 and 11) + * @param _timeStaked Amount of time (in seconds) that the miner has staked their CLNY + */ + calculateMinerWeight( + _timeStaked: BigNumberish, + _submissonIndex: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Calculate raw miner weight in WADs. + * @param _submissonIndex Index of reputation hash submission (between 0 and 11) + * @param _timeStaked Amount of time (in seconds) that the miner has staked their CLNY + */ + "calculateMinerWeight(uint256,uint256)"( + _timeStaked: BigNumberish, + _submissonIndex: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `Resolver` address for Colony contract version `_version`. + * @param _version The Colony contract version + */ + getColonyVersionResolver( + _version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `Resolver` address for Colony contract version `_version`. + * @param _version The Colony contract version + */ + "getColonyVersionResolver(uint256)"( + _version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set a new Reputation root hash and starts a new mining cycle. Can only be called by the ReputationMiningCycle contract. + * @param newHash The reputation root hash + * @param newNLeaves The updated leaves count value + * @param stakers Array of users who submitted or backed the hash, being accepted here as the new reputation root hash + */ + setReputationRootHash( + newHash: Arrayish, + newNLeaves: BigNumberish, + stakers: string[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Set a new Reputation root hash and starts a new mining cycle. Can only be called by the ReputationMiningCycle contract. + * @param newHash The reputation root hash + * @param newNLeaves The updated leaves count value + * @param stakers Array of users who submitted or backed the hash, being accepted here as the new reputation root hash + */ + "setReputationRootHash(bytes32,uint256,address[])"( + newHash: Arrayish, + newNLeaves: BigNumberish, + stakers: string[], + overrides?: TransactionOverrides + ): Promise; + + /** + * This version of setReputationRootHash is deprecated and will be removed in a future release. It transparently calls the new version if it is called (essentially, removing the `reward` parameter. + * @param newHash The reputation root hash + * @param newNLeaves The updated leaves count value + * @param reward Amount of CLNY to be distributed as reward to miners (not used) + * @param stakers Array of users who submitted or backed the hash, being accepted here as the new reputation root hash + */ + "setReputationRootHash(bytes32,uint256,address[],uint256)"( + newHash: Arrayish, + newNLeaves: BigNumberish, + stakers: string[], + reward: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Starts a new Reputation Mining cycle. Explicitly called only the first time, subsequently called from within `setReputationRootHash`. + */ + startNextCycle( + overrides?: TransactionOverrides + ): Promise; + + /** + * Starts a new Reputation Mining cycle. Explicitly called only the first time, subsequently called from within `setReputationRootHash`. + */ + "startNextCycle()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Creates initial inactive reputation mining cycle. + */ + initialiseReputationMining( + overrides?: TransactionOverrides + ): Promise; + + /** + * Creates initial inactive reputation mining cycle. + */ + "initialiseReputationMining()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the root hash of the current reputation state tree. + */ + getReputationRootHash(overrides?: TransactionOverrides): Promise; + + /** + * Get the root hash of the current reputation state tree. + */ + "getReputationRootHash()"(overrides?: TransactionOverrides): Promise; + + /** + * I cannot see a reason why a user's client would need to call this - only stored to help with some edge cases in reputation mining dispute resolution. + * Get the number of leaves in the current reputation state tree. + */ + getReputationRootHashNLeaves( + overrides?: TransactionOverrides + ): Promise; + + /** + * I cannot see a reason why a user's client would need to call this - only stored to help with some edge cases in reputation mining dispute resolution. + * Get the number of leaves in the current reputation state tree. + */ + "getReputationRootHashNLeaves()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Deprecated, replaced by getReputationRootHashNLeaves which does the same thing but is more accurately named.will be removed in a later version. + * Get the number of leaves in the current reputation state tree. + */ + getReputationRootHashNNodes( + overrides?: TransactionOverrides + ): Promise; + + /** + * Deprecated, replaced by getReputationRootHashNLeaves which does the same thing but is more accurately named.will be removed in a later version. + * Get the number of leaves in the current reputation state tree. + */ + "getReputationRootHashNNodes()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Create and start a new `DutchAuction` for the entire amount of `_token` owned by the Colony Network. + * @param _token Address of the token held by the network to be auctioned + */ + startTokenAuction( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Create and start a new `DutchAuction` for the entire amount of `_token` owned by the Colony Network. + * @param _token Address of the token held by the network to be auctioned + */ + "startTokenAuction(address)"( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Setup registrar with ENS and root node. + * @param _ens Address of ENS registrar + * @param _rootNode Namehash of the root node for the domain + */ + setupRegistrar( + _ens: string, + _rootNode: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Setup registrar with ENS and root node. + * @param _ens Address of ENS registrar + * @param _rootNode Namehash of the root node for the domain + */ + "setupRegistrar(address,bytes32)"( + _ens: string, + _rootNode: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Register a "user.joincolony.eth" label. + * @param orbitdb The path of the orbitDB database associated with the user profile + * @param username The label to register + */ + registerUserLabel( + username: string, + orbitdb: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Register a "user.joincolony.eth" label. + * @param orbitdb The path of the orbitDB database associated with the user profile + * @param username The label to register + */ + "registerUserLabel(string,string)"( + username: string, + orbitdb: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Register a "colony.joincolony.eth" label. Can only be called by a Colony. + * @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; + + /** + * Register a "colony.joincolony.eth" label. Can only be called by a Colony. + * @param colonyName The label to register. + * @param orbitdb The path of the orbitDB database associated with the colony name + */ + "registerColonyLabel(string,string)"( + 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; + + /** + * 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(string)"( + orbitdb: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Update a user's orbitdb address. Can only be called by a user with a registered subdomain + * @param orbitdb The path of the orbitDB database to be associated with the user + */ + updateUserOrbitDB( + orbitdb: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Update a user's orbitdb address. Can only be called by a user with a registered subdomain + * @param orbitdb The path of the orbitDB database to be associated with the user + */ + "updateUserOrbitDB(string)"( + orbitdb: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Retrieve the orbitdb address corresponding to a registered account. + * @param node The Namehash of the account being queried. + */ + getProfileDBAddress( + node: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Retrieve the orbitdb address corresponding to a registered account. + * @param node The Namehash of the account being queried. + */ + "getProfileDBAddress(bytes32)"( + node: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Reverse lookup a username from an address. + * @param addr The address we wish to find the corresponding ENS domain for (if any) + */ + lookupRegisteredENSDomain( + addr: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Reverse lookup a username from an address. + * @param addr The address we wish to find the corresponding ENS domain for (if any) + */ + "lookupRegisteredENSDomain(address)"( + addr: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the address the supplied node resolves do, if we are the resolver. + * @param node The namehash of the ENS address being requested + */ + addr(node: Arrayish, overrides?: TransactionOverrides): Promise; + + /** + * Returns the address the supplied node resolves do, if we are the resolver. + * @param node The namehash of the ENS address being requested + */ + "addr(bytes32)"( + node: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the address of the ENSRegistrar for the Network. + */ + getENSRegistrar(overrides?: TransactionOverrides): Promise; + + /** + * Returns the address of the ENSRegistrar for the Network. + */ + "getENSRegistrar()"(overrides?: TransactionOverrides): Promise; + + /** + * Set the resolver to be used by new instances of ReputationMiningCycle. + * @param miningResolverAddress The address of the Resolver contract with the functions correctly wired. + */ + setMiningResolver( + miningResolverAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the resolver to be used by new instances of ReputationMiningCycle. + * @param miningResolverAddress The address of the Resolver contract with the functions correctly wired. + */ + "setMiningResolver(address)"( + miningResolverAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the resolver to be used by new instances of ReputationMiningCycle. + */ + getMiningResolver(overrides?: TransactionOverrides): Promise; + + /** + * Get the resolver to be used by new instances of ReputationMiningCycle. + */ + "getMiningResolver()"(overrides?: TransactionOverrides): Promise; + + /** + * Can only be called by the MetaColony.The extension version is queried from the resolver itself. + * Add a new extension resolver to the Extensions repository. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param resolver The deployed resolver containing the extension contract logic + */ + addExtensionToNetwork( + extensionId: Arrayish, + resolver: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Can only be called by the MetaColony.The extension version is queried from the resolver itself. + * Add a new extension resolver to the Extensions repository. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param resolver The deployed resolver containing the extension contract logic + */ + "addExtensionToNetwork(bytes32,address)"( + extensionId: Arrayish, + resolver: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Install an extension in a colony. Can only be called by a Colony. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param version Version of the extension to install + */ + installExtension( + extensionId: Arrayish, + version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Install an extension in a colony. Can only be called by a Colony. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param version Version of the extension to install + */ + "installExtension(bytes32,uint256)"( + extensionId: Arrayish, + version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Upgrade an extension in a colony. Can only be called by a Colony. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param newVersion Version of the extension to upgrade to (must be one greater than current) + */ + upgradeExtension( + extensionId: Arrayish, + newVersion: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Upgrade an extension in a colony. Can only be called by a Colony. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param newVersion Version of the extension to upgrade to (must be one greater than current) + */ + "upgradeExtension(bytes32,uint256)"( + extensionId: Arrayish, + newVersion: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the deprecation of an extension in a colony. Can only be called by a Colony. + * @param deprecated Whether to deprecate the extension or not + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + deprecateExtension( + extensionId: Arrayish, + deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the deprecation of an extension in a colony. Can only be called by a Colony. + * @param deprecated Whether to deprecate the extension or not + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + "deprecateExtension(bytes32,bool)"( + extensionId: Arrayish, + deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Uninstall an extension in a colony. Can only be called by a Colony. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + uninstallExtension( + extensionId: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Uninstall an extension in a colony. Can only be called by a Colony. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + "uninstallExtension(bytes32)"( + extensionId: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get an extension's resolver. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param version Version of the extension + */ + getExtensionResolver( + extensionId: Arrayish, + version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get an extension's resolver. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param version Version of the extension + */ + "getExtensionResolver(bytes32,uint256)"( + extensionId: Arrayish, + version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get an extension's installation. + * @param colony Address of the colony the extension is installed in + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + getExtensionInstallation( + extensionId: Arrayish, + colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get an extension's installation. + * @param colony Address of the colony the extension is installed in + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + "getExtensionInstallation(bytes32,address)"( + extensionId: Arrayish, + colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Return 1 / the fee to pay to the network. e.g. if the fee is 1% (or 0.01), return 100. + */ + getFeeInverse(overrides?: TransactionOverrides): Promise; + + /** + * Return 1 / the fee to pay to the network. e.g. if the fee is 1% (or 0.01), return 100. + */ + "getFeeInverse()"(overrides?: TransactionOverrides): Promise; + + /** + * Set the colony network fee to pay. e.g. if the fee is 1% (or 0.01), pass 100 as `_feeInverse`. + * @param _feeInverse The inverse of the network fee to set + */ + setFeeInverse( + _feeInverse: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the colony network fee to pay. e.g. if the fee is 1% (or 0.01), pass 100 as `_feeInverse`. + * @param _feeInverse The inverse of the network fee to set + */ + "setFeeInverse(uint256)"( + _feeInverse: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a token's status in the payout whitelist + * @param _token The token being queried + */ + getPayoutWhitelist( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a token's status in the payout whitelist + * @param _token The token being queried + */ + "getPayoutWhitelist(address)"( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set a token's status in the payout whitelist + * @param _status The whitelist status + * @param _token The token being set + */ + setPayoutWhitelist( + _token: string, + _status: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set a token's status in the payout whitelist + * @param _status The whitelist status + * @param _token The token being set + */ + "setPayoutWhitelist(address,bool)"( + _token: string, + _status: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * While external, it can only be called successfully by the current ReputationMiningCycle. + * Function called to punish people who staked against a new reputation root hash that turned out to be incorrect. + * @param _amount Amount of stake to slash + * @param _stakers Array of the addresses of stakers to punish + */ + punishStakers( + _stakers: string[], + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * While external, it can only be called successfully by the current ReputationMiningCycle. + * Function called to punish people who staked against a new reputation root hash that turned out to be incorrect. + * @param _amount Amount of stake to slash + * @param _stakers Array of the addresses of stakers to punish + */ + "punishStakers(address[],uint256)"( + _stakers: string[], + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Stake CLNY to allow the staker to participate in reputation mining. + * @param _amount Amount of CLNY to stake for the purposes of mining + */ + stakeForMining( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Stake CLNY to allow the staker to participate in reputation mining. + * @param _amount Amount of CLNY to stake for the purposes of mining + */ + "stakeForMining(uint256)"( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Unstake CLNY currently staked for reputation mining. + * @param _amount Amount of CLNY staked for mining to unstake + */ + unstakeForMining( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Unstake CLNY currently staked for reputation mining. + * @param _amount Amount of CLNY staked for mining to unstake + */ + "unstakeForMining(uint256)"( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * returns how much CLNY _user has staked for the purposes of reputation mining + * @param _user The user to query + */ + getMiningStake( + _user: string, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber] & { amount: BigNumber; timestamp: BigNumber } + >; + + /** + * returns how much CLNY _user has staked for the purposes of reputation mining + * @param _user The user to query + */ + "getMiningStake(address)"( + _user: string, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber] & { amount: BigNumber; timestamp: BigNumber } + >; + + /** + * Only callable by the active reputation mining cycle + * Used to track that a user is eligible to claim a reward + * @param _amount The amount of CLNY to be awarded + * @param _recipient The address receiving the award + */ + reward( + _recipient: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Only callable by the active reputation mining cycle + * Used to track that a user is eligible to claim a reward + * @param _amount The amount of CLNY to be awarded + * @param _recipient The address receiving the award + */ + "reward(address,uint256)"( + _recipient: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Only callable by the active reputation mining cycle + * Used to burn tokens that are not needed to pay out rewards (because not every possible defence was made for all submissions) + * @param _amount The amount of CLNY to burn + */ + burnUnneededRewards( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Only callable by the active reputation mining cycle + * Used to burn tokens that are not needed to pay out rewards (because not every possible defence was made for all submissions) + * @param _amount The amount of CLNY to burn + */ + "burnUnneededRewards(uint256)"( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Can be called by anyone, not just _recipient + * Used by a user to claim any mining rewards due to them. This will place them in their balance or pending balance, as appropriate. + * @param _recipient The user whose rewards to claim + */ + claimMiningReward( + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Can be called by anyone, not just _recipient + * Used by a user to claim any mining rewards due to them. This will place them in their balance or pending balance, as appropriate. + * @param _recipient The user whose rewards to claim + */ + "claimMiningReward(address)"( + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Can only be called by the MetaColony. + * Called to set the total per-cycle reputation reward, which will be split between all miners. + */ + setReputationMiningCycleReward( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Can only be called by the MetaColony. + * Called to set the total per-cycle reputation reward, which will be split between all miners. + */ + "setReputationMiningCycleReward(uint256)"( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called to get the total per-cycle reputation mining reward. + */ + getReputationMiningCycleReward( + overrides?: TransactionOverrides + ): Promise; + + /** + * Called to get the total per-cycle reputation mining reward. + */ + "getReputationMiningCycleReward()"( + overrides?: TransactionOverrides + ): Promise; + + filters: { + AuctionCreated(auction: null, token: null, quantity: null): EventFilter; + + ColonyAdded( + colonyId: BigNumberish | null, + colonyAddress: string | null, + token: null + ): EventFilter; + + ColonyLabelRegistered(colony: string | null, label: null): EventFilter; + + ColonyNetworkInitialised(resolver: null): EventFilter; + + ColonyVersionAdded(version: null, resolver: null): EventFilter; + + ExtensionAddedToNetwork( + extensionId: Arrayish | null, + version: null + ): EventFilter; + + ExtensionDeprecated( + extensionId: Arrayish | null, + colony: string | null, + deprecated: null + ): EventFilter; + + ExtensionInstalled( + extensionId: Arrayish | null, + colony: string | null, + version: null + ): EventFilter; + + ExtensionUninstalled( + extensionId: Arrayish | null, + colony: string | null + ): EventFilter; + + ExtensionUpgraded( + extensionId: Arrayish | null, + colony: string | null, + version: null + ): EventFilter; + + MetaColonyCreated( + metaColony: null, + token: null, + rootSkillId: null + ): EventFilter; + + MiningCycleResolverSet(miningCycleResolver: null): EventFilter; + + NetworkFeeInverseSet(feeInverse: null): EventFilter; + + RecoveryModeEntered(user: null): EventFilter; + + RecoveryModeExitApproved(user: null): EventFilter; + + RecoveryModeExited(user: null): EventFilter; + + RecoveryRoleSet(user: string | null, setTo: null): EventFilter; + + RecoveryStorageSlotSet( + user: null, + slot: null, + fromValue: null, + toValue: null + ): EventFilter; + + RegistrarInitialised(ens: null, rootNode: null): EventFilter; + + ReputationMinerPenalised(miner: null, tokensLost: null): EventFilter; + + ReputationMiningCycleComplete(hash: null, nLeaves: null): EventFilter; + + ReputationMiningInitialised( + inactiveReputationMiningCycle: null + ): EventFilter; + + ReputationMiningRewardSet(amount: null): EventFilter; + + ReputationRootHashSet( + newHash: null, + newNLeaves: null, + stakers: null, + reward: null + ): EventFilter; + + SkillAdded(skillId: null, parentSkillId: null): EventFilter; + + TokenLockingAddressSet(tokenLocking: null): EventFilter; + + TokenWhitelisted(token: null, status: null): EventFilter; + + UserLabelRegistered(user: string | null, label: null): EventFilter; + }; + + estimate: { + /** + * Indicate approval to exit recovery mode. Can only be called by user with recovery role. + */ + approveExitRecovery(overrides?: TransactionOverrides): Promise; + + /** + * Indicate approval to exit recovery mode. Can only be called by user with recovery role. + */ + "approveExitRecovery()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * No return value, but should throw if protected.This is external, 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, + overrides?: TransactionOverrides + ): Promise; + + /** + * No return value, but should throw if protected.This is external, 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(uint256)"( + _slot: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Put colony network mining into recovery mode. Can only be called by user with recovery role. + */ + enterRecoveryMode(overrides?: TransactionOverrides): Promise; + + /** + * Put colony network mining into recovery mode. Can only be called by user with recovery role. + */ + "enterRecoveryMode()"(overrides?: TransactionOverrides): Promise; + + /** + * Exit recovery mode, can be called by anyone if enough whitelist approvals are given. + */ + exitRecoveryMode(overrides?: TransactionOverrides): Promise; + + /** + * Exit recovery mode, can be called by anyone if enough whitelist approvals are given. + */ + "exitRecoveryMode()"(overrides?: TransactionOverrides): Promise; + + /** + * Is colony network in recovery mode. + */ + isInRecoveryMode(overrides?: TransactionOverrides): Promise; + + /** + * Is colony network in recovery mode. + */ + "isInRecoveryMode()"(overrides?: TransactionOverrides): Promise; + + /** + * Return number of recovery roles. + */ + numRecoveryRoles(overrides?: TransactionOverrides): Promise; + + /** + * Return number of recovery roles. + */ + "numRecoveryRoles()"(overrides?: TransactionOverrides): 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; + + /** + * Remove colony recovery role. Can only be called by root role. + * @param _user User we want to remove recovery role from + */ + "removeRecoveryRole(address)"( + _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; + + /** + * Set new colony recovery role. Can be called by root. + * @param _user User we want to give a recovery role to + */ + "setRecoveryRole(address)"( + _user: string, + overrides?: TransactionOverrides + ): 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; + + /** + * 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(uint256,bytes32)"( + _slot: BigNumberish, + _value: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Interface identification is specified in ERC-165. + * Query if a contract implements an interface + * @param interfaceID The interface identifier, as specified in ERC-165 + */ + supportsInterface( + interfaceID: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Interface identification is specified in ERC-165. + * Query if a contract implements an interface + * @param interfaceID The interface identifier, as specified in ERC-165 + */ + "supportsInterface(bytes4)"( + interfaceID: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Note that strictly, `_nUpdates` and `_nPreviousUpdates` don't need to be set - they're only used during dispute resolution, which these replacement log entries are never used for. However, for ease of resyncing the client, we have decided to include them for now. + * Set a replacement log entry if we're in recovery mode. + * @param _amount The amount of reputation being earned / lost + * @param _colony The address of the colony being updated + * @param _id The number of the log entry in the reputation mining cycle in question. + * @param _nPreviousUpdates The number of updates in the log before this entry + * @param _nUpdates The number of updates the log entry corresponds to + * @param _reputationMiningCycle The address of the reputation mining cycle that the log was in. + * @param _skillId The id of the origin skill for the reputation update + * @param _user The address of the user earning / losing the reputation + */ + setReplacementReputationUpdateLogEntry( + _reputationMiningCycle: string, + _id: BigNumberish, + _user: string, + _amount: BigNumberish, + _skillId: BigNumberish, + _colony: string, + _nUpdates: BigNumberish, + _nPreviousUpdates: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Note that strictly, `_nUpdates` and `_nPreviousUpdates` don't need to be set - they're only used during dispute resolution, which these replacement log entries are never used for. However, for ease of resyncing the client, we have decided to include them for now. + * Set a replacement log entry if we're in recovery mode. + * @param _amount The amount of reputation being earned / lost + * @param _colony The address of the colony being updated + * @param _id The number of the log entry in the reputation mining cycle in question. + * @param _nPreviousUpdates The number of updates in the log before this entry + * @param _nUpdates The number of updates the log entry corresponds to + * @param _reputationMiningCycle The address of the reputation mining cycle that the log was in. + * @param _skillId The id of the origin skill for the reputation update + * @param _user The address of the user earning / losing the reputation + */ + "setReplacementReputationUpdateLogEntry(address,uint256,address,int256,uint256,address,uint128,uint128)"( + _reputationMiningCycle: string, + _id: BigNumberish, + _user: string, + _amount: BigNumberish, + _skillId: BigNumberish, + _colony: string, + _nUpdates: BigNumberish, + _nPreviousUpdates: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a replacement log entry (if set) for the log entry `_id` in the mining cycle that was at the address `_reputationMiningCycle`. + * @param _id The log entry number we wish to see if there is a replacement for + * @param _reputationMiningCycle The address of the reputation mining cycle we are asking about + */ + getReplacementReputationUpdateLogEntry( + _reputationMiningCycle: string, + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a replacement log entry (if set) for the log entry `_id` in the mining cycle that was at the address `_reputationMiningCycle`. + * @param _id The log entry number we wish to see if there is a replacement for + * @param _reputationMiningCycle The address of the reputation mining cycle we are asking about + */ + "getReplacementReputationUpdateLogEntry(address,uint256)"( + _reputationMiningCycle: string, + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get whether any replacement log entries have been set for the supplied reputation mining cycle.Used by the client to avoid doubling the number of RPC calls when syncing from scratch. + * @param _reputationMiningCycle The reputation mining cycle address we want to know if any entries have been replaced in. + */ + getReplacementReputationUpdateLogsExist( + _reputationMiningCycle: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get whether any replacement log entries have been set for the supplied reputation mining cycle.Used by the client to avoid doubling the number of RPC calls when syncing from scratch. + * @param _reputationMiningCycle The reputation mining cycle address we want to know if any entries have been replaced in. + */ + "getReplacementReputationUpdateLogsExist(address)"( + _reputationMiningCycle: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the Meta Colony address. + */ + getMetaColony(overrides?: TransactionOverrides): Promise; + + /** + * Get the Meta Colony address. + */ + "getMetaColony()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of colonies in the network. + */ + getColonyCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of colonies in the network. + */ + "getColonyCount()"(overrides?: TransactionOverrides): Promise; + + /** + * Check if specific address is a colony created on colony network. + * @param _colony Address of the colony + */ + isColony( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Check if specific address is a colony created on colony network. + * @param _colony Address of the colony + */ + "isColony(address)"( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Errors if the parent skill does not exist or if this is called by an unauthorised sender. + * Adds a new skill to the global or local skills tree, under skill `_parentSkillId`. Only the Meta Colony is allowed to add a global skill, called via `IColony.addGlobalSkill`. Any colony is allowed to add a local skill and which is associated with a new domain via `IColony.addDomain`. + * @param _parentSkillId Id of the skill under which the new skill will be added. If 0, a global skill is added with no parent. + */ + addSkill( + _parentSkillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Errors if the parent skill does not exist or if this is called by an unauthorised sender. + * Adds a new skill to the global or local skills tree, under skill `_parentSkillId`. Only the Meta Colony is allowed to add a global skill, called via `IColony.addGlobalSkill`. Any colony is allowed to add a local skill and which is associated with a new domain via `IColony.addDomain`. + * @param _parentSkillId Id of the skill under which the new skill will be added. If 0, a global skill is added with no parent. + */ + "addSkill(uint256)"( + _parentSkillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `nParents` and `nChildren` of skill with id `_skillId`. + * @param _skillId Id of the skill + */ + getSkill( + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `nParents` and `nChildren` of skill with id `_skillId`. + * @param _skillId Id of the skill + */ + "getSkill(uint256)"( + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Mark a global skill as deprecated which stops new tasks and payments from using it. + * @param _skillId Id of the skill + */ + deprecateSkill( + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Mark a global skill as deprecated which stops new tasks and payments from using it. + * @param _skillId Id of the skill + */ + "deprecateSkill(uint256)"( + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Errors if it is called by anyone but a colony or if skill with id `_skillId` does not exist or. + * Adds a reputation update entry to log. + * @param _amount The amount of reputation change for the update, this can be a negative as well as a positive value + * @param _skillId The skill for the reputation update + * @param _user The address of the user for the reputation update + */ + appendReputationUpdateLog( + _user: string, + _amount: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Errors if it is called by anyone but a colony or if skill with id `_skillId` does not exist or. + * Adds a reputation update entry to log. + * @param _amount The amount of reputation change for the update, this can be a negative as well as a positive value + * @param _skillId The skill for the reputation update + * @param _user The address of the user for the reputation update + */ + "appendReputationUpdateLog(address,int256,uint256)"( + _user: string, + _amount: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of skills in the network including both global and local skills. + */ + getSkillCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of skills in the network including both global and local skills. + */ + "getSkillCount()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the `skillId` of the reputation mining skill. Only set once the metacolony is set up. + */ + getReputationMiningSkillId( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `skillId` of the reputation mining skill. Only set once the metacolony is set up. + */ + "getReputationMiningSkillId()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Sets the token locking address. This is only set once, and can't be changed afterwards. + * @param _tokenLockingAddress Address of the locking contract + */ + setTokenLocking( + _tokenLockingAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Sets the token locking address. This is only set once, and can't be changed afterwards. + * @param _tokenLockingAddress Address of the locking contract + */ + "setTokenLocking(address)"( + _tokenLockingAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get token locking contract address. + */ + getTokenLocking(overrides?: TransactionOverrides): Promise; + + /** + * Get token locking contract address. + */ + "getTokenLocking()"(overrides?: TransactionOverrides): Promise; + + /** + * Create the Meta Colony, same as a normal colony plus the root skill. + * @param _tokenAddress Address of the CLNY token + */ + createMetaColony( + _tokenAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Create the Meta Colony, same as a normal colony plus the root skill. + * @param _tokenAddress Address of the CLNY token + */ + "createMetaColony(address)"( + _tokenAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future versionFor the colony to mint tokens, token ownership must be transferred to the new colony + * Creates a new colony in the network, at version 3 + * @param _tokenAddress Address of an ERC20 token to serve as the colony token. + */ + createColony( + _tokenAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future versionFor the colony to mint tokens, token ownership must be transferred to the new colony + * Creates a new colony in the network, at version 3 + * @param _tokenAddress Address of an ERC20 token to serve as the colony token. + */ + "createColony(address)"( + _tokenAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * For the colony to mint tokens, token ownership must be transferred to the new colonyWe expect this function to only be used by the dapp + * Creates a new colony in the network, with an optional ENS name + * @param _colonyName The label to register (if null, no label is registered) + * @param _metadata The metadata associated with the new colony + * @param _tokenAddress Address of an ERC20 token to serve as the colony token + * @param _version The version of colony to deploy (pass 0 for the current version) + */ + "createColony(address,uint256,string,string)"( + _tokenAddress: string, + _version: BigNumberish, + _colonyName: string, + _metadata: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * For the colony to mint tokens, token ownership must be transferred to the new colony + * Creates a new colony in the network, with an optional ENS name + * @param _colonyName The label to register (if null, no label is registered) + * @param _tokenAddress Address of an ERC20 token to serve as the colony token + * @param _version The version of colony to deploy (pass 0 for the current version) + */ + "createColony(address,uint256,string)"( + _tokenAddress: string, + _version: BigNumberish, + _colonyName: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * This is now deprecated and will be removed in a future versionFor the colony to mint tokens, token ownership must be transferred to the new colony + * Overload of the simpler `createColony` -- creates a new colony in the network with a variety of options, at version 4 + * @param _colonyName The label to register (if null, no label is registered) + * @param _orbitdb DEPRECATED Currently a no-op + * @param _tokenAddress Address of an ERC20 token to serve as the colony token + * @param _useExtensionManager DEPRECATED Currently a no-op + * @param _version The version of colony to deploy (pass 0 for the current version) + */ + "createColony(address,uint256,string,string,bool)"( + _tokenAddress: string, + _version: BigNumberish, + _colonyName: string, + _orbitdb: string, + _useExtensionManager: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Adds a new Colony contract version and the address of associated `_resolver` contract. Secured function to authorised members. Allowed to be called by the Meta Colony only. + * @param _resolver Address of the `Resolver` contract which will be used with the underlying `EtherRouter` contract + * @param _version The new Colony contract version + */ + addColonyVersion( + _version: BigNumberish, + _resolver: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Adds a new Colony contract version and the address of associated `_resolver` contract. Secured function to authorised members. Allowed to be called by the Meta Colony only. + * @param _resolver Address of the `Resolver` contract which will be used with the underlying `EtherRouter` contract + * @param _version The new Colony contract version + */ + "addColonyVersion(uint256,address)"( + _version: BigNumberish, + _resolver: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Only allowed to be run once, by the Network owner before any Colony versions are added. + * Initialises the colony network by setting the first Colony version resolver to `_resolver` address. + * @param _resolver Address of the resolver for Colony contract + * @param _version Version of the Colony contract the resolver represents + */ + initialise( + _resolver: string, + _version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Only allowed to be run once, by the Network owner before any Colony versions are added. + * Initialises the colony network by setting the first Colony version resolver to `_resolver` address. + * @param _resolver Address of the resolver for Colony contract + * @param _version Version of the Colony contract the resolver represents + */ + "initialise(address,uint256)"( + _resolver: string, + _version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a colony address by its Id in the network. + * @param _id Id of the colony to get + */ + getColony( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a colony address by its Id in the network. + * @param _id Id of the colony to get + */ + "getColony(uint256)"( + _id: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the latest Colony contract version. This is the version used to create all new colonies. + */ + getCurrentColonyVersion( + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the latest Colony contract version. This is the version used to create all new colonies. + */ + "getCurrentColonyVersion()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the id of the parent skill at index `_parentSkillIndex` for skill with Id `_skillId`. + * @param _parentSkillIndex Index of the `skill.parents` array to get Note that not all parent skill ids are stored here. See `Skill.parents` member for definition on which parents are stored + * @param _skillId Id of the skill + */ + getParentSkillId( + _skillId: BigNumberish, + _parentSkillIndex: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the id of the parent skill at index `_parentSkillIndex` for skill with Id `_skillId`. + * @param _parentSkillIndex Index of the `skill.parents` array to get Note that not all parent skill ids are stored here. See `Skill.parents` member for definition on which parents are stored + * @param _skillId Id of the skill + */ + "getParentSkillId(uint256,uint256)"( + _skillId: BigNumberish, + _parentSkillIndex: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the id of the child skill at index `_childSkillIndex` for skill with Id `_skillId`. + * @param _childSkillIndex Index of the `skill.children` array to get + * @param _skillId Id of the skill + */ + getChildSkillId( + _skillId: BigNumberish, + _childSkillIndex: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the id of the child skill at index `_childSkillIndex` for skill with Id `_skillId`. + * @param _childSkillIndex Index of the `skill.children` array to get + * @param _skillId Id of the skill + */ + "getChildSkillId(uint256,uint256)"( + _skillId: BigNumberish, + _childSkillIndex: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the address of either the active or inactive reputation mining cycle, based on `active`. The active reputation mining cycle is the one currently under consideration by reputation miners. The inactive reputation cycle is the one with the log that is being appended to. + * @param _active Whether the user wants the active or inactive reputation mining cycle + */ + getReputationMiningCycle( + _active: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the address of either the active or inactive reputation mining cycle, based on `active`. The active reputation mining cycle is the one currently under consideration by reputation miners. The inactive reputation cycle is the one with the log that is being appended to. + * @param _active Whether the user wants the active or inactive reputation mining cycle + */ + "getReputationMiningCycle(bool)"( + _active: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Calculate raw miner weight in WADs. + * @param _submissonIndex Index of reputation hash submission (between 0 and 11) + * @param _timeStaked Amount of time (in seconds) that the miner has staked their CLNY + */ + calculateMinerWeight( + _timeStaked: BigNumberish, + _submissonIndex: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Calculate raw miner weight in WADs. + * @param _submissonIndex Index of reputation hash submission (between 0 and 11) + * @param _timeStaked Amount of time (in seconds) that the miner has staked their CLNY + */ + "calculateMinerWeight(uint256,uint256)"( + _timeStaked: BigNumberish, + _submissonIndex: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `Resolver` address for Colony contract version `_version`. + * @param _version The Colony contract version + */ + getColonyVersionResolver( + _version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the `Resolver` address for Colony contract version `_version`. + * @param _version The Colony contract version + */ + "getColonyVersionResolver(uint256)"( + _version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set a new Reputation root hash and starts a new mining cycle. Can only be called by the ReputationMiningCycle contract. + * @param newHash The reputation root hash + * @param newNLeaves The updated leaves count value + * @param stakers Array of users who submitted or backed the hash, being accepted here as the new reputation root hash + */ + setReputationRootHash( + newHash: Arrayish, + newNLeaves: BigNumberish, + stakers: string[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Set a new Reputation root hash and starts a new mining cycle. Can only be called by the ReputationMiningCycle contract. + * @param newHash The reputation root hash + * @param newNLeaves The updated leaves count value + * @param stakers Array of users who submitted or backed the hash, being accepted here as the new reputation root hash + */ + "setReputationRootHash(bytes32,uint256,address[])"( + newHash: Arrayish, + newNLeaves: BigNumberish, + stakers: string[], + overrides?: TransactionOverrides + ): Promise; + + /** + * This version of setReputationRootHash is deprecated and will be removed in a future release. It transparently calls the new version if it is called (essentially, removing the `reward` parameter. + * @param newHash The reputation root hash + * @param newNLeaves The updated leaves count value + * @param reward Amount of CLNY to be distributed as reward to miners (not used) + * @param stakers Array of users who submitted or backed the hash, being accepted here as the new reputation root hash + */ + "setReputationRootHash(bytes32,uint256,address[],uint256)"( + newHash: Arrayish, + newNLeaves: BigNumberish, + stakers: string[], + reward: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Starts a new Reputation Mining cycle. Explicitly called only the first time, subsequently called from within `setReputationRootHash`. + */ + startNextCycle(overrides?: TransactionOverrides): Promise; + + /** + * Starts a new Reputation Mining cycle. Explicitly called only the first time, subsequently called from within `setReputationRootHash`. + */ + "startNextCycle()"(overrides?: TransactionOverrides): Promise; + + /** + * Creates initial inactive reputation mining cycle. + */ + initialiseReputationMining( + overrides?: TransactionOverrides + ): Promise; + + /** + * Creates initial inactive reputation mining cycle. + */ + "initialiseReputationMining()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the root hash of the current reputation state tree. + */ + getReputationRootHash(overrides?: TransactionOverrides): Promise; + + /** + * Get the root hash of the current reputation state tree. + */ + "getReputationRootHash()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * I cannot see a reason why a user's client would need to call this - only stored to help with some edge cases in reputation mining dispute resolution. + * Get the number of leaves in the current reputation state tree. + */ + getReputationRootHashNLeaves( + overrides?: TransactionOverrides + ): Promise; + + /** + * I cannot see a reason why a user's client would need to call this - only stored to help with some edge cases in reputation mining dispute resolution. + * Get the number of leaves in the current reputation state tree. + */ + "getReputationRootHashNLeaves()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Deprecated, replaced by getReputationRootHashNLeaves which does the same thing but is more accurately named.will be removed in a later version. + * Get the number of leaves in the current reputation state tree. + */ + getReputationRootHashNNodes( + overrides?: TransactionOverrides + ): Promise; + + /** + * Deprecated, replaced by getReputationRootHashNLeaves which does the same thing but is more accurately named.will be removed in a later version. + * Get the number of leaves in the current reputation state tree. + */ + "getReputationRootHashNNodes()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Create and start a new `DutchAuction` for the entire amount of `_token` owned by the Colony Network. + * @param _token Address of the token held by the network to be auctioned + */ + startTokenAuction( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Create and start a new `DutchAuction` for the entire amount of `_token` owned by the Colony Network. + * @param _token Address of the token held by the network to be auctioned + */ + "startTokenAuction(address)"( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Setup registrar with ENS and root node. + * @param _ens Address of ENS registrar + * @param _rootNode Namehash of the root node for the domain + */ + setupRegistrar( + _ens: string, + _rootNode: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Setup registrar with ENS and root node. + * @param _ens Address of ENS registrar + * @param _rootNode Namehash of the root node for the domain + */ + "setupRegistrar(address,bytes32)"( + _ens: string, + _rootNode: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Register a "user.joincolony.eth" label. + * @param orbitdb The path of the orbitDB database associated with the user profile + * @param username The label to register + */ + registerUserLabel( + username: string, + orbitdb: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Register a "user.joincolony.eth" label. + * @param orbitdb The path of the orbitDB database associated with the user profile + * @param username The label to register + */ + "registerUserLabel(string,string)"( + username: string, + orbitdb: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Register a "colony.joincolony.eth" label. Can only be called by a Colony. + * @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; + + /** + * Register a "colony.joincolony.eth" label. Can only be called by a Colony. + * @param colonyName The label to register. + * @param orbitdb The path of the orbitDB database associated with the colony name + */ + "registerColonyLabel(string,string)"( + 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; + + /** + * 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(string)"( + orbitdb: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Update a user's orbitdb address. Can only be called by a user with a registered subdomain + * @param orbitdb The path of the orbitDB database to be associated with the user + */ + updateUserOrbitDB( + orbitdb: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Update a user's orbitdb address. Can only be called by a user with a registered subdomain + * @param orbitdb The path of the orbitDB database to be associated with the user + */ + "updateUserOrbitDB(string)"( + orbitdb: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Retrieve the orbitdb address corresponding to a registered account. + * @param node The Namehash of the account being queried. + */ + getProfileDBAddress( + node: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Retrieve the orbitdb address corresponding to a registered account. + * @param node The Namehash of the account being queried. + */ + "getProfileDBAddress(bytes32)"( + node: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Reverse lookup a username from an address. + * @param addr The address we wish to find the corresponding ENS domain for (if any) + */ + lookupRegisteredENSDomain( + addr: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Reverse lookup a username from an address. + * @param addr The address we wish to find the corresponding ENS domain for (if any) + */ + "lookupRegisteredENSDomain(address)"( + addr: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the address the supplied node resolves do, if we are the resolver. + * @param node The namehash of the ENS address being requested + */ + addr(node: Arrayish, overrides?: TransactionOverrides): Promise; + + /** + * Returns the address the supplied node resolves do, if we are the resolver. + * @param node The namehash of the ENS address being requested + */ + "addr(bytes32)"( + node: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the address of the ENSRegistrar for the Network. + */ + getENSRegistrar(overrides?: TransactionOverrides): Promise; + + /** + * Returns the address of the ENSRegistrar for the Network. + */ + "getENSRegistrar()"(overrides?: TransactionOverrides): Promise; + + /** + * Set the resolver to be used by new instances of ReputationMiningCycle. + * @param miningResolverAddress The address of the Resolver contract with the functions correctly wired. + */ + setMiningResolver( + miningResolverAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the resolver to be used by new instances of ReputationMiningCycle. + * @param miningResolverAddress The address of the Resolver contract with the functions correctly wired. + */ + "setMiningResolver(address)"( + miningResolverAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the resolver to be used by new instances of ReputationMiningCycle. + */ + getMiningResolver(overrides?: TransactionOverrides): Promise; + + /** + * Get the resolver to be used by new instances of ReputationMiningCycle. + */ + "getMiningResolver()"(overrides?: TransactionOverrides): Promise; + + /** + * Can only be called by the MetaColony.The extension version is queried from the resolver itself. + * Add a new extension resolver to the Extensions repository. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param resolver The deployed resolver containing the extension contract logic + */ + addExtensionToNetwork( + extensionId: Arrayish, + resolver: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Can only be called by the MetaColony.The extension version is queried from the resolver itself. + * Add a new extension resolver to the Extensions repository. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param resolver The deployed resolver containing the extension contract logic + */ + "addExtensionToNetwork(bytes32,address)"( + extensionId: Arrayish, + resolver: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Install an extension in a colony. Can only be called by a Colony. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param version Version of the extension to install + */ + installExtension( + extensionId: Arrayish, + version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Install an extension in a colony. Can only be called by a Colony. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param version Version of the extension to install + */ + "installExtension(bytes32,uint256)"( + extensionId: Arrayish, + version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Upgrade an extension in a colony. Can only be called by a Colony. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param newVersion Version of the extension to upgrade to (must be one greater than current) + */ + upgradeExtension( + extensionId: Arrayish, + newVersion: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Upgrade an extension in a colony. Can only be called by a Colony. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param newVersion Version of the extension to upgrade to (must be one greater than current) + */ + "upgradeExtension(bytes32,uint256)"( + extensionId: Arrayish, + newVersion: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the deprecation of an extension in a colony. Can only be called by a Colony. + * @param deprecated Whether to deprecate the extension or not + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + deprecateExtension( + extensionId: Arrayish, + deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the deprecation of an extension in a colony. Can only be called by a Colony. + * @param deprecated Whether to deprecate the extension or not + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + "deprecateExtension(bytes32,bool)"( + extensionId: Arrayish, + deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Uninstall an extension in a colony. Can only be called by a Colony. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + uninstallExtension( + extensionId: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Uninstall an extension in a colony. Can only be called by a Colony. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + "uninstallExtension(bytes32)"( + extensionId: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get an extension's resolver. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param version Version of the extension + */ + getExtensionResolver( + extensionId: Arrayish, + version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get an extension's resolver. + * @param extensionId keccak256 hash of the extension name, used as an indentifier + * @param version Version of the extension + */ + "getExtensionResolver(bytes32,uint256)"( + extensionId: Arrayish, + version: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get an extension's installation. + * @param colony Address of the colony the extension is installed in + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + getExtensionInstallation( + extensionId: Arrayish, + colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get an extension's installation. + * @param colony Address of the colony the extension is installed in + * @param extensionId keccak256 hash of the extension name, used as an indentifier + */ + "getExtensionInstallation(bytes32,address)"( + extensionId: Arrayish, + colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Return 1 / the fee to pay to the network. e.g. if the fee is 1% (or 0.01), return 100. + */ + getFeeInverse(overrides?: TransactionOverrides): Promise; + + /** + * Return 1 / the fee to pay to the network. e.g. if the fee is 1% (or 0.01), return 100. + */ + "getFeeInverse()"(overrides?: TransactionOverrides): Promise; + + /** + * Set the colony network fee to pay. e.g. if the fee is 1% (or 0.01), pass 100 as `_feeInverse`. + * @param _feeInverse The inverse of the network fee to set + */ + setFeeInverse( + _feeInverse: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the colony network fee to pay. e.g. if the fee is 1% (or 0.01), pass 100 as `_feeInverse`. + * @param _feeInverse The inverse of the network fee to set + */ + "setFeeInverse(uint256)"( + _feeInverse: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a token's status in the payout whitelist + * @param _token The token being queried + */ + getPayoutWhitelist( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a token's status in the payout whitelist + * @param _token The token being queried + */ + "getPayoutWhitelist(address)"( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set a token's status in the payout whitelist + * @param _status The whitelist status + * @param _token The token being set + */ + setPayoutWhitelist( + _token: string, + _status: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set a token's status in the payout whitelist + * @param _status The whitelist status + * @param _token The token being set + */ + "setPayoutWhitelist(address,bool)"( + _token: string, + _status: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * While external, it can only be called successfully by the current ReputationMiningCycle. + * Function called to punish people who staked against a new reputation root hash that turned out to be incorrect. + * @param _amount Amount of stake to slash + * @param _stakers Array of the addresses of stakers to punish + */ + punishStakers( + _stakers: string[], + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * While external, it can only be called successfully by the current ReputationMiningCycle. + * Function called to punish people who staked against a new reputation root hash that turned out to be incorrect. + * @param _amount Amount of stake to slash + * @param _stakers Array of the addresses of stakers to punish + */ + "punishStakers(address[],uint256)"( + _stakers: string[], + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Stake CLNY to allow the staker to participate in reputation mining. + * @param _amount Amount of CLNY to stake for the purposes of mining + */ + stakeForMining( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Stake CLNY to allow the staker to participate in reputation mining. + * @param _amount Amount of CLNY to stake for the purposes of mining + */ + "stakeForMining(uint256)"( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Unstake CLNY currently staked for reputation mining. + * @param _amount Amount of CLNY staked for mining to unstake + */ + unstakeForMining( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Unstake CLNY currently staked for reputation mining. + * @param _amount Amount of CLNY staked for mining to unstake + */ + "unstakeForMining(uint256)"( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * returns how much CLNY _user has staked for the purposes of reputation mining + * @param _user The user to query + */ + getMiningStake( + _user: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * returns how much CLNY _user has staked for the purposes of reputation mining + * @param _user The user to query + */ + "getMiningStake(address)"( + _user: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Only callable by the active reputation mining cycle + * Used to track that a user is eligible to claim a reward + * @param _amount The amount of CLNY to be awarded + * @param _recipient The address receiving the award + */ + reward( + _recipient: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Only callable by the active reputation mining cycle + * Used to track that a user is eligible to claim a reward + * @param _amount The amount of CLNY to be awarded + * @param _recipient The address receiving the award + */ + "reward(address,uint256)"( + _recipient: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Only callable by the active reputation mining cycle + * Used to burn tokens that are not needed to pay out rewards (because not every possible defence was made for all submissions) + * @param _amount The amount of CLNY to burn + */ + burnUnneededRewards( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Only callable by the active reputation mining cycle + * Used to burn tokens that are not needed to pay out rewards (because not every possible defence was made for all submissions) + * @param _amount The amount of CLNY to burn + */ + "burnUnneededRewards(uint256)"( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Can be called by anyone, not just _recipient + * Used by a user to claim any mining rewards due to them. This will place them in their balance or pending balance, as appropriate. + * @param _recipient The user whose rewards to claim + */ + claimMiningReward( + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Can be called by anyone, not just _recipient + * Used by a user to claim any mining rewards due to them. This will place them in their balance or pending balance, as appropriate. + * @param _recipient The user whose rewards to claim + */ + "claimMiningReward(address)"( + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Can only be called by the MetaColony. + * Called to set the total per-cycle reputation reward, which will be split between all miners. + */ + setReputationMiningCycleReward( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Can only be called by the MetaColony. + * Called to set the total per-cycle reputation reward, which will be split between all miners. + */ + "setReputationMiningCycleReward(uint256)"( + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called to get the total per-cycle reputation mining reward. + */ + getReputationMiningCycleReward( + overrides?: TransactionOverrides + ): Promise; + + /** + * Called to get the total per-cycle reputation mining reward. + */ + "getReputationMiningCycleReward()"( + overrides?: TransactionOverrides + ): Promise; + }; +} diff --git a/src/contracts/colony/7/Token.d.ts b/src/contracts/colony/7/Token.d.ts new file mode 100644 index 000000000..17121c677 --- /dev/null +++ b/src/contracts/colony/7/Token.d.ts @@ -0,0 +1,560 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-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 TokenInterface extends Interface { + functions: { + name: TypedFunctionDescription<{ encode([]: []): string }>; + + approve: TypedFunctionDescription<{ + encode([guy, wad]: [string, BigNumberish]): string; + }>; + + setOwner: TypedFunctionDescription<{ encode([owner_]: [string]): string }>; + + totalSupply: TypedFunctionDescription<{ encode([]: []): string }>; + + decimals: TypedFunctionDescription<{ encode([]: []): string }>; + + balanceOf: TypedFunctionDescription<{ encode([src]: [string]): string }>; + + setAuthority: TypedFunctionDescription<{ + encode([authority_]: [string]): string; + }>; + + owner: TypedFunctionDescription<{ encode([]: []): string }>; + + symbol: TypedFunctionDescription<{ encode([]: []): string }>; + + transfer: TypedFunctionDescription<{ + encode([dst, wad]: [string, BigNumberish]): string; + }>; + + authority: TypedFunctionDescription<{ encode([]: []): string }>; + + locked: TypedFunctionDescription<{ encode([]: []): string }>; + + allowance: TypedFunctionDescription<{ + encode([src, guy]: [string, string]): string; + }>; + + transferFrom: TypedFunctionDescription<{ + encode([src, dst, wad]: [string, string, BigNumberish]): string; + }>; + + mint: TypedFunctionDescription<{ + encode([guy, wad]: [string, BigNumberish]): string; + }>; + + burn: TypedFunctionDescription<{ encode([wad]: [BigNumberish]): string }>; + + unlock: TypedFunctionDescription<{ encode([]: []): string }>; + }; + + events: { + Mint: TypedEventDescription<{ + encodeTopics([guy, wad]: [string | null, null]): string[]; + }>; + + Burn: TypedEventDescription<{ + encodeTopics([guy, wad]: [string | null, null]): string[]; + }>; + + LogSetAuthority: TypedEventDescription<{ + encodeTopics([authority]: [string | null]): string[]; + }>; + + LogSetOwner: TypedEventDescription<{ + encodeTopics([owner]: [string | null]): string[]; + }>; + + Approval: TypedEventDescription<{ + encodeTopics([src, guy, wad]: [ + string | null, + string | null, + null + ]): string[]; + }>; + + Transfer: TypedEventDescription<{ + encodeTopics([src, dst, wad]: [ + string | null, + string | null, + null + ]): string[]; + }>; + }; +} + +export class Token extends Contract { + connect(signerOrProvider: Signer | Provider | string): Token; + attach(addressOrName: string): Token; + deployed(): Promise; + + on(event: EventFilter | string, listener: Listener): Token; + once(event: EventFilter | string, listener: Listener): Token; + addListener(eventName: EventFilter | string, listener: Listener): Token; + removeAllListeners(eventName: EventFilter | string): Token; + removeListener(eventName: any, listener: Listener): Token; + + interface: TokenInterface; + + functions: { + name(overrides?: TransactionOverrides): Promise; + + "name()"(overrides?: TransactionOverrides): Promise; + + approve( + guy: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "approve(address,uint256)"( + guy: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + setOwner( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + "setOwner(address)"( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + totalSupply(overrides?: TransactionOverrides): Promise; + + "totalSupply()"(overrides?: TransactionOverrides): Promise; + + decimals(overrides?: TransactionOverrides): Promise; + + "decimals()"(overrides?: TransactionOverrides): Promise; + + balanceOf( + src: string, + overrides?: TransactionOverrides + ): Promise; + + "balanceOf(address)"( + src: string, + overrides?: TransactionOverrides + ): Promise; + + setAuthority( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + "setAuthority(address)"( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + owner(overrides?: TransactionOverrides): Promise; + + "owner()"(overrides?: TransactionOverrides): Promise; + + symbol(overrides?: TransactionOverrides): Promise; + + "symbol()"(overrides?: TransactionOverrides): Promise; + + transfer( + dst: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "transfer(address,uint256)"( + dst: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + authority(overrides?: TransactionOverrides): Promise; + + "authority()"(overrides?: TransactionOverrides): Promise; + + locked(overrides?: TransactionOverrides): Promise; + + "locked()"(overrides?: TransactionOverrides): Promise; + + allowance( + src: string, + guy: string, + overrides?: TransactionOverrides + ): Promise; + + "allowance(address,address)"( + src: string, + guy: string, + overrides?: TransactionOverrides + ): Promise; + + transferFrom( + src: string, + dst: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "transferFrom(address,address,uint256)"( + src: string, + dst: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + mint( + guy: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "mint(address,uint256)"( + guy: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "mint(uint256)"( + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + burn( + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "burn(uint256)"( + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "burn(address,uint256)"( + guy: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + unlock(overrides?: TransactionOverrides): Promise; + + "unlock()"(overrides?: TransactionOverrides): Promise; + }; + + name(overrides?: TransactionOverrides): Promise; + + "name()"(overrides?: TransactionOverrides): Promise; + + approve( + guy: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "approve(address,uint256)"( + guy: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + setOwner( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + "setOwner(address)"( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + totalSupply(overrides?: TransactionOverrides): Promise; + + "totalSupply()"(overrides?: TransactionOverrides): Promise; + + decimals(overrides?: TransactionOverrides): Promise; + + "decimals()"(overrides?: TransactionOverrides): Promise; + + balanceOf(src: string, overrides?: TransactionOverrides): Promise; + + "balanceOf(address)"( + src: string, + overrides?: TransactionOverrides + ): Promise; + + setAuthority( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + "setAuthority(address)"( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + owner(overrides?: TransactionOverrides): Promise; + + "owner()"(overrides?: TransactionOverrides): Promise; + + symbol(overrides?: TransactionOverrides): Promise; + + "symbol()"(overrides?: TransactionOverrides): Promise; + + transfer( + dst: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "transfer(address,uint256)"( + dst: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + authority(overrides?: TransactionOverrides): Promise; + + "authority()"(overrides?: TransactionOverrides): Promise; + + locked(overrides?: TransactionOverrides): Promise; + + "locked()"(overrides?: TransactionOverrides): Promise; + + allowance( + src: string, + guy: string, + overrides?: TransactionOverrides + ): Promise; + + "allowance(address,address)"( + src: string, + guy: string, + overrides?: TransactionOverrides + ): Promise; + + transferFrom( + src: string, + dst: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "transferFrom(address,address,uint256)"( + src: string, + dst: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + mint( + guy: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "mint(address,uint256)"( + guy: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "mint(uint256)"( + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + burn( + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "burn(uint256)"( + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "burn(address,uint256)"( + guy: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + unlock(overrides?: TransactionOverrides): Promise; + + "unlock()"(overrides?: TransactionOverrides): Promise; + + filters: { + Mint(guy: string | null, wad: null): EventFilter; + + Burn(guy: string | null, wad: null): EventFilter; + + LogSetAuthority(authority: string | null): EventFilter; + + LogSetOwner(owner: string | null): EventFilter; + + Approval(src: string | null, guy: string | null, wad: null): EventFilter; + + Transfer(src: string | null, dst: string | null, wad: null): EventFilter; + }; + + estimate: { + name(overrides?: TransactionOverrides): Promise; + + "name()"(overrides?: TransactionOverrides): Promise; + + approve( + guy: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "approve(address,uint256)"( + guy: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + setOwner( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + "setOwner(address)"( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + totalSupply(overrides?: TransactionOverrides): Promise; + + "totalSupply()"(overrides?: TransactionOverrides): Promise; + + decimals(overrides?: TransactionOverrides): Promise; + + "decimals()"(overrides?: TransactionOverrides): Promise; + + balanceOf( + src: string, + overrides?: TransactionOverrides + ): Promise; + + "balanceOf(address)"( + src: string, + overrides?: TransactionOverrides + ): Promise; + + setAuthority( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + "setAuthority(address)"( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + owner(overrides?: TransactionOverrides): Promise; + + "owner()"(overrides?: TransactionOverrides): Promise; + + symbol(overrides?: TransactionOverrides): Promise; + + "symbol()"(overrides?: TransactionOverrides): Promise; + + transfer( + dst: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "transfer(address,uint256)"( + dst: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + authority(overrides?: TransactionOverrides): Promise; + + "authority()"(overrides?: TransactionOverrides): Promise; + + locked(overrides?: TransactionOverrides): Promise; + + "locked()"(overrides?: TransactionOverrides): Promise; + + allowance( + src: string, + guy: string, + overrides?: TransactionOverrides + ): Promise; + + "allowance(address,address)"( + src: string, + guy: string, + overrides?: TransactionOverrides + ): Promise; + + transferFrom( + src: string, + dst: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "transferFrom(address,address,uint256)"( + src: string, + dst: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + mint( + guy: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "mint(address,uint256)"( + guy: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "mint(uint256)"( + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + burn( + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "burn(uint256)"( + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "burn(address,uint256)"( + guy: string, + wad: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + unlock(overrides?: TransactionOverrides): Promise; + + "unlock()"(overrides?: TransactionOverrides): Promise; + }; +} diff --git a/src/contracts/colony/7/TokenERC20.d.ts b/src/contracts/colony/7/TokenERC20.d.ts new file mode 100644 index 000000000..93c7a6793 --- /dev/null +++ b/src/contracts/colony/7/TokenERC20.d.ts @@ -0,0 +1,316 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-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 TokenERC20Interface extends Interface { + functions: { + name: TypedFunctionDescription<{ encode([]: []): string }>; + + approve: TypedFunctionDescription<{ + encode([_spender, _value]: [string, BigNumberish]): string; + }>; + + totalSupply: TypedFunctionDescription<{ encode([]: []): string }>; + + transferFrom: TypedFunctionDescription<{ + encode([_from, _to, _value]: [string, string, BigNumberish]): string; + }>; + + decimals: TypedFunctionDescription<{ encode([]: []): string }>; + + balanceOf: TypedFunctionDescription<{ encode([_owner]: [string]): string }>; + + symbol: TypedFunctionDescription<{ encode([]: []): string }>; + + transfer: TypedFunctionDescription<{ + encode([_to, _value]: [string, BigNumberish]): string; + }>; + + allowance: TypedFunctionDescription<{ + encode([_owner, _spender]: [string, string]): string; + }>; + }; + + events: { + Approval: TypedEventDescription<{ + encodeTopics([owner, spender, value]: [ + string | null, + string | null, + null + ]): string[]; + }>; + + Transfer: TypedEventDescription<{ + encodeTopics([from, to, value]: [ + string | null, + string | null, + null + ]): string[]; + }>; + }; +} + +export class TokenERC20 extends Contract { + connect(signerOrProvider: Signer | Provider | string): TokenERC20; + attach(addressOrName: string): TokenERC20; + deployed(): Promise; + + on(event: EventFilter | string, listener: Listener): TokenERC20; + once(event: EventFilter | string, listener: Listener): TokenERC20; + addListener(eventName: EventFilter | string, listener: Listener): TokenERC20; + removeAllListeners(eventName: EventFilter | string): TokenERC20; + removeListener(eventName: any, listener: Listener): TokenERC20; + + interface: TokenERC20Interface; + + functions: { + name(overrides?: TransactionOverrides): Promise; + + "name()"(overrides?: TransactionOverrides): Promise; + + approve( + _spender: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "approve(address,uint256)"( + _spender: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + totalSupply(overrides?: TransactionOverrides): Promise; + + "totalSupply()"(overrides?: TransactionOverrides): Promise; + + transferFrom( + _from: string, + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "transferFrom(address,address,uint256)"( + _from: string, + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + decimals(overrides?: TransactionOverrides): Promise; + + "decimals()"(overrides?: TransactionOverrides): Promise; + + balanceOf( + _owner: string, + overrides?: TransactionOverrides + ): Promise; + + "balanceOf(address)"( + _owner: string, + overrides?: TransactionOverrides + ): Promise; + + symbol(overrides?: TransactionOverrides): Promise; + + "symbol()"(overrides?: TransactionOverrides): Promise; + + transfer( + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "transfer(address,uint256)"( + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + allowance( + _owner: string, + _spender: string, + overrides?: TransactionOverrides + ): Promise; + + "allowance(address,address)"( + _owner: string, + _spender: string, + overrides?: TransactionOverrides + ): Promise; + }; + + name(overrides?: TransactionOverrides): Promise; + + "name()"(overrides?: TransactionOverrides): Promise; + + approve( + _spender: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "approve(address,uint256)"( + _spender: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + totalSupply(overrides?: TransactionOverrides): Promise; + + "totalSupply()"(overrides?: TransactionOverrides): Promise; + + transferFrom( + _from: string, + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "transferFrom(address,address,uint256)"( + _from: string, + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + decimals(overrides?: TransactionOverrides): Promise; + + "decimals()"(overrides?: TransactionOverrides): Promise; + + balanceOf( + _owner: string, + overrides?: TransactionOverrides + ): Promise; + + "balanceOf(address)"( + _owner: string, + overrides?: TransactionOverrides + ): Promise; + + symbol(overrides?: TransactionOverrides): Promise; + + "symbol()"(overrides?: TransactionOverrides): Promise; + + transfer( + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "transfer(address,uint256)"( + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + allowance( + _owner: string, + _spender: string, + overrides?: TransactionOverrides + ): Promise; + + "allowance(address,address)"( + _owner: string, + _spender: string, + overrides?: TransactionOverrides + ): Promise; + + filters: { + Approval( + owner: string | null, + spender: string | null, + value: null + ): EventFilter; + + Transfer(from: string | null, to: string | null, value: null): EventFilter; + }; + + estimate: { + name(overrides?: TransactionOverrides): Promise; + + "name()"(overrides?: TransactionOverrides): Promise; + + approve( + _spender: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "approve(address,uint256)"( + _spender: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + totalSupply(overrides?: TransactionOverrides): Promise; + + "totalSupply()"(overrides?: TransactionOverrides): Promise; + + transferFrom( + _from: string, + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "transferFrom(address,address,uint256)"( + _from: string, + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + decimals(overrides?: TransactionOverrides): Promise; + + "decimals()"(overrides?: TransactionOverrides): Promise; + + balanceOf( + _owner: string, + overrides?: TransactionOverrides + ): Promise; + + "balanceOf(address)"( + _owner: string, + overrides?: TransactionOverrides + ): Promise; + + symbol(overrides?: TransactionOverrides): Promise; + + "symbol()"(overrides?: TransactionOverrides): Promise; + + transfer( + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "transfer(address,uint256)"( + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + allowance( + _owner: string, + _spender: string, + overrides?: TransactionOverrides + ): Promise; + + "allowance(address,address)"( + _owner: string, + _spender: string, + overrides?: TransactionOverrides + ): Promise; + }; +} diff --git a/src/contracts/colony/7/TokenLocking.d.ts b/src/contracts/colony/7/TokenLocking.d.ts new file mode 100644 index 000000000..75de79a43 --- /dev/null +++ b/src/contracts/colony/7/TokenLocking.d.ts @@ -0,0 +1,1085 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-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 TokenLockingInterface extends Interface { + functions: { + authority: TypedFunctionDescription<{ encode([]: []): string }>; + + owner: TypedFunctionDescription<{ encode([]: []): string }>; + + setAuthority: TypedFunctionDescription<{ + encode([authority_]: [string]): string; + }>; + + setOwner: TypedFunctionDescription<{ encode([owner_]: [string]): string }>; + + setColonyNetwork: TypedFunctionDescription<{ + encode([_colonyNetwork]: [string]): string; + }>; + + getColonyNetwork: TypedFunctionDescription<{ encode([]: []): string }>; + + lockToken: TypedFunctionDescription<{ encode([_token]: [string]): string }>; + + unlockTokenForUser: TypedFunctionDescription<{ + encode([_token, _user, _lockId]: [string, string, BigNumberish]): string; + }>; + + incrementLockCounterTo: TypedFunctionDescription<{ + encode([_token, _lockId]: [string, BigNumberish]): string; + }>; + + deposit: TypedFunctionDescription<{ + encode([_token, _amount, _force]: [ + string, + BigNumberish, + boolean + ]): string; + }>; + + depositFor: TypedFunctionDescription<{ + encode([_token, _amount, _recipient]: [ + string, + BigNumberish, + string + ]): string; + }>; + + transfer: TypedFunctionDescription<{ + encode([_token, _amount, _recipient, _force]: [ + string, + BigNumberish, + string, + boolean + ]): string; + }>; + + withdraw: TypedFunctionDescription<{ + encode([_token, _amount, _force]: [ + string, + BigNumberish, + boolean + ]): string; + }>; + + approveStake: TypedFunctionDescription<{ + encode([_user, _amount, _token]: [string, BigNumberish, string]): string; + }>; + + obligateStake: TypedFunctionDescription<{ + encode([_user, _amount, _token]: [string, BigNumberish, string]): string; + }>; + + deobligateStake: TypedFunctionDescription<{ + encode([_user, _amount, _token]: [string, BigNumberish, string]): string; + }>; + + transferStake: TypedFunctionDescription<{ + encode([_user, _amount, _token, _recipient]: [ + string, + BigNumberish, + string, + string + ]): string; + }>; + + reward: TypedFunctionDescription<{ + encode([_recipient, _amount]: [string, BigNumberish]): string; + }>; + + getTotalLockCount: TypedFunctionDescription<{ + encode([_token]: [string]): string; + }>; + + getUserLock: TypedFunctionDescription<{ + encode([_token, _user]: [string, string]): string; + }>; + + getTotalObligation: TypedFunctionDescription<{ + encode([_user, _token]: [string, string]): string; + }>; + + getApproval: TypedFunctionDescription<{ + encode([_user, _token, _obligator]: [string, string, string]): string; + }>; + + getObligation: TypedFunctionDescription<{ + encode([_user, _token, _obligator]: [string, string, string]): string; + }>; + }; + + events: { + ColonyNetworkSet: TypedEventDescription<{ + encodeTopics([colonyNetwork]: [null]): string[]; + }>; + + LogSetAuthority: TypedEventDescription<{ + encodeTopics([authority]: [string | null]): string[]; + }>; + + LogSetOwner: TypedEventDescription<{ + encodeTopics([owner]: [string | null]): string[]; + }>; + + TokenLocked: TypedEventDescription<{ + encodeTopics([token, lockedBy, lockCount]: [ + string | null, + string | null, + null + ]): string[]; + }>; + + UserTokenClaimed: TypedEventDescription<{ + encodeTopics([token, user, amount]: [null, null, null]): string[]; + }>; + + UserTokenDeposited: TypedEventDescription<{ + encodeTopics([token, user, amount]: [null, null, null]): string[]; + }>; + + UserTokenTransferred: TypedEventDescription<{ + encodeTopics([token, user, recipient, amount]: [ + null, + null, + null, + null + ]): string[]; + }>; + + UserTokenUnlocked: TypedEventDescription<{ + encodeTopics([token, user, lockId]: [null, null, null]): string[]; + }>; + + UserTokenWithdrawn: TypedEventDescription<{ + encodeTopics([token, user, amount]: [null, null, null]): string[]; + }>; + }; +} + +export class TokenLocking extends Contract { + connect(signerOrProvider: Signer | Provider | string): TokenLocking; + attach(addressOrName: string): TokenLocking; + deployed(): Promise; + + on(event: EventFilter | string, listener: Listener): TokenLocking; + once(event: EventFilter | string, listener: Listener): TokenLocking; + addListener( + eventName: EventFilter | string, + listener: Listener + ): TokenLocking; + removeAllListeners(eventName: EventFilter | string): TokenLocking; + removeListener(eventName: any, listener: Listener): TokenLocking; + + interface: TokenLockingInterface; + + functions: { + authority(overrides?: TransactionOverrides): Promise; + + "authority()"(overrides?: TransactionOverrides): Promise; + + owner(overrides?: TransactionOverrides): Promise; + + "owner()"(overrides?: TransactionOverrides): Promise; + + setAuthority( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + "setAuthority(address)"( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + setOwner( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + "setOwner(address)"( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + setColonyNetwork( + _colonyNetwork: string, + overrides?: TransactionOverrides + ): Promise; + + "setColonyNetwork(address)"( + _colonyNetwork: string, + overrides?: TransactionOverrides + ): Promise; + + getColonyNetwork(overrides?: TransactionOverrides): Promise; + + "getColonyNetwork()"(overrides?: TransactionOverrides): Promise; + + lockToken( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + "lockToken(address)"( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + unlockTokenForUser( + _token: string, + _user: string, + _lockId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "unlockTokenForUser(address,address,uint256)"( + _token: string, + _user: string, + _lockId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + incrementLockCounterTo( + _token: string, + _lockId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "incrementLockCounterTo(address,uint256)"( + _token: string, + _lockId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + deposit( + _token: string, + _amount: BigNumberish, + _force: boolean, + overrides?: TransactionOverrides + ): Promise; + + "deposit(address,uint256,bool)"( + _token: string, + _amount: BigNumberish, + _force: boolean, + overrides?: TransactionOverrides + ): Promise; + + "deposit(address,uint256)"( + _token: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + depositFor( + _token: string, + _amount: BigNumberish, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + "depositFor(address,uint256,address)"( + _token: string, + _amount: BigNumberish, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + transfer( + _token: string, + _amount: BigNumberish, + _recipient: string, + _force: boolean, + overrides?: TransactionOverrides + ): Promise; + + "transfer(address,uint256,address,bool)"( + _token: string, + _amount: BigNumberish, + _recipient: string, + _force: boolean, + overrides?: TransactionOverrides + ): Promise; + + withdraw( + _token: string, + _amount: BigNumberish, + _force: boolean, + overrides?: TransactionOverrides + ): Promise; + + "withdraw(address,uint256,bool)"( + _token: string, + _amount: BigNumberish, + _force: boolean, + overrides?: TransactionOverrides + ): Promise; + + "withdraw(address,uint256)"( + _token: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + approveStake( + _user: string, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + "approveStake(address,uint256,address)"( + _user: string, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + obligateStake( + _user: string, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + "obligateStake(address,uint256,address)"( + _user: string, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + deobligateStake( + _user: string, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + "deobligateStake(address,uint256,address)"( + _user: string, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + transferStake( + _user: string, + _amount: BigNumberish, + _token: string, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + "transferStake(address,uint256,address,address)"( + _user: string, + _amount: BigNumberish, + _token: string, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + reward( + _recipient: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "reward(address,uint256)"( + _recipient: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + getTotalLockCount( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + "getTotalLockCount(address)"( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + getUserLock( + _token: string, + _user: string, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber, BigNumber] & { + lockCount: BigNumber; + balance: BigNumber; + DEPRECATED_timestamp: BigNumber; + pendingBalance: BigNumber; + } + >; + + "getUserLock(address,address)"( + _token: string, + _user: string, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber, BigNumber] & { + lockCount: BigNumber; + balance: BigNumber; + DEPRECATED_timestamp: BigNumber; + pendingBalance: BigNumber; + } + >; + + getTotalObligation( + _user: string, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + "getTotalObligation(address,address)"( + _user: string, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + getApproval( + _user: string, + _token: string, + _obligator: string, + overrides?: TransactionOverrides + ): Promise; + + "getApproval(address,address,address)"( + _user: string, + _token: string, + _obligator: string, + overrides?: TransactionOverrides + ): Promise; + + getObligation( + _user: string, + _token: string, + _obligator: string, + overrides?: TransactionOverrides + ): Promise; + + "getObligation(address,address,address)"( + _user: string, + _token: string, + _obligator: string, + overrides?: TransactionOverrides + ): Promise; + }; + + authority(overrides?: TransactionOverrides): Promise; + + "authority()"(overrides?: TransactionOverrides): Promise; + + owner(overrides?: TransactionOverrides): Promise; + + "owner()"(overrides?: TransactionOverrides): Promise; + + setAuthority( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + "setAuthority(address)"( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + setOwner( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + "setOwner(address)"( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + setColonyNetwork( + _colonyNetwork: string, + overrides?: TransactionOverrides + ): Promise; + + "setColonyNetwork(address)"( + _colonyNetwork: string, + overrides?: TransactionOverrides + ): Promise; + + getColonyNetwork(overrides?: TransactionOverrides): Promise; + + "getColonyNetwork()"(overrides?: TransactionOverrides): Promise; + + lockToken( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + "lockToken(address)"( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + unlockTokenForUser( + _token: string, + _user: string, + _lockId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "unlockTokenForUser(address,address,uint256)"( + _token: string, + _user: string, + _lockId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + incrementLockCounterTo( + _token: string, + _lockId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "incrementLockCounterTo(address,uint256)"( + _token: string, + _lockId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + deposit( + _token: string, + _amount: BigNumberish, + _force: boolean, + overrides?: TransactionOverrides + ): Promise; + + "deposit(address,uint256,bool)"( + _token: string, + _amount: BigNumberish, + _force: boolean, + overrides?: TransactionOverrides + ): Promise; + + "deposit(address,uint256)"( + _token: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + depositFor( + _token: string, + _amount: BigNumberish, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + "depositFor(address,uint256,address)"( + _token: string, + _amount: BigNumberish, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + transfer( + _token: string, + _amount: BigNumberish, + _recipient: string, + _force: boolean, + overrides?: TransactionOverrides + ): Promise; + + "transfer(address,uint256,address,bool)"( + _token: string, + _amount: BigNumberish, + _recipient: string, + _force: boolean, + overrides?: TransactionOverrides + ): Promise; + + withdraw( + _token: string, + _amount: BigNumberish, + _force: boolean, + overrides?: TransactionOverrides + ): Promise; + + "withdraw(address,uint256,bool)"( + _token: string, + _amount: BigNumberish, + _force: boolean, + overrides?: TransactionOverrides + ): Promise; + + "withdraw(address,uint256)"( + _token: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + approveStake( + _user: string, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + "approveStake(address,uint256,address)"( + _user: string, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + obligateStake( + _user: string, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + "obligateStake(address,uint256,address)"( + _user: string, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + deobligateStake( + _user: string, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + "deobligateStake(address,uint256,address)"( + _user: string, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + transferStake( + _user: string, + _amount: BigNumberish, + _token: string, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + "transferStake(address,uint256,address,address)"( + _user: string, + _amount: BigNumberish, + _token: string, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + reward( + _recipient: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "reward(address,uint256)"( + _recipient: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + getTotalLockCount( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + "getTotalLockCount(address)"( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + getUserLock( + _token: string, + _user: string, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber, BigNumber] & { + lockCount: BigNumber; + balance: BigNumber; + DEPRECATED_timestamp: BigNumber; + pendingBalance: BigNumber; + } + >; + + "getUserLock(address,address)"( + _token: string, + _user: string, + overrides?: TransactionOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber, BigNumber] & { + lockCount: BigNumber; + balance: BigNumber; + DEPRECATED_timestamp: BigNumber; + pendingBalance: BigNumber; + } + >; + + getTotalObligation( + _user: string, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + "getTotalObligation(address,address)"( + _user: string, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + getApproval( + _user: string, + _token: string, + _obligator: string, + overrides?: TransactionOverrides + ): Promise; + + "getApproval(address,address,address)"( + _user: string, + _token: string, + _obligator: string, + overrides?: TransactionOverrides + ): Promise; + + getObligation( + _user: string, + _token: string, + _obligator: string, + overrides?: TransactionOverrides + ): Promise; + + "getObligation(address,address,address)"( + _user: string, + _token: string, + _obligator: string, + overrides?: TransactionOverrides + ): Promise; + + filters: { + ColonyNetworkSet(colonyNetwork: null): EventFilter; + + LogSetAuthority(authority: string | null): EventFilter; + + LogSetOwner(owner: string | null): EventFilter; + + TokenLocked( + token: string | null, + lockedBy: string | null, + lockCount: null + ): EventFilter; + + UserTokenClaimed(token: null, user: null, amount: null): EventFilter; + + UserTokenDeposited(token: null, user: null, amount: null): EventFilter; + + UserTokenTransferred( + token: null, + user: null, + recipient: null, + amount: null + ): EventFilter; + + UserTokenUnlocked(token: null, user: null, lockId: null): EventFilter; + + UserTokenWithdrawn(token: null, user: null, amount: null): EventFilter; + }; + + estimate: { + authority(overrides?: TransactionOverrides): Promise; + + "authority()"(overrides?: TransactionOverrides): Promise; + + owner(overrides?: TransactionOverrides): Promise; + + "owner()"(overrides?: TransactionOverrides): Promise; + + setAuthority( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + "setAuthority(address)"( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + setOwner( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + "setOwner(address)"( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + setColonyNetwork( + _colonyNetwork: string, + overrides?: TransactionOverrides + ): Promise; + + "setColonyNetwork(address)"( + _colonyNetwork: string, + overrides?: TransactionOverrides + ): Promise; + + getColonyNetwork(overrides?: TransactionOverrides): Promise; + + "getColonyNetwork()"(overrides?: TransactionOverrides): Promise; + + lockToken( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + "lockToken(address)"( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + unlockTokenForUser( + _token: string, + _user: string, + _lockId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "unlockTokenForUser(address,address,uint256)"( + _token: string, + _user: string, + _lockId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + incrementLockCounterTo( + _token: string, + _lockId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "incrementLockCounterTo(address,uint256)"( + _token: string, + _lockId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + deposit( + _token: string, + _amount: BigNumberish, + _force: boolean, + overrides?: TransactionOverrides + ): Promise; + + "deposit(address,uint256,bool)"( + _token: string, + _amount: BigNumberish, + _force: boolean, + overrides?: TransactionOverrides + ): Promise; + + "deposit(address,uint256)"( + _token: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + depositFor( + _token: string, + _amount: BigNumberish, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + "depositFor(address,uint256,address)"( + _token: string, + _amount: BigNumberish, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + transfer( + _token: string, + _amount: BigNumberish, + _recipient: string, + _force: boolean, + overrides?: TransactionOverrides + ): Promise; + + "transfer(address,uint256,address,bool)"( + _token: string, + _amount: BigNumberish, + _recipient: string, + _force: boolean, + overrides?: TransactionOverrides + ): Promise; + + withdraw( + _token: string, + _amount: BigNumberish, + _force: boolean, + overrides?: TransactionOverrides + ): Promise; + + "withdraw(address,uint256,bool)"( + _token: string, + _amount: BigNumberish, + _force: boolean, + overrides?: TransactionOverrides + ): Promise; + + "withdraw(address,uint256)"( + _token: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + approveStake( + _user: string, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + "approveStake(address,uint256,address)"( + _user: string, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + obligateStake( + _user: string, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + "obligateStake(address,uint256,address)"( + _user: string, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + deobligateStake( + _user: string, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + "deobligateStake(address,uint256,address)"( + _user: string, + _amount: BigNumberish, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + transferStake( + _user: string, + _amount: BigNumberish, + _token: string, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + "transferStake(address,uint256,address,address)"( + _user: string, + _amount: BigNumberish, + _token: string, + _recipient: string, + overrides?: TransactionOverrides + ): Promise; + + reward( + _recipient: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "reward(address,uint256)"( + _recipient: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + getTotalLockCount( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + "getTotalLockCount(address)"( + _token: string, + overrides?: TransactionOverrides + ): Promise; + + getUserLock( + _token: string, + _user: string, + overrides?: TransactionOverrides + ): Promise; + + "getUserLock(address,address)"( + _token: string, + _user: string, + overrides?: TransactionOverrides + ): Promise; + + getTotalObligation( + _user: string, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + "getTotalObligation(address,address)"( + _user: string, + _token: string, + overrides?: TransactionOverrides + ): Promise; + + getApproval( + _user: string, + _token: string, + _obligator: string, + overrides?: TransactionOverrides + ): Promise; + + "getApproval(address,address,address)"( + _user: string, + _token: string, + _obligator: string, + overrides?: TransactionOverrides + ): Promise; + + getObligation( + _user: string, + _token: string, + _obligator: string, + overrides?: TransactionOverrides + ): Promise; + + "getObligation(address,address,address)"( + _user: string, + _token: string, + _obligator: string, + overrides?: TransactionOverrides + ): Promise; + }; +} diff --git a/src/contracts/colony/7/TokenSAI.d.ts b/src/contracts/colony/7/TokenSAI.d.ts new file mode 100644 index 000000000..7b5834e38 --- /dev/null +++ b/src/contracts/colony/7/TokenSAI.d.ts @@ -0,0 +1,316 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-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 TokenSAIInterface extends Interface { + functions: { + name: TypedFunctionDescription<{ encode([]: []): string }>; + + approve: TypedFunctionDescription<{ + encode([_spender, _value]: [string, BigNumberish]): string; + }>; + + totalSupply: TypedFunctionDescription<{ encode([]: []): string }>; + + transferFrom: TypedFunctionDescription<{ + encode([_from, _to, _value]: [string, string, BigNumberish]): string; + }>; + + decimals: TypedFunctionDescription<{ encode([]: []): string }>; + + balanceOf: TypedFunctionDescription<{ encode([_owner]: [string]): string }>; + + symbol: TypedFunctionDescription<{ encode([]: []): string }>; + + transfer: TypedFunctionDescription<{ + encode([_to, _value]: [string, BigNumberish]): string; + }>; + + allowance: TypedFunctionDescription<{ + encode([_owner, _spender]: [string, string]): string; + }>; + }; + + events: { + Approval: TypedEventDescription<{ + encodeTopics([owner, spender, value]: [ + string | null, + string | null, + null + ]): string[]; + }>; + + Transfer: TypedEventDescription<{ + encodeTopics([from, to, value]: [ + string | null, + string | null, + null + ]): string[]; + }>; + }; +} + +export class TokenSAI extends Contract { + connect(signerOrProvider: Signer | Provider | string): TokenSAI; + attach(addressOrName: string): TokenSAI; + deployed(): Promise; + + on(event: EventFilter | string, listener: Listener): TokenSAI; + once(event: EventFilter | string, listener: Listener): TokenSAI; + addListener(eventName: EventFilter | string, listener: Listener): TokenSAI; + removeAllListeners(eventName: EventFilter | string): TokenSAI; + removeListener(eventName: any, listener: Listener): TokenSAI; + + interface: TokenSAIInterface; + + functions: { + name(overrides?: TransactionOverrides): Promise; + + "name()"(overrides?: TransactionOverrides): Promise; + + approve( + _spender: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "approve(address,uint256)"( + _spender: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + totalSupply(overrides?: TransactionOverrides): Promise; + + "totalSupply()"(overrides?: TransactionOverrides): Promise; + + transferFrom( + _from: string, + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "transferFrom(address,address,uint256)"( + _from: string, + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + decimals(overrides?: TransactionOverrides): Promise; + + "decimals()"(overrides?: TransactionOverrides): Promise; + + balanceOf( + _owner: string, + overrides?: TransactionOverrides + ): Promise; + + "balanceOf(address)"( + _owner: string, + overrides?: TransactionOverrides + ): Promise; + + symbol(overrides?: TransactionOverrides): Promise; + + "symbol()"(overrides?: TransactionOverrides): Promise; + + transfer( + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "transfer(address,uint256)"( + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + allowance( + _owner: string, + _spender: string, + overrides?: TransactionOverrides + ): Promise; + + "allowance(address,address)"( + _owner: string, + _spender: string, + overrides?: TransactionOverrides + ): Promise; + }; + + name(overrides?: TransactionOverrides): Promise; + + "name()"(overrides?: TransactionOverrides): Promise; + + approve( + _spender: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "approve(address,uint256)"( + _spender: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + totalSupply(overrides?: TransactionOverrides): Promise; + + "totalSupply()"(overrides?: TransactionOverrides): Promise; + + transferFrom( + _from: string, + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "transferFrom(address,address,uint256)"( + _from: string, + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + decimals(overrides?: TransactionOverrides): Promise; + + "decimals()"(overrides?: TransactionOverrides): Promise; + + balanceOf( + _owner: string, + overrides?: TransactionOverrides + ): Promise; + + "balanceOf(address)"( + _owner: string, + overrides?: TransactionOverrides + ): Promise; + + symbol(overrides?: TransactionOverrides): Promise; + + "symbol()"(overrides?: TransactionOverrides): Promise; + + transfer( + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "transfer(address,uint256)"( + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + allowance( + _owner: string, + _spender: string, + overrides?: TransactionOverrides + ): Promise; + + "allowance(address,address)"( + _owner: string, + _spender: string, + overrides?: TransactionOverrides + ): Promise; + + filters: { + Approval( + owner: string | null, + spender: string | null, + value: null + ): EventFilter; + + Transfer(from: string | null, to: string | null, value: null): EventFilter; + }; + + estimate: { + name(overrides?: TransactionOverrides): Promise; + + "name()"(overrides?: TransactionOverrides): Promise; + + approve( + _spender: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "approve(address,uint256)"( + _spender: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + totalSupply(overrides?: TransactionOverrides): Promise; + + "totalSupply()"(overrides?: TransactionOverrides): Promise; + + transferFrom( + _from: string, + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "transferFrom(address,address,uint256)"( + _from: string, + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + decimals(overrides?: TransactionOverrides): Promise; + + "decimals()"(overrides?: TransactionOverrides): Promise; + + balanceOf( + _owner: string, + overrides?: TransactionOverrides + ): Promise; + + "balanceOf(address)"( + _owner: string, + overrides?: TransactionOverrides + ): Promise; + + symbol(overrides?: TransactionOverrides): Promise; + + "symbol()"(overrides?: TransactionOverrides): Promise; + + transfer( + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "transfer(address,uint256)"( + _to: string, + _value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + allowance( + _owner: string, + _spender: string, + overrides?: TransactionOverrides + ): Promise; + + "allowance(address,address)"( + _owner: string, + _spender: string, + overrides?: TransactionOverrides + ): Promise; + }; +} diff --git a/src/contracts/colony/7/factories/IColonyNetwork__factory.ts b/src/contracts/colony/7/factories/IColonyNetwork__factory.ts new file mode 100644 index 000000000..57511a1db --- /dev/null +++ b/src/contracts/colony/7/factories/IColonyNetwork__factory.ts @@ -0,0 +1,1953 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "ethers/providers"; + +import { IColonyNetwork } from "../IColonyNetwork"; + +export class IColonyNetwork__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IColonyNetwork { + return new Contract(address, _abi, signerOrProvider) as IColonyNetwork; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "auction", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "quantity", + type: "uint256", + }, + ], + name: "AuctionCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "colonyId", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "colonyAddress", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + ], + name: "ColonyAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "colony", + type: "address", + }, + { + indexed: false, + internalType: "bytes32", + name: "label", + type: "bytes32", + }, + ], + name: "ColonyLabelRegistered", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "resolver", + type: "address", + }, + ], + name: "ColonyNetworkInitialised", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "version", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "resolver", + type: "address", + }, + ], + name: "ColonyVersionAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "extensionId", + type: "bytes32", + }, + { + indexed: false, + internalType: "uint256", + name: "version", + type: "uint256", + }, + ], + name: "ExtensionAddedToNetwork", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "extensionId", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "colony", + type: "address", + }, + { + indexed: false, + internalType: "bool", + name: "deprecated", + type: "bool", + }, + ], + name: "ExtensionDeprecated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "extensionId", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "colony", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "version", + type: "uint256", + }, + ], + name: "ExtensionInstalled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "extensionId", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "colony", + type: "address", + }, + ], + name: "ExtensionUninstalled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "extensionId", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "colony", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "version", + type: "uint256", + }, + ], + name: "ExtensionUpgraded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "metaColony", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "rootSkillId", + type: "uint256", + }, + ], + name: "MetaColonyCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "miningCycleResolver", + type: "address", + }, + ], + name: "MiningCycleResolverSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "feeInverse", + type: "uint256", + }, + ], + name: "NetworkFeeInverseSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "user", + type: "address", + }, + ], + name: "RecoveryModeEntered", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "user", + type: "address", + }, + ], + name: "RecoveryModeExitApproved", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "user", + type: "address", + }, + ], + name: "RecoveryModeExited", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: false, + internalType: "bool", + name: "setTo", + type: "bool", + }, + ], + name: "RecoveryRoleSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "slot", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes32", + name: "fromValue", + type: "bytes32", + }, + { + indexed: false, + internalType: "bytes32", + name: "toValue", + type: "bytes32", + }, + ], + name: "RecoveryStorageSlotSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "ens", + type: "address", + }, + { + indexed: false, + internalType: "bytes32", + name: "rootNode", + type: "bytes32", + }, + ], + name: "RegistrarInitialised", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "miner", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "tokensLost", + type: "uint256", + }, + ], + name: "ReputationMinerPenalised", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes32", + name: "hash", + type: "bytes32", + }, + { + indexed: false, + internalType: "uint256", + name: "nLeaves", + type: "uint256", + }, + ], + name: "ReputationMiningCycleComplete", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "inactiveReputationMiningCycle", + type: "address", + }, + ], + name: "ReputationMiningInitialised", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "ReputationMiningRewardSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes32", + name: "newHash", + type: "bytes32", + }, + { + indexed: false, + internalType: "uint256", + name: "newNLeaves", + type: "uint256", + }, + { + indexed: false, + internalType: "address[]", + name: "stakers", + type: "address[]", + }, + { + indexed: false, + internalType: "uint256", + name: "reward", + type: "uint256", + }, + ], + name: "ReputationRootHashSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "skillId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "parentSkillId", + type: "uint256", + }, + ], + name: "SkillAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "tokenLocking", + type: "address", + }, + ], + name: "TokenLockingAddressSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "bool", + name: "status", + type: "bool", + }, + ], + name: "TokenWhitelisted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: false, + internalType: "bytes32", + name: "label", + type: "bytes32", + }, + ], + name: "UserLabelRegistered", + type: "event", + }, + { + inputs: [], + name: "approveExitRecovery", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_slot", + type: "uint256", + }, + ], + name: "checkNotAdditionalProtectedVariable", + outputs: [], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "enterRecoveryMode", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "exitRecoveryMode", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "isInRecoveryMode", + outputs: [ + { + internalType: "bool", + name: "inRecoveryMode", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "numRecoveryRoles", + outputs: [ + { + internalType: "uint64", + name: "numRoles", + type: "uint64", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + ], + name: "removeRecoveryRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + ], + name: "setRecoveryRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_slot", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_value", + type: "bytes32", + }, + ], + name: "setStorageSlotRecovery", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceID", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "status", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_reputationMiningCycle", + type: "address", + }, + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "int256", + name: "_amount", + type: "int256", + }, + { + internalType: "uint256", + name: "_skillId", + type: "uint256", + }, + { + internalType: "address", + name: "_colony", + type: "address", + }, + { + internalType: "uint128", + name: "_nUpdates", + type: "uint128", + }, + { + internalType: "uint128", + name: "_nPreviousUpdates", + type: "uint128", + }, + ], + name: "setReplacementReputationUpdateLogEntry", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_reputationMiningCycle", + type: "address", + }, + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + ], + name: "getReplacementReputationUpdateLogEntry", + outputs: [ + { + components: [ + { + internalType: "address", + name: "user", + type: "address", + }, + { + internalType: "int256", + name: "amount", + type: "int256", + }, + { + internalType: "uint256", + name: "skillId", + type: "uint256", + }, + { + internalType: "address", + name: "colony", + type: "address", + }, + { + internalType: "uint128", + name: "nUpdates", + type: "uint128", + }, + { + internalType: "uint128", + name: "nPreviousUpdates", + type: "uint128", + }, + ], + internalType: "struct ColonyNetworkDataTypes.ReputationLogEntry", + name: "reputationLogEntry", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_reputationMiningCycle", + type: "address", + }, + ], + name: "getReplacementReputationUpdateLogsExist", + outputs: [ + { + internalType: "bool", + name: "exists", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getMetaColony", + outputs: [ + { + internalType: "address payable", + name: "colonyAddress", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getColonyCount", + outputs: [ + { + internalType: "uint256", + name: "count", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_colony", + type: "address", + }, + ], + name: "isColony", + outputs: [ + { + internalType: "bool", + name: "addressIsColony", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_parentSkillId", + type: "uint256", + }, + ], + name: "addSkill", + outputs: [ + { + internalType: "uint256", + name: "skillId", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_skillId", + type: "uint256", + }, + ], + name: "getSkill", + outputs: [ + { + components: [ + { + internalType: "uint128", + name: "nParents", + type: "uint128", + }, + { + internalType: "uint128", + name: "nChildren", + type: "uint128", + }, + { + internalType: "uint256[]", + name: "parents", + type: "uint256[]", + }, + { + internalType: "uint256[]", + name: "children", + type: "uint256[]", + }, + { + internalType: "bool", + name: "globalSkill", + type: "bool", + }, + { + internalType: "bool", + name: "deprecated", + type: "bool", + }, + ], + internalType: "struct ColonyNetworkDataTypes.Skill", + name: "skill", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_skillId", + type: "uint256", + }, + ], + name: "deprecateSkill", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "int256", + name: "_amount", + type: "int256", + }, + { + internalType: "uint256", + name: "_skillId", + type: "uint256", + }, + ], + name: "appendReputationUpdateLog", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getSkillCount", + outputs: [ + { + internalType: "uint256", + name: "count", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getReputationMiningSkillId", + outputs: [ + { + internalType: "uint256", + name: "skillId", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_tokenLockingAddress", + type: "address", + }, + ], + name: "setTokenLocking", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getTokenLocking", + outputs: [ + { + internalType: "address", + name: "lockingAddress", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_tokenAddress", + type: "address", + }, + ], + name: "createMetaColony", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_tokenAddress", + type: "address", + }, + ], + name: "createColony", + outputs: [ + { + internalType: "address", + name: "colonyAddress", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_tokenAddress", + type: "address", + }, + { + internalType: "uint256", + name: "_version", + type: "uint256", + }, + { + internalType: "string", + name: "_colonyName", + type: "string", + }, + { + internalType: "string", + name: "_metadata", + type: "string", + }, + ], + name: "createColony", + outputs: [ + { + internalType: "address", + name: "colonyAddress", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_tokenAddress", + type: "address", + }, + { + internalType: "uint256", + name: "_version", + type: "uint256", + }, + { + internalType: "string", + name: "_colonyName", + type: "string", + }, + ], + name: "createColony", + outputs: [ + { + internalType: "address", + name: "colonyAddress", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_tokenAddress", + type: "address", + }, + { + internalType: "uint256", + name: "_version", + type: "uint256", + }, + { + internalType: "string", + name: "_colonyName", + type: "string", + }, + { + internalType: "string", + name: "_orbitdb", + type: "string", + }, + { + internalType: "bool", + name: "_useExtensionManager", + type: "bool", + }, + ], + name: "createColony", + outputs: [ + { + internalType: "address", + name: "colonyAddress", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_version", + type: "uint256", + }, + { + internalType: "address", + name: "_resolver", + type: "address", + }, + ], + name: "addColonyVersion", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_resolver", + type: "address", + }, + { + internalType: "uint256", + name: "_version", + type: "uint256", + }, + ], + name: "initialise", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + ], + name: "getColony", + outputs: [ + { + internalType: "address", + name: "colonyAddress", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getCurrentColonyVersion", + outputs: [ + { + internalType: "uint256", + name: "version", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_skillId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_parentSkillIndex", + type: "uint256", + }, + ], + name: "getParentSkillId", + outputs: [ + { + internalType: "uint256", + name: "skillId", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_skillId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + ], + name: "getChildSkillId", + outputs: [ + { + internalType: "uint256", + name: "skillId", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bool", + name: "_active", + type: "bool", + }, + ], + name: "getReputationMiningCycle", + outputs: [ + { + internalType: "address", + name: "repMiningCycleAddress", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_timeStaked", + type: "uint256", + }, + { + internalType: "uint256", + name: "_submissonIndex", + type: "uint256", + }, + ], + name: "calculateMinerWeight", + outputs: [ + { + internalType: "uint256", + name: "minerWeight", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_version", + type: "uint256", + }, + ], + name: "getColonyVersionResolver", + outputs: [ + { + internalType: "address", + name: "resolverAddress", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "newHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "newNLeaves", + type: "uint256", + }, + { + internalType: "address[]", + name: "stakers", + type: "address[]", + }, + ], + name: "setReputationRootHash", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "newHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "newNLeaves", + type: "uint256", + }, + { + internalType: "address[]", + name: "stakers", + type: "address[]", + }, + { + internalType: "uint256", + name: "reward", + type: "uint256", + }, + ], + name: "setReputationRootHash", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "startNextCycle", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "initialiseReputationMining", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getReputationRootHash", + outputs: [ + { + internalType: "bytes32", + name: "rootHash", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getReputationRootHashNLeaves", + outputs: [ + { + internalType: "uint256", + name: "nLeaves", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getReputationRootHashNNodes", + outputs: [ + { + internalType: "uint256", + name: "nNodes", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "startTokenAuction", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_ens", + type: "address", + }, + { + internalType: "bytes32", + name: "_rootNode", + type: "bytes32", + }, + ], + name: "setupRegistrar", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "username", + type: "string", + }, + { + internalType: "string", + name: "orbitdb", + type: "string", + }, + ], + name: "registerUserLabel", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "colonyName", + type: "string", + }, + { + internalType: "string", + name: "orbitdb", + type: "string", + }, + ], + name: "registerColonyLabel", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "orbitdb", + type: "string", + }, + ], + name: "updateColonyOrbitDB", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "orbitdb", + type: "string", + }, + ], + name: "updateUserOrbitDB", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + ], + name: "getProfileDBAddress", + outputs: [ + { + internalType: "string", + name: "orbitDB", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "addr", + type: "address", + }, + ], + name: "lookupRegisteredENSDomain", + outputs: [ + { + internalType: "string", + name: "domain", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + ], + name: "addr", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getENSRegistrar", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "miningResolverAddress", + type: "address", + }, + ], + name: "setMiningResolver", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getMiningResolver", + outputs: [ + { + internalType: "address", + name: "miningResolverAddress", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "extensionId", + type: "bytes32", + }, + { + internalType: "address", + name: "resolver", + type: "address", + }, + ], + name: "addExtensionToNetwork", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "extensionId", + type: "bytes32", + }, + { + internalType: "uint256", + name: "version", + type: "uint256", + }, + ], + name: "installExtension", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "extensionId", + type: "bytes32", + }, + { + internalType: "uint256", + name: "newVersion", + type: "uint256", + }, + ], + name: "upgradeExtension", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "extensionId", + type: "bytes32", + }, + { + internalType: "bool", + name: "deprecated", + type: "bool", + }, + ], + name: "deprecateExtension", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "extensionId", + type: "bytes32", + }, + ], + name: "uninstallExtension", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "extensionId", + type: "bytes32", + }, + { + internalType: "uint256", + name: "version", + type: "uint256", + }, + ], + name: "getExtensionResolver", + outputs: [ + { + internalType: "address", + name: "resolver", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "extensionId", + type: "bytes32", + }, + { + internalType: "address", + name: "colony", + type: "address", + }, + ], + name: "getExtensionInstallation", + outputs: [ + { + internalType: "address", + name: "installation", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getFeeInverse", + outputs: [ + { + internalType: "uint256", + name: "_feeInverse", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_feeInverse", + type: "uint256", + }, + ], + name: "setFeeInverse", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "getPayoutWhitelist", + outputs: [ + { + internalType: "bool", + name: "status", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "bool", + name: "_status", + type: "bool", + }, + ], + name: "setPayoutWhitelist", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "_stakers", + type: "address[]", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "punishStakers", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "stakeForMining", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "unstakeForMining", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + ], + name: "getMiningStake", + outputs: [ + { + components: [ + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "uint256", + name: "timestamp", + type: "uint256", + }, + ], + internalType: "struct ColonyNetworkDataTypes.MiningStake", + name: "_info", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_recipient", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "reward", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "burnUnneededRewards", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_recipient", + type: "address", + }, + ], + name: "claimMiningReward", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "setReputationMiningCycleReward", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getReputationMiningCycleReward", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, +]; diff --git a/src/contracts/colony/7/factories/IColony__factory.ts b/src/contracts/colony/7/factories/IColony__factory.ts new file mode 100644 index 000000000..522356d0e --- /dev/null +++ b/src/contracts/colony/7/factories/IColony__factory.ts @@ -0,0 +1,4234 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "ethers/providers"; + +import { IColony } from "../IColony"; + +export class IColony__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IColony { + return new Contract(address, _abi, signerOrProvider) as IColony; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: true, + internalType: "bytes32", + name: "txHash", + type: "bytes32", + }, + { + indexed: false, + internalType: "string", + name: "metadata", + type: "string", + }, + ], + name: "Annotation", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: false, + internalType: "address[]", + name: "users", + type: "address[]", + }, + { + indexed: false, + internalType: "int256[]", + name: "amounts", + type: "int256[]", + }, + ], + name: "ColonyBootstrapped", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "fee", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "payoutRemainder", + type: "uint256", + }, + ], + name: "ColonyFundsClaimed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "fromPot", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "toPot", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + ], + name: "ColonyFundsMovedBetweenFundingPots", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "colonyNetwork", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + ], + name: "ColonyInitialised", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: false, + internalType: "string", + name: "metadata", + type: "string", + }, + ], + name: "ColonyMetadata", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "rewardInverse", + type: "uint256", + }, + ], + name: "ColonyRewardInverseSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "domainId", + type: "uint256", + }, + { + indexed: true, + internalType: "uint8", + name: "role", + type: "uint8", + }, + { + indexed: false, + internalType: "bool", + name: "setTo", + type: "bool", + }, + ], + name: "ColonyRoleSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "oldVersion", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newVersion", + type: "uint256", + }, + ], + name: "ColonyUpgraded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "domainId", + type: "uint256", + }, + ], + name: "DomainAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "domainId", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "metadata", + type: "string", + }, + ], + name: "DomainMetadata", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "expenditureId", + type: "uint256", + }, + ], + name: "ExpenditureAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "expenditureId", + type: "uint256", + }, + ], + name: "ExpenditureCancelled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "expenditureId", + type: "uint256", + }, + ], + name: "ExpenditureFinalized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "expenditureId", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "slot", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "ExpenditurePayoutSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "expenditureId", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "slot", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "recipient", + type: "address", + }, + ], + name: "ExpenditureRecipientSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "expenditureId", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "slot", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "skillId", + type: "uint256", + }, + ], + name: "ExpenditureSkillSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "expenditureId", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "ExpenditureTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "fundingPotId", + type: "uint256", + }, + ], + name: "FundingPotAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "paymentId", + type: "uint256", + }, + ], + name: "PaymentAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "paymentId", + type: "uint256", + }, + ], + name: "PaymentFinalized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "paymentId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "PaymentPayoutSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "paymentId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "recipient", + type: "address", + }, + ], + name: "PaymentRecipientSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "paymentId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "skillId", + type: "uint256", + }, + ], + name: "PaymentSkillSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "fundingPotId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "PayoutClaimed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "user", + type: "address", + }, + ], + name: "RecoveryModeEntered", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "user", + type: "address", + }, + ], + name: "RecoveryModeExitApproved", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "user", + type: "address", + }, + ], + name: "RecoveryModeExited", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: false, + internalType: "bool", + name: "setTo", + type: "bool", + }, + ], + name: "RecoveryRoleSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "slot", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes32", + name: "fromValue", + type: "bytes32", + }, + { + indexed: false, + internalType: "bytes32", + name: "toValue", + type: "bytes32", + }, + ], + name: "RecoveryStorageSlotSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "rewardPayoutId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "fee", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "rewardRemainder", + type: "uint256", + }, + ], + name: "RewardPayoutClaimed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "rewardPayoutId", + type: "uint256", + }, + ], + name: "RewardPayoutCycleEnded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "rewardPayoutId", + type: "uint256", + }, + ], + name: "RewardPayoutCycleStarted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "taskId", + type: "uint256", + }, + ], + name: "TaskAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "taskId", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes32", + name: "specificationHash", + type: "bytes32", + }, + ], + name: "TaskBriefSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "taskId", + type: "uint256", + }, + ], + name: "TaskCanceled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address[]", + name: "reviewerAddresses", + type: "address[]", + }, + ], + name: "TaskChangedViaSignatures", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "taskId", + type: "uint256", + }, + ], + name: "TaskCompleted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "taskId", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes32", + name: "deliverableHash", + type: "bytes32", + }, + ], + name: "TaskDeliverableSubmitted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "taskId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "dueDate", + type: "uint256", + }, + ], + name: "TaskDueDateSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "taskId", + type: "uint256", + }, + ], + name: "TaskFinalized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "taskId", + type: "uint256", + }, + { + indexed: false, + internalType: "enum ColonyDataTypes.TaskRole", + name: "role", + type: "uint8", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "TaskPayoutSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "taskId", + type: "uint256", + }, + { + indexed: false, + internalType: "enum ColonyDataTypes.TaskRole", + name: "role", + type: "uint8", + }, + { + indexed: true, + internalType: "address", + name: "user", + type: "address", + }, + ], + name: "TaskRoleUserSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "taskId", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "skillId", + type: "uint256", + }, + ], + name: "TaskSkillSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "taskId", + type: "uint256", + }, + { + indexed: false, + internalType: "enum ColonyDataTypes.TaskRole", + name: "role", + type: "uint8", + }, + { + indexed: false, + internalType: "uint8", + name: "rating", + type: "uint8", + }, + ], + name: "TaskWorkRatingRevealed", + type: "event", + }, + { + anonymous: false, + inputs: [], + name: "TokenUnlocked", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "TokensBurned", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "who", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "TokensMinted", + type: "event", + }, + { + inputs: [], + name: "approveExitRecovery", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_slot", + type: "uint256", + }, + ], + name: "checkNotAdditionalProtectedVariable", + outputs: [], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "enterRecoveryMode", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "exitRecoveryMode", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "isInRecoveryMode", + outputs: [ + { + internalType: "bool", + name: "inRecoveryMode", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "numRecoveryRoles", + outputs: [ + { + internalType: "uint64", + name: "numRoles", + type: "uint64", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + ], + name: "removeRecoveryRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + ], + name: "setRecoveryRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_slot", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_value", + type: "bytes32", + }, + ], + name: "setStorageSlotRecovery", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "authority", + outputs: [ + { + internalType: "address", + name: "colonyAuthority", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "colonyOwner", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "uint256", + name: "colonyVersion", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_newVersion", + type: "uint256", + }, + ], + name: "upgrade", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "finishUpgrade", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getColonyNetwork", + outputs: [ + { + internalType: "address", + name: "colonyNetwork", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getToken", + outputs: [ + { + internalType: "address", + name: "tokenAddress", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_to", + type: "address", + }, + { + internalType: "bytes", + name: "_action", + type: "bytes", + }, + ], + name: "makeArbitraryTransaction", + outputs: [ + { + internalType: "bool", + name: "success", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_txHash", + type: "bytes32", + }, + { + internalType: "string", + name: "_metadata", + type: "string", + }, + ], + name: "annotateTransaction", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "bool", + name: "_setTo", + type: "bool", + }, + ], + name: "setRootRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "bool", + name: "_setTo", + type: "bool", + }, + ], + name: "setArbitrationRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "bool", + name: "_setTo", + type: "bool", + }, + ], + name: "setArchitectureRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "bool", + name: "_setTo", + type: "bool", + }, + ], + name: "setFundingRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "bool", + name: "_setTo", + type: "bool", + }, + ], + name: "setAdministrationRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_roles", + type: "bytes32", + }, + ], + name: "setUserRoles", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "enum ColonyDataTypes.ColonyRole", + name: "_role", + type: "uint8", + }, + ], + name: "hasUserRole", + outputs: [ + { + internalType: "bool", + name: "hasRole", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "enum ColonyDataTypes.ColonyRole", + name: "_role", + type: "uint8", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childDomainId", + type: "uint256", + }, + ], + name: "hasInheritedUserRole", + outputs: [ + { + internalType: "bool", + name: "hasRole", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childDomainId", + type: "uint256", + }, + ], + name: "userCanSetRoles", + outputs: [ + { + internalType: "bool", + name: "canSet", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "uint256", + name: "_domain", + type: "uint256", + }, + ], + name: "getUserRoles", + outputs: [ + { + internalType: "bytes32", + name: "roles", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "_sig", + type: "bytes4", + }, + ], + name: "getCapabilityRoles", + outputs: [ + { + internalType: "bytes32", + name: "roles", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "int256", + name: "_amount", + type: "int256", + }, + ], + name: "emitDomainReputationReward", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_skillId", + type: "uint256", + }, + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "int256", + name: "_amount", + type: "int256", + }, + ], + name: "emitSkillReputationReward", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "int256", + name: "_amount", + type: "int256", + }, + ], + name: "emitDomainReputationPenalty", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_skillId", + type: "uint256", + }, + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "int256", + name: "_amount", + type: "int256", + }, + ], + name: "emitSkillReputationPenalty", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_colonyNetworkAddress", + type: "address", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "initialiseColony", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_metadata", + type: "string", + }, + ], + name: "editColony", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "_users", + type: "address[]", + }, + { + internalType: "int256[]", + name: "_amount", + type: "int256[]", + }, + ], + name: "bootstrapColony", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_wad", + type: "uint256", + }, + ], + name: "mintTokens", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_guy", + type: "address", + }, + { + internalType: "uint256", + name: "_wad", + type: "uint256", + }, + ], + name: "mintTokensFor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "lockToken", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "user", + type: "address", + }, + { + internalType: "uint256", + name: "lockId", + type: "uint256", + }, + ], + name: "unlockTokenForUser", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "colonyName", + type: "string", + }, + { + internalType: "string", + name: "orbitdb", + type: "string", + }, + ], + name: "registerColonyLabel", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "orbitdb", + type: "string", + }, + ], + name: "updateColonyOrbitDB", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "extensionId", + type: "bytes32", + }, + { + internalType: "uint256", + name: "version", + type: "uint256", + }, + ], + name: "installExtension", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "extensionId", + type: "bytes32", + }, + { + internalType: "uint256", + name: "newVersion", + type: "uint256", + }, + ], + name: "upgradeExtension", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "extensionId", + type: "bytes32", + }, + { + internalType: "bool", + name: "deprecated", + type: "bool", + }, + ], + name: "deprecateExtension", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "extensionId", + type: "bytes32", + }, + ], + name: "uninstallExtension", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_parentDomainId", + type: "uint256", + }, + ], + name: "addDomain", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_parentDomainId", + type: "uint256", + }, + { + internalType: "string", + name: "_metadata", + type: "string", + }, + ], + name: "addDomain", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "string", + name: "_metadata", + type: "string", + }, + ], + name: "editDomain", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + ], + name: "getDomain", + outputs: [ + { + components: [ + { + internalType: "uint256", + name: "skillId", + type: "uint256", + }, + { + internalType: "uint256", + name: "fundingPotId", + type: "uint256", + }, + ], + internalType: "struct ColonyDataTypes.Domain", + name: "domain", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getDomainCount", + outputs: [ + { + internalType: "uint256", + name: "count", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "key", + type: "bytes", + }, + { + internalType: "bytes", + name: "value", + type: "bytes", + }, + { + internalType: "uint256", + name: "branchMask", + type: "uint256", + }, + { + internalType: "bytes32[]", + name: "siblings", + type: "bytes32[]", + }, + ], + name: "verifyReputationProof", + outputs: [ + { + internalType: "bool", + name: "isValid", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + ], + name: "makeExpenditure", + outputs: [ + { + internalType: "uint256", + name: "expenditureId", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "address", + name: "_newOwner", + type: "address", + }, + ], + name: "transferExpenditure", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "address", + name: "_newOwner", + type: "address", + }, + ], + name: "transferExpenditureViaArbitration", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + ], + name: "cancelExpenditure", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + ], + name: "finalizeExpenditure", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "uint256", + name: "_slot", + type: "uint256", + }, + { + internalType: "address payable", + name: "_recipient", + type: "address", + }, + ], + name: "setExpenditureRecipient", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "uint256", + name: "_slot", + type: "uint256", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "setExpenditurePayout", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "uint256", + name: "_slot", + type: "uint256", + }, + { + internalType: "uint256", + name: "_skillId", + type: "uint256", + }, + ], + name: "setExpenditureSkill", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "uint256", + name: "_slot", + type: "uint256", + }, + { + internalType: "int256", + name: "_payoutModifier", + type: "int256", + }, + ], + name: "setExpenditurePayoutModifier", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "uint256", + name: "_slot", + type: "uint256", + }, + { + internalType: "uint256", + name: "_claimDelay", + type: "uint256", + }, + ], + name: "setExpenditureClaimDelay", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "uint256", + name: "_storageSlot", + type: "uint256", + }, + { + internalType: "bool[]", + name: "_mask", + type: "bool[]", + }, + { + internalType: "bytes32[]", + name: "_keys", + type: "bytes32[]", + }, + { + internalType: "bytes32", + name: "_value", + type: "bytes32", + }, + ], + name: "setExpenditureState", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "uint256", + name: "_slot", + type: "uint256", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "claimExpenditurePayout", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getExpenditureCount", + outputs: [ + { + internalType: "uint256", + name: "count", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + ], + name: "getExpenditure", + outputs: [ + { + components: [ + { + internalType: "enum ColonyDataTypes.ExpenditureStatus", + name: "status", + type: "uint8", + }, + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "uint256", + name: "fundingPotId", + type: "uint256", + }, + { + internalType: "uint256", + name: "domainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "finalizedTimestamp", + type: "uint256", + }, + { + internalType: "uint256", + name: "globalClaimDelay", + type: "uint256", + }, + ], + internalType: "struct ColonyDataTypes.Expenditure", + name: "expenditure", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "uint256", + name: "_slot", + type: "uint256", + }, + ], + name: "getExpenditureSlot", + outputs: [ + { + components: [ + { + internalType: "address payable", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "claimDelay", + type: "uint256", + }, + { + internalType: "int256", + name: "payoutModifier", + type: "int256", + }, + { + internalType: "uint256[]", + name: "skills", + type: "uint256[]", + }, + ], + internalType: "struct ColonyDataTypes.ExpenditureSlot", + name: "expenditureSlot", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "uint256", + name: "_slot", + type: "uint256", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "getExpenditureSlotPayout", + outputs: [ + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "address payable", + name: "_recipient", + type: "address", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_skillId", + type: "uint256", + }, + ], + name: "addPayment", + outputs: [ + { + internalType: "uint256", + name: "paymentId", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + ], + name: "finalizePayment", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "address payable", + name: "_recipient", + type: "address", + }, + ], + name: "setPaymentRecipient", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "uint256", + name: "_skillId", + type: "uint256", + }, + ], + name: "setPaymentSkill", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "setPaymentPayout", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + ], + name: "getPayment", + outputs: [ + { + components: [ + { + internalType: "address payable", + name: "recipient", + type: "address", + }, + { + internalType: "bool", + name: "finalized", + type: "bool", + }, + { + internalType: "uint256", + name: "fundingPotId", + type: "uint256", + }, + { + internalType: "uint256", + name: "domainId", + type: "uint256", + }, + { + internalType: "uint256[]", + name: "skills", + type: "uint256[]", + }, + ], + internalType: "struct ColonyDataTypes.Payment", + name: "payment", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "claimPayment", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getPaymentCount", + outputs: [ + { + internalType: "uint256", + name: "count", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_specificationHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_skillId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_dueDate", + type: "uint256", + }, + ], + name: "makeTask", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getTaskCount", + outputs: [ + { + internalType: "uint256", + name: "count", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + ], + name: "getTaskChangeNonce", + outputs: [ + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint8[]", + name: "_sigV", + type: "uint8[]", + }, + { + internalType: "bytes32[]", + name: "_sigR", + type: "bytes32[]", + }, + { + internalType: "bytes32[]", + name: "_sigS", + type: "bytes32[]", + }, + { + internalType: "uint8[]", + name: "_mode", + type: "uint8[]", + }, + { + internalType: "uint256", + name: "_value", + type: "uint256", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", + }, + ], + name: "executeTaskChange", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint8[]", + name: "_sigV", + type: "uint8[]", + }, + { + internalType: "bytes32[]", + name: "_sigR", + type: "bytes32[]", + }, + { + internalType: "bytes32[]", + name: "_sigS", + type: "bytes32[]", + }, + { + internalType: "uint8[]", + name: "_mode", + type: "uint8[]", + }, + { + internalType: "uint256", + name: "_value", + type: "uint256", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", + }, + ], + name: "executeTaskRoleAssignment", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "uint8", + name: "_role", + type: "uint8", + }, + { + internalType: "bytes32", + name: "_ratingSecret", + type: "bytes32", + }, + ], + name: "submitTaskWorkRating", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "uint8", + name: "_role", + type: "uint8", + }, + { + internalType: "uint8", + name: "_rating", + type: "uint8", + }, + { + internalType: "bytes32", + name: "_salt", + type: "bytes32", + }, + ], + name: "revealTaskWorkRating", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_salt", + type: "bytes32", + }, + { + internalType: "uint256", + name: "_value", + type: "uint256", + }, + ], + name: "generateSecret", + outputs: [ + { + internalType: "bytes32", + name: "secret", + type: "bytes32", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + ], + name: "getTaskWorkRatingSecretsInfo", + outputs: [ + { + internalType: "uint256", + name: "nSecrets", + type: "uint256", + }, + { + internalType: "uint256", + name: "lastSubmittedAt", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "uint8", + name: "_role", + type: "uint8", + }, + ], + name: "getTaskWorkRatingSecret", + outputs: [ + { + internalType: "bytes32", + name: "secret", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "address payable", + name: "_user", + type: "address", + }, + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + ], + name: "setTaskManagerRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "address payable", + name: "_user", + type: "address", + }, + ], + name: "setTaskEvaluatorRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "address payable", + name: "_user", + type: "address", + }, + ], + name: "setTaskWorkerRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + ], + name: "removeTaskEvaluatorRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + ], + name: "removeTaskWorkerRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "uint256", + name: "_skillId", + type: "uint256", + }, + ], + name: "setTaskSkill", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_specificationHash", + type: "bytes32", + }, + ], + name: "setTaskBrief", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "uint256", + name: "_dueDate", + type: "uint256", + }, + ], + name: "setTaskDueDate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_deliverableHash", + type: "bytes32", + }, + ], + name: "submitTaskDeliverable", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_deliverableHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "_ratingSecret", + type: "bytes32", + }, + ], + name: "submitTaskDeliverableAndRating", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + ], + name: "finalizeTask", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + ], + name: "cancelTask", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + ], + name: "completeTask", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + ], + name: "getTask", + outputs: [ + { + internalType: "bytes32", + name: "specificationHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "deliverableHash", + type: "bytes32", + }, + { + internalType: "enum ColonyDataTypes.TaskStatus", + name: "status", + type: "uint8", + }, + { + internalType: "uint256", + name: "dueDate", + type: "uint256", + }, + { + internalType: "uint256", + name: "fundingPotId", + type: "uint256", + }, + { + internalType: "uint256", + name: "completionTimestamp", + type: "uint256", + }, + { + internalType: "uint256", + name: "domainId", + type: "uint256", + }, + { + internalType: "uint256[]", + name: "skillIds", + type: "uint256[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "uint8", + name: "_role", + type: "uint8", + }, + ], + name: "getTaskRole", + outputs: [ + { + components: [ + { + internalType: "address payable", + name: "user", + type: "address", + }, + { + internalType: "bool", + name: "rateFail", + type: "bool", + }, + { + internalType: "enum ColonyDataTypes.TaskRatings", + name: "rating", + type: "uint8", + }, + ], + internalType: "struct ColonyDataTypes.Role", + name: "role", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_rewardInverse", + type: "uint256", + }, + ], + name: "setRewardInverse", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getRewardInverse", + outputs: [ + { + internalType: "uint256", + name: "rewardInverse", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "uint8", + name: "_role", + type: "uint8", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "getTaskPayout", + outputs: [ + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "setTaskManagerPayout", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "setTaskEvaluatorPayout", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "setTaskWorkerPayout", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "uint256", + name: "_managerAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "_evaluatorAmount", + type: "uint256", + }, + { + internalType: "uint256", + name: "_workerAmount", + type: "uint256", + }, + ], + name: "setAllTaskPayouts", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + { + internalType: "uint8", + name: "_role", + type: "uint8", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "claimTaskPayout", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "bytes", + name: "key", + type: "bytes", + }, + { + internalType: "bytes", + name: "value", + type: "bytes", + }, + { + internalType: "uint256", + name: "branchMask", + type: "uint256", + }, + { + internalType: "bytes32[]", + name: "siblings", + type: "bytes32[]", + }, + ], + name: "startNextRewardPayout", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_payoutId", + type: "uint256", + }, + { + internalType: "uint256[7]", + name: "_squareRoots", + type: "uint256[7]", + }, + { + internalType: "bytes", + name: "key", + type: "bytes", + }, + { + internalType: "bytes", + name: "value", + type: "bytes", + }, + { + internalType: "uint256", + name: "branchMask", + type: "uint256", + }, + { + internalType: "bytes32[]", + name: "siblings", + type: "bytes32[]", + }, + ], + name: "claimRewardPayout", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_payoutId", + type: "uint256", + }, + ], + name: "getRewardPayoutInfo", + outputs: [ + { + components: [ + { + internalType: "bytes32", + name: "reputationState", + type: "bytes32", + }, + { + internalType: "uint256", + name: "colonyWideReputation", + type: "uint256", + }, + { + internalType: "uint256", + name: "totalTokens", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "address", + name: "tokenAddress", + type: "address", + }, + { + internalType: "uint256", + name: "blockTimestamp", + type: "uint256", + }, + { + internalType: "uint256", + name: "amountRemaining", + type: "uint256", + }, + { + internalType: "bool", + name: "finalized", + type: "bool", + }, + ], + internalType: "struct ColonyDataTypes.RewardPayoutCycle", + name: "rewardPayoutCycle", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_payoutId", + type: "uint256", + }, + ], + name: "finalizeRewardPayout", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_id", + type: "uint256", + }, + ], + name: "getFundingPot", + outputs: [ + { + internalType: "enum ColonyDataTypes.FundingPotAssociatedType", + name: "associatedType", + type: "uint8", + }, + { + internalType: "uint256", + name: "associatedTypeId", + type: "uint256", + }, + { + internalType: "uint256", + name: "payoutsWeCannotMake", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getFundingPotCount", + outputs: [ + { + internalType: "uint256", + name: "count", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_potId", + type: "uint256", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "getFundingPotBalance", + outputs: [ + { + internalType: "uint256", + name: "balance", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_potId", + type: "uint256", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "getFundingPotPayout", + outputs: [ + { + internalType: "uint256", + name: "payout", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_fromChildSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_toChildSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_fromPot", + type: "uint256", + }, + { + internalType: "uint256", + name: "_toPot", + type: "uint256", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "moveFundsBetweenPots", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_fromChildSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_toChildSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_fromPot", + type: "uint256", + }, + { + internalType: "uint256", + name: "_toPot", + type: "uint256", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "moveFundsBetweenPots", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "claimColonyFunds", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "getNonRewardPotsTotal", + outputs: [ + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_approvee", + type: "address", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "approveStake", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "obligateStake", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "deobligateStake", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "address", + name: "_obligator", + type: "address", + }, + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "address", + name: "_recipient", + type: "address", + }, + ], + name: "transferStake", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "address", + name: "_obligator", + type: "address", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + ], + name: "getApproval", + outputs: [ + { + internalType: "uint256", + name: "approval", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "address", + name: "_obligator", + type: "address", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + ], + name: "getObligation", + outputs: [ + { + internalType: "uint256", + name: "obligation", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_fundingPotId", + type: "uint256", + }, + ], + name: "getDomainFromFundingPot", + outputs: [ + { + internalType: "uint256", + name: "domainId", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "burnTokens", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "unlockToken", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "updateApprovalAmount", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "getTokenApproval", + outputs: [ + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + ], + name: "getTotalTokenApproval", + outputs: [ + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, +]; diff --git a/src/contracts/colony/7/factories/TokenERC20__factory.ts b/src/contracts/colony/7/factories/TokenERC20__factory.ts new file mode 100644 index 000000000..dc1d83452 --- /dev/null +++ b/src/contracts/colony/7/factories/TokenERC20__factory.ts @@ -0,0 +1,240 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "ethers/providers"; + +import { TokenERC20 } from "../TokenERC20"; + +export class TokenERC20__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): TokenERC20 { + return new Contract(address, _abi, signerOrProvider) as TokenERC20; + } +} + +const _abi = [ + { + constant: true, + inputs: [], + name: "name", + outputs: [ + { + name: "", + type: "string", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "_spender", + type: "address", + }, + { + name: "_value", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "totalSupply", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "_from", + type: "address", + }, + { + name: "_to", + type: "address", + }, + { + name: "_value", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "decimals", + outputs: [ + { + name: "", + type: "uint8", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + name: "_owner", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + name: "balance", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "symbol", + outputs: [ + { + name: "", + type: "string", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "_to", + type: "address", + }, + { + name: "_value", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [ + { + name: "_owner", + type: "address", + }, + { + name: "_spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + payable: true, + stateMutability: "payable", + type: "fallback", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "owner", + type: "address", + }, + { + indexed: true, + name: "spender", + type: "address", + }, + { + indexed: false, + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "from", + type: "address", + }, + { + indexed: true, + name: "to", + type: "address", + }, + { + indexed: false, + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, +]; diff --git a/src/contracts/colony/7/factories/TokenLocking__factory.ts b/src/contracts/colony/7/factories/TokenLocking__factory.ts new file mode 100644 index 000000000..6a975bc22 --- /dev/null +++ b/src/contracts/colony/7/factories/TokenLocking__factory.ts @@ -0,0 +1,769 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, ContractFactory, Signer } from "ethers"; +import { Provider } from "ethers/providers"; +import { UnsignedTransaction } from "ethers/utils/transaction"; + +import { TransactionOverrides } from ".."; +import { TokenLocking } from "../TokenLocking"; + +export class TokenLocking__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy(overrides?: TransactionOverrides): Promise { + return super.deploy(overrides) as Promise; + } + getDeployTransaction(overrides?: TransactionOverrides): UnsignedTransaction { + return super.getDeployTransaction(overrides); + } + attach(address: string): TokenLocking { + return super.attach(address) as TokenLocking; + } + connect(signer: Signer): TokenLocking__factory { + return super.connect(signer) as TokenLocking__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): TokenLocking { + return new Contract(address, _abi, signerOrProvider) as TokenLocking; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "colonyNetwork", + type: "address", + }, + ], + name: "ColonyNetworkSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "authority", + type: "address", + }, + ], + name: "LogSetAuthority", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "LogSetOwner", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "lockedBy", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "lockCount", + type: "uint256", + }, + ], + name: "TokenLocked", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "UserTokenClaimed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "UserTokenDeposited", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "recipient", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "UserTokenTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "lockId", + type: "uint256", + }, + ], + name: "UserTokenUnlocked", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "UserTokenWithdrawn", + type: "event", + }, + { + inputs: [], + name: "authority", + outputs: [ + { + internalType: "contract DSAuthority", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract DSAuthority", + name: "authority_", + type: "address", + }, + ], + name: "setAuthority", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner_", + type: "address", + }, + ], + name: "setOwner", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_colonyNetwork", + type: "address", + }, + ], + name: "setColonyNetwork", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getColonyNetwork", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "lockToken", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "uint256", + name: "_lockId", + type: "uint256", + }, + ], + name: "unlockTokenForUser", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "uint256", + name: "_lockId", + type: "uint256", + }, + ], + name: "incrementLockCounterTo", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "bool", + name: "_force", + type: "bool", + }, + ], + name: "deposit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "deposit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "address", + name: "_recipient", + type: "address", + }, + ], + name: "depositFor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "address", + name: "_recipient", + type: "address", + }, + { + internalType: "bool", + name: "_force", + type: "bool", + }, + ], + name: "transfer", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "bool", + name: "_force", + type: "bool", + }, + ], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "approveStake", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "obligateStake", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "deobligateStake", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "address", + name: "_recipient", + type: "address", + }, + ], + name: "transferStake", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_recipient", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "reward", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "getTotalLockCount", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "address", + name: "_user", + type: "address", + }, + ], + name: "getUserLock", + outputs: [ + { + components: [ + { + internalType: "uint256", + name: "lockCount", + type: "uint256", + }, + { + internalType: "uint256", + name: "balance", + type: "uint256", + }, + { + internalType: "uint256", + name: "DEPRECATED_timestamp", + type: "uint256", + }, + { + internalType: "uint256", + name: "pendingBalance", + type: "uint256", + }, + ], + internalType: "struct TokenLockingDataTypes.Lock", + name: "lock", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "getTotalObligation", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "address", + name: "_obligator", + type: "address", + }, + ], + name: "getApproval", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "address", + name: "_obligator", + type: "address", + }, + ], + name: "getObligation", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, +]; + +const _bytecode = + "0x608060405234801561001057600080fd5b50600180546001600160a01b031916339081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a2611fae8061005e6000396000f3fe608060405234801561001057600080fd5b50600436106101725760003560e01c80635afd5341116100de578063bf50382311610097578063e49d7ebd11610071578063e49d7ebd14610317578063ead5d3591461032a578063f3fef3a31461033d578063f75312811461035057610172565b8063bf503823146102e9578063bf7e214f146102fc578063c8820f6c1461030457610172565b80635afd53411461028257806361ac1990146102955780636d7bd889146102a85780637a9e5e4b146102bb5780638da5cb5b146102ce57806393c45535146102d657610172565b806321670f221161013057806321670f221461020e5780632c822a0d146102215780633edd11281461023457806343af70a41461024757806347e7ef241461025a5780634e5e83951461026d57610172565b80626ad1001461017757806303e27b42146101a057806310693fcd146101b557806313af4035146101c85780631ca55574146101db5780631cc17c52146101ee575b600080fd5b61018a6101853660046118e8565b610363565b6040516101979190611f49565b60405180910390f35b6101b36101ae3660046118c5565b610390565b005b61018a6101c33660046118c5565b610447565b6101b36101d63660046118c5565b61059d565b61018a6101e93660046118c5565b61061f565b6102016101fc3660046118e8565b61063a565b6040516101979190611f1e565b6101b361021c3660046119aa565b61069d565b61018a61022f366004611920565b6106a1565b6101b3610242366004611aa4565b6106d6565b6101b36102553660046119d5565b610873565b6101b36102683660046119aa565b6109db565b6102756109e7565b6040516101979190611af6565b6101b3610290366004611a0b565b6109f6565b6101b36102a33660046119d5565b610b8d565b6101b36102b636600461196a565b610cad565b6101b36102c93660046118c5565b610eb5565b610275610f33565b6101b36102e4366004611a5d565b610f42565b6101b36102f73660046119aa565b61108c565b610275611119565b6101b36103123660046119d5565b611128565b6101b36103253660046119d5565b61123a565b6101b3610338366004611aa4565b61142f565b6101b361034b3660046119aa565b611607565b61018a61035e366004611920565b611613565b6001600160a01b038083166000908152600860209081526040808320938516835292905220545b92915050565b6103a6336000356001600160e01b031916611648565b6103cb5760405162461bcd60e51b81526004016103c290611c18565b60405180910390fd5b6001600160a01b0381166103f15760405162461bcd60e51b81526004016103c290611bcd565b600380546001600160a01b0319166001600160a01b0383161790556040517faac08694cb36f6250aa0c27b058ab1542ec8a9289c0a3af21af36cdfaf1b46cc9061043c908390611af6565b60405180910390a150565b6003546000906001600160a01b03163314806104de575060035460405163db0dd7ff60e01b81526001600160a01b039091169063db0dd7ff9061048e903390600401611af6565b60206040518083038186803b1580156104a657600080fd5b505afa1580156104ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104de9190611ada565b6104fa5760405162461bcd60e51b81526004016103c290611c46565b6001600160a01b0382166000818152600560208181526040808420805460010180825560098452828620908652835281852080546001600160a01b031916339081179091559486905292909152905490519192917f991b8e8a2e2b8ff515f7045174eeb52eb4868e69c5bb4259da6146a93c77574d9161057991611f49565b60405180910390a3506001600160a01b031660009081526005602052604090205490565b6105b3336000356001600160e01b031916611648565b6105cf5760405162461bcd60e51b81526004016103c290611c18565b600180546001600160a01b0319166001600160a01b0383811691909117918290556040519116907fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b6001600160a01b031660009081526005602052604090205490565b61064261189d565b506001600160a01b039182166000908152600460209081526040808320939094168252918252829020825160808101845281548152600182015492810192909252600281015492820192909252600390910154606082015290565b5050565b6001600160a01b0392831660009081526007602090815260408083209486168352938152838220929094168152925290205490565b8281801561070c576001600160a01b03821660009081526005602090815260408083205460048352818420338552909252909120555b6107168233611724565b6107325760405162461bcd60e51b81526004016103c290611cc5565b6001600160a01b0385166000908152600460209081526040808320338452909152902060018101546107649086611757565b6001820155831561078e5761078181600101548260030154611757565b6001820155600060038201555b6040516323b872dd60e01b81526001600160a01b038716906323b872dd906107be90339030908a90600401611b0a565b602060405180830381600087803b1580156107d857600080fd5b505af11580156107ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108109190611ada565b61082c5760405162461bcd60e51b81526004016103c290611e46565b7fd783236f9ce1a99ac7489d26331b958d099f7895331d5c91777389e01a73cda98633836001015460405161086393929190611b0a565b60405180910390a1505050505050565b6003546001600160a01b0316331480610907575060035460405163db0dd7ff60e01b81526001600160a01b039091169063db0dd7ff906108b7903390600401611af6565b60206040518083038186803b1580156108cf57600080fd5b505afa1580156108e3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109079190611ada565b6109235760405162461bcd60e51b81526004016103c290611c46565b6001600160a01b03808416600090815260076020908152604080832093851683529281528282203383529052205461095b908361177a565b6001600160a01b0380851660008181526007602090815260408083209487168084529482528083203384528252808320959095559181526008825283812092815291905220546109ab908361177a565b6001600160a01b039384166000908152600860209081526040808320949096168252929092529290209190915550565b61069d828260006106d6565b6003546001600160a01b031690565b6003546001600160a01b0316331480610a8a575060035460405163db0dd7ff60e01b81526001600160a01b039091169063db0dd7ff90610a3a903390600401611af6565b60206040518083038186803b158015610a5257600080fd5b505afa158015610a66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8a9190611ada565b610aa65760405162461bcd60e51b81526004016103c290611c46565b6001600160a01b038085166000908152600760209081526040808320938616835292815282822033835290522054610ade908461177a565b6001600160a01b038086166000818152600760209081526040808320948816808452948252808320338452825280832095909555918152600882528381209281529190522054610b2e908461177a565b6001600160a01b03808616600081815260086020908152604080832094881683529381528382209490945560048452828120918152925290206001810154610b76908561177a565b6001820155610b8683858461179d565b5050505050565b6003546001600160a01b0316331480610c21575060035460405163db0dd7ff60e01b81526001600160a01b039091169063db0dd7ff90610bd1903390600401611af6565b60206040518083038186803b158015610be957600080fd5b505afa158015610bfd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c219190611ada565b610c3d5760405162461bcd60e51b81526004016103c290611c46565b6001600160a01b038084166000908152600660209081526040808320938516835292815282822033835290522054610c759083611757565b6001600160a01b0393841660009081526006602090815260408083209490961682529283528481203382529092529290209190915550565b6003546001600160a01b0316331480610d41575060035460405163db0dd7ff60e01b81526001600160a01b039091169063db0dd7ff90610cf1903390600401611af6565b60206040518083038186803b158015610d0957600080fd5b505afa158015610d1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d419190611ada565b610d5d5760405162461bcd60e51b81526004016103c290611c46565b6001600160a01b038381166000908152600960209081526040808320858452909152902054163314610da15760405162461bcd60e51b81526004016103c290611d4a565b6001600160a01b038316600090815260056020526040902054811115610dd95760405162461bcd60e51b81526004016103c290611dca565b6001600160a01b038084166000908152600460209081526040808320938616835292905290812054610e0c90839061177a565b905080610e2b5760405162461bcd60e51b81526004016103c290611e01565b80600114610e4b5760405162461bcd60e51b81526004016103c290611ed0565b6001600160a01b0380851660009081526004602090815260408083209387168352929052819020839055517f66d1ba6a7bba8a64b1341777e1e7721371ab2824e4b50ec33c687036451fe7f090610ea790869086908690611b0a565b60405180910390a150505050565b610ecb336000356001600160e01b031916611648565b610ee75760405162461bcd60e51b81526004016103c290611c18565b600080546001600160a01b0319166001600160a01b03838116919091178083556040519116917f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada491a250565b6001546001600160a01b031681565b3360008181526008602090815260408083206001600160a01b0389168452825280832054600483528184209484529390915290206001015485918591610f88908361177a565b1015610fa65760405162461bcd60e51b81526004016103c290611e8a565b85838015610fdc576001600160a01b03821660009081526005602090815260408083205460048352818420338552909252909120555b610fe68233611724565b6110025760405162461bcd60e51b81526004016103c290611cc5565b6001600160a01b038816600090815260046020908152604080832033845290915290206001810154611034908961177a565b600182015561104489898961179d565b7fb8c56c2a9387492995ba191019b63a38d5ce068bd9fe02315cbe2600d561dc398933898b6040516110799493929190611b47565b60405180910390a1505050505050505050565b6001600160a01b03821660009081526005602052604090205481118015906110d657506001600160a01b038216600090815260046020908152604080832033845290915290205481115b6110f25760405162461bcd60e51b81526004016103c290611d06565b6001600160a01b039091166000908152600460209081526040808320338452909152902055565b6000546001600160a01b031681565b6040516323b872dd60e01b81526001600160a01b038416906323b872dd9061115890339030908790600401611b0a565b602060405180830381600087803b15801561117257600080fd5b505af1158015611186573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111aa9190611ada565b6111c65760405162461bcd60e51b81526004016103c290611e46565b6111d183838361179d565b6001600160a01b03808416600090815260046020908152604080832093851683529290528190206001015490517fd783236f9ce1a99ac7489d26331b958d099f7895331d5c91777389e01a73cda99161122d9186918591611b0a565b60405180910390a1505050565b6003546001600160a01b03163314806112ce575060035460405163db0dd7ff60e01b81526001600160a01b039091169063db0dd7ff9061127e903390600401611af6565b60206040518083038186803b15801561129657600080fd5b505afa1580156112aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112ce9190611ada565b6112ea5760405162461bcd60e51b81526004016103c290611c46565b6001600160a01b038084166000908152600660209081526040808320938516835292815282822033835290522054611322908361177a565b6001600160a01b0380851660008181526006602090815260408083209487168084529482528083203380855290835281842096909655928252600781528282209382529283528181209381529290915290205461137f9083611757565b6001600160a01b0380851660008181526007602090815260408083209487168084529482528083203384528252808320959095559181526008825283812092815291905220546113cf9083611757565b6001600160a01b038481166000818152600860209081526040808320948716835293815283822085905560048152838220928252919091522060010154101561142a5760405162461bcd60e51b81526004016103c290611d81565b505050565b3360008181526008602090815260408083206001600160a01b0388168452825280832054600483528184209484529390915290206001015484918491611475908361177a565b10156114935760405162461bcd60e51b81526004016103c290611e8a565b848380156114c9576001600160a01b03821660009081526005602090815260408083205460048352818420338552909252909120555b6114d38233611724565b6114ef5760405162461bcd60e51b81526004016103c290611cc5565b6001600160a01b038716600090815260046020908152604080832033845290915290206001810154611521908861177a565b600182015560405163a9059cbb60e01b81526001600160a01b0389169063a9059cbb906115549033908b90600401611b2e565b602060405180830381600087803b15801561156e57600080fd5b505af1158015611582573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a69190611ada565b6115c25760405162461bcd60e51b81526004016103c290611e46565b7f01e2c71b014f62b55400e8becdca80c6a907b5cc36c7a5789443c3ed5e5799278833896040516115f593929190611b0a565b60405180910390a15050505050505050565b61069d8282600061142f565b6001600160a01b0392831660009081526006602090815260408083209486168352938152838220929094168152925290205490565b60006001600160a01b0383163014156116635750600161038a565b6001546001600160a01b03848116911614156116815750600161038a565b6000546001600160a01b03166116995750600061038a565b60005460405163b700961360e01b81526001600160a01b039091169063b7009613906116cd90869030908790600401611b71565b60206040518083038186803b1580156116e557600080fd5b505afa1580156116f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061171d9190611ada565b905061038a565b6001600160a01b039182166000908152600560209081526040808320546004835281842094909516835292905220541490565b8082018281101561038a5760405162461bcd60e51b81526004016103c290611c97565b8082038281111561038a5760405162461bcd60e51b81526004016103c290611b9e565b6001600160a01b0380841660009081526004602090815260408083209385168352929052206117cc8483611724565b156117e9576117df816001015484611757565b6001820155611897565b60405163a9059cbb60e01b81526001600160a01b0385169063a9059cbb906118179085908790600401611b2e565b602060405180830381600087803b15801561183157600080fd5b505af1925050508015611861575060408051601f3d908101601f1916820190925261185e91810190611ada565b60015b61187d57611873816003015484611757565b6003820155611897565b80610b8657611890826003015485611757565b6003830155505b50505050565b6040518060800160405280600081526020016000815260200160008152602001600081525090565b6000602082840312156118d6578081fd5b81356118e181611f52565b9392505050565b600080604083850312156118fa578081fd5b823561190581611f52565b9150602083013561191581611f52565b809150509250929050565b600080600060608486031215611934578081fd5b833561193f81611f52565b9250602084013561194f81611f52565b9150604084013561195f81611f52565b809150509250925092565b60008060006060848603121561197e578283fd5b833561198981611f52565b9250602084013561199981611f52565b929592945050506040919091013590565b600080604083850312156119bc578182fd5b82356119c781611f52565b946020939093013593505050565b6000806000606084860312156119e9578283fd5b83356119f481611f52565b925060208401359150604084013561195f81611f52565b60008060008060808587031215611a20578081fd5b8435611a2b81611f52565b9350602085013592506040850135611a4281611f52565b91506060850135611a5281611f52565b939692955090935050565b60008060008060808587031215611a72578384fd5b8435611a7d81611f52565b9350602085013592506040850135611a9481611f52565b91506060850135611a5281611f6a565b600080600060608486031215611ab8578283fd5b8335611ac381611f52565b925060208401359150604084013561195f81611f6a565b600060208284031215611aeb578081fd5b81516118e181611f6a565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039485168152928416602084015292166040820152606081019190915260800190565b6001600160a01b0393841681529190921660208201526001600160e01b0319909116604082015260600190565b60208082526015908201527464732d6d6174682d7375622d756e646572666c6f7760581b604082015260600190565b6020808252602b908201527f636f6c6f6e792d746f6b656e2d6c6f636b696e672d6e6574776f726b2d63616e60408201526a6e6f742d62652d7a65726f60a81b606082015260800190565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b60208082526031908201527f636f6c6f6e792d746f6b656e2d6c6f636b696e672d73656e6465722d6e6f742d604082015270636f6c6f6e792d6f722d6e6574776f726b60781b606082015260800190565b60208082526014908201527364732d6d6174682d6164642d6f766572666c6f7760601b604082015260600190565b60208082526021908201527f636f6c6f6e792d746f6b656e2d6c6f636b696e672d746f6b656e2d6c6f636b656040820152601960fa1b606082015260800190565b60208082526024908201527f636f6c6f6e792d746f6b656e2d6c6f636b696e672d696e76616c69642d6c6f636040820152631acb5a5960e21b606082015260800190565b6020808252601f908201527f636f6c6f6e792d746f6b656e2d6c6f636b696e672d6e6f742d6c6f636b657200604082015260600190565b60208082526029908201527f636f6c6f6e792d746f6b656e2d6c6f636b696e672d696e73756666696369656e6040820152681d0b59195c1bdcda5d60ba1b606082015260800190565b6020808252601b908201527f636f6c6f6e792d746f6b656e2d696e76616c69642d6c6f636b69640000000000604082015260600190565b60208082526025908201527f636f6c6f6e792d746f6b656e2d6c6f636b696e672d616c72656164792d756e6c6040820152641bd8dad95960da1b606082015260800190565b60208082526024908201527f636f6c6f6e792d746f6b656e2d6c6f636b696e672d7472616e736665722d66616040820152631a5b195960e21b606082015260800190565b60208082526026908201527f636f6c6f6e792d746f6b656e2d6c6f636b696e672d6578636573732d6f626c6960408201526533b0ba34b7b760d11b606082015260800190565b6020808252602e908201527f636f6c6f6e792d746f6b656e2d6c6f636b696e672d6861732d70726576696f7560408201526d732d6163746976652d6c6f636b7360901b606082015260800190565b8151815260208083015190820152604080830151908201526060918201519181019190915260800190565b90815260200190565b6001600160a01b0381168114611f6757600080fd5b50565b8015158114611f6757600080fdfea26469706673582212206241301012a3eab8df4e887197d1eb9d0eb27ec47c0f0253fee8ffbd5ba2c1ef64736f6c63430007030033"; diff --git a/src/contracts/colony/7/factories/TokenSAI__factory.ts b/src/contracts/colony/7/factories/TokenSAI__factory.ts new file mode 100644 index 000000000..a8f6c796d --- /dev/null +++ b/src/contracts/colony/7/factories/TokenSAI__factory.ts @@ -0,0 +1,240 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "ethers/providers"; + +import { TokenSAI } from "../TokenSAI"; + +export class TokenSAI__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): TokenSAI { + return new Contract(address, _abi, signerOrProvider) as TokenSAI; + } +} + +const _abi = [ + { + constant: true, + inputs: [], + name: "name", + outputs: [ + { + name: "", + type: "bytes32", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "_spender", + type: "address", + }, + { + name: "_value", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "totalSupply", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "_from", + type: "address", + }, + { + name: "_to", + type: "address", + }, + { + name: "_value", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "decimals", + outputs: [ + { + name: "", + type: "uint8", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + name: "_owner", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + name: "balance", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "symbol", + outputs: [ + { + name: "", + type: "bytes32", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "_to", + type: "address", + }, + { + name: "_value", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [ + { + name: "_owner", + type: "address", + }, + { + name: "_spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + payable: true, + stateMutability: "payable", + type: "fallback", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "owner", + type: "address", + }, + { + indexed: true, + name: "spender", + type: "address", + }, + { + indexed: false, + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "from", + type: "address", + }, + { + indexed: true, + name: "to", + type: "address", + }, + { + indexed: false, + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, +]; diff --git a/src/contracts/colony/7/factories/Token__factory.ts b/src/contracts/colony/7/factories/Token__factory.ts new file mode 100644 index 000000000..2f3b8b083 --- /dev/null +++ b/src/contracts/colony/7/factories/Token__factory.ts @@ -0,0 +1,484 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, ContractFactory, Signer } from "ethers"; +import { Provider } from "ethers/providers"; +import { UnsignedTransaction } from "ethers/utils/transaction"; +import { BigNumberish } from "ethers/utils"; + +import { TransactionOverrides } from ".."; +import { Token } from "../Token"; + +export class Token__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + _name: string, + _symbol: string, + _decimals: BigNumberish, + overrides?: TransactionOverrides + ): Promise { + return super.deploy(_name, _symbol, _decimals, overrides) as Promise; + } + getDeployTransaction( + _name: string, + _symbol: string, + _decimals: BigNumberish, + overrides?: TransactionOverrides + ): UnsignedTransaction { + return super.getDeployTransaction(_name, _symbol, _decimals, overrides); + } + attach(address: string): Token { + return super.attach(address) as Token; + } + connect(signer: Signer): Token__factory { + return super.connect(signer) as Token__factory; + } + static connect(address: string, signerOrProvider: Signer | Provider): Token { + return new Contract(address, _abi, signerOrProvider) as Token; + } +} + +const _abi = [ + { + constant: true, + inputs: [], + name: "name", + outputs: [ + { + name: "", + type: "string", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "guy", + type: "address", + }, + { + name: "wad", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "owner_", + type: "address", + }, + ], + name: "setOwner", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "totalSupply", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "decimals", + outputs: [ + { + name: "", + type: "uint8", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + name: "src", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "authority_", + type: "address", + }, + ], + name: "setAuthority", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "owner", + outputs: [ + { + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "symbol", + outputs: [ + { + name: "", + type: "string", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "dst", + type: "address", + }, + { + name: "wad", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "authority", + outputs: [ + { + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "locked", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + name: "src", + type: "address", + }, + { + name: "guy", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + name: "_name", + type: "string", + }, + { + name: "_symbol", + type: "string", + }, + { + name: "_decimals", + type: "uint8", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "guy", + type: "address", + }, + { + indexed: false, + name: "wad", + type: "uint256", + }, + ], + name: "Mint", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "guy", + type: "address", + }, + { + indexed: false, + name: "wad", + type: "uint256", + }, + ], + name: "Burn", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "authority", + type: "address", + }, + ], + name: "LogSetAuthority", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "owner", + type: "address", + }, + ], + name: "LogSetOwner", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "src", + type: "address", + }, + { + indexed: true, + name: "guy", + type: "address", + }, + { + indexed: false, + name: "wad", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + name: "src", + type: "address", + }, + { + indexed: true, + name: "dst", + type: "address", + }, + { + indexed: false, + name: "wad", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + constant: false, + inputs: [ + { + name: "src", + type: "address", + }, + { + name: "dst", + type: "address", + }, + { + name: "wad", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "guy", + type: "address", + }, + { + name: "wad", + type: "uint256", + }, + ], + name: "mint", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "wad", + type: "uint256", + }, + ], + name: "mint", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "wad", + type: "uint256", + }, + ], + name: "burn", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + name: "guy", + type: "address", + }, + { + name: "wad", + type: "uint256", + }, + ], + name: "burn", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [], + name: "unlock", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, +]; + +const _bytecode = + "0x60806040523480156200001157600080fd5b50604051620011ce380380620011ce833981018060405260608110156200003757600080fd5b8101908080516401000000008111156200005057600080fd5b820160208101848111156200006457600080fd5b81516401000000008111828201871017156200007f57600080fd5b505092919060200180516401000000008111156200009c57600080fd5b82016020810184811115620000b057600080fd5b8151640100000000811182820187101715620000cb57600080fd5b505060209182015133600081815260019094526040808520859055848055600480546001600160a01b0319168317905551929550909350917fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9491a282516200013b90600690602086019062000199565b5081516200015190600590602085019062000199565b506004805460ff9092167401000000000000000000000000000000000000000002600160a01b60ff021990921691909117905550506007805460ff191660011790556200023e565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620001dc57805160ff19168380011785556200020c565b828001600101855582156200020c579182015b828111156200020c578251825591602001919060010190620001ef565b506200021a9291506200021e565b5090565b6200023b91905b808211156200021a576000815560010162000225565b90565b610f80806200024e6000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c80637a9e5e4b116100ad578063a69df4b511610071578063a69df4b514610383578063a9059cbb1461038b578063bf7e214f146103b7578063cf309012146103bf578063dd62ed3e146103c757610121565b80637a9e5e4b146102e85780638da5cb5b1461030e57806395d89b41146103325780639dc29fac1461033a578063a0712d681461036657610121565b806323b872dd116100f457806323b872dd14610225578063313ce5671461025b57806340c10f191461027957806342966c68146102a557806370a08231146102c257610121565b806306fdde0314610126578063095ea7b3146101a357806313af4035146101e357806318160ddd1461020b575b600080fd5b61012e6103f5565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610168578181015183820152602001610150565b50505050905090810190601f1680156101955780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101cf600480360360408110156101b957600080fd5b506001600160a01b038135169060200135610483565b604080519115158252519081900360200190f35b610209600480360360208110156101f957600080fd5b50356001600160a01b03166104ea565b005b610213610592565b60408051918252519081900360200190f35b6101cf6004803603606081101561023b57600080fd5b506001600160a01b03813581169160208101359091169060400135610598565b610263610623565b6040805160ff9092168252519081900360200190f35b6102096004803603604081101561028f57600080fd5b506001600160a01b038135169060200135610633565b610209600480360360208110156102bb57600080fd5b503561075c565b610213600480360360208110156102d857600080fd5b50356001600160a01b0316610769565b610209600480360360208110156102fe57600080fd5b50356001600160a01b0316610784565b61031661082c565b604080516001600160a01b039092168252519081900360200190f35b61012e61083b565b6102096004803603604081101561035057600080fd5b506001600160a01b038135169060200135610896565b6102096004803603602081101561037c57600080fd5b5035610a74565b610209610ad6565b6101cf600480360360408110156103a157600080fd5b506001600160a01b038135169060200135610b3a565b610316610b4e565b6101cf610b5d565b610213600480360360408110156103dd57600080fd5b506001600160a01b0381358116916020013516610b66565b6006805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561047b5780601f106104505761010080835404028352916020019161047b565b820191906000526020600020905b81548152906001019060200180831161045e57829003601f168201915b505050505081565b3360008181526002602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b610500336000356001600160e01b031916610b91565b6105425760408051600160e51b62461bcd0281526020600482015260146024820152600080516020610f35833981519152604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0383811691909117918290556040519116907fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60005490565b60075460009060ff1615610610576105bc336000356001600160e01b031916610b91565b6106105760408051600160e51b62461bcd02815260206004820152601960248201527f636f6c6f6e792d746f6b656e2d756e617574686f726973656400000000000000604482015290519081900360640190fd5b61061b848484610c7b565b949350505050565b600454600160a01b900460ff1681565b610649336000356001600160e01b031916610b91565b61068b5760408051600160e51b62461bcd0281526020600482015260146024820152600080516020610f35833981519152604482015290519081900360640190fd5b6001600160a01b0382166000908152600160205260409020546106ae9082610e7e565b6001600160a01b038316600090815260016020526040812091909155546106d59082610e7e565b6000556040805182815290516001600160a01b038416917f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885919081900360200190a26040805182815290516001600160a01b038416916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b6107663382610896565b50565b6001600160a01b031660009081526001602052604090205490565b61079a336000356001600160e01b031916610b91565b6107dc5760408051600160e51b62461bcd0281526020600482015260146024820152600080516020610f35833981519152604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0383811691909117918290556040519116907f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6004546001600160a01b031681565b6005805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561047b5780601f106104505761010080835404028352916020019161047b565b6001600160a01b0382163314610974576001600160a01b03821660009081526002602090815260408083203384529091529020548111156109215760408051600160e51b62461bcd02815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c0000604482015290519081900360640190fd5b6001600160a01b038216600090815260026020908152604080832033845290915290205461094f9082610ed9565b6001600160a01b03831660009081526002602090815260408083203384529091529020555b6001600160a01b0382166000908152600160205260409020548111156109e45760408051600160e51b62461bcd02815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e6365000000604482015290519081900360640190fd5b6001600160a01b038216600090815260016020526040902054610a079082610ed9565b6001600160a01b03831660009081526001602052604081209190915554610a2e9082610ed9565b6000556040805182815290516001600160a01b038416917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a25050565b610a8a336000356001600160e01b031916610b91565b610acc5760408051600160e51b62461bcd0281526020600482015260146024820152600080516020610f35833981519152604482015290519081900360640190fd5b6107663382610633565b610aec336000356001600160e01b031916610b91565b610b2e5760408051600160e51b62461bcd0281526020600482015260146024820152600080516020610f35833981519152604482015290519081900360640190fd5b6007805460ff19169055565b6000610b47338484610598565b9392505050565b6003546001600160a01b031681565b60075460ff1681565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b60006001600160a01b038316301415610bac575060016104e4565b6004546001600160a01b0384811691161415610bca575060016104e4565b6003546001600160a01b0316610be2575060006104e4565b60035460408051600160e01b63b70096130281526001600160a01b0386811660048301523060248301526001600160e01b0319861660448301529151919092169163b7009613916064808301926020929190829003018186803b158015610c4857600080fd5b505afa158015610c5c573d6000803e3d6000fd5b505050506040513d6020811015610c7257600080fd5b505190506104e4565b60006001600160a01b0384163314610d5b576001600160a01b0384166000908152600260209081526040808320338452909152902054821115610d085760408051600160e51b62461bcd02815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c0000604482015290519081900360640190fd5b6001600160a01b0384166000908152600260209081526040808320338452909152902054610d369083610ed9565b6001600160a01b03851660009081526002602090815260408083203384529091529020555b6001600160a01b038416600090815260016020526040902054821115610dcb5760408051600160e51b62461bcd02815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e6365000000604482015290519081900360640190fd5b6001600160a01b038416600090815260016020526040902054610dee9083610ed9565b6001600160a01b038086166000908152600160205260408082209390935590851681522054610e1d9083610e7e565b6001600160a01b0380851660008181526001602090815260409182902094909455805186815290519193928816927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a35060019392505050565b808201828110156104e45760408051600160e51b62461bcd02815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b808203828111156104e45760408051600160e51b62461bcd02815260206004820152601560248201527f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000604482015290519081900360640190fdfe64732d617574682d756e617574686f72697a6564000000000000000000000000a165627a7a72305820ed8de9a90263e33e6d6e4fb5554694081cb7508892aee98c6e637d87f2bec09a0029"; diff --git a/src/contracts/colony/7/index.d.ts b/src/contracts/colony/7/index.d.ts new file mode 100644 index 000000000..910d6a045 --- /dev/null +++ b/src/contracts/colony/7/index.d.ts @@ -0,0 +1,29 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { + BigNumberish, + EventDescription, + FunctionDescription, +} from "ethers/utils"; + +export interface TransactionOverrides { + gasLimit?: BigNumberish | Promise; + gasPrice?: BigNumberish | Promise; + nonce?: BigNumberish | Promise; + value?: BigNumberish | Promise; + from?: string | Promise; + chainId?: number | Promise; +} + +export interface TypedEventDescription< + T extends Pick +> extends EventDescription { + encodeTopics: T["encodeTopics"]; +} + +export interface TypedFunctionDescription< + T extends Pick +> extends FunctionDescription { + encode: T["encode"]; +} diff --git a/src/contracts/deploy/MetaTxToken.json b/src/contracts/deploy/MetaTxToken.json new file mode 100644 index 000000000..ddb334391 --- /dev/null +++ b/src/contracts/deploy/MetaTxToken.json @@ -0,0 +1,11385 @@ +{ + "contractName": "MetaTxToken", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "uint8", + "name": "_decimals", + "type": "uint8" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "src", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "guy", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "wad", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "guy", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "wad", + "type": "uint256" + } + ], + "name": "Burn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "authority", + "type": "address" + } + ], + "name": "LogSetAuthority", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "LogSetOwner", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "address payable", + "name": "relayerAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "functionSignature", + "type": "bytes" + } + ], + "name": "MetaTransactionExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "guy", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "wad", + "type": "uint256" + } + ], + "name": "Mint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "src", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "dst", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "wad", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PERMIT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "src", + "type": "address" + }, + { + "internalType": "address", + "name": "guy", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guy", + "type": "address" + }, + { + "internalType": "uint256", + "name": "wad", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "authority", + "outputs": [ + { + "internalType": "contract DSAuthority", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "src", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "_sigR", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_sigS", + "type": "bytes32" + }, + { + "internalType": "uint8", + "name": "_sigV", + "type": "uint8" + } + ], + "name": "executeMetaTransaction", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "getChainId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "locked", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract DSAuthority", + "name": "authority_", + "type": "address" + } + ], + "name": "setAuthority", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner_", + "type": "address" + } + ], + "name": "setOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "dst", + "type": "address" + }, + { + "internalType": "uint256", + "name": "wad", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_chainId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "_sigR", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_sigS", + "type": "bytes32" + }, + { + "internalType": "uint8", + "name": "_sigV", + "type": "uint8" + } + ], + "name": "verify", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "getMetatransactionNonce", + "outputs": [ + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "src", + "type": "address" + }, + { + "internalType": "address", + "name": "dst", + "type": "address" + }, + { + "internalType": "uint256", + "name": "wad", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guy", + "type": "address" + }, + { + "internalType": "uint256", + "name": "wad", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "wad", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "wad", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guy", + "type": "address" + }, + { + "internalType": "uint256", + "name": "wad", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unlock", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.7.3+commit.9bfce1f6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"_decimals\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"guy\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"guy\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Burn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"authority\",\"type\":\"address\"}],\"name\":\"LogSetAuthority\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"LogSetOwner\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address payable\",\"name\":\"relayerAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"functionSignature\",\"type\":\"bytes\"}],\"name\":\"MetaTransactionExecuted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"guy\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PERMIT_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"guy\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guy\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"authority\",\"outputs\":[{\"internalType\":\"contract DSAuthority\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guy\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"_sigR\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_sigS\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"_sigV\",\"type\":\"uint8\"}],\"name\":\"executeMetaTransaction\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"}],\"name\":\"getMetatransactionNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"locked\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guy\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract DSAuthority\",\"name\":\"authority_\",\"type\":\"address\"}],\"name\":\"setAuthority\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner_\",\"type\":\"address\"}],\"name\":\"setOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"_sigR\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_sigS\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"_sigV\",\"type\":\"uint8\"}],\"name\":\"verify\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"executeMetaTransaction(address,bytes,bytes32,bytes32,uint8)\":{\"params\":{\"_payload\":\"Function call to make via meta transaction\",\"_sigR\":\"R part of the signature\",\"_sigS\":\"S part of the signature\",\"_sigV\":\"V part of the signature\",\"_user\":\"Address of user trying to do meta transaction\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"executeMetaTransaction(address,bytes,bytes32,bytes32,uint8)\":{\"notice\":\"Main function to be called when user wants to execute meta transaction. The actual function to be called should be passed as param with name functionSignature Here the basic signature recovery is being used. Signature is expected to be generated using personal_sign method.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/alex/colony/colonyNetwork/contracts/metatxToken/MetaTxToken.sol\":\"MetaTxToken\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/alex/colony/colonyNetwork/contracts/common/BasicMetaTransaction.sol\":{\"keccak256\":\"0xbefc18701ee84d21bcd0f1ec6b2633cbc0b37b2fa281ff08ed38633ef822e897\",\"urls\":[\"bzz-raw://f2660629fb97a5e7041f1cdc359f50a29bfdc022d1c5d53c21506229ae0d383a\",\"dweb:/ipfs/QmNgLSVPHUNC247MeUfFSQHNDASKyw2PiLAoDQRj6eEpPr\"]},\"/home/alex/colony/colonyNetwork/contracts/common/ERC20Extended.sol\":{\"keccak256\":\"0x8ee76ab93ed44fa284c4b04980cfed835bd1952f52870e44d5213cf8367d4d72\",\"urls\":[\"bzz-raw://641b7d7325370fbf5b1438f70ec0f7504ceb0cf7fbb5d91e7d9c7c21dd15aaa1\",\"dweb:/ipfs/QmVrKk9T5upEDNk6rpYU6KaELwDc1vTA9CJswHe6TBoYkR\"]},\"/home/alex/colony/colonyNetwork/contracts/common/MetaTransactionMsgSender.sol\":{\"keccak256\":\"0xe0ff4cef89b9e16896cfe2d39aced588897fd9203774d941aae228220021e413\",\"urls\":[\"bzz-raw://548cd52bb3c56b709132b3862d36ecfdcf03f3ac725bfbb1904f5933fc85484e\",\"dweb:/ipfs/QmVLpWfj7jWZAGsz24hb3NRJby7TaEVZiyspDZqWthS3MS\"]},\"/home/alex/colony/colonyNetwork/contracts/common/MultiChain.sol\":{\"keccak256\":\"0x83b2f975cb2a95281c6d2637101fd98c4fb1d5dd3af8d62997a0a0e42724bd64\",\"urls\":[\"bzz-raw://03c93ed27c3d97b8e2e6000678ca14bc9a10a2ab3426ab90f679de29a18bba41\",\"dweb:/ipfs/QmVC9EiYWQvM3wRB8TYcFkP1w8NtGXyTxHFoUKiwAGmqgV\"]},\"/home/alex/colony/colonyNetwork/contracts/metatxToken/DSAuthMeta.sol\":{\"keccak256\":\"0xe9dbe38e7b9c249194a0edb56173c6db3a1fa71edd29e946723102dfa0ef0e3e\",\"urls\":[\"bzz-raw://a51a1550c710171fa02e773778d5edfdd73fb3871ed7ba74bbf0a6f474f64791\",\"dweb:/ipfs/QmNVt3J7SyK4dRop9h2s1bdJh52A4NBbZCMXLyPRWWHVd4\"]},\"/home/alex/colony/colonyNetwork/contracts/metatxToken/DSTokenBaseMeta.sol\":{\"keccak256\":\"0x28d3dd113891090248b3037370cd1939a5646a29c2c6d6849b46bd0e4e3d3dee\",\"urls\":[\"bzz-raw://419a0abcfd8d7f9af5d5d9b4b5c097e3dd832ddc70f46c5a8146e376bb4181c4\",\"dweb:/ipfs/QmXgtaNvgDqQ9iWbNtevAy4NPneo4my3GJeJvYHvP3gtjN\"]},\"/home/alex/colony/colonyNetwork/contracts/metatxToken/MetaTxToken.sol\":{\"keccak256\":\"0x33b475c45728c90e1be18c7c018be5219c80cec4d7fecff110b1d9ba854d0a5b\",\"urls\":[\"bzz-raw://34302925d0d248e3e85f4dac41b09b731c7c0ba3c2f3c2f83b6fabbbfa75efeb\",\"dweb:/ipfs/QmVAXLc55hSXQfyZYzqQAo6Ubd9gd5HFDbAXmbZMJBpqce\"]},\"/home/alex/colony/colonyNetwork/lib/dappsys/auth.sol\":{\"keccak256\":\"0xb59c9b93ee83bf361ad763b027b0cc2ab7fb21486c4744802dd0017457c3424a\",\"urls\":[\"bzz-raw://01a1dff28577babee9044206c83db562d0941776cbd449b3ec47318571476fc6\",\"dweb:/ipfs/QmT5hrUe1zuVCAkdbudbHVNDa3E3uRy7NM1WwAAApRsJqe\"]},\"/home/alex/colony/colonyNetwork/lib/dappsys/erc20.sol\":{\"keccak256\":\"0xe01559371fecb34df51499200abb4d15dece3e8e43c3ba8561c0edac39c63c9d\",\"urls\":[\"bzz-raw://a53873aacc8a99f0585419f212094ff967c67f0f502588f0e71df4316e771af6\",\"dweb:/ipfs/QmYcgejDnfWURPH2pFnYPCfcDpmrY639pXuRdEWh8U4S45\"]},\"/home/alex/colony/colonyNetwork/lib/dappsys/math.sol\":{\"keccak256\":\"0x7cd3a27541f75fb9234cea98fbf42b40499dc0c732ddacf41981edca7b278211\",\"urls\":[\"bzz-raw://fc61d8737c6e2d1e6badcbe45ce8776fd7af9522f746224c4ca292bf81d057f1\",\"dweb:/ipfs/QmZZuNXm1fn1wQg5BmeCFPN73qZEUsf8oNz1jazYRyZEKp\"]}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b50604051620021f9380380620021f9833981810160405260608110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b9083019060208201858111156200006e57600080fd5b82516401000000008111828201881017156200008957600080fd5b82525081516020918201929091019080838360005b83811015620000b85781810151838201526020016200009e565b50505050905090810190601f168015620000e65780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200010a57600080fd5b9083019060208201858111156200012057600080fd5b82516401000000008111828201881017156200013b57600080fd5b82525081516020918201929091019080838360005b838110156200016a57818101518382015260200162000150565b50505050905090810190601f168015620001985780820380516001836020036101000a031916815260200191505b506040526020015191506000905080600181620001b4620003a6565b6001600160a01b03168152602081019190915260400160009081209190915555620001de620003a6565b600480546001600160a01b0319166001600160a01b039290921691909117905562000208620003a6565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a28251620002529060069060208601906200045c565b508151620002689060059060208501906200045c565b506004805460ff60a01b1916600160a01b60ff8416021790556007805460ff191660019081179091556040516006805446937f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f9391829184916002610100928216159290920260001901160480156200031b5780601f10620002f85761010080835404028352918201916200031b565b820191906000526020600020905b81548152906001019060200180831162000306575b505060408051918290038220828201825260018352603160f81b602093840152815180840196909652858201527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6606086015260808501959095523060a0808601919091528551808603909101815260c09094019094525050805191012060085550620004ee915050565b6000363330148015620003ba575060348110155b156200044d5760606000368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88114620004385733935050505062000459565b508101516001600160a01b0316915062000457565b3391505062000459565b505b90565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200049f57805160ff1916838001178555620004cf565b82800160010185558215620004cf579182015b82811115620004cf578251825591602001919060010190620004b2565b50620004579291505b80821115620004575760008155600101620004d8565b611cfb80620004fe6000396000f3fe6080604052600436106101815760003560e01c806370a08231116100d1578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146106fa578063cf3090121461070f578063d505accf14610724578063dd62ed3e1461078257610181565b8063a69df4b514610679578063a9059cbb1461068e578063b3eac1d8146106c757610181565b806370a082311461056a5780637a9e5e4b1461059d5780638da5cb5b146105d057806395d89b41146106015780639dc29fac14610616578063a0712d681461064f57610181565b806330adf81f1161013e5780633644e515116101185780633644e5151461041557806340c10f191461042a57806342966c68146104635780636281133d1461048d57610181565b806330adf81f146103c0578063313ce567146103d55780633408e4701461040057610181565b806306fdde0314610186578063095ea7b3146102105780630c53c51c1461025d57806313af40351461032157806318160ddd1461035657806323b872dd1461037d575b600080fd5b34801561019257600080fd5b5061019b6107bd565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101d55781810151838201526020016101bd565b50505050905090810190601f1680156102025780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561021c57600080fd5b506102496004803603604081101561023357600080fd5b506001600160a01b03813516906020013561084b565b604080519115158252519081900360200190f35b61019b600480360360a081101561027357600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561029e57600080fd5b8201836020820111156102b057600080fd5b803590602001918460018302840111640100000000831117156102d257600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550508235935050506020810135906040013560ff166108dc565b34801561032d57600080fd5b506103546004803603602081101561034457600080fd5b50356001600160a01b0316610b8e565b005b34801561036257600080fd5b5061036b610c43565b60408051918252519081900360200190f35b34801561038957600080fd5b50610249600480360360608110156103a057600080fd5b506001600160a01b03813581169160208101359091169060400135610c4a565b3480156103cc57600080fd5b5061036b610cc3565b3480156103e157600080fd5b506103ea610ce7565b6040805160ff9092168252519081900360200190f35b34801561040c57600080fd5b5061036b610cf7565b34801561042157600080fd5b5061036b610cfb565b34801561043657600080fd5b506103546004803603604081101561044d57600080fd5b506001600160a01b038135169060200135610d01565b34801561046f57600080fd5b506103546004803603602081101561048657600080fd5b5035610e25565b34801561049957600080fd5b50610249600480360360e08110156104b057600080fd5b6001600160a01b0382351691602081013591604082013591908101906080810160608201356401000000008111156104e757600080fd5b8201836020820111156104f957600080fd5b8035906020019184600183028401116401000000008311171561051b57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550508235935050506020810135906040013560ff16610e39565b34801561057657600080fd5b5061036b6004803603602081101561058d57600080fd5b50356001600160a01b0316610fb8565b3480156105a957600080fd5b50610354600480360360208110156105c057600080fd5b50356001600160a01b0316610fd3565b3480156105dc57600080fd5b506105e5611076565b604080516001600160a01b039092168252519081900360200190f35b34801561060d57600080fd5b5061019b611085565b34801561062257600080fd5b506103546004803603604081101561063957600080fd5b506001600160a01b0381351690602001356110e0565b34801561065b57600080fd5b506103546004803603602081101561067257600080fd5b503561131a565b34801561068557600080fd5b5061035461137e565b34801561069a57600080fd5b50610249600480360360408110156106b157600080fd5b506001600160a01b0381351690602001356113dd565b3480156106d357600080fd5b5061036b600480360360208110156106ea57600080fd5b50356001600160a01b03166113f8565b34801561070657600080fd5b506105e5611413565b34801561071b57600080fd5b50610249611422565b34801561073057600080fd5b50610354600480360360e081101561074757600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c0013561142b565b34801561078e57600080fd5b5061036b600480360360408110156107a557600080fd5b506001600160a01b0381358116916020013516611744565b6006805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156108435780601f1061081857610100808354040283529160200191610843565b820191906000526020600020905b81548152906001019060200180831161082657829003601f168201915b505050505081565b6000816002600061085a61176f565b6001600160a01b039081168252602080830193909352604091820160009081209188168082529190935291209190915561089261176f565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a35060015b92915050565b60606108fc866108eb886113f8565b6108f3610cf7565b88888888610e39565b6109375760405162461bcd60e51b8152600401808060200182810382526029815260200180611c9d6029913960400191505060405180910390fd5b6109408661181e565b60006060306001600160a01b0316877f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88a6040516020018084805190602001908083835b602083106109a35780518252601f199092019160209182019101610984565b6001836020036101000a038019825116818451168082178552505050505050905001838152602001826001600160a01b031660601b815260140193505050506040516020818303038152906040526040518082805190602001908083835b60208310610a205780518252601f199092019160209182019101610a01565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610a82576040519150601f19603f3d011682016040523d82523d6000602084013e610a87565b606091505b509150915081610ac85760405162461bcd60e51b8152600401808060200182810382526028815260200180611c756028913960400191505060405180910390fd5b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b88338960405180846001600160a01b03168152602001836001600160a01b0316815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610b47578181015183820152602001610b2f565b50505050905090810190601f168015610b745780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a1979650505050505050565b610bab610b9961176f565b6000356001600160e01b03191661183e565b610bf3576040805162461bcd60e51b8152602060048201526014602482015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0383811691909117918290556040519116907fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b6000545b90565b60075460009060ff1615610cb057610c63610b9961176f565b610cb0576040805162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b604482015290519081900360640190fd5b610cbb848484611925565b949350505050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b600454600160a01b900460ff1681565b4690565b60085481565b610d0c610b9961176f565b610d54576040805162461bcd60e51b8152602060048201526014602482015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604482015290519081900360640190fd5b6001600160a01b038216600090815260016020526040902054610d779082611b84565b6001600160a01b03831660009081526001602052604081209190915554610d9e9082611b84565b6000556040805182815290516001600160a01b038416917f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885919081900360200190a26040805182815290516001600160a01b038416916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b610e36610e3061176f565b826110e0565b50565b600080610ed68830898960405160200180858152602001846001600160a01b031660601b815260140183815260200182805190602001908083835b60208310610e935780518252601f199092019160209182019101610e74565b6001836020036101000a03801982511681845116808217855250505050505090500194505050505060405160208183030381529060405280519060200120611bd3565b9050600060018285888860405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015610f34573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610f9c576040805162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e617475726500604482015290519081900360640190fd5b6001600160a01b038a8116911614915050979650505050505050565b6001600160a01b031660009081526001602052604090205490565b610fde610b9961176f565b611026576040805162461bcd60e51b8152602060048201526014602482015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0383811691909117918290556040519116907f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6004546001600160a01b031681565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156108435780601f1061081857610100808354040283529160200191610843565b6110e861176f565b6001600160a01b0316826001600160a01b03161461121d576001600160a01b0382166000908152600260205260408120829161112261176f565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015611196576040805162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c0000604482015290519081900360640190fd5b6001600160a01b03821660009081526002602052604081206111e1916111ba61176f565b6001600160a01b03166001600160a01b031681526020019081526020016000205482611c24565b6001600160a01b03831660009081526002602052604081209061120261176f565b6001600160a01b031681526020810191909152604001600020555b6001600160a01b03821660009081526001602052604090205481111561128a576040805162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e6365000000604482015290519081900360640190fd5b6001600160a01b0382166000908152600160205260409020546112ad9082611c24565b6001600160a01b038316600090815260016020526040812091909155546112d49082611c24565b6000556040805182815290516001600160a01b038416917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a25050565b611325610b9961176f565b61136d576040805162461bcd60e51b8152602060048201526014602482015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604482015290519081900360640190fd5b610e3661137861176f565b82610d01565b611389610b9961176f565b6113d1576040805162461bcd60e51b8152602060048201526014602482015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604482015290519081900360640190fd5b6007805460ff19169055565b60006113f16113ea61176f565b8484610c4a565b9392505050565b6001600160a01b031660009081526009602052604090205490565b6003546001600160a01b031681565b60075460ff1681565b60075460ff161561148e57611441610b9961176f565b61148e576040805162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b604482015290519081900360640190fd5b428410156114e3576040805162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e65000000604482015290519081900360640190fd5b6040805180820182526002815261190160f01b60208083019182526008546001600160a01b03808d1660008181526009855287812080546001810190915588517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981880152808a0193909352928e166060830152608082018d905260a082019290925260c08082018c90528751808303909101815260e082019097528651969093019590952084519193909261010001918291908083835b602083106115ba5780518252601f19909201916020918201910161159b565b51815160209384036101000a6000190180199092169116179052920194855250838101929092525060408051808403830181528184018083528151918401919091206000918290526060850180845281905260ff8a16608086015260a0850189905260c085018890529151919550935060019260e08082019392601f1981019281900390910190855afa158015611655573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381161580159061168b5750886001600160a01b0316816001600160a01b0316145b6116dc576040805162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e61747572650000604482015290519081900360640190fd5b6001600160a01b03808a166000818152600260209081526040808320948d16808452948252918290208b905581518b815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050505050505050565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6000363330148015611782575060348110155b156118115760606000368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146117fd57339350505050610c47565b508101516001600160a01b0316915061181a565b33915050610c47565b5090565b6001600160a01b0316600090815260096020526040902080546001019055565b60006001600160a01b038316301415611859575060016108d6565b6004546001600160a01b0384811691161415611877575060016108d6565b6003546001600160a01b031661188f575060006108d6565b6003546040805163b700961360e01b81526001600160a01b0386811660048301523060248301526001600160e01b0319861660448301529151919092169163b7009613916064808301926020929190829003018186803b1580156118f257600080fd5b505afa158015611906573d6000803e3d6000fd5b505050506040513d602081101561191c57600080fd5b505190506108d6565b600061192f61176f565b6001600160a01b0316846001600160a01b031614611a64576001600160a01b0384166000908152600260205260408120839161196961176f565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156119dd576040805162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c0000604482015290519081900360640190fd5b6001600160a01b0384166000908152600260205260408120611a2891611a0161176f565b6001600160a01b03166001600160a01b031681526020019081526020016000205483611c24565b6001600160a01b038516600090815260026020526040812090611a4961176f565b6001600160a01b031681526020810191909152604001600020555b6001600160a01b038416600090815260016020526040902054821115611ad1576040805162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e6365000000604482015290519081900360640190fd5b6001600160a01b038416600090815260016020526040902054611af49083611c24565b6001600160a01b038086166000908152600160205260408082209390935590851681522054611b239083611b84565b6001600160a01b0380851660008181526001602090815260409182902094909455805186815290519193928816927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a35060019392505050565b808201828110156108d6576040805162461bcd60e51b815260206004820152601460248201527364732d6d6174682d6164642d6f766572666c6f7760601b604482015290519081900360640190fd5b604080517f19457468657265756d205369676e6564204d6573736167653a0a333200000000602080830191909152603c8083019490945282518083039094018452605c909101909152815191012090565b808203828111156108d6576040805162461bcd60e51b815260206004820152601560248201527464732d6d6174682d7375622d756e646572666c6f7760581b604482015290519081900360640190fdfe636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e7375636365737366756c6d6574617472616e73616374696f6e2d7369676e65722d7369676e61747572652d6d69736d61746368a264697066735822122055eeac2228dfae391826f6e9c9787a4f1714e9610e01479e0866abfee76d559864736f6c63430007030033", + "deployedBytecode": "0x6080604052600436106101815760003560e01c806370a08231116100d1578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146106fa578063cf3090121461070f578063d505accf14610724578063dd62ed3e1461078257610181565b8063a69df4b514610679578063a9059cbb1461068e578063b3eac1d8146106c757610181565b806370a082311461056a5780637a9e5e4b1461059d5780638da5cb5b146105d057806395d89b41146106015780639dc29fac14610616578063a0712d681461064f57610181565b806330adf81f1161013e5780633644e515116101185780633644e5151461041557806340c10f191461042a57806342966c68146104635780636281133d1461048d57610181565b806330adf81f146103c0578063313ce567146103d55780633408e4701461040057610181565b806306fdde0314610186578063095ea7b3146102105780630c53c51c1461025d57806313af40351461032157806318160ddd1461035657806323b872dd1461037d575b600080fd5b34801561019257600080fd5b5061019b6107bd565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101d55781810151838201526020016101bd565b50505050905090810190601f1680156102025780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561021c57600080fd5b506102496004803603604081101561023357600080fd5b506001600160a01b03813516906020013561084b565b604080519115158252519081900360200190f35b61019b600480360360a081101561027357600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561029e57600080fd5b8201836020820111156102b057600080fd5b803590602001918460018302840111640100000000831117156102d257600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550508235935050506020810135906040013560ff166108dc565b34801561032d57600080fd5b506103546004803603602081101561034457600080fd5b50356001600160a01b0316610b8e565b005b34801561036257600080fd5b5061036b610c43565b60408051918252519081900360200190f35b34801561038957600080fd5b50610249600480360360608110156103a057600080fd5b506001600160a01b03813581169160208101359091169060400135610c4a565b3480156103cc57600080fd5b5061036b610cc3565b3480156103e157600080fd5b506103ea610ce7565b6040805160ff9092168252519081900360200190f35b34801561040c57600080fd5b5061036b610cf7565b34801561042157600080fd5b5061036b610cfb565b34801561043657600080fd5b506103546004803603604081101561044d57600080fd5b506001600160a01b038135169060200135610d01565b34801561046f57600080fd5b506103546004803603602081101561048657600080fd5b5035610e25565b34801561049957600080fd5b50610249600480360360e08110156104b057600080fd5b6001600160a01b0382351691602081013591604082013591908101906080810160608201356401000000008111156104e757600080fd5b8201836020820111156104f957600080fd5b8035906020019184600183028401116401000000008311171561051b57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550508235935050506020810135906040013560ff16610e39565b34801561057657600080fd5b5061036b6004803603602081101561058d57600080fd5b50356001600160a01b0316610fb8565b3480156105a957600080fd5b50610354600480360360208110156105c057600080fd5b50356001600160a01b0316610fd3565b3480156105dc57600080fd5b506105e5611076565b604080516001600160a01b039092168252519081900360200190f35b34801561060d57600080fd5b5061019b611085565b34801561062257600080fd5b506103546004803603604081101561063957600080fd5b506001600160a01b0381351690602001356110e0565b34801561065b57600080fd5b506103546004803603602081101561067257600080fd5b503561131a565b34801561068557600080fd5b5061035461137e565b34801561069a57600080fd5b50610249600480360360408110156106b157600080fd5b506001600160a01b0381351690602001356113dd565b3480156106d357600080fd5b5061036b600480360360208110156106ea57600080fd5b50356001600160a01b03166113f8565b34801561070657600080fd5b506105e5611413565b34801561071b57600080fd5b50610249611422565b34801561073057600080fd5b50610354600480360360e081101561074757600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c0013561142b565b34801561078e57600080fd5b5061036b600480360360408110156107a557600080fd5b506001600160a01b0381358116916020013516611744565b6006805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156108435780601f1061081857610100808354040283529160200191610843565b820191906000526020600020905b81548152906001019060200180831161082657829003601f168201915b505050505081565b6000816002600061085a61176f565b6001600160a01b039081168252602080830193909352604091820160009081209188168082529190935291209190915561089261176f565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a35060015b92915050565b60606108fc866108eb886113f8565b6108f3610cf7565b88888888610e39565b6109375760405162461bcd60e51b8152600401808060200182810382526029815260200180611c9d6029913960400191505060405180910390fd5b6109408661181e565b60006060306001600160a01b0316877f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88a6040516020018084805190602001908083835b602083106109a35780518252601f199092019160209182019101610984565b6001836020036101000a038019825116818451168082178552505050505050905001838152602001826001600160a01b031660601b815260140193505050506040516020818303038152906040526040518082805190602001908083835b60208310610a205780518252601f199092019160209182019101610a01565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610a82576040519150601f19603f3d011682016040523d82523d6000602084013e610a87565b606091505b509150915081610ac85760405162461bcd60e51b8152600401808060200182810382526028815260200180611c756028913960400191505060405180910390fd5b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b88338960405180846001600160a01b03168152602001836001600160a01b0316815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610b47578181015183820152602001610b2f565b50505050905090810190601f168015610b745780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a1979650505050505050565b610bab610b9961176f565b6000356001600160e01b03191661183e565b610bf3576040805162461bcd60e51b8152602060048201526014602482015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0383811691909117918290556040519116907fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b6000545b90565b60075460009060ff1615610cb057610c63610b9961176f565b610cb0576040805162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b604482015290519081900360640190fd5b610cbb848484611925565b949350505050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b600454600160a01b900460ff1681565b4690565b60085481565b610d0c610b9961176f565b610d54576040805162461bcd60e51b8152602060048201526014602482015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604482015290519081900360640190fd5b6001600160a01b038216600090815260016020526040902054610d779082611b84565b6001600160a01b03831660009081526001602052604081209190915554610d9e9082611b84565b6000556040805182815290516001600160a01b038416917f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885919081900360200190a26040805182815290516001600160a01b038416916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b610e36610e3061176f565b826110e0565b50565b600080610ed68830898960405160200180858152602001846001600160a01b031660601b815260140183815260200182805190602001908083835b60208310610e935780518252601f199092019160209182019101610e74565b6001836020036101000a03801982511681845116808217855250505050505090500194505050505060405160208183030381529060405280519060200120611bd3565b9050600060018285888860405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015610f34573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610f9c576040805162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e617475726500604482015290519081900360640190fd5b6001600160a01b038a8116911614915050979650505050505050565b6001600160a01b031660009081526001602052604090205490565b610fde610b9961176f565b611026576040805162461bcd60e51b8152602060048201526014602482015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0383811691909117918290556040519116907f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6004546001600160a01b031681565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156108435780601f1061081857610100808354040283529160200191610843565b6110e861176f565b6001600160a01b0316826001600160a01b03161461121d576001600160a01b0382166000908152600260205260408120829161112261176f565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015611196576040805162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c0000604482015290519081900360640190fd5b6001600160a01b03821660009081526002602052604081206111e1916111ba61176f565b6001600160a01b03166001600160a01b031681526020019081526020016000205482611c24565b6001600160a01b03831660009081526002602052604081209061120261176f565b6001600160a01b031681526020810191909152604001600020555b6001600160a01b03821660009081526001602052604090205481111561128a576040805162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e6365000000604482015290519081900360640190fd5b6001600160a01b0382166000908152600160205260409020546112ad9082611c24565b6001600160a01b038316600090815260016020526040812091909155546112d49082611c24565b6000556040805182815290516001600160a01b038416917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a25050565b611325610b9961176f565b61136d576040805162461bcd60e51b8152602060048201526014602482015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604482015290519081900360640190fd5b610e3661137861176f565b82610d01565b611389610b9961176f565b6113d1576040805162461bcd60e51b8152602060048201526014602482015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604482015290519081900360640190fd5b6007805460ff19169055565b60006113f16113ea61176f565b8484610c4a565b9392505050565b6001600160a01b031660009081526009602052604090205490565b6003546001600160a01b031681565b60075460ff1681565b60075460ff161561148e57611441610b9961176f565b61148e576040805162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b604482015290519081900360640190fd5b428410156114e3576040805162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e65000000604482015290519081900360640190fd5b6040805180820182526002815261190160f01b60208083019182526008546001600160a01b03808d1660008181526009855287812080546001810190915588517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981880152808a0193909352928e166060830152608082018d905260a082019290925260c08082018c90528751808303909101815260e082019097528651969093019590952084519193909261010001918291908083835b602083106115ba5780518252601f19909201916020918201910161159b565b51815160209384036101000a6000190180199092169116179052920194855250838101929092525060408051808403830181528184018083528151918401919091206000918290526060850180845281905260ff8a16608086015260a0850189905260c085018890529151919550935060019260e08082019392601f1981019281900390910190855afa158015611655573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381161580159061168b5750886001600160a01b0316816001600160a01b0316145b6116dc576040805162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e61747572650000604482015290519081900360640190fd5b6001600160a01b03808a166000818152600260209081526040808320948d16808452948252918290208b905581518b815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050505050505050565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6000363330148015611782575060348110155b156118115760606000368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146117fd57339350505050610c47565b508101516001600160a01b0316915061181a565b33915050610c47565b5090565b6001600160a01b0316600090815260096020526040902080546001019055565b60006001600160a01b038316301415611859575060016108d6565b6004546001600160a01b0384811691161415611877575060016108d6565b6003546001600160a01b031661188f575060006108d6565b6003546040805163b700961360e01b81526001600160a01b0386811660048301523060248301526001600160e01b0319861660448301529151919092169163b7009613916064808301926020929190829003018186803b1580156118f257600080fd5b505afa158015611906573d6000803e3d6000fd5b505050506040513d602081101561191c57600080fd5b505190506108d6565b600061192f61176f565b6001600160a01b0316846001600160a01b031614611a64576001600160a01b0384166000908152600260205260408120839161196961176f565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156119dd576040805162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c0000604482015290519081900360640190fd5b6001600160a01b0384166000908152600260205260408120611a2891611a0161176f565b6001600160a01b03166001600160a01b031681526020019081526020016000205483611c24565b6001600160a01b038516600090815260026020526040812090611a4961176f565b6001600160a01b031681526020810191909152604001600020555b6001600160a01b038416600090815260016020526040902054821115611ad1576040805162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e6365000000604482015290519081900360640190fd5b6001600160a01b038416600090815260016020526040902054611af49083611c24565b6001600160a01b038086166000908152600160205260408082209390935590851681522054611b239083611b84565b6001600160a01b0380851660008181526001602090815260409182902094909455805186815290519193928816927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a35060019392505050565b808201828110156108d6576040805162461bcd60e51b815260206004820152601460248201527364732d6d6174682d6164642d6f766572666c6f7760601b604482015290519081900360640190fd5b604080517f19457468657265756d205369676e6564204d6573736167653a0a333200000000602080830191909152603c8083019490945282518083039094018452605c909101909152815191012090565b808203828111156108d6576040805162461bcd60e51b815260206004820152601560248201527464732d6d6174682d7375622d756e646572666c6f7760581b604482015290519081900360640190fdfe636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e7375636365737366756c6d6574617472616e73616374696f6e2d7369676e65722d7369676e61747572652d6d69736d61746368a264697066735822122055eeac2228dfae391826f6e9c9787a4f1714e9610e01479e0866abfee76d559864736f6c63430007030033", + "immutableReferences": {}, + "generatedSources": [], + "deployedGeneratedSources": [], + "sourceMap": "784:3430:47:-:0;;;1521:534;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1521:534:47;;;;;;;;;;-1:-1:-1;1521:534:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1521:534:47;;;;;;;;;;-1:-1:-1;1521:534:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1521:534:47;;;;;;-1:-1:-1;824:1:47;;-1:-1:-1;824:1:47;1285:9:46;824:1:47;1295:11:46;:9;:11::i;:::-;-1:-1:-1;;;;;1285:22:46;;;;;;;;;;;;-1:-1:-1;1285:22:46;;;:31;;;;1326:16;1007:11:45;:9;:11::i;:::-;999:5;:19;;-1:-1:-1;;;;;;999:19:45;-1:-1:-1;;;;;999:19:45;;;;;;;;;;1045:11;:9;:11::i;:::-;-1:-1:-1;;;;;1033:24:45;;;;;;;;;;;1600:12:47;;;;:4;;:12;;;;;:::i;:::-;-1:-1:-1;1618:16:47;;;;:6;;:16;;;;;:::i;:::-;-1:-1:-1;1640:8:47;:20;;-1:-1:-1;;;;1640:20:47;-1:-1:-1;;;1640:20:47;;;;;;;1666:6;:13;;-1:-1:-1;;1666:13:47;-1:-1:-1;1666:13:47;;;;;;1929:22;;1945:4;1929:22;;1737:9;;1820:95;;1929:22;;;1945:4;;1929:22;1640:20;1929:22;;;;;;;;-1:-1:-1;;1929:22:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;1929:22:47;;;;;;;;;1975:10;;;;;;;;-1:-1:-1;;;1975:10:47;;;;;1796:248;;;;;;;;;;;;;1965:21;1796:248;;;;;;;;;;;2029:4;1796:248;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;1777:273:47;;;;;1758:16;:292;-1:-1:-1;784:3430:47;;-1:-1:-1;;784:3430:47;197:737:33;240:22;290:8;318:10;340:4;318:27;:42;;;;;358:2;349:5;:11;;318:42;315:613;;;376:18;397:8;;376:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;486:26:33;;;-1:-1:-1;;486:26:33;480:33;376:29;;-1:-1:-1;162:28:33;544;;540:83;;598:10;591:17;;;;;;;540:83;-1:-1:-1;793:17:33;;787:24;-1:-1:-1;;;;;783:73:33;;-1:-1:-1;645:225:33;;;907:10;900:17;;;;;315:613;197:737;;;:::o;784:3430:47:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;784:3430:47;;;-1:-1:-1;784:3430:47;;;;;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "784:3430:47:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;892:18;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2421:194:46;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;2421:194:46;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;1268:712:22;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1268:712:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1268:712:22;;-1:-1:-1;;1268:712:22;;;-1:-1:-1;;;1268:712:22;;;;;;;;;;;:::i;1070:130:45:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1070:130:45;-1:-1:-1;;;;;1070:130:45;;:::i;:::-;;1355:90:46;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;2059:158:47;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;2059:158:47;;;;;;;;;;;;;;;;;:::i;3318:108::-;;;;;;;;;;;;;:::i;843:21::-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;750:133:34;;;;;;;;;;;;;:::i;937:31:47:-;;;;;;;;;;;;;:::i;2368:206::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;2368:206:47;;;;;;;;:::i;2297:67::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2297:67:47;;:::i;2206:431:22:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2206:431:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2206:431:22;;-1:-1:-1;;2206:431:22;;;-1:-1:-1;;;2206:431:22;;;;;;;;;;;:::i;1450:106:46:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1450:106:46;-1:-1:-1;;;;;1450:106:46;;:::i;1206:167:45:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1206:167:45;-1:-1:-1;;;;;1206:167:45;;:::i;942:26::-;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;942:26:45;;;;;;;;;;;;;;868:20:47;;;;;;;;;;;;;:::i;2578:427::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;2578:427:47;;;;;;;;:::i;2221:72::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2221:72:47;;:::i;3009:59::-;;;;;;;;;;;;;:::i;1692:134:46:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;1692:134:46;;;;;;;;:::i;1124:138:47:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1124:138:47;-1:-1:-1;;;;;1124:138:47;;:::i;906:30:45:-;;;;;;;;;;;;;:::i;915:18:47:-;;;;;;;;;;;;;:::i;3478:734::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;3478:734:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;1561:125:46:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;1561:125:46;;;;;;;;;;:::i;892:18:47:-;;;;;;;;;;;;;;;-1:-1:-1;;892:18:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;2421:194:46:-;2489:4;2536:3;2505:10;:23;2516:11;:9;:11::i;:::-;-1:-1:-1;;;;;2505:23:46;;;;;;;;;;;;;;;;;-1:-1:-1;2505:23:46;;;:28;;;;;;;;;;;;:34;;;;2564:11;:9;:11::i;:::-;-1:-1:-1;;;;;2555:31:46;;2582:3;2555:31;;;;;;;;;;;;;;;;;;-1:-1:-1;2604:4:46;2421:194;;;;;:::o;1268:712:22:-;1411:12;1442:90;1449:5;1456:30;1480:5;1456:23;:30::i;:::-;1488:12;:10;:12::i;:::-;1502:8;1512:5;1519;1526;1442:6;:90::i;:::-;1434:144;;;;-1:-1:-1;;;1434:144:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1586:36;1616:5;1586:29;:36::i;:::-;1700:12;1714:23;1749:4;-1:-1:-1;;;;;1741:18:22;1777:8;162:28:33;1809:5:22;1760:55;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;1760:55:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1760:55:22;;;;;;;;;;;;;;;;;;;;;;;;1741:75;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;1741:75:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1699:117;;;;1832:7;1824:60;;;;-1:-1:-1;;;1824:60:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1898:52;1922:5;1929:10;1941:8;1898:52;;;;-1:-1:-1;;;;;1898:52:22;;;;;;-1:-1:-1;;;;;1898:52:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1965:10;1268:712;-1:-1:-1;;;;;;;1268:712:22:o;1070:130:45:-;1411:34;1424:11;:9;:11::i;:::-;1437:7;;-1:-1:-1;;;;;;1437:7:45;1411:12;:34::i;:::-;1403:67;;;;;-1:-1:-1;;;1403:67:45;;;;;;;;;;;;-1:-1:-1;;;1403:67:45;;;;;;;;;;;;;;;1146:5:::1;:14:::0;;-1:-1:-1;;;;;;1146:14:45::1;-1:-1:-1::0;;;;;1146:14:45;;::::1;::::0;;;::::1;::::0;;;;1175:18:::1;::::0;1187:5;::::1;::::0;1175:18:::1;::::0;-1:-1:-1;;1175:18:45::1;1070:130:::0;:::o;1355:90:46:-;1408:4;1431:7;1355:90;;:::o;2059:158:47:-;1411:6;;2158:4;;1411:6;;1407:99;;;1435:34;1448:11;:9;:11::i;1435:34::-;1427:72;;;;;-1:-1:-1;;;1427:72:47;;;;;;;;;;;;-1:-1:-1;;;1427:72:47;;;;;;;;;;;;;;;2179:33:::1;2198:3;2203;2208;2179:18;:33::i;:::-;2172:40:::0;2059:158;-1:-1:-1;;;;2059:158:47:o;3318:108::-;3360:66;3318:108;:::o;843:21::-;;;-1:-1:-1;;;843:21:47;;;;;:::o;750:133:34:-;849:9;750:133;:::o;937:31:47:-;;;;:::o;2368:206::-;1411:34:45;1424:11;:9;:11::i;1411:34::-;1403:67;;;;;-1:-1:-1;;;1403:67:45;;;;;;;;;;;;-1:-1:-1;;;1403:67:45;;;;;;;;;;;;;;;-1:-1:-1;;;;;2447:14:47;::::1;;::::0;;;:9:::1;:14;::::0;;;;;2443:24:::1;::::0;2463:3;2443::::1;:24::i;:::-;-1:-1:-1::0;;;;;2426:14:47;::::1;;::::0;;;:9:::1;:14;::::0;;;;:41;;;;2487:7;2483:17:::1;::::0;2496:3;2483::::1;:17::i;:::-;2473:7;:27:::0;2512:14:::1;::::0;;;;;;;-1:-1:-1;;;;;2512:14:47;::::1;::::0;::::1;::::0;;;;;::::1;::::0;;::::1;2537:32;::::0;;;;;;;-1:-1:-1;;;;;2537:32:47;::::1;::::0;2554:3:::1;::::0;2537:32:::1;::::0;;;;::::1;::::0;;::::1;2368:206:::0;;:::o;2297:67::-;2337:22;2342:11;:9;:11::i;:::-;2355:3;2337:4;:22::i;:::-;2297:67;:::o;2206:431:22:-;2365:4;2380:12;2395:71;2431:6;2439:4;2445:8;2455;2414:50;;;;;;;;;;;-1:-1:-1;;;;;2414:50:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2414:50:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2404:61;;;;;;2395:8;:71::i;:::-;2380:86;;2474:14;2491:36;2501:4;2507:5;2514;2521;2491:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2491:36:22;;-1:-1:-1;;2491:36:22;;;-1:-1:-1;;;;;;;2543:20:22;;2535:64;;;;;-1:-1:-1;;;2535:64:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2615:16:22;;;;;;;-1:-1:-1;;2206:431:22;;;;;;;;;:::o;1450:106:46:-;-1:-1:-1;;;;;1535:14:46;1512:4;1535:14;;;:9;:14;;;;;;;1450:106::o;1206:167:45:-;1411:34;1424:11;:9;:11::i;1411:34::-;1403:67;;;;;-1:-1:-1;;;1403:67:45;;;;;;;;;;;;-1:-1:-1;;;1403:67:45;;;;;;;;;;;;;;;1294:9:::1;:22:::0;;-1:-1:-1;;;;;;1294:22:45::1;-1:-1:-1::0;;;;;1294:22:45;;::::1;::::0;;;::::1;::::0;;;;1331:35:::1;::::0;1355:9;::::1;::::0;1331:35:::1;::::0;-1:-1:-1;;1331:35:45::1;1206:167:::0;:::o;942:26::-;;;-1:-1:-1;;;;;942:26:45;;:::o;868:20:47:-;;;;;;;;;;;;;;;-1:-1:-1;;868:20:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2578:427;2642:11;:9;:11::i;:::-;-1:-1:-1;;;;;2635:18:47;:3;-1:-1:-1;;;;;2635:18:47;;2631:194;;-1:-1:-1;;;;;2671:15:47;;;;;;:10;:15;;;;;2703:3;;2687:11;:9;:11::i;:::-;-1:-1:-1;;;;;2671:28:47;-1:-1:-1;;;;;2671:28:47;;;;;;;;;;;;;:35;;2663:78;;;;;-1:-1:-1;;;2663:78:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2784:15:47;;;;;;:10;:15;;;;;2780:38;;2800:11;:9;:11::i;:::-;-1:-1:-1;;;;;2784:28:47;-1:-1:-1;;;;;2784:28:47;;;;;;;;;;;;;2814:3;2780;:38::i;:::-;-1:-1:-1;;;;;2749:15:47;;;;;;:10;:15;;;;;;2765:11;:9;:11::i;:::-;-1:-1:-1;;;;;2749:28:47;;;;;;;;;;;;-1:-1:-1;2749:28:47;:69;2631:194;-1:-1:-1;;;;;2839:14:47;;;;;;:9;:14;;;;;;:21;-1:-1:-1;2839:21:47;2831:63;;;;;-1:-1:-1;;;2831:63:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2921:14:47;;;;;;:9;:14;;;;;;2917:24;;2937:3;2917;:24::i;:::-;-1:-1:-1;;;;;2900:14:47;;;;;;:9;:14;;;;;:41;;;;2961:7;2957:17;;2970:3;2957;:17::i;:::-;2947:7;:27;2986:14;;;;;;;;-1:-1:-1;;;;;2986:14:47;;;;;;;;;;;;;2578:427;;:::o;2221:72::-;1411:34:45;1424:11;:9;:11::i;1411:34::-;1403:67;;;;;-1:-1:-1;;;1403:67:45;;;;;;;;;;;;-1:-1:-1;;;1403:67:45;;;;;;;;;;;;;;;2266:22:47::1;2271:11;:9;:11::i;:::-;2284:3;2266:4;:22::i;3009:59::-:0;1411:34:45;1424:11;:9;:11::i;1411:34::-;1403:67;;;;;-1:-1:-1;;;1403:67:45;;;;;;;;;;;;-1:-1:-1;;;1403:67:45;;;;;;;;;;;;;;;3049:6:47::1;:14:::0;;-1:-1:-1;;3049:14:47::1;::::0;;3009:59::o;1692:134:46:-;1761:4;1784:35;1797:11;:9;:11::i;:::-;1810:3;1815;1784:12;:35::i;:::-;1777:42;1692:134;-1:-1:-1;;;1692:134:46:o;1124:138:47:-;-1:-1:-1;;;;;1229:28:47;1202:13;1229:28;;;:21;:28;;;;;;;1124:138::o;906:30:45:-;;;-1:-1:-1;;;;;906:30:45;;:::o;915:18:47:-;;;;;;:::o;3478:734::-;1411:6;;;;1407:99;;;1435:34;1448:11;:9;:11::i;1435:34::-;1427:72;;;;;-1:-1:-1;;;1427:72:47;;;;;;;;;;;;-1:-1:-1;;;1427:72:47;;;;;;;;;;;;;;;3636:15:::1;3624:8;:27;;3616:69;;;::::0;;-1:-1:-1;;;3616:69:47;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;::::1;::::0;;;;;;;;;;;;;::::1;;3764:14;::::0;;;;::::1;::::0;;::::1;::::0;;-1:-1:-1;;;3764:14:47::1;::::0;;::::1;::::0;;;3794:16:::1;::::0;-1:-1:-1;;;;;3887:28:47;;::::1;3694:14;3887:28:::0;;;:21:::1;:28:::0;;;;;:30;;::::1;::::0;::::1;::::0;;;3836:92;;3360:66:::1;3836:92:::0;;::::1;::::0;;;;;;;;;;::::1;::::0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3826:103;;;;;::::1;::::0;;;;3732:209;;3794:16;;3826:103;;3732:209;;;;;3764:14;3732:209;;3764:14;3732:209:::1;;;;;;::::0;;;;-1:-1:-1;;3732:209:47;;;;::::1;::::0;;::::1;::::0;::::1;;;;::::0;;;::::1;::::0;;::::1;;;-1:-1:-1::0;;3732:209:47;;::::1;::::0;;::::1;::::0;::::1;;::::0;;;::::1;::::0;;;-1:-1:-1;3732:209:47;;::::1;::::0;;;;-1:-1:-1;3732:209:47;;;;;;;;;;;;;;;;3711:238;;;;::::1;::::0;;;;-1:-1:-1;3984:26:47;;;;;;;;;;;;;::::1;::::0;::::1;::::0;;;;;;;;;;;;;;;;;;3711:238;;-1:-1:-1;;;3732:209:47::1;::::0;3984:26;;;;;3732:209;-1:-1:-1;;3984:26:47;;;;;;;;;;3732:209;3984:26:::1;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;3984:26:47::1;::::0;-1:-1:-1;;3984:26:47;;;-1:-1:-1;;;;;;;4026:30:47;::::1;::::0;;::::1;::::0;:59:::1;;;4080:5;-1:-1:-1::0;;;;;4060:25:47::1;:16;-1:-1:-1::0;;;;;4060:25:47::1;;4026:59;4018:102;;;::::0;;-1:-1:-1;;;4018:102:47;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;::::1;::::0;;;;;;;;;;;;;::::1;;-1:-1:-1::0;;;;;4128:17:47;;::::1;;::::0;;;:10:::1;:17;::::0;;;;;;;:26;;::::1;::::0;;;;;;;;;;:34;;;4176:31;;;;;;;::::1;::::0;;;;;;;;::::1;1511:1;;3478:734:::0;;;;;;;:::o;1561:125:46:-;-1:-1:-1;;;;;1659:15:46;;;1636:4;1659:15;;;:10;:15;;;;;;;;:20;;;;;;;;;;;;;1561:125::o;197:737:33:-;240:22;290:8;318:10;340:4;318:27;:42;;;;;358:2;349:5;:11;;318:42;315:613;;;376:18;397:8;;376:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;486:26:33;;;-1:-1:-1;;486:26:33;480:33;376:29;;-1:-1:-1;162:28:33;544;;540:83;;598:10;591:17;;;;;;;540:83;-1:-1:-1;793:17:33;;787:24;-1:-1:-1;;;;;783:73:33;;-1:-1:-1;645:225:33;;;907:10;900:17;;;;;315:613;197:737;;:::o;1266:113:47:-;-1:-1:-1;;;;;1344:28:47;;;;;:21;:28;;;;;:30;;;;;;1266:113::o;1494:370:45:-;1564:4;-1:-1:-1;;;;;1584:20:45;;1599:4;1584:20;1580:278;;;-1:-1:-1;1627:4:45;1620:11;;1580:278;1659:5;;-1:-1:-1;;;;;1652:12:45;;;1659:5;;1652:12;1648:210;;;-1:-1:-1;1687:4:45;1680:11;;1648:210;1712:9;;-1:-1:-1;;;;;1712:9:45;1708:150;;-1:-1:-1;1762:5:45;1755:12;;1708:150;1805:9;;:42;;;-1:-1:-1;;;1805:42:45;;-1:-1:-1;;;;;1805:42:45;;;;;;;1836:4;1805:42;;;;-1:-1:-1;;;;;;1805:42:45;;;;;;;;:9;;;;;:17;;:42;;;;;;;;;;;;;;:9;:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1805:42:45;;-1:-1:-1;1798:49:45;;1832:583:46;1942:4;1973:11;:9;:11::i;:::-;-1:-1:-1;;;;;1966:18:46;:3;-1:-1:-1;;;;;1966:18:46;;1962:210;;-1:-1:-1;;;;;2008:15:46;;;;;;:10;:15;;;;;2040:3;;2024:11;:9;:11::i;:::-;-1:-1:-1;;;;;2008:28:46;-1:-1:-1;;;;;2008:28:46;;;;;;;;;;;;;:35;;2000:78;;;;;-1:-1:-1;;;2000:78:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2127:15:46;;;;;;:10;:15;;;;;2123:38;;2143:11;:9;:11::i;:::-;-1:-1:-1;;;;;2127:28:46;-1:-1:-1;;;;;2127:28:46;;;;;;;;;;;;;2157:3;2123;:38::i;:::-;-1:-1:-1;;;;;2092:15:46;;;;;;:10;:15;;;;;;2108:11;:9;:11::i;:::-;-1:-1:-1;;;;;2092:28:46;;;;;;;;;;;;-1:-1:-1;2092:28:46;:69;1962:210;-1:-1:-1;;;;;2190:14:46;;;;;;:9;:14;;;;;;:21;-1:-1:-1;2190:21:46;2182:63;;;;;-1:-1:-1;;;2182:63:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2276:14:46;;;;;;:9;:14;;;;;;2272:24;;2292:3;2272;:24::i;:::-;-1:-1:-1;;;;;2255:14:46;;;;;;;:9;:14;;;;;;:41;;;;2327:14;;;;;;;2323:24;;2343:3;2323;:24::i;:::-;-1:-1:-1;;;;;2306:14:46;;;;;;;:9;:14;;;;;;;;;:41;;;;2363:23;;;;;;;2306:14;;2363:23;;;;;;;;;;;;;-1:-1:-1;2404:4:46;1832:583;;;;;:::o;744:126:79:-;827:5;;;822:16;;;;814:49;;;;;-1:-1:-1;;;814:49:79;;;;;;;;;;;;-1:-1:-1;;;814:49:79;;;;;;;;;;;;;;2047:155:22;2137:59;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2127:70;;;;;;2047:155::o;875:127:79:-;958:5;;;953:16;;;;945:50;;;;;-1:-1:-1;;;945:50:79;;;;;;;;;;;;-1:-1:-1;;;945:50:79;;;;;;;;;;;;;", + "source": "/*\n This file is part of The Colony Network.\n\n The Colony Network is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n The Colony Network is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with The Colony Network. If not, see .\n*/\n\npragma solidity 0.7.3;\n\nimport \"./DSTokenBaseMeta.sol\";\nimport \"./DSAuthMeta.sol\";\n\ncontract MetaTxToken is DSTokenBaseMeta(0), DSAuthMeta {\n uint8 public decimals;\n string public symbol;\n string public name;\n\n bool public locked;\n bytes32 public DOMAIN_SEPARATOR;\n\n mapping(address => uint256) metatransactionNonces;\n\n event Mint(address indexed guy, uint256 wad);\n event Burn(address indexed guy, uint256 wad);\n\n function getMetatransactionNonce(address _user) override public view returns (uint256 nonce){\n return metatransactionNonces[_user];\n }\n\n function incrementMetatransactionNonce(address _user) override internal {\n metatransactionNonces[_user]++;\n }\n\n modifier unlocked {\n if (locked) {\n require(isAuthorized(msgSender(), msg.sig), \"colony-token-unauthorised\");\n }\n _;\n }\n\n constructor(string memory _name, string memory _symbol, uint8 _decimals) {\n name = _name;\n symbol = _symbol;\n decimals = _decimals;\n locked = true;\n\n uint256 chainId;\n assembly {\n chainId := chainid()\n }\n\n DOMAIN_SEPARATOR = keccak256(\n abi.encode(\n keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"),\n keccak256(bytes(name)),\n keccak256(bytes(\"1\")),\n chainId,\n address(this)\n )\n );\n }\n\n function transferFrom(address src, address dst, uint256 wad) public\n unlocked override\n returns (bool)\n {\n return super.transferFrom(src, dst, wad);\n }\n\n function mint(uint256 wad) public auth {\n mint(msgSender(), wad);\n }\n\n function burn(uint256 wad) public {\n burn(msgSender(), wad);\n }\n\n function mint(address guy, uint256 wad) public auth {\n _balances[guy] = add(_balances[guy], wad);\n _supply = add(_supply, wad);\n\n emit Mint(guy, wad);\n emit Transfer(address(0x0), guy, wad);\n }\n\n function burn(address guy, uint256 wad) public {\n if (guy != msgSender()) {\n require(_approvals[guy][msgSender()] >= wad, \"ds-token-insufficient-approval\");\n _approvals[guy][msgSender()] = sub(_approvals[guy][msgSender()], wad);\n }\n\n require(_balances[guy] >= wad, \"ds-token-insufficient-balance\");\n _balances[guy] = sub(_balances[guy], wad);\n _supply = sub(_supply, wad);\n\n emit Burn(guy, wad);\n }\n\n function unlock() public\n auth\n {\n locked = false;\n }\n\n // Pinched from https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol\n // Which is also licenced under GPL V3\n\n // keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\");\n bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;\n string constant EIP_712_PREFIX = \"\\x19\\x01\";\n\n function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external unlocked {\n require(deadline >= block.timestamp, \"colony-token-expired-deadline\");\n\n bytes32 digest = keccak256(\n abi.encodePacked(\n EIP_712_PREFIX,\n DOMAIN_SEPARATOR,\n keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, metatransactionNonces[owner]++, deadline))\n )\n );\n address recoveredAddress = ecrecover(digest, v, r, s);\n require(recoveredAddress != address(0) && recoveredAddress == owner, \"colony-token-invalid-signature\");\n _approvals[owner][spender] = value;\n\n emit Approval(owner, spender, value);\n }\n}", + "sourcePath": "/home/alex/colony/colonyNetwork/contracts/metatxToken/MetaTxToken.sol", + "ast": { + "absolutePath": "/home/alex/colony/colonyNetwork/contracts/metatxToken/MetaTxToken.sol", + "exportedSymbols": { + "BasicMetaTransaction": [ + 17484 + ], + "DSAuth": [ + 37393 + ], + "DSAuthEvents": [ + 37276 + ], + "DSAuthMeta": [ + 27005 + ], + "DSAuthority": [ + 37267 + ], + "DSMath": [ + 37749 + ], + "DSTokenBaseMeta": [ + 27219 + ], + "ERC20": [ + 37465 + ], + "ERC20Events": [ + 37412 + ], + "ERC20Extended": [ + 18388 + ], + "MetaTransactionMsgSender": [ + 18604 + ], + "MetaTxToken": [ + 27625 + ], + "MultiChain": [ + 18679 + ] + }, + "id": 27626, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 27221, + "literals": [ + "solidity", + "0.7", + ".3" + ], + "nodeType": "PragmaDirective", + "src": "700:22:47" + }, + { + "absolutePath": "/home/alex/colony/colonyNetwork/contracts/metatxToken/DSTokenBaseMeta.sol", + "file": "./DSTokenBaseMeta.sol", + "id": 27222, + "nodeType": "ImportDirective", + "scope": 27626, + "sourceUnit": 27220, + "src": "724:31:47", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/alex/colony/colonyNetwork/contracts/metatxToken/DSAuthMeta.sol", + "file": "./DSAuthMeta.sol", + "id": 27223, + "nodeType": "ImportDirective", + "scope": 27626, + "sourceUnit": 27006, + "src": "756:26:47", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": [ + { + "hexValue": "30", + "id": 27225, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "824:1:47", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "baseName": { + "id": 27224, + "name": "DSTokenBaseMeta", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 27219, + "src": "808:15:47", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DSTokenBaseMeta_$27219", + "typeString": "contract DSTokenBaseMeta" + } + }, + "id": 27226, + "nodeType": "InheritanceSpecifier", + "src": "808:18:47" + }, + { + "baseName": { + "id": 27227, + "name": "DSAuthMeta", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 27005, + "src": "828:10:47", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DSAuthMeta_$27005", + "typeString": "contract DSAuthMeta" + } + }, + "id": 27228, + "nodeType": "InheritanceSpecifier", + "src": "828:10:47" + } + ], + "contractDependencies": [ + 17484, + 18604, + 18679, + 27005, + 27219, + 37276, + 37412, + 37465, + 37749 + ], + "contractKind": "contract", + "fullyImplemented": true, + "id": 27625, + "linearizedBaseContracts": [ + 27625, + 27005, + 27219, + 17484, + 18679, + 18604, + 37749, + 37276, + 37465, + 37412 + ], + "name": "MetaTxToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "313ce567", + "id": 27230, + "mutability": "mutable", + "name": "decimals", + "nodeType": "VariableDeclaration", + "scope": 27625, + "src": "843:21:47", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 27229, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "843:5:47", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "95d89b41", + "id": 27232, + "mutability": "mutable", + "name": "symbol", + "nodeType": "VariableDeclaration", + "scope": 27625, + "src": "868:20:47", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 27231, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "868:6:47", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "06fdde03", + "id": 27234, + "mutability": "mutable", + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 27625, + "src": "892:18:47", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 27233, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "892:6:47", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "cf309012", + "id": 27236, + "mutability": "mutable", + "name": "locked", + "nodeType": "VariableDeclaration", + "scope": 27625, + "src": "915:18:47", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 27235, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "915:4:47", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "3644e515", + "id": 27238, + "mutability": "mutable", + "name": "DOMAIN_SEPARATOR", + "nodeType": "VariableDeclaration", + "scope": 27625, + "src": "937:31:47", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 27237, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "937:7:47", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "public" + }, + { + "constant": false, + "id": 27242, + "mutability": "mutable", + "name": "metatransactionNonces", + "nodeType": "VariableDeclaration", + "scope": 27625, + "src": "973:49:47", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 27241, + "keyType": { + "id": 27239, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "981:7:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "973:27:47", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 27240, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "992:7:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "internal" + }, + { + "anonymous": false, + "id": 27248, + "name": "Mint", + "nodeType": "EventDefinition", + "parameters": { + "id": 27247, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 27244, + "indexed": true, + "mutability": "mutable", + "name": "guy", + "nodeType": "VariableDeclaration", + "scope": 27248, + "src": "1038:19:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 27243, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1038:7:47", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 27246, + "indexed": false, + "mutability": "mutable", + "name": "wad", + "nodeType": "VariableDeclaration", + "scope": 27248, + "src": "1059:11:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 27245, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1059:7:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1037:34:47" + }, + "src": "1027:45:47" + }, + { + "anonymous": false, + "id": 27254, + "name": "Burn", + "nodeType": "EventDefinition", + "parameters": { + "id": 27253, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 27250, + "indexed": true, + "mutability": "mutable", + "name": "guy", + "nodeType": "VariableDeclaration", + "scope": 27254, + "src": "1086:19:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 27249, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1086:7:47", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 27252, + "indexed": false, + "mutability": "mutable", + "name": "wad", + "nodeType": "VariableDeclaration", + "scope": 27254, + "src": "1107:11:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 27251, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1107:7:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1085:34:47" + }, + "src": "1075:45:47" + }, + { + "baseFunctions": [ + 17336 + ], + "body": { + "id": 27266, + "nodeType": "Block", + "src": "1216:46:47", + "statements": [ + { + "expression": { + "baseExpression": { + "id": 27262, + "name": "metatransactionNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27242, + "src": "1229:21:47", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 27264, + "indexExpression": { + "id": 27263, + "name": "_user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27256, + "src": "1251:5:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1229:28:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 27261, + "id": 27265, + "nodeType": "Return", + "src": "1222:35:47" + } + ] + }, + "functionSelector": "b3eac1d8", + "id": 27267, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getMetatransactionNonce", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 27258, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1172:8:47" + }, + "parameters": { + "id": 27257, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 27256, + "mutability": "mutable", + "name": "_user", + "nodeType": "VariableDeclaration", + "scope": 27267, + "src": "1157:13:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 27255, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1157:7:47", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1156:15:47" + }, + "returnParameters": { + "id": 27261, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 27260, + "mutability": "mutable", + "name": "nonce", + "nodeType": "VariableDeclaration", + "scope": 27267, + "src": "1202:13:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 27259, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1202:7:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1201:15:47" + }, + "scope": 27625, + "src": "1124:138:47", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 17341 + ], + "body": { + "id": 27278, + "nodeType": "Block", + "src": "1338:41:47", + "statements": [ + { + "expression": { + "id": 27276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "1344:30:47", + "subExpression": { + "baseExpression": { + "id": 27273, + "name": "metatransactionNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27242, + "src": "1344:21:47", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 27275, + "indexExpression": { + "id": 27274, + "name": "_user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27269, + "src": "1366:5:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1344:28:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 27277, + "nodeType": "ExpressionStatement", + "src": "1344:30:47" + } + ] + }, + "id": 27279, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "incrementMetatransactionNonce", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 27271, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1320:8:47" + }, + "parameters": { + "id": 27270, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 27269, + "mutability": "mutable", + "name": "_user", + "nodeType": "VariableDeclaration", + "scope": 27279, + "src": "1305:13:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 27268, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1305:7:47", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1304:15:47" + }, + "returnParameters": { + "id": 27272, + "nodeType": "ParameterList", + "parameters": [], + "src": "1338:0:47" + }, + "scope": 27625, + "src": "1266:113:47", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 27295, + "nodeType": "Block", + "src": "1401:116:47", + "statements": [ + { + "condition": { + "id": 27281, + "name": "locked", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27236, + "src": "1411:6:47", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 27293, + "nodeType": "IfStatement", + "src": "1407:99:47", + "trueBody": { + "id": 27292, + "nodeType": "Block", + "src": "1419:87:47", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 27284, + "name": "msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18603, + "src": "1448:9:47", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 27285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1448:11:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "expression": { + "id": 27286, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1461:3:47", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 27287, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sig", + "nodeType": "MemberAccess", + "src": "1461:7:47", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + ], + "id": 27283, + "name": "isAuthorized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27004, + "src": "1435:12:47", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_bytes4_$returns$_t_bool_$", + "typeString": "function (address,bytes4) view returns (bool)" + } + }, + "id": 27288, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1435:34:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "636f6c6f6e792d746f6b656e2d756e617574686f7269736564", + "id": 27289, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1471:27:47", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d37c89ab35379dbbb026297d255b69ea134b61b163699a001e9dbf9a490c7cf2", + "typeString": "literal_string \"colony-token-unauthorised\"" + }, + "value": "colony-token-unauthorised" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d37c89ab35379dbbb026297d255b69ea134b61b163699a001e9dbf9a490c7cf2", + "typeString": "literal_string \"colony-token-unauthorised\"" + } + ], + "id": 27282, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1427:7:47", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 27290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1427:72:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 27291, + "nodeType": "ExpressionStatement", + "src": "1427:72:47" + } + ] + } + }, + { + "id": 27294, + "nodeType": "PlaceholderStatement", + "src": "1511:1:47" + } + ] + }, + "id": 27296, + "name": "unlocked", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 27280, + "nodeType": "ParameterList", + "parameters": [], + "src": "1401:0:47" + }, + "src": "1383:134:47", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 27353, + "nodeType": "Block", + "src": "1594:461:47", + "statements": [ + { + "expression": { + "id": 27307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 27305, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27234, + "src": "1600:4:47", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 27306, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27298, + "src": "1607:5:47", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "1600:12:47", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 27308, + "nodeType": "ExpressionStatement", + "src": "1600:12:47" + }, + { + "expression": { + "id": 27311, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 27309, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27232, + "src": "1618:6:47", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 27310, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27300, + "src": "1627:7:47", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "1618:16:47", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 27312, + "nodeType": "ExpressionStatement", + "src": "1618:16:47" + }, + { + "expression": { + "id": 27315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 27313, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27230, + "src": "1640:8:47", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 27314, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27302, + "src": "1651:9:47", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "1640:20:47", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 27316, + "nodeType": "ExpressionStatement", + "src": "1640:20:47" + }, + { + "expression": { + "id": 27319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 27317, + "name": "locked", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27236, + "src": "1666:6:47", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 27318, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1675:4:47", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1666:13:47", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 27320, + "nodeType": "ExpressionStatement", + "src": "1666:13:47" + }, + { + "assignments": [ + 27322 + ], + "declarations": [ + { + "constant": false, + "id": 27322, + "mutability": "mutable", + "name": "chainId", + "nodeType": "VariableDeclaration", + "scope": 27353, + "src": "1686:15:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 27321, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1686:7:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 27323, + "nodeType": "VariableDeclarationStatement", + "src": "1686:15:47" + }, + { + "AST": { + "nodeType": "YulBlock", + "src": "1716:36:47", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1726:20:47", + "value": { + "arguments": [], + "functionName": { + "name": "chainid", + "nodeType": "YulIdentifier", + "src": "1737:7:47" + }, + "nodeType": "YulFunctionCall", + "src": "1737:9:47" + }, + "variableNames": [ + { + "name": "chainId", + "nodeType": "YulIdentifier", + "src": "1726:7:47" + } + ] + } + ] + }, + "evmVersion": "istanbul", + "externalReferences": [ + { + "declaration": 27322, + "isOffset": false, + "isSlot": false, + "src": "1726:7:47", + "valueSize": 1 + } + ], + "id": 27324, + "nodeType": "InlineAssembly", + "src": "1707:45:47" + }, + { + "expression": { + "id": 27351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 27325, + "name": "DOMAIN_SEPARATOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27238, + "src": "1758:16:47", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "hexValue": "454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429", + "id": 27330, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1830:84:47", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f", + "typeString": "literal_string \"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"" + }, + "value": "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f", + "typeString": "literal_string \"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"" + } + ], + "id": 27329, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "1820:9:47", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 27331, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1820:95:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "id": 27335, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27234, + "src": "1945:4:47", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + ], + "id": 27334, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1939:5:47", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 27333, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1939:5:47", + "typeDescriptions": {} + } + }, + "id": 27336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1939:11:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes storage pointer" + } + ], + "id": 27332, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "1929:9:47", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 27337, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1929:22:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "hexValue": "31", + "id": 27341, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1981:3:47", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6", + "typeString": "literal_string \"1\"" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6", + "typeString": "literal_string \"1\"" + } + ], + "id": 27340, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1975:5:47", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 27339, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1975:5:47", + "typeDescriptions": {} + } + }, + "id": 27342, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1975:10:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 27338, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "1965:9:47", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 27343, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1965:21:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 27344, + "name": "chainId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27322, + "src": "2000:7:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [ + { + "id": 27347, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "2029:4:47", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MetaTxToken_$27625", + "typeString": "contract MetaTxToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_MetaTxToken_$27625", + "typeString": "contract MetaTxToken" + } + ], + "id": 27346, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2021:7:47", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 27345, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2021:7:47", + "typeDescriptions": {} + } + }, + "id": 27348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2021:13:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 27327, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "1796:3:47", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 27328, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encode", + "nodeType": "MemberAccess", + "src": "1796:10:47", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 27349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1796:248:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 27326, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "1777:9:47", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 27350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1777:273:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "1758:292:47", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 27352, + "nodeType": "ExpressionStatement", + "src": "1758:292:47" + } + ] + }, + "id": 27354, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 27303, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 27298, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "scope": 27354, + "src": "1533:19:47", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 27297, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1533:6:47", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 27300, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "scope": 27354, + "src": "1554:21:47", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 27299, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1554:6:47", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 27302, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "scope": 27354, + "src": "1577:15:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 27301, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1577:5:47", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "1532:61:47" + }, + "returnParameters": { + "id": 27304, + "nodeType": "ParameterList", + "parameters": [], + "src": "1594:0:47" + }, + "scope": 27625, + "src": "1521:534:47", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 27189 + ], + "body": { + "id": 27375, + "nodeType": "Block", + "src": "2166:51:47", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 27370, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27356, + "src": "2198:3:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 27371, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27358, + "src": "2203:3:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 27372, + "name": "wad", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27360, + "src": "2208:3:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 27368, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "2179:5:47", + "typeDescriptions": { + "typeIdentifier": "t_super$_MetaTxToken_$27625", + "typeString": "contract super MetaTxToken" + } + }, + "id": 27369, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 27189, + "src": "2179:18:47", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) returns (bool)" + } + }, + "id": 27373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2179:33:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 27367, + "id": 27374, + "nodeType": "Return", + "src": "2172:40:47" + } + ] + }, + "functionSelector": "23b872dd", + "id": 27376, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 27363, + "modifierName": { + "id": 27362, + "name": "unlocked", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27296, + "src": "2129:8:47", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2129:8:47" + } + ], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 27364, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2138:8:47" + }, + "parameters": { + "id": 27361, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 27356, + "mutability": "mutable", + "name": "src", + "nodeType": "VariableDeclaration", + "scope": 27376, + "src": "2081:11:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 27355, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2081:7:47", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 27358, + "mutability": "mutable", + "name": "dst", + "nodeType": "VariableDeclaration", + "scope": 27376, + "src": "2094:11:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 27357, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2094:7:47", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 27360, + "mutability": "mutable", + "name": "wad", + "nodeType": "VariableDeclaration", + "scope": 27376, + "src": "2107:11:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 27359, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2107:7:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2080:39:47" + }, + "returnParameters": { + "id": 27367, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 27366, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 27376, + "src": "2158:4:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 27365, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2158:4:47", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2157:6:47" + }, + "scope": 27625, + "src": "2059:158:47", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 27389, + "nodeType": "Block", + "src": "2260:33:47", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 27384, + "name": "msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18603, + "src": "2271:9:47", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 27385, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2271:11:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 27386, + "name": "wad", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27378, + "src": "2284:3:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 27383, + "name": "mint", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 27390, + 27444 + ], + "referencedDeclaration": 27444, + "src": "2266:4:47", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 27387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2266:22:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 27388, + "nodeType": "ExpressionStatement", + "src": "2266:22:47" + } + ] + }, + "functionSelector": "a0712d68", + "id": 27390, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 27381, + "modifierName": { + "id": 27380, + "name": "auth", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 26957, + "src": "2255:4:47", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2255:4:47" + } + ], + "name": "mint", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 27379, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 27378, + "mutability": "mutable", + "name": "wad", + "nodeType": "VariableDeclaration", + "scope": 27390, + "src": "2235:11:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 27377, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2235:7:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2234:13:47" + }, + "returnParameters": { + "id": 27382, + "nodeType": "ParameterList", + "parameters": [], + "src": "2260:0:47" + }, + "scope": 27625, + "src": "2221:72:47", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 27401, + "nodeType": "Block", + "src": "2331:33:47", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 27396, + "name": "msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18603, + "src": "2342:9:47", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 27397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2342:11:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 27398, + "name": "wad", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27392, + "src": "2355:3:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 27395, + "name": "burn", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 27402, + 27519 + ], + "referencedDeclaration": 27519, + "src": "2337:4:47", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 27399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2337:22:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 27400, + "nodeType": "ExpressionStatement", + "src": "2337:22:47" + } + ] + }, + "functionSelector": "42966c68", + "id": 27402, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "burn", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 27393, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 27392, + "mutability": "mutable", + "name": "wad", + "nodeType": "VariableDeclaration", + "scope": 27402, + "src": "2311:11:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 27391, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2311:7:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2310:13:47" + }, + "returnParameters": { + "id": 27394, + "nodeType": "ParameterList", + "parameters": [], + "src": "2331:0:47" + }, + "scope": 27625, + "src": "2297:67:47", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 27443, + "nodeType": "Block", + "src": "2420:154:47", + "statements": [ + { + "expression": { + "id": 27420, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 27411, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27022, + "src": "2426:9:47", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 27413, + "indexExpression": { + "id": 27412, + "name": "guy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27404, + "src": "2436:3:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2426:14:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "baseExpression": { + "id": 27415, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27022, + "src": "2447:9:47", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 27417, + "indexExpression": { + "id": 27416, + "name": "guy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27404, + "src": "2457:3:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2447:14:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 27418, + "name": "wad", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27406, + "src": "2463:3:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 27414, + "name": "add", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37489, + "src": "2443:3:47", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 27419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2443:24:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2426:41:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 27421, + "nodeType": "ExpressionStatement", + "src": "2426:41:47" + }, + { + "expression": { + "id": 27427, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 27422, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27018, + "src": "2473:7:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 27424, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27018, + "src": "2487:7:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 27425, + "name": "wad", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27406, + "src": "2496:3:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 27423, + "name": "add", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37489, + "src": "2483:3:47", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 27426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2483:17:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2473:27:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 27428, + "nodeType": "ExpressionStatement", + "src": "2473:27:47" + }, + { + "eventCall": { + "arguments": [ + { + "id": 27430, + "name": "guy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27404, + "src": "2517:3:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 27431, + "name": "wad", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27406, + "src": "2522:3:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 27429, + "name": "Mint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27248, + "src": "2512:4:47", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 27432, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2512:14:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 27433, + "nodeType": "EmitStatement", + "src": "2507:19:47" + }, + { + "eventCall": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "307830", + "id": 27437, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2554:3:47", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 27436, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2546:7:47", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 27435, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2546:7:47", + "typeDescriptions": {} + } + }, + "id": 27438, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2546:12:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 27439, + "name": "guy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27404, + "src": "2560:3:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 27440, + "name": "wad", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27406, + "src": "2565:3:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 27434, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37411, + "src": "2537:8:47", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 27441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2537:32:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 27442, + "nodeType": "EmitStatement", + "src": "2532:37:47" + } + ] + }, + "functionSelector": "40c10f19", + "id": 27444, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 27409, + "modifierName": { + "id": 27408, + "name": "auth", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 26957, + "src": "2415:4:47", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2415:4:47" + } + ], + "name": "mint", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 27407, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 27404, + "mutability": "mutable", + "name": "guy", + "nodeType": "VariableDeclaration", + "scope": 27444, + "src": "2382:11:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 27403, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2382:7:47", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 27406, + "mutability": "mutable", + "name": "wad", + "nodeType": "VariableDeclaration", + "scope": 27444, + "src": "2395:11:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 27405, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2395:7:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2381:26:47" + }, + "returnParameters": { + "id": 27410, + "nodeType": "ParameterList", + "parameters": [], + "src": "2420:0:47" + }, + "scope": 27625, + "src": "2368:206:47", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 27518, + "nodeType": "Block", + "src": "2625:380:47", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 27454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 27451, + "name": "guy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27446, + "src": "2635:3:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 27452, + "name": "msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18603, + "src": "2642:9:47", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 27453, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2642:11:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2635:18:47", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 27485, + "nodeType": "IfStatement", + "src": "2631:194:47", + "trueBody": { + "id": 27484, + "nodeType": "Block", + "src": "2655:170:47", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 27463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "baseExpression": { + "id": 27456, + "name": "_approvals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27028, + "src": "2671:10:47", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 27458, + "indexExpression": { + "id": 27457, + "name": "guy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27446, + "src": "2682:3:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2671:15:47", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 27461, + "indexExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 27459, + "name": "msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18603, + "src": "2687:9:47", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 27460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2687:11:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2671:28:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 27462, + "name": "wad", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27448, + "src": "2703:3:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2671:35:47", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "64732d746f6b656e2d696e73756666696369656e742d617070726f76616c", + "id": 27464, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2708:32:47", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_696d4069430cf8d6cb2027cca74c9eeb7bde4a18fa913c0c20fafe3803d09463", + "typeString": "literal_string \"ds-token-insufficient-approval\"" + }, + "value": "ds-token-insufficient-approval" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_696d4069430cf8d6cb2027cca74c9eeb7bde4a18fa913c0c20fafe3803d09463", + "typeString": "literal_string \"ds-token-insufficient-approval\"" + } + ], + "id": 27455, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2663:7:47", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 27465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2663:78:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 27466, + "nodeType": "ExpressionStatement", + "src": "2663:78:47" + }, + { + "expression": { + "id": 27482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 27467, + "name": "_approvals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27028, + "src": "2749:10:47", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 27471, + "indexExpression": { + "id": 27468, + "name": "guy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27446, + "src": "2760:3:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2749:15:47", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 27472, + "indexExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 27469, + "name": "msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18603, + "src": "2765:9:47", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 27470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2765:11:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2749:28:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "baseExpression": { + "baseExpression": { + "id": 27474, + "name": "_approvals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27028, + "src": "2784:10:47", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 27476, + "indexExpression": { + "id": 27475, + "name": "guy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27446, + "src": "2795:3:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2784:15:47", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 27479, + "indexExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 27477, + "name": "msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18603, + "src": "2800:9:47", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 27478, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2800:11:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2784:28:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 27480, + "name": "wad", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27448, + "src": "2814:3:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 27473, + "name": "sub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37511, + "src": "2780:3:47", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 27481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2780:38:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2749:69:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 27483, + "nodeType": "ExpressionStatement", + "src": "2749:69:47" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 27491, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "id": 27487, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27022, + "src": "2839:9:47", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 27489, + "indexExpression": { + "id": 27488, + "name": "guy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27446, + "src": "2849:3:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2839:14:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 27490, + "name": "wad", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27448, + "src": "2857:3:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2839:21:47", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "64732d746f6b656e2d696e73756666696369656e742d62616c616e6365", + "id": 27492, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2862:31:47", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_58b3253fdcbd27eec9eeef4ab31fa5cbbc7b0eada085070fa774e92cf7110bce", + "typeString": "literal_string \"ds-token-insufficient-balance\"" + }, + "value": "ds-token-insufficient-balance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_58b3253fdcbd27eec9eeef4ab31fa5cbbc7b0eada085070fa774e92cf7110bce", + "typeString": "literal_string \"ds-token-insufficient-balance\"" + } + ], + "id": 27486, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2831:7:47", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 27493, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2831:63:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 27494, + "nodeType": "ExpressionStatement", + "src": "2831:63:47" + }, + { + "expression": { + "id": 27504, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 27495, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27022, + "src": "2900:9:47", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 27497, + "indexExpression": { + "id": 27496, + "name": "guy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27446, + "src": "2910:3:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2900:14:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "baseExpression": { + "id": 27499, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27022, + "src": "2921:9:47", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 27501, + "indexExpression": { + "id": 27500, + "name": "guy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27446, + "src": "2931:3:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2921:14:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 27502, + "name": "wad", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27448, + "src": "2937:3:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 27498, + "name": "sub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37511, + "src": "2917:3:47", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 27503, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2917:24:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2900:41:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 27505, + "nodeType": "ExpressionStatement", + "src": "2900:41:47" + }, + { + "expression": { + "id": 27511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 27506, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27018, + "src": "2947:7:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 27508, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27018, + "src": "2961:7:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 27509, + "name": "wad", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27448, + "src": "2970:3:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 27507, + "name": "sub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37511, + "src": "2957:3:47", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 27510, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2957:17:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2947:27:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 27512, + "nodeType": "ExpressionStatement", + "src": "2947:27:47" + }, + { + "eventCall": { + "arguments": [ + { + "id": 27514, + "name": "guy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27446, + "src": "2991:3:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 27515, + "name": "wad", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27448, + "src": "2996:3:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 27513, + "name": "Burn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27254, + "src": "2986:4:47", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 27516, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2986:14:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 27517, + "nodeType": "EmitStatement", + "src": "2981:19:47" + } + ] + }, + "functionSelector": "9dc29fac", + "id": 27519, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "burn", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 27449, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 27446, + "mutability": "mutable", + "name": "guy", + "nodeType": "VariableDeclaration", + "scope": 27519, + "src": "2592:11:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 27445, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2592:7:47", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 27448, + "mutability": "mutable", + "name": "wad", + "nodeType": "VariableDeclaration", + "scope": 27519, + "src": "2605:11:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 27447, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2605:7:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2591:26:47" + }, + "returnParameters": { + "id": 27450, + "nodeType": "ParameterList", + "parameters": [], + "src": "2625:0:47" + }, + "scope": 27625, + "src": "2578:427:47", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 27528, + "nodeType": "Block", + "src": "3043:25:47", + "statements": [ + { + "expression": { + "id": 27526, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 27524, + "name": "locked", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27236, + "src": "3049:6:47", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "66616c7365", + "id": 27525, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3058:5:47", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "3049:14:47", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 27527, + "nodeType": "ExpressionStatement", + "src": "3049:14:47" + } + ] + }, + "functionSelector": "a69df4b5", + "id": 27529, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 27522, + "modifierName": { + "id": 27521, + "name": "auth", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 26957, + "src": "3036:4:47", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3036:4:47" + } + ], + "name": "unlock", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 27520, + "nodeType": "ParameterList", + "parameters": [], + "src": "3024:2:47" + }, + "returnParameters": { + "id": 27523, + "nodeType": "ParameterList", + "parameters": [], + "src": "3043:0:47" + }, + "scope": 27625, + "src": "3009:59:47", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "constant": true, + "functionSelector": "30adf81f", + "id": 27532, + "mutability": "constant", + "name": "PERMIT_TYPEHASH", + "nodeType": "VariableDeclaration", + "scope": 27625, + "src": "3318:108:47", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 27530, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3318:7:47", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "hexValue": "307836653731656461653132623162393766346431663630333730666566313031303566613266616165303132363131346131363963363438343564363132366339", + "id": 27531, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3360:66:47", + "typeDescriptions": { + "typeIdentifier": "t_rational_49955707469362902507454157297736832118868343942642399513960811609542965143241_by_1", + "typeString": "int_const 4995...(69 digits omitted)...3241" + }, + "value": "0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9" + }, + "visibility": "public" + }, + { + "constant": true, + "id": 27535, + "mutability": "constant", + "name": "EIP_712_PREFIX", + "nodeType": "VariableDeclaration", + "scope": 27625, + "src": "3430:43:47", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 27533, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3430:6:47", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": { + "hexValue": "1901", + "id": 27534, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3463:10:47", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_301a50b291d33ce1e8e9064e3f6a6c51d902ec22892b50d58abf6357c6a45541", + "typeString": "literal_string hex\"1901\"" + }, + "value": "\u0019\u0001" + }, + "visibility": "internal" + }, + { + "body": { + "id": 27623, + "nodeType": "Block", + "src": "3608:604:47", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 27558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 27555, + "name": "deadline", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27543, + "src": "3624:8:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "expression": { + "id": 27556, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "3636:5:47", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 27557, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "3636:15:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3624:27:47", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e65", + "id": 27559, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3653:31:47", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_815ebfb3109265b29ca267dae21cbe8c0cb89ce273ce5bcfb289f62de84da14d", + "typeString": "literal_string \"colony-token-expired-deadline\"" + }, + "value": "colony-token-expired-deadline" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_815ebfb3109265b29ca267dae21cbe8c0cb89ce273ce5bcfb289f62de84da14d", + "typeString": "literal_string \"colony-token-expired-deadline\"" + } + ], + "id": 27554, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3616:7:47", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 27560, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3616:69:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 27561, + "nodeType": "ExpressionStatement", + "src": "3616:69:47" + }, + { + "assignments": [ + 27563 + ], + "declarations": [ + { + "constant": false, + "id": 27563, + "mutability": "mutable", + "name": "digest", + "nodeType": "VariableDeclaration", + "scope": 27623, + "src": "3694:14:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 27562, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3694:7:47", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 27585, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "id": 27567, + "name": "EIP_712_PREFIX", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27535, + "src": "3764:14:47", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 27568, + "name": "DOMAIN_SEPARATOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27238, + "src": "3794:16:47", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "id": 27572, + "name": "PERMIT_TYPEHASH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27532, + "src": "3847:15:47", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 27573, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27537, + "src": "3864:5:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 27574, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27539, + "src": "3871:7:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 27575, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27541, + "src": "3880:5:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 27579, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "3887:30:47", + "subExpression": { + "baseExpression": { + "id": 27576, + "name": "metatransactionNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27242, + "src": "3887:21:47", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 27578, + "indexExpression": { + "id": 27577, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27537, + "src": "3909:5:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3887:28:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 27580, + "name": "deadline", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27543, + "src": "3919:8:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 27570, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "3836:3:47", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 27571, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encode", + "nodeType": "MemberAccess", + "src": "3836:10:47", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 27581, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3836:92:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 27569, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "3826:9:47", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 27582, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3826:103:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "id": 27565, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "3732:3:47", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 27566, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "3732:16:47", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 27583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3732:209:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 27564, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "3711:9:47", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 27584, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3711:238:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3694:255:47" + }, + { + "assignments": [ + 27587 + ], + "declarations": [ + { + "constant": false, + "id": 27587, + "mutability": "mutable", + "name": "recoveredAddress", + "nodeType": "VariableDeclaration", + "scope": 27623, + "src": "3957:24:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 27586, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3957:7:47", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 27594, + "initialValue": { + "arguments": [ + { + "id": 27589, + "name": "digest", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27563, + "src": "3994:6:47", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 27590, + "name": "v", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27545, + "src": "4002:1:47", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 27591, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27547, + "src": "4005:1:47", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 27592, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27549, + "src": "4008:1:47", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 27588, + "name": "ecrecover", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -6, + "src": "3984:9:47", + "typeDescriptions": { + "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)" + } + }, + "id": 27593, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3984:26:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3957:53:47" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 27605, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 27601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 27596, + "name": "recoveredAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27587, + "src": "4026:16:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 27599, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4054:1:47", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 27598, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4046:7:47", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 27597, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4046:7:47", + "typeDescriptions": {} + } + }, + "id": 27600, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4046:10:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "4026:30:47", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 27604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 27602, + "name": "recoveredAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27587, + "src": "4060:16:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 27603, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27537, + "src": "4080:5:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4060:25:47", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4026:59:47", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e6174757265", + "id": 27606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4087:32:47", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_526edddc9727429a967a975832be0465c1934d62e7f830eb064e30b134f4fab2", + "typeString": "literal_string \"colony-token-invalid-signature\"" + }, + "value": "colony-token-invalid-signature" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_526edddc9727429a967a975832be0465c1934d62e7f830eb064e30b134f4fab2", + "typeString": "literal_string \"colony-token-invalid-signature\"" + } + ], + "id": 27595, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4018:7:47", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 27607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4018:102:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 27608, + "nodeType": "ExpressionStatement", + "src": "4018:102:47" + }, + { + "expression": { + "id": 27615, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 27609, + "name": "_approvals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27028, + "src": "4128:10:47", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 27612, + "indexExpression": { + "id": 27610, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27537, + "src": "4139:5:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4128:17:47", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 27613, + "indexExpression": { + "id": 27611, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27539, + "src": "4146:7:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4128:26:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 27614, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27541, + "src": "4157:5:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4128:34:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 27616, + "nodeType": "ExpressionStatement", + "src": "4128:34:47" + }, + { + "eventCall": { + "arguments": [ + { + "id": 27618, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27537, + "src": "4185:5:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 27619, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27539, + "src": "4192:7:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 27620, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27541, + "src": "4201:5:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 27617, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37403, + "src": "4176:8:47", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 27621, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4176:31:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 27622, + "nodeType": "EmitStatement", + "src": "4171:36:47" + } + ] + }, + "functionSelector": "d505accf", + "id": 27624, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 27552, + "modifierName": { + "id": 27551, + "name": "unlocked", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27296, + "src": "3599:8:47", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3599:8:47" + } + ], + "name": "permit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 27550, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 27537, + "mutability": "mutable", + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 27624, + "src": "3494:13:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 27536, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3494:7:47", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 27539, + "mutability": "mutable", + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 27624, + "src": "3509:15:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 27538, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3509:7:47", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 27541, + "mutability": "mutable", + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 27624, + "src": "3526:13:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 27540, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3526:7:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 27543, + "mutability": "mutable", + "name": "deadline", + "nodeType": "VariableDeclaration", + "scope": 27624, + "src": "3541:16:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 27542, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3541:7:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 27545, + "mutability": "mutable", + "name": "v", + "nodeType": "VariableDeclaration", + "scope": 27624, + "src": "3559:7:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 27544, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3559:5:47", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 27547, + "mutability": "mutable", + "name": "r", + "nodeType": "VariableDeclaration", + "scope": 27624, + "src": "3568:9:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 27546, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3568:7:47", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 27549, + "mutability": "mutable", + "name": "s", + "nodeType": "VariableDeclaration", + "scope": 27624, + "src": "3579:9:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 27548, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3579:7:47", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3493:96:47" + }, + "returnParameters": { + "id": 27553, + "nodeType": "ParameterList", + "parameters": [], + "src": "3608:0:47" + }, + "scope": 27625, + "src": "3478:734:47", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 27626, + "src": "784:3430:47" + } + ], + "src": "700:3514:47" + }, + "legacyAST": { + "absolutePath": "/home/alex/colony/colonyNetwork/contracts/metatxToken/MetaTxToken.sol", + "exportedSymbols": { + "BasicMetaTransaction": [ + 17484 + ], + "DSAuth": [ + 37393 + ], + "DSAuthEvents": [ + 37276 + ], + "DSAuthMeta": [ + 27005 + ], + "DSAuthority": [ + 37267 + ], + "DSMath": [ + 37749 + ], + "DSTokenBaseMeta": [ + 27219 + ], + "ERC20": [ + 37465 + ], + "ERC20Events": [ + 37412 + ], + "ERC20Extended": [ + 18388 + ], + "MetaTransactionMsgSender": [ + 18604 + ], + "MetaTxToken": [ + 27625 + ], + "MultiChain": [ + 18679 + ] + }, + "id": 27626, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 27221, + "literals": [ + "solidity", + "0.7", + ".3" + ], + "nodeType": "PragmaDirective", + "src": "700:22:47" + }, + { + "absolutePath": "/home/alex/colony/colonyNetwork/contracts/metatxToken/DSTokenBaseMeta.sol", + "file": "./DSTokenBaseMeta.sol", + "id": 27222, + "nodeType": "ImportDirective", + "scope": 27626, + "sourceUnit": 27220, + "src": "724:31:47", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "/home/alex/colony/colonyNetwork/contracts/metatxToken/DSAuthMeta.sol", + "file": "./DSAuthMeta.sol", + "id": 27223, + "nodeType": "ImportDirective", + "scope": 27626, + "sourceUnit": 27006, + "src": "756:26:47", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": [ + { + "hexValue": "30", + "id": 27225, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "824:1:47", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "baseName": { + "id": 27224, + "name": "DSTokenBaseMeta", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 27219, + "src": "808:15:47", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DSTokenBaseMeta_$27219", + "typeString": "contract DSTokenBaseMeta" + } + }, + "id": 27226, + "nodeType": "InheritanceSpecifier", + "src": "808:18:47" + }, + { + "baseName": { + "id": 27227, + "name": "DSAuthMeta", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 27005, + "src": "828:10:47", + "typeDescriptions": { + "typeIdentifier": "t_contract$_DSAuthMeta_$27005", + "typeString": "contract DSAuthMeta" + } + }, + "id": 27228, + "nodeType": "InheritanceSpecifier", + "src": "828:10:47" + } + ], + "contractDependencies": [ + 17484, + 18604, + 18679, + 27005, + 27219, + 37276, + 37412, + 37465, + 37749 + ], + "contractKind": "contract", + "fullyImplemented": true, + "id": 27625, + "linearizedBaseContracts": [ + 27625, + 27005, + 27219, + 17484, + 18679, + 18604, + 37749, + 37276, + 37465, + 37412 + ], + "name": "MetaTxToken", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "functionSelector": "313ce567", + "id": 27230, + "mutability": "mutable", + "name": "decimals", + "nodeType": "VariableDeclaration", + "scope": 27625, + "src": "843:21:47", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 27229, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "843:5:47", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "95d89b41", + "id": 27232, + "mutability": "mutable", + "name": "symbol", + "nodeType": "VariableDeclaration", + "scope": 27625, + "src": "868:20:47", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 27231, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "868:6:47", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "06fdde03", + "id": 27234, + "mutability": "mutable", + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 27625, + "src": "892:18:47", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 27233, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "892:6:47", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "cf309012", + "id": 27236, + "mutability": "mutable", + "name": "locked", + "nodeType": "VariableDeclaration", + "scope": 27625, + "src": "915:18:47", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 27235, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "915:4:47", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "3644e515", + "id": 27238, + "mutability": "mutable", + "name": "DOMAIN_SEPARATOR", + "nodeType": "VariableDeclaration", + "scope": 27625, + "src": "937:31:47", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 27237, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "937:7:47", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "public" + }, + { + "constant": false, + "id": 27242, + "mutability": "mutable", + "name": "metatransactionNonces", + "nodeType": "VariableDeclaration", + "scope": 27625, + "src": "973:49:47", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 27241, + "keyType": { + "id": 27239, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "981:7:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "973:27:47", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 27240, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "992:7:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "visibility": "internal" + }, + { + "anonymous": false, + "id": 27248, + "name": "Mint", + "nodeType": "EventDefinition", + "parameters": { + "id": 27247, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 27244, + "indexed": true, + "mutability": "mutable", + "name": "guy", + "nodeType": "VariableDeclaration", + "scope": 27248, + "src": "1038:19:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 27243, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1038:7:47", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 27246, + "indexed": false, + "mutability": "mutable", + "name": "wad", + "nodeType": "VariableDeclaration", + "scope": 27248, + "src": "1059:11:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 27245, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1059:7:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1037:34:47" + }, + "src": "1027:45:47" + }, + { + "anonymous": false, + "id": 27254, + "name": "Burn", + "nodeType": "EventDefinition", + "parameters": { + "id": 27253, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 27250, + "indexed": true, + "mutability": "mutable", + "name": "guy", + "nodeType": "VariableDeclaration", + "scope": 27254, + "src": "1086:19:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 27249, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1086:7:47", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 27252, + "indexed": false, + "mutability": "mutable", + "name": "wad", + "nodeType": "VariableDeclaration", + "scope": 27254, + "src": "1107:11:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 27251, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1107:7:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1085:34:47" + }, + "src": "1075:45:47" + }, + { + "baseFunctions": [ + 17336 + ], + "body": { + "id": 27266, + "nodeType": "Block", + "src": "1216:46:47", + "statements": [ + { + "expression": { + "baseExpression": { + "id": 27262, + "name": "metatransactionNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27242, + "src": "1229:21:47", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 27264, + "indexExpression": { + "id": 27263, + "name": "_user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27256, + "src": "1251:5:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "1229:28:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 27261, + "id": 27265, + "nodeType": "Return", + "src": "1222:35:47" + } + ] + }, + "functionSelector": "b3eac1d8", + "id": 27267, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getMetatransactionNonce", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 27258, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1172:8:47" + }, + "parameters": { + "id": 27257, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 27256, + "mutability": "mutable", + "name": "_user", + "nodeType": "VariableDeclaration", + "scope": 27267, + "src": "1157:13:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 27255, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1157:7:47", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1156:15:47" + }, + "returnParameters": { + "id": 27261, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 27260, + "mutability": "mutable", + "name": "nonce", + "nodeType": "VariableDeclaration", + "scope": 27267, + "src": "1202:13:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 27259, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1202:7:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "1201:15:47" + }, + "scope": 27625, + "src": "1124:138:47", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 17341 + ], + "body": { + "id": 27278, + "nodeType": "Block", + "src": "1338:41:47", + "statements": [ + { + "expression": { + "id": 27276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "1344:30:47", + "subExpression": { + "baseExpression": { + "id": 27273, + "name": "metatransactionNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27242, + "src": "1344:21:47", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 27275, + "indexExpression": { + "id": 27274, + "name": "_user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27269, + "src": "1366:5:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "1344:28:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 27277, + "nodeType": "ExpressionStatement", + "src": "1344:30:47" + } + ] + }, + "id": 27279, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "incrementMetatransactionNonce", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 27271, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "1320:8:47" + }, + "parameters": { + "id": 27270, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 27269, + "mutability": "mutable", + "name": "_user", + "nodeType": "VariableDeclaration", + "scope": 27279, + "src": "1305:13:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 27268, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1305:7:47", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "src": "1304:15:47" + }, + "returnParameters": { + "id": 27272, + "nodeType": "ParameterList", + "parameters": [], + "src": "1338:0:47" + }, + "scope": 27625, + "src": "1266:113:47", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 27295, + "nodeType": "Block", + "src": "1401:116:47", + "statements": [ + { + "condition": { + "id": 27281, + "name": "locked", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27236, + "src": "1411:6:47", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 27293, + "nodeType": "IfStatement", + "src": "1407:99:47", + "trueBody": { + "id": 27292, + "nodeType": "Block", + "src": "1419:87:47", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 27284, + "name": "msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18603, + "src": "1448:9:47", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 27285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1448:11:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "expression": { + "id": 27286, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1461:3:47", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 27287, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sig", + "nodeType": "MemberAccess", + "src": "1461:7:47", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + ], + "id": 27283, + "name": "isAuthorized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27004, + "src": "1435:12:47", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_bytes4_$returns$_t_bool_$", + "typeString": "function (address,bytes4) view returns (bool)" + } + }, + "id": 27288, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1435:34:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "636f6c6f6e792d746f6b656e2d756e617574686f7269736564", + "id": 27289, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1471:27:47", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_d37c89ab35379dbbb026297d255b69ea134b61b163699a001e9dbf9a490c7cf2", + "typeString": "literal_string \"colony-token-unauthorised\"" + }, + "value": "colony-token-unauthorised" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_d37c89ab35379dbbb026297d255b69ea134b61b163699a001e9dbf9a490c7cf2", + "typeString": "literal_string \"colony-token-unauthorised\"" + } + ], + "id": 27282, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1427:7:47", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 27290, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1427:72:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 27291, + "nodeType": "ExpressionStatement", + "src": "1427:72:47" + } + ] + } + }, + { + "id": 27294, + "nodeType": "PlaceholderStatement", + "src": "1511:1:47" + } + ] + }, + "id": 27296, + "name": "unlocked", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 27280, + "nodeType": "ParameterList", + "parameters": [], + "src": "1401:0:47" + }, + "src": "1383:134:47", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 27353, + "nodeType": "Block", + "src": "1594:461:47", + "statements": [ + { + "expression": { + "id": 27307, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 27305, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27234, + "src": "1600:4:47", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 27306, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27298, + "src": "1607:5:47", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "1600:12:47", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 27308, + "nodeType": "ExpressionStatement", + "src": "1600:12:47" + }, + { + "expression": { + "id": 27311, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 27309, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27232, + "src": "1618:6:47", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 27310, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27300, + "src": "1627:7:47", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "1618:16:47", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 27312, + "nodeType": "ExpressionStatement", + "src": "1618:16:47" + }, + { + "expression": { + "id": 27315, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 27313, + "name": "decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27230, + "src": "1640:8:47", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 27314, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27302, + "src": "1651:9:47", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "1640:20:47", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 27316, + "nodeType": "ExpressionStatement", + "src": "1640:20:47" + }, + { + "expression": { + "id": 27319, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 27317, + "name": "locked", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27236, + "src": "1666:6:47", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "74727565", + "id": 27318, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1675:4:47", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "1666:13:47", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 27320, + "nodeType": "ExpressionStatement", + "src": "1666:13:47" + }, + { + "assignments": [ + 27322 + ], + "declarations": [ + { + "constant": false, + "id": 27322, + "mutability": "mutable", + "name": "chainId", + "nodeType": "VariableDeclaration", + "scope": 27353, + "src": "1686:15:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 27321, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1686:7:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "id": 27323, + "nodeType": "VariableDeclarationStatement", + "src": "1686:15:47" + }, + { + "AST": { + "nodeType": "YulBlock", + "src": "1716:36:47", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1726:20:47", + "value": { + "arguments": [], + "functionName": { + "name": "chainid", + "nodeType": "YulIdentifier", + "src": "1737:7:47" + }, + "nodeType": "YulFunctionCall", + "src": "1737:9:47" + }, + "variableNames": [ + { + "name": "chainId", + "nodeType": "YulIdentifier", + "src": "1726:7:47" + } + ] + } + ] + }, + "evmVersion": "istanbul", + "externalReferences": [ + { + "declaration": 27322, + "isOffset": false, + "isSlot": false, + "src": "1726:7:47", + "valueSize": 1 + } + ], + "id": 27324, + "nodeType": "InlineAssembly", + "src": "1707:45:47" + }, + { + "expression": { + "id": 27351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 27325, + "name": "DOMAIN_SEPARATOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27238, + "src": "1758:16:47", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "arguments": [ + { + "arguments": [ + { + "hexValue": "454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429", + "id": 27330, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1830:84:47", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f", + "typeString": "literal_string \"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"" + }, + "value": "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f", + "typeString": "literal_string \"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"" + } + ], + "id": 27329, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "1820:9:47", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 27331, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1820:95:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "id": 27335, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27234, + "src": "1945:4:47", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + ], + "id": 27334, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1939:5:47", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 27333, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1939:5:47", + "typeDescriptions": {} + } + }, + "id": 27336, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1939:11:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes storage pointer" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes storage pointer" + } + ], + "id": 27332, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "1929:9:47", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 27337, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1929:22:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "hexValue": "31", + "id": 27341, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1981:3:47", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6", + "typeString": "literal_string \"1\"" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6", + "typeString": "literal_string \"1\"" + } + ], + "id": 27340, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1975:5:47", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 27339, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1975:5:47", + "typeDescriptions": {} + } + }, + "id": 27342, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1975:10:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 27338, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "1965:9:47", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 27343, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1965:21:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 27344, + "name": "chainId", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27322, + "src": "2000:7:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "arguments": [ + { + "id": 27347, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "2029:4:47", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MetaTxToken_$27625", + "typeString": "contract MetaTxToken" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_MetaTxToken_$27625", + "typeString": "contract MetaTxToken" + } + ], + "id": 27346, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2021:7:47", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 27345, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2021:7:47", + "typeDescriptions": {} + } + }, + "id": 27348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2021:13:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "id": 27327, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "1796:3:47", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 27328, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encode", + "nodeType": "MemberAccess", + "src": "1796:10:47", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 27349, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1796:248:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 27326, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "1777:9:47", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 27350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1777:273:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "1758:292:47", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "id": 27352, + "nodeType": "ExpressionStatement", + "src": "1758:292:47" + } + ] + }, + "id": 27354, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 27303, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 27298, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "scope": 27354, + "src": "1533:19:47", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 27297, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1533:6:47", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 27300, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "scope": 27354, + "src": "1554:21:47", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 27299, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1554:6:47", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 27302, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "scope": 27354, + "src": "1577:15:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 27301, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1577:5:47", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + } + ], + "src": "1532:61:47" + }, + "returnParameters": { + "id": 27304, + "nodeType": "ParameterList", + "parameters": [], + "src": "1594:0:47" + }, + "scope": 27625, + "src": "1521:534:47", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 27189 + ], + "body": { + "id": 27375, + "nodeType": "Block", + "src": "2166:51:47", + "statements": [ + { + "expression": { + "arguments": [ + { + "id": 27370, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27356, + "src": "2198:3:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 27371, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27358, + "src": "2203:3:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 27372, + "name": "wad", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27360, + "src": "2208:3:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 27368, + "name": "super", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -25, + "src": "2179:5:47", + "typeDescriptions": { + "typeIdentifier": "t_super$_MetaTxToken_$27625", + "typeString": "contract super MetaTxToken" + } + }, + "id": 27369, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 27189, + "src": "2179:18:47", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) returns (bool)" + } + }, + "id": 27373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2179:33:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 27367, + "id": 27374, + "nodeType": "Return", + "src": "2172:40:47" + } + ] + }, + "functionSelector": "23b872dd", + "id": 27376, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 27363, + "modifierName": { + "id": 27362, + "name": "unlocked", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27296, + "src": "2129:8:47", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2129:8:47" + } + ], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 27364, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "2138:8:47" + }, + "parameters": { + "id": 27361, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 27356, + "mutability": "mutable", + "name": "src", + "nodeType": "VariableDeclaration", + "scope": 27376, + "src": "2081:11:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 27355, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2081:7:47", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 27358, + "mutability": "mutable", + "name": "dst", + "nodeType": "VariableDeclaration", + "scope": 27376, + "src": "2094:11:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 27357, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2094:7:47", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 27360, + "mutability": "mutable", + "name": "wad", + "nodeType": "VariableDeclaration", + "scope": 27376, + "src": "2107:11:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 27359, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2107:7:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2080:39:47" + }, + "returnParameters": { + "id": 27367, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 27366, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "scope": 27376, + "src": "2158:4:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 27365, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2158:4:47", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "visibility": "internal" + } + ], + "src": "2157:6:47" + }, + "scope": 27625, + "src": "2059:158:47", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 27389, + "nodeType": "Block", + "src": "2260:33:47", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 27384, + "name": "msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18603, + "src": "2271:9:47", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 27385, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2271:11:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 27386, + "name": "wad", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27378, + "src": "2284:3:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 27383, + "name": "mint", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 27390, + 27444 + ], + "referencedDeclaration": 27444, + "src": "2266:4:47", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 27387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2266:22:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 27388, + "nodeType": "ExpressionStatement", + "src": "2266:22:47" + } + ] + }, + "functionSelector": "a0712d68", + "id": 27390, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 27381, + "modifierName": { + "id": 27380, + "name": "auth", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 26957, + "src": "2255:4:47", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2255:4:47" + } + ], + "name": "mint", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 27379, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 27378, + "mutability": "mutable", + "name": "wad", + "nodeType": "VariableDeclaration", + "scope": 27390, + "src": "2235:11:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 27377, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2235:7:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2234:13:47" + }, + "returnParameters": { + "id": 27382, + "nodeType": "ParameterList", + "parameters": [], + "src": "2260:0:47" + }, + "scope": 27625, + "src": "2221:72:47", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 27401, + "nodeType": "Block", + "src": "2331:33:47", + "statements": [ + { + "expression": { + "arguments": [ + { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 27396, + "name": "msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18603, + "src": "2342:9:47", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 27397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2342:11:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 27398, + "name": "wad", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27392, + "src": "2355:3:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 27395, + "name": "burn", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 27402, + 27519 + ], + "referencedDeclaration": 27519, + "src": "2337:4:47", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 27399, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2337:22:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 27400, + "nodeType": "ExpressionStatement", + "src": "2337:22:47" + } + ] + }, + "functionSelector": "42966c68", + "id": 27402, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "burn", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 27393, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 27392, + "mutability": "mutable", + "name": "wad", + "nodeType": "VariableDeclaration", + "scope": 27402, + "src": "2311:11:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 27391, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2311:7:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2310:13:47" + }, + "returnParameters": { + "id": 27394, + "nodeType": "ParameterList", + "parameters": [], + "src": "2331:0:47" + }, + "scope": 27625, + "src": "2297:67:47", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 27443, + "nodeType": "Block", + "src": "2420:154:47", + "statements": [ + { + "expression": { + "id": 27420, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 27411, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27022, + "src": "2426:9:47", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 27413, + "indexExpression": { + "id": 27412, + "name": "guy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27404, + "src": "2436:3:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2426:14:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "baseExpression": { + "id": 27415, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27022, + "src": "2447:9:47", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 27417, + "indexExpression": { + "id": 27416, + "name": "guy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27404, + "src": "2457:3:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2447:14:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 27418, + "name": "wad", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27406, + "src": "2463:3:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 27414, + "name": "add", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37489, + "src": "2443:3:47", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 27419, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2443:24:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2426:41:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 27421, + "nodeType": "ExpressionStatement", + "src": "2426:41:47" + }, + { + "expression": { + "id": 27427, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 27422, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27018, + "src": "2473:7:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 27424, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27018, + "src": "2487:7:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 27425, + "name": "wad", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27406, + "src": "2496:3:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 27423, + "name": "add", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37489, + "src": "2483:3:47", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 27426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2483:17:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2473:27:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 27428, + "nodeType": "ExpressionStatement", + "src": "2473:27:47" + }, + { + "eventCall": { + "arguments": [ + { + "id": 27430, + "name": "guy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27404, + "src": "2517:3:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 27431, + "name": "wad", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27406, + "src": "2522:3:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 27429, + "name": "Mint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27248, + "src": "2512:4:47", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 27432, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2512:14:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 27433, + "nodeType": "EmitStatement", + "src": "2507:19:47" + }, + { + "eventCall": { + "arguments": [ + { + "arguments": [ + { + "hexValue": "307830", + "id": 27437, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2554:3:47", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 27436, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2546:7:47", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 27435, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2546:7:47", + "typeDescriptions": {} + } + }, + "id": 27438, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2546:12:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "id": 27439, + "name": "guy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27404, + "src": "2560:3:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 27440, + "name": "wad", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27406, + "src": "2565:3:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 27434, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37411, + "src": "2537:8:47", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 27441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2537:32:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 27442, + "nodeType": "EmitStatement", + "src": "2532:37:47" + } + ] + }, + "functionSelector": "40c10f19", + "id": 27444, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 27409, + "modifierName": { + "id": 27408, + "name": "auth", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 26957, + "src": "2415:4:47", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2415:4:47" + } + ], + "name": "mint", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 27407, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 27404, + "mutability": "mutable", + "name": "guy", + "nodeType": "VariableDeclaration", + "scope": 27444, + "src": "2382:11:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 27403, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2382:7:47", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 27406, + "mutability": "mutable", + "name": "wad", + "nodeType": "VariableDeclaration", + "scope": 27444, + "src": "2395:11:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 27405, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2395:7:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2381:26:47" + }, + "returnParameters": { + "id": 27410, + "nodeType": "ParameterList", + "parameters": [], + "src": "2420:0:47" + }, + "scope": 27625, + "src": "2368:206:47", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 27518, + "nodeType": "Block", + "src": "2625:380:47", + "statements": [ + { + "condition": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 27454, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 27451, + "name": "guy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27446, + "src": "2635:3:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 27452, + "name": "msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18603, + "src": "2642:9:47", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 27453, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2642:11:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2635:18:47", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 27485, + "nodeType": "IfStatement", + "src": "2631:194:47", + "trueBody": { + "id": 27484, + "nodeType": "Block", + "src": "2655:170:47", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 27463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "baseExpression": { + "id": 27456, + "name": "_approvals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27028, + "src": "2671:10:47", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 27458, + "indexExpression": { + "id": 27457, + "name": "guy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27446, + "src": "2682:3:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2671:15:47", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 27461, + "indexExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 27459, + "name": "msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18603, + "src": "2687:9:47", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 27460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2687:11:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2671:28:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 27462, + "name": "wad", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27448, + "src": "2703:3:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2671:35:47", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "64732d746f6b656e2d696e73756666696369656e742d617070726f76616c", + "id": 27464, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2708:32:47", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_696d4069430cf8d6cb2027cca74c9eeb7bde4a18fa913c0c20fafe3803d09463", + "typeString": "literal_string \"ds-token-insufficient-approval\"" + }, + "value": "ds-token-insufficient-approval" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_696d4069430cf8d6cb2027cca74c9eeb7bde4a18fa913c0c20fafe3803d09463", + "typeString": "literal_string \"ds-token-insufficient-approval\"" + } + ], + "id": 27455, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2663:7:47", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 27465, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2663:78:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 27466, + "nodeType": "ExpressionStatement", + "src": "2663:78:47" + }, + { + "expression": { + "id": 27482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 27467, + "name": "_approvals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27028, + "src": "2749:10:47", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 27471, + "indexExpression": { + "id": 27468, + "name": "guy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27446, + "src": "2760:3:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2749:15:47", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 27472, + "indexExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 27469, + "name": "msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18603, + "src": "2765:9:47", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 27470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2765:11:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2749:28:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "baseExpression": { + "baseExpression": { + "id": 27474, + "name": "_approvals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27028, + "src": "2784:10:47", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 27476, + "indexExpression": { + "id": 27475, + "name": "guy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27446, + "src": "2795:3:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2784:15:47", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 27479, + "indexExpression": { + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 27477, + "name": "msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 18603, + "src": "2800:9:47", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 27478, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2800:11:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2784:28:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 27480, + "name": "wad", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27448, + "src": "2814:3:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 27473, + "name": "sub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37511, + "src": "2780:3:47", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 27481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2780:38:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2749:69:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 27483, + "nodeType": "ExpressionStatement", + "src": "2749:69:47" + } + ] + } + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 27491, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "baseExpression": { + "id": 27487, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27022, + "src": "2839:9:47", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 27489, + "indexExpression": { + "id": 27488, + "name": "guy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27446, + "src": "2849:3:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2839:14:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "id": 27490, + "name": "wad", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27448, + "src": "2857:3:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2839:21:47", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "64732d746f6b656e2d696e73756666696369656e742d62616c616e6365", + "id": 27492, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2862:31:47", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_58b3253fdcbd27eec9eeef4ab31fa5cbbc7b0eada085070fa774e92cf7110bce", + "typeString": "literal_string \"ds-token-insufficient-balance\"" + }, + "value": "ds-token-insufficient-balance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_58b3253fdcbd27eec9eeef4ab31fa5cbbc7b0eada085070fa774e92cf7110bce", + "typeString": "literal_string \"ds-token-insufficient-balance\"" + } + ], + "id": 27486, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2831:7:47", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 27493, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2831:63:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 27494, + "nodeType": "ExpressionStatement", + "src": "2831:63:47" + }, + { + "expression": { + "id": 27504, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "id": 27495, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27022, + "src": "2900:9:47", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 27497, + "indexExpression": { + "id": 27496, + "name": "guy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27446, + "src": "2910:3:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2900:14:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "baseExpression": { + "id": 27499, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27022, + "src": "2921:9:47", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 27501, + "indexExpression": { + "id": 27500, + "name": "guy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27446, + "src": "2931:3:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2921:14:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 27502, + "name": "wad", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27448, + "src": "2937:3:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 27498, + "name": "sub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37511, + "src": "2917:3:47", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 27503, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2917:24:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2900:41:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 27505, + "nodeType": "ExpressionStatement", + "src": "2900:41:47" + }, + { + "expression": { + "id": 27511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 27506, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27018, + "src": "2947:7:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "arguments": [ + { + "id": 27508, + "name": "_supply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27018, + "src": "2961:7:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 27509, + "name": "wad", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27448, + "src": "2970:3:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 27507, + "name": "sub", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37511, + "src": "2957:3:47", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 27510, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2957:17:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2947:27:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 27512, + "nodeType": "ExpressionStatement", + "src": "2947:27:47" + }, + { + "eventCall": { + "arguments": [ + { + "id": 27514, + "name": "guy", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27446, + "src": "2991:3:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 27515, + "name": "wad", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27448, + "src": "2996:3:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 27513, + "name": "Burn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27254, + "src": "2986:4:47", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 27516, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2986:14:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 27517, + "nodeType": "EmitStatement", + "src": "2981:19:47" + } + ] + }, + "functionSelector": "9dc29fac", + "id": 27519, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "burn", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 27449, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 27446, + "mutability": "mutable", + "name": "guy", + "nodeType": "VariableDeclaration", + "scope": 27519, + "src": "2592:11:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 27445, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2592:7:47", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 27448, + "mutability": "mutable", + "name": "wad", + "nodeType": "VariableDeclaration", + "scope": 27519, + "src": "2605:11:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 27447, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2605:7:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + } + ], + "src": "2591:26:47" + }, + "returnParameters": { + "id": 27450, + "nodeType": "ParameterList", + "parameters": [], + "src": "2625:0:47" + }, + "scope": 27625, + "src": "2578:427:47", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 27528, + "nodeType": "Block", + "src": "3043:25:47", + "statements": [ + { + "expression": { + "id": 27526, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "id": 27524, + "name": "locked", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27236, + "src": "3049:6:47", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "hexValue": "66616c7365", + "id": 27525, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3058:5:47", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "false" + }, + "src": "3049:14:47", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 27527, + "nodeType": "ExpressionStatement", + "src": "3049:14:47" + } + ] + }, + "functionSelector": "a69df4b5", + "id": 27529, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 27522, + "modifierName": { + "id": 27521, + "name": "auth", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 26957, + "src": "3036:4:47", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3036:4:47" + } + ], + "name": "unlock", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 27520, + "nodeType": "ParameterList", + "parameters": [], + "src": "3024:2:47" + }, + "returnParameters": { + "id": 27523, + "nodeType": "ParameterList", + "parameters": [], + "src": "3043:0:47" + }, + "scope": 27625, + "src": "3009:59:47", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "constant": true, + "functionSelector": "30adf81f", + "id": 27532, + "mutability": "constant", + "name": "PERMIT_TYPEHASH", + "nodeType": "VariableDeclaration", + "scope": 27625, + "src": "3318:108:47", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 27530, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3318:7:47", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": { + "hexValue": "307836653731656461653132623162393766346431663630333730666566313031303566613266616165303132363131346131363963363438343564363132366339", + "id": 27531, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3360:66:47", + "typeDescriptions": { + "typeIdentifier": "t_rational_49955707469362902507454157297736832118868343942642399513960811609542965143241_by_1", + "typeString": "int_const 4995...(69 digits omitted)...3241" + }, + "value": "0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9" + }, + "visibility": "public" + }, + { + "constant": true, + "id": 27535, + "mutability": "constant", + "name": "EIP_712_PREFIX", + "nodeType": "VariableDeclaration", + "scope": 27625, + "src": "3430:43:47", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 27533, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3430:6:47", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": { + "hexValue": "1901", + "id": 27534, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3463:10:47", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_301a50b291d33ce1e8e9064e3f6a6c51d902ec22892b50d58abf6357c6a45541", + "typeString": "literal_string hex\"1901\"" + }, + "value": "\u0019\u0001" + }, + "visibility": "internal" + }, + { + "body": { + "id": 27623, + "nodeType": "Block", + "src": "3608:604:47", + "statements": [ + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 27558, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 27555, + "name": "deadline", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27543, + "src": "3624:8:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "expression": { + "id": 27556, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "3636:5:47", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 27557, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "src": "3636:15:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3624:27:47", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e65", + "id": 27559, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3653:31:47", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_815ebfb3109265b29ca267dae21cbe8c0cb89ce273ce5bcfb289f62de84da14d", + "typeString": "literal_string \"colony-token-expired-deadline\"" + }, + "value": "colony-token-expired-deadline" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_815ebfb3109265b29ca267dae21cbe8c0cb89ce273ce5bcfb289f62de84da14d", + "typeString": "literal_string \"colony-token-expired-deadline\"" + } + ], + "id": 27554, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3616:7:47", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 27560, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3616:69:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 27561, + "nodeType": "ExpressionStatement", + "src": "3616:69:47" + }, + { + "assignments": [ + 27563 + ], + "declarations": [ + { + "constant": false, + "id": 27563, + "mutability": "mutable", + "name": "digest", + "nodeType": "VariableDeclaration", + "scope": 27623, + "src": "3694:14:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 27562, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3694:7:47", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "id": 27585, + "initialValue": { + "arguments": [ + { + "arguments": [ + { + "id": 27567, + "name": "EIP_712_PREFIX", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27535, + "src": "3764:14:47", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "id": 27568, + "name": "DOMAIN_SEPARATOR", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27238, + "src": "3794:16:47", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "arguments": [ + { + "arguments": [ + { + "id": 27572, + "name": "PERMIT_TYPEHASH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27532, + "src": "3847:15:47", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 27573, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27537, + "src": "3864:5:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 27574, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27539, + "src": "3871:7:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 27575, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27541, + "src": "3880:5:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 27579, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "3887:30:47", + "subExpression": { + "baseExpression": { + "id": 27576, + "name": "metatransactionNonces", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27242, + "src": "3887:21:47", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 27578, + "indexExpression": { + "id": 27577, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27537, + "src": "3909:5:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3887:28:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "id": 27580, + "name": "deadline", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27543, + "src": "3919:8:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "id": 27570, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "3836:3:47", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 27571, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encode", + "nodeType": "MemberAccess", + "src": "3836:10:47", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencode_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 27581, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3836:92:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 27569, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "3826:9:47", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 27582, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3826:103:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "expression": { + "id": 27565, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "3732:3:47", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 27566, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "src": "3732:16:47", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 27583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3732:209:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 27564, + "name": "keccak256", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -8, + "src": "3711:9:47", + "typeDescriptions": { + "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", + "typeString": "function (bytes memory) pure returns (bytes32)" + } + }, + "id": 27584, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3711:238:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3694:255:47" + }, + { + "assignments": [ + 27587 + ], + "declarations": [ + { + "constant": false, + "id": 27587, + "mutability": "mutable", + "name": "recoveredAddress", + "nodeType": "VariableDeclaration", + "scope": 27623, + "src": "3957:24:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 27586, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3957:7:47", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + } + ], + "id": 27594, + "initialValue": { + "arguments": [ + { + "id": 27589, + "name": "digest", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27563, + "src": "3994:6:47", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 27590, + "name": "v", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27545, + "src": "4002:1:47", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + { + "id": 27591, + "name": "r", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27547, + "src": "4005:1:47", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + { + "id": 27592, + "name": "s", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27549, + "src": "4008:1:47", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + ], + "id": 27588, + "name": "ecrecover", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -6, + "src": "3984:9:47", + "typeDescriptions": { + "typeIdentifier": "t_function_ecrecover_pure$_t_bytes32_$_t_uint8_$_t_bytes32_$_t_bytes32_$returns$_t_address_$", + "typeString": "function (bytes32,uint8,bytes32,bytes32) pure returns (address)" + } + }, + "id": 27593, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3984:26:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3957:53:47" + }, + { + "expression": { + "arguments": [ + { + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 27605, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 27601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 27596, + "name": "recoveredAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27587, + "src": "4026:16:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "arguments": [ + { + "hexValue": "30", + "id": 27599, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4054:1:47", + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 27598, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4046:7:47", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 27597, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4046:7:47", + "typeDescriptions": {} + } + }, + "id": 27600, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4046:10:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "4026:30:47", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 27604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "id": 27602, + "name": "recoveredAddress", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27587, + "src": "4060:16:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "id": 27603, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27537, + "src": "4080:5:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4060:25:47", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4026:59:47", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "hexValue": "636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e6174757265", + "id": 27606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4087:32:47", + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_526edddc9727429a967a975832be0465c1934d62e7f830eb064e30b134f4fab2", + "typeString": "literal_string \"colony-token-invalid-signature\"" + }, + "value": "colony-token-invalid-signature" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_526edddc9727429a967a975832be0465c1934d62e7f830eb064e30b134f4fab2", + "typeString": "literal_string \"colony-token-invalid-signature\"" + } + ], + "id": 27595, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4018:7:47", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 27607, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4018:102:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 27608, + "nodeType": "ExpressionStatement", + "src": "4018:102:47" + }, + { + "expression": { + "id": 27615, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "baseExpression": { + "baseExpression": { + "id": 27609, + "name": "_approvals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27028, + "src": "4128:10:47", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 27612, + "indexExpression": { + "id": 27610, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27537, + "src": "4139:5:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4128:17:47", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 27613, + "indexExpression": { + "id": 27611, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27539, + "src": "4146:7:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "4128:26:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "id": 27614, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27541, + "src": "4157:5:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4128:34:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 27616, + "nodeType": "ExpressionStatement", + "src": "4128:34:47" + }, + { + "eventCall": { + "arguments": [ + { + "id": 27618, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27537, + "src": "4185:5:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 27619, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27539, + "src": "4192:7:47", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "id": 27620, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27541, + "src": "4201:5:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 27617, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 37403, + "src": "4176:8:47", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 27621, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4176:31:47", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 27622, + "nodeType": "EmitStatement", + "src": "4171:36:47" + } + ] + }, + "functionSelector": "d505accf", + "id": 27624, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "id": 27552, + "modifierName": { + "id": 27551, + "name": "unlocked", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 27296, + "src": "3599:8:47", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "3599:8:47" + } + ], + "name": "permit", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 27550, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 27537, + "mutability": "mutable", + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 27624, + "src": "3494:13:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 27536, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3494:7:47", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 27539, + "mutability": "mutable", + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 27624, + "src": "3509:15:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 27538, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3509:7:47", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 27541, + "mutability": "mutable", + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 27624, + "src": "3526:13:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 27540, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3526:7:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 27543, + "mutability": "mutable", + "name": "deadline", + "nodeType": "VariableDeclaration", + "scope": 27624, + "src": "3541:16:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 27542, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3541:7:47", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 27545, + "mutability": "mutable", + "name": "v", + "nodeType": "VariableDeclaration", + "scope": 27624, + "src": "3559:7:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 27544, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3559:5:47", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 27547, + "mutability": "mutable", + "name": "r", + "nodeType": "VariableDeclaration", + "scope": 27624, + "src": "3568:9:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 27546, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3568:7:47", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 27549, + "mutability": "mutable", + "name": "s", + "nodeType": "VariableDeclaration", + "scope": 27624, + "src": "3579:9:47", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 27548, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "3579:7:47", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "visibility": "internal" + } + ], + "src": "3493:96:47" + }, + "returnParameters": { + "id": 27553, + "nodeType": "ParameterList", + "parameters": [], + "src": "3608:0:47" + }, + "scope": 27625, + "src": "3478:734:47", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 27626, + "src": "784:3430:47" + } + ], + "src": "700:3514:47" + }, + "compiler": { + "name": "solc", + "version": "0.7.3+commit.9bfce1f6.Linux.g++" + }, + "networks": {}, + "schemaVersion": "3.3.0", + "updatedAt": "2021-07-01T10:51:24.382Z", + "devdoc": { + "kind": "dev", + "methods": { + "executeMetaTransaction(address,bytes,bytes32,bytes32,uint8)": { + "params": { + "_payload": "Function call to make via meta transaction", + "_sigR": "R part of the signature", + "_sigS": "S part of the signature", + "_sigV": "V part of the signature", + "_user": "Address of user trying to do meta transaction" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "executeMetaTransaction(address,bytes,bytes32,bytes32,uint8)": { + "notice": "Main function to be called when user wants to execute meta transaction. The actual function to be called should be passed as param with name functionSignature Here the basic signature recovery is being used. Signature is expected to be generated using personal_sign method." + } + }, + "version": 1 + } +} diff --git a/src/contracts/deploy/Token.json b/src/contracts/deploy/Token.json deleted file mode 100644 index d67093298..000000000 --- a/src/contracts/deploy/Token.json +++ /dev/null @@ -1,6612 +0,0 @@ -{ - "contractName": "Token", - "abi": [ - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "guy", - "type": "address" - }, - { - "name": "wad", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "owner_", - "type": "address" - } - ], - "name": "setOwner", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "src", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "authority_", - "type": "address" - } - ], - "name": "setAuthority", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "dst", - "type": "address" - }, - { - "name": "wad", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "authority", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "locked", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "src", - "type": "address" - }, - { - "name": "guy", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "name": "_name", - "type": "string" - }, - { - "name": "_symbol", - "type": "string" - }, - { - "name": "_decimals", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "guy", - "type": "address" - }, - { - "indexed": false, - "name": "wad", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "guy", - "type": "address" - }, - { - "indexed": false, - "name": "wad", - "type": "uint256" - } - ], - "name": "Burn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "authority", - "type": "address" - } - ], - "name": "LogSetAuthority", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "owner", - "type": "address" - } - ], - "name": "LogSetOwner", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "src", - "type": "address" - }, - { - "indexed": true, - "name": "guy", - "type": "address" - }, - { - "indexed": false, - "name": "wad", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "src", - "type": "address" - }, - { - "indexed": true, - "name": "dst", - "type": "address" - }, - { - "indexed": false, - "name": "wad", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [ - { - "name": "src", - "type": "address" - }, - { - "name": "dst", - "type": "address" - }, - { - "name": "wad", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "guy", - "type": "address" - }, - { - "name": "wad", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "wad", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "wad", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "guy", - "type": "address" - }, - { - "name": "wad", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "unlock", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.8+commit.23d335f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"guy\",\"type\":\"address\"},{\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"owner_\",\"type\":\"address\"}],\"name\":\"setOwner\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"src\",\"type\":\"address\"},{\"name\":\"dst\",\"type\":\"address\"},{\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"guy\",\"type\":\"address\"},{\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"src\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"authority_\",\"type\":\"address\"}],\"name\":\"setAuthority\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"guy\",\"type\":\"address\"},{\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unlock\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"dst\",\"type\":\"address\"},{\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"authority\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"locked\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"src\",\"type\":\"address\"},{\"name\":\"guy\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_name\",\"type\":\"string\"},{\"name\":\"_symbol\",\"type\":\"string\"},{\"name\":\"_decimals\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"guy\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"guy\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Burn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"authority\",\"type\":\"address\"}],\"name\":\"LogSetAuthority\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"LogSetOwner\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"src\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"guy\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"src\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"dst\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/Elena/colonyToken/contracts/Token.sol\":\"Token\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/Elena/colonyToken/contracts/ERC20Extended.sol\":{\"keccak256\":\"0x45aaaab17d3a97285dabc6699f56f1dcf99b2118fc8d99714a4218f064641436\",\"urls\":[\"bzzr://cbd05b3e7af3cd2e4997cb4afc4a3cef2d8816ad4313f8aba488b6daec1ea401\"]},\"/Users/Elena/colonyToken/contracts/Token.sol\":{\"keccak256\":\"0x49b680873a5ed72a44293c9abd4ff524c336b40a1978ec1fcede4bdd378389b3\",\"urls\":[\"bzzr://4ff68c9496fc5f35b9ff92b24bdf7b9bb0e4d794624ebd8aedb629ffeab52748\"]},\"/Users/Elena/colonyToken/lib/dappsys/auth.sol\":{\"keccak256\":\"0xea1d7e0d958384fe7fef111a9705a51c86acd6408c3e854bdbe4140a23adf8bd\",\"urls\":[\"bzzr://8a1eada3825355aea021016239b532f6b4f4cf22a7c3a9e8a136848ab179abf9\"]},\"/Users/Elena/colonyToken/lib/dappsys/base.sol\":{\"keccak256\":\"0x2e6337c3e4b122d741987ecee27bb7bb8e9e55961b324dc2fadc0ab3f76fa302\",\"urls\":[\"bzzr://09ed118c454346a4acb503539f3b5a5e1f0445d5efdcbd88a309e2107cf8acb7\"]},\"/Users/Elena/colonyToken/lib/dappsys/erc20.sol\":{\"keccak256\":\"0x000fc2c14d5d477eae259d71e7a4cca88dd864afee7a338d141f21f1eb4f9a7b\",\"urls\":[\"bzzr://e4301a08ad0509f034dd07ecdaf32a52d2e671725fa09b797b40e9c63dbcd44d\"]},\"/Users/Elena/colonyToken/lib/dappsys/math.sol\":{\"keccak256\":\"0x13d03a3d8e35f03ae8d99208cd6dbc225234506f628c23546ddb8bda2fa89dde\",\"urls\":[\"bzzr://25ada4352c38af9341a3e72b11354f636ee2af51cad1ec7eb755ffdd36533361\"]}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b50604051620011ce380380620011ce833981018060405260608110156200003757600080fd5b8101908080516401000000008111156200005057600080fd5b820160208101848111156200006457600080fd5b81516401000000008111828201871017156200007f57600080fd5b505092919060200180516401000000008111156200009c57600080fd5b82016020810184811115620000b057600080fd5b8151640100000000811182820187101715620000cb57600080fd5b505060209182015133600081815260019094526040808520859055848055600480546001600160a01b0319168317905551929550909350917fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9491a282516200013b90600690602086019062000199565b5081516200015190600590602085019062000199565b506004805460ff9092167401000000000000000000000000000000000000000002600160a01b60ff021990921691909117905550506007805460ff191660011790556200023e565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620001dc57805160ff19168380011785556200020c565b828001600101855582156200020c579182015b828111156200020c578251825591602001919060010190620001ef565b506200021a9291506200021e565b5090565b6200023b91905b808211156200021a576000815560010162000225565b90565b610f80806200024e6000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c80637a9e5e4b116100ad578063a69df4b511610071578063a69df4b514610383578063a9059cbb1461038b578063bf7e214f146103b7578063cf309012146103bf578063dd62ed3e146103c757610121565b80637a9e5e4b146102e85780638da5cb5b1461030e57806395d89b41146103325780639dc29fac1461033a578063a0712d681461036657610121565b806323b872dd116100f457806323b872dd14610225578063313ce5671461025b57806340c10f191461027957806342966c68146102a557806370a08231146102c257610121565b806306fdde0314610126578063095ea7b3146101a357806313af4035146101e357806318160ddd1461020b575b600080fd5b61012e6103f5565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610168578181015183820152602001610150565b50505050905090810190601f1680156101955780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101cf600480360360408110156101b957600080fd5b506001600160a01b038135169060200135610483565b604080519115158252519081900360200190f35b610209600480360360208110156101f957600080fd5b50356001600160a01b03166104ea565b005b610213610592565b60408051918252519081900360200190f35b6101cf6004803603606081101561023b57600080fd5b506001600160a01b03813581169160208101359091169060400135610598565b610263610623565b6040805160ff9092168252519081900360200190f35b6102096004803603604081101561028f57600080fd5b506001600160a01b038135169060200135610633565b610209600480360360208110156102bb57600080fd5b503561075c565b610213600480360360208110156102d857600080fd5b50356001600160a01b0316610769565b610209600480360360208110156102fe57600080fd5b50356001600160a01b0316610784565b61031661082c565b604080516001600160a01b039092168252519081900360200190f35b61012e61083b565b6102096004803603604081101561035057600080fd5b506001600160a01b038135169060200135610896565b6102096004803603602081101561037c57600080fd5b5035610a74565b610209610ad6565b6101cf600480360360408110156103a157600080fd5b506001600160a01b038135169060200135610b3a565b610316610b4e565b6101cf610b5d565b610213600480360360408110156103dd57600080fd5b506001600160a01b0381358116916020013516610b66565b6006805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561047b5780601f106104505761010080835404028352916020019161047b565b820191906000526020600020905b81548152906001019060200180831161045e57829003601f168201915b505050505081565b3360008181526002602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b610500336000356001600160e01b031916610b91565b6105425760408051600160e51b62461bcd0281526020600482015260146024820152600080516020610f35833981519152604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0383811691909117918290556040519116907fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60005490565b60075460009060ff1615610610576105bc336000356001600160e01b031916610b91565b6106105760408051600160e51b62461bcd02815260206004820152601960248201527f636f6c6f6e792d746f6b656e2d756e617574686f726973656400000000000000604482015290519081900360640190fd5b61061b848484610c7b565b949350505050565b600454600160a01b900460ff1681565b610649336000356001600160e01b031916610b91565b61068b5760408051600160e51b62461bcd0281526020600482015260146024820152600080516020610f35833981519152604482015290519081900360640190fd5b6001600160a01b0382166000908152600160205260409020546106ae9082610e7e565b6001600160a01b038316600090815260016020526040812091909155546106d59082610e7e565b6000556040805182815290516001600160a01b038416917f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885919081900360200190a26040805182815290516001600160a01b038416916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b6107663382610896565b50565b6001600160a01b031660009081526001602052604090205490565b61079a336000356001600160e01b031916610b91565b6107dc5760408051600160e51b62461bcd0281526020600482015260146024820152600080516020610f35833981519152604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0383811691909117918290556040519116907f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6004546001600160a01b031681565b6005805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561047b5780601f106104505761010080835404028352916020019161047b565b6001600160a01b0382163314610974576001600160a01b03821660009081526002602090815260408083203384529091529020548111156109215760408051600160e51b62461bcd02815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c0000604482015290519081900360640190fd5b6001600160a01b038216600090815260026020908152604080832033845290915290205461094f9082610ed9565b6001600160a01b03831660009081526002602090815260408083203384529091529020555b6001600160a01b0382166000908152600160205260409020548111156109e45760408051600160e51b62461bcd02815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e6365000000604482015290519081900360640190fd5b6001600160a01b038216600090815260016020526040902054610a079082610ed9565b6001600160a01b03831660009081526001602052604081209190915554610a2e9082610ed9565b6000556040805182815290516001600160a01b038416917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a25050565b610a8a336000356001600160e01b031916610b91565b610acc5760408051600160e51b62461bcd0281526020600482015260146024820152600080516020610f35833981519152604482015290519081900360640190fd5b6107663382610633565b610aec336000356001600160e01b031916610b91565b610b2e5760408051600160e51b62461bcd0281526020600482015260146024820152600080516020610f35833981519152604482015290519081900360640190fd5b6007805460ff19169055565b6000610b47338484610598565b9392505050565b6003546001600160a01b031681565b60075460ff1681565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b60006001600160a01b038316301415610bac575060016104e4565b6004546001600160a01b0384811691161415610bca575060016104e4565b6003546001600160a01b0316610be2575060006104e4565b60035460408051600160e01b63b70096130281526001600160a01b0386811660048301523060248301526001600160e01b0319861660448301529151919092169163b7009613916064808301926020929190829003018186803b158015610c4857600080fd5b505afa158015610c5c573d6000803e3d6000fd5b505050506040513d6020811015610c7257600080fd5b505190506104e4565b60006001600160a01b0384163314610d5b576001600160a01b0384166000908152600260209081526040808320338452909152902054821115610d085760408051600160e51b62461bcd02815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c0000604482015290519081900360640190fd5b6001600160a01b0384166000908152600260209081526040808320338452909152902054610d369083610ed9565b6001600160a01b03851660009081526002602090815260408083203384529091529020555b6001600160a01b038416600090815260016020526040902054821115610dcb5760408051600160e51b62461bcd02815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e6365000000604482015290519081900360640190fd5b6001600160a01b038416600090815260016020526040902054610dee9083610ed9565b6001600160a01b038086166000908152600160205260408082209390935590851681522054610e1d9083610e7e565b6001600160a01b0380851660008181526001602090815260409182902094909455805186815290519193928816927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a35060019392505050565b808201828110156104e45760408051600160e51b62461bcd02815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b808203828111156104e45760408051600160e51b62461bcd02815260206004820152601560248201527f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000604482015290519081900360640190fdfe64732d617574682d756e617574686f72697a6564000000000000000000000000a165627a7a72305820ed8de9a90263e33e6d6e4fb5554694081cb7508892aee98c6e637d87f2bec09a0029", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101215760003560e01c80637a9e5e4b116100ad578063a69df4b511610071578063a69df4b514610383578063a9059cbb1461038b578063bf7e214f146103b7578063cf309012146103bf578063dd62ed3e146103c757610121565b80637a9e5e4b146102e85780638da5cb5b1461030e57806395d89b41146103325780639dc29fac1461033a578063a0712d681461036657610121565b806323b872dd116100f457806323b872dd14610225578063313ce5671461025b57806340c10f191461027957806342966c68146102a557806370a08231146102c257610121565b806306fdde0314610126578063095ea7b3146101a357806313af4035146101e357806318160ddd1461020b575b600080fd5b61012e6103f5565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610168578181015183820152602001610150565b50505050905090810190601f1680156101955780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101cf600480360360408110156101b957600080fd5b506001600160a01b038135169060200135610483565b604080519115158252519081900360200190f35b610209600480360360208110156101f957600080fd5b50356001600160a01b03166104ea565b005b610213610592565b60408051918252519081900360200190f35b6101cf6004803603606081101561023b57600080fd5b506001600160a01b03813581169160208101359091169060400135610598565b610263610623565b6040805160ff9092168252519081900360200190f35b6102096004803603604081101561028f57600080fd5b506001600160a01b038135169060200135610633565b610209600480360360208110156102bb57600080fd5b503561075c565b610213600480360360208110156102d857600080fd5b50356001600160a01b0316610769565b610209600480360360208110156102fe57600080fd5b50356001600160a01b0316610784565b61031661082c565b604080516001600160a01b039092168252519081900360200190f35b61012e61083b565b6102096004803603604081101561035057600080fd5b506001600160a01b038135169060200135610896565b6102096004803603602081101561037c57600080fd5b5035610a74565b610209610ad6565b6101cf600480360360408110156103a157600080fd5b506001600160a01b038135169060200135610b3a565b610316610b4e565b6101cf610b5d565b610213600480360360408110156103dd57600080fd5b506001600160a01b0381358116916020013516610b66565b6006805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561047b5780601f106104505761010080835404028352916020019161047b565b820191906000526020600020905b81548152906001019060200180831161045e57829003601f168201915b505050505081565b3360008181526002602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b610500336000356001600160e01b031916610b91565b6105425760408051600160e51b62461bcd0281526020600482015260146024820152600080516020610f35833981519152604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0383811691909117918290556040519116907fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60005490565b60075460009060ff1615610610576105bc336000356001600160e01b031916610b91565b6106105760408051600160e51b62461bcd02815260206004820152601960248201527f636f6c6f6e792d746f6b656e2d756e617574686f726973656400000000000000604482015290519081900360640190fd5b61061b848484610c7b565b949350505050565b600454600160a01b900460ff1681565b610649336000356001600160e01b031916610b91565b61068b5760408051600160e51b62461bcd0281526020600482015260146024820152600080516020610f35833981519152604482015290519081900360640190fd5b6001600160a01b0382166000908152600160205260409020546106ae9082610e7e565b6001600160a01b038316600090815260016020526040812091909155546106d59082610e7e565b6000556040805182815290516001600160a01b038416917f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885919081900360200190a26040805182815290516001600160a01b038416916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b6107663382610896565b50565b6001600160a01b031660009081526001602052604090205490565b61079a336000356001600160e01b031916610b91565b6107dc5760408051600160e51b62461bcd0281526020600482015260146024820152600080516020610f35833981519152604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0383811691909117918290556040519116907f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6004546001600160a01b031681565b6005805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561047b5780601f106104505761010080835404028352916020019161047b565b6001600160a01b0382163314610974576001600160a01b03821660009081526002602090815260408083203384529091529020548111156109215760408051600160e51b62461bcd02815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c0000604482015290519081900360640190fd5b6001600160a01b038216600090815260026020908152604080832033845290915290205461094f9082610ed9565b6001600160a01b03831660009081526002602090815260408083203384529091529020555b6001600160a01b0382166000908152600160205260409020548111156109e45760408051600160e51b62461bcd02815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e6365000000604482015290519081900360640190fd5b6001600160a01b038216600090815260016020526040902054610a079082610ed9565b6001600160a01b03831660009081526001602052604081209190915554610a2e9082610ed9565b6000556040805182815290516001600160a01b038416917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a25050565b610a8a336000356001600160e01b031916610b91565b610acc5760408051600160e51b62461bcd0281526020600482015260146024820152600080516020610f35833981519152604482015290519081900360640190fd5b6107663382610633565b610aec336000356001600160e01b031916610b91565b610b2e5760408051600160e51b62461bcd0281526020600482015260146024820152600080516020610f35833981519152604482015290519081900360640190fd5b6007805460ff19169055565b6000610b47338484610598565b9392505050565b6003546001600160a01b031681565b60075460ff1681565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b60006001600160a01b038316301415610bac575060016104e4565b6004546001600160a01b0384811691161415610bca575060016104e4565b6003546001600160a01b0316610be2575060006104e4565b60035460408051600160e01b63b70096130281526001600160a01b0386811660048301523060248301526001600160e01b0319861660448301529151919092169163b7009613916064808301926020929190829003018186803b158015610c4857600080fd5b505afa158015610c5c573d6000803e3d6000fd5b505050506040513d6020811015610c7257600080fd5b505190506104e4565b60006001600160a01b0384163314610d5b576001600160a01b0384166000908152600260209081526040808320338452909152902054821115610d085760408051600160e51b62461bcd02815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c0000604482015290519081900360640190fd5b6001600160a01b0384166000908152600260209081526040808320338452909152902054610d369083610ed9565b6001600160a01b03851660009081526002602090815260408083203384529091529020555b6001600160a01b038416600090815260016020526040902054821115610dcb5760408051600160e51b62461bcd02815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e6365000000604482015290519081900360640190fd5b6001600160a01b038416600090815260016020526040902054610dee9083610ed9565b6001600160a01b038086166000908152600160205260408082209390935590851681522054610e1d9083610e7e565b6001600160a01b0380851660008181526001602090815260409182902094909455805186815290519193928816927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a35060019392505050565b808201828110156104e45760408051600160e51b62461bcd02815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b808203828111156104e45760408051600160e51b62461bcd02815260206004820152601560248201527f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000604482015290519081900360640190fdfe64732d617574682d756e617574686f72697a6564000000000000000000000000a165627a7a72305820ed8de9a90263e33e6d6e4fb5554694081cb7508892aee98c6e637d87f2bec09a0029", - "sourceMap": "824:1446:2:-;;;1116:170;8:9:-1;5:2;;;30:1;27;20:12;5:2;1116:170:2;;;;;;;;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1116:170:2;;;;;;19:11:-1;14:3;11:20;8:2;;;44:1;41;34:12;8:2;62:21;;123:4;114:14;;138:31;;;135:2;;;182:1;179;172:12;135:2;213:10;;261:11;244:29;;285:43;;;282:58;-1:-1;233:115;230:2;;;361:1;358;351:12;230:2;0:372;;1116:170:2;;;;;;;19:11:-1;14:3;11:20;8:2;;;44:1;41;34:12;8:2;62:21;;123:4;114:14;;138:31;;;135:2;;;182:1;179;172:12;135:2;213:10;;261:11;244:29;;285:43;;;282:58;-1:-1;233:115;230:2;;;361:1;358;351:12;230:2;-1:-1;;1116:170:2;;;;;1101:10:7;854:1:2;1091:21:7;;;:9;:21;;;1116:170:2;1091:21:7;;;:30;;;1131:16;;;1068:5:6;:18;;-1:-1:-1;;;;;;1068:18:6;;;;;1101:23;1116:170:2;;-1:-1:-1;1116:170:2;;-1:-1:-1;1101:10:7;:23:6;;;1202:12:2;;;;:4;;:12;;;;;:::i;:::-;-1:-1:-1;1220:16:2;;;;:6;;:16;;;;;:::i;:::-;-1:-1:-1;1242:8:2;:20;;;;;;;;-1:-1:-1;;;;;;1242:20:2;;;;;;;;;-1:-1:-1;;1268:6:2;:13;;-1:-1:-1;;1268:13:2;-1:-1:-1;1268:13:2;;;824:1446;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;824:1446:2;;;-1:-1:-1;824:1446:2;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;", - "deployedSourceMap": "824:1446:2:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;824:1446:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;933:18;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;933:18:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2162:180:7;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2162:180:7;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;1137:130:6;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1137:130:6;-1:-1:-1;;;;;1137:130:6;;:::i;:::-;;1160:81:7;;;:::i;:::-;;;;;;;;;;;;;;;;1290:147:2;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;1290:147:2;;;;;;;;;;;;;;;;;:::i;884:21::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1580:202;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;1580:202:2;;;;;;;;:::i;1513:63::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1513:63:2;;:::i;1246:97:7:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1246:97:7;-1:-1:-1;;;;;1246:97:7;;:::i;1273:167:6:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1273:167:6;-1:-1:-1;;;;;1273:167:6;;:::i;1004:26::-;;;:::i;:::-;;;;-1:-1:-1;;;;;1004:26:6;;;;;;;;;;;;;;909:20:2;;;:::i;1786:419::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;1786:419:2;;;;;;;;:::i;1441:68::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1441:68:2;;:::i;2209:59::-;;;:::i;1470:121:7:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;1470:121:7;;;;;;;;:::i;968:30:6:-;;;:::i;956:18:2:-;;;:::i;1348:116:7:-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;1348:116:7;;;;;;;;;;:::i;933:18:2:-;;;;;;;;;;;;;;;-1:-1:-1;;933:18:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;2162:180:7:-;2245:10;2218:4;2234:22;;;:10;:22;;;;;;;;-1:-1:-1;;;;;2234:27:7;;;;;;;;;;;:33;;;2283:30;;;;;;;2218:4;;2234:27;;2245:10;;2283:30;;;;;;;;-1:-1:-1;2331:4:7;2162:180;;;;;:::o;1137:130:6:-;1478:33;1491:10;1503:7;;-1:-1:-1;;;;;;1503:7:6;1478:12;:33::i;:::-;1470:66;;;;;-1:-1:-1;;;;;1470:66:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1470:66:6;;;;;;;;;;;;;;;1213:5;:14;;-1:-1:-1;;;;;;1213:14:6;-1:-1:-1;;;;;1213:14:6;;;;;;;;;;;1242:18;;1254:5;;;1242:18;;-1:-1:-1;;1242:18:6;1137:130;:::o;1160:81:7:-;1204:4;1227:7;1160:81;:::o;1290:147:2:-;1007:6;;1378:4;;1007:6;;1003:98;;;1031:33;1044:10;1056:7;;-1:-1:-1;;;;;;1056:7:2;1031:12;:33::i;:::-;1023:71;;;;;-1:-1:-1;;;;;1023:71:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;1399:33;1418:3;1423;1428;1399:18;:33::i;:::-;1392:40;1290:147;-1:-1:-1;;;;1290:147:2:o;884:21::-;;;-1:-1:-1;;;884:21:2;;;;;:::o;1580:202::-;1478:33:6;1491:10;1503:7;;-1:-1:-1;;;;;;1503:7:6;1478:12;:33::i;:::-;1470:66;;;;;-1:-1:-1;;;;;1470:66:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1470:66:6;;;;;;;;;;;;;;;-1:-1:-1;;;;;1656:14:2;;;;;;:9;:14;;;;;;1652:24;;1672:3;1652;:24::i;:::-;-1:-1:-1;;;;;1635:14:2;;;;;;:9;:14;;;;;:41;;;;1696:7;1692:17;;1705:3;1692;:17::i;:::-;1682:7;:27;1720:14;;;;;;;;-1:-1:-1;;;;;1720:14:2;;;;;;;;;;;;;1745:32;;;;;;;;-1:-1:-1;;;;;1745:32:2;;;1762:3;;1745:32;;;;;;;;;1580:202;;:::o;1513:63::-;1550:21;1555:10;1567:3;1550:4;:21::i;:::-;1513:63;:::o;1246:97:7:-;-1:-1:-1;;;;;1322:14:7;1299:4;1322:14;;;:9;:14;;;;;;;1246:97::o;1273:167:6:-;1478:33;1491:10;1503:7;;-1:-1:-1;;;;;;1503:7:6;1478:12;:33::i;:::-;1470:66;;;;;-1:-1:-1;;;;;1470:66:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1470:66:6;;;;;;;;;;;;;;;1361:9;:22;;-1:-1:-1;;;;;;1361:22:6;-1:-1:-1;;;;;1361:22:6;;;;;;;;;;;1398:35;;1422:9;;;1398:35;;-1:-1:-1;;1398:35:6;1273:167;:::o;1004:26::-;;;-1:-1:-1;;;;;1004:26:6;;:::o;909:20:2:-;;;;;;;;;;;;;;;-1:-1:-1;;909:20:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1786:419;-1:-1:-1;;;;;1840:17:2;;1847:10;1840:17;1836:190;;-1:-1:-1;;;;;1875:15:2;;;;;;:10;:15;;;;;;;;1891:10;1875:27;;;;;;;;:34;-1:-1:-1;1875:34:2;1867:77;;;;;-1:-1:-1;;;;;1867:77:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1986:15:2;;;;;;:10;:15;;;;;;;;2002:10;1986:27;;;;;;;;1982:37;;2015:3;1982;:37::i;:::-;-1:-1:-1;;;;;1952:15:2;;;;;;:10;:15;;;;;;;;1968:10;1952:27;;;;;;;:67;1836:190;-1:-1:-1;;;;;2040:14:2;;;;;;:9;:14;;;;;;:21;-1:-1:-1;2040:21:2;2032:63;;;;;-1:-1:-1;;;;;2032:63:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2122:14:2;;;;;;:9;:14;;;;;;2118:24;;2138:3;2118;:24::i;:::-;-1:-1:-1;;;;;2101:14:2;;;;;;:9;:14;;;;;:41;;;;2162:7;2158:17;;2171:3;2158;:17::i;:::-;2148:7;:27;2186:14;;;;;;;;-1:-1:-1;;;;;2186:14:2;;;;;;;;;;;;;1786:419;;:::o;1441:68::-;1478:33:6;1491:10;1503:7;;-1:-1:-1;;;;;;1503:7:6;1478:12;:33::i;:::-;1470:66;;;;;-1:-1:-1;;;;;1470:66:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1470:66:6;;;;;;;;;;;;;;;1483:21:2;1488:10;1500:3;1483:4;:21::i;2209:59::-;1478:33:6;1491:10;1503:7;;-1:-1:-1;;;;;;1503:7:6;1478:12;:33::i;:::-;1470:66;;;;;-1:-1:-1;;;;;1470:66:6;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1470:66:6;;;;;;;;;;;;;;;2249:6:2;:14;;-1:-1:-1;;2249:14:2;;;2209:59::o;1470:121:7:-;1527:4;1550:34;1563:10;1575:3;1580;1550:12;:34::i;:::-;1543:41;1470:121;-1:-1:-1;;;1470:121:7:o;968:30:6:-;;;-1:-1:-1;;;;;968:30:6;;:::o;956:18:2:-;;;;;;:::o;1348:116:7:-;-1:-1:-1;;;;;1437:15:7;;;1414:4;1437:15;;;:10;:15;;;;;;;;:20;;;;;;;;;;;;;1348:116::o;1560:370:6:-;1630:4;-1:-1:-1;;;;;1650:20:6;;1665:4;1650:20;1646:278;;;-1:-1:-1;1693:4:6;1686:11;;1646:278;1725:5;;-1:-1:-1;;;;;1718:12:6;;;1725:5;;1718:12;1714:210;;;-1:-1:-1;1753:4:6;1746:11;;1714:210;1778:9;;-1:-1:-1;;;;;1778:9:6;1774:150;;-1:-1:-1;1828:5:6;1821:12;;1774:150;1871:9;;:42;;;-1:-1:-1;;;;;1871:42:6;;-1:-1:-1;;;;;1871:42:6;;;;;;;1902:4;1871:42;;;;-1:-1:-1;;;;;;1871:42:6;;;;;;;;:9;;;;;:17;;:42;;;;;;;;;;;;;;:9;:42;;;5:2:-1;;;;30:1;27;20:12;5:2;1871:42:6;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1871:42:6;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1871:42:6;;-1:-1:-1;1864:49:6;;1597:559:7;1687:4;-1:-1:-1;;;;;1711:17:7;;1718:10;1711:17;1707:206;;-1:-1:-1;;;;;1752:15:7;;;;;;:10;:15;;;;;;;;1768:10;1752:27;;;;;;;;:34;-1:-1:-1;1752:34:7;1744:77;;;;;-1:-1:-1;;;;;1744:77:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1869:15:7;;;;;;:10;:15;;;;;;;;1885:10;1869:27;;;;;;;;1865:37;;1898:3;1865;:37::i;:::-;-1:-1:-1;;;;;1835:15:7;;;;;;:10;:15;;;;;;;;1851:10;1835:27;;;;;;;:67;1707:206;-1:-1:-1;;;;;1931:14:7;;;;;;:9;:14;;;;;;:21;-1:-1:-1;1931:21:7;1923:63;;;;;-1:-1:-1;;;;;1923:63:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2017:14:7;;;;;;:9;:14;;;;;;2013:24;;2033:3;2013;:24::i;:::-;-1:-1:-1;;;;;1996:14:7;;;;;;;:9;:14;;;;;;:41;;;;2068:14;;;;;;;2064:24;;2084:3;2064;:24::i;:::-;-1:-1:-1;;;;;2047:14:7;;;;;;;:9;:14;;;;;;;;;:41;;;;2104:23;;;;;;;2047:14;;2104:23;;;;;;;;;;;;;-1:-1:-1;2145:4:7;1597:559;;;;;:::o;744:126:9:-;827:5;;;822:16;;;;814:49;;;;;-1:-1:-1;;;;;814:49:9;;;;;;;;;;;;;;;;;;;;;;;;;;;875:127;958:5;;;953:16;;;;945:50;;;;;-1:-1:-1;;;;;945:50:9;;;;;;;;;;;;;;;;;;;;;;;;;;", - "source": "/*\n This file is part of The Colony Network.\n\n The Colony Network is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n The Colony Network is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with The Colony Network. If not, see .\n*/\n\npragma solidity 0.5.8;\n\nimport \"../lib/dappsys/auth.sol\";\nimport \"../lib/dappsys/base.sol\";\nimport \"./ERC20Extended.sol\";\n\n\ncontract Token is DSTokenBase(0), DSAuth, ERC20Extended {\n uint8 public decimals;\n string public symbol;\n string public name;\n\n bool public locked;\n\n modifier unlocked {\n if (locked) {\n require(isAuthorized(msg.sender, msg.sig), \"colony-token-unauthorised\");\n }\n _;\n }\n\n constructor(string memory _name, string memory _symbol, uint8 _decimals) public {\n name = _name;\n symbol = _symbol;\n decimals = _decimals;\n locked = true;\n }\n\n function transferFrom(address src, address dst, uint wad) public \n unlocked\n returns (bool)\n {\n return super.transferFrom(src, dst, wad);\n }\n\n function mint(uint wad) public auth {\n mint(msg.sender, wad);\n }\n\n function burn(uint wad) public {\n burn(msg.sender, wad);\n }\n\n function mint(address guy, uint wad) public auth {\n _balances[guy] = add(_balances[guy], wad);\n _supply = add(_supply, wad);\n emit Mint(guy, wad);\n emit Transfer(address(0x0), guy, wad);\n }\n\n function burn(address guy, uint wad) public {\n if (guy != msg.sender) {\n require(_approvals[guy][msg.sender] >= wad, \"ds-token-insufficient-approval\");\n _approvals[guy][msg.sender] = sub(_approvals[guy][msg.sender], wad);\n }\n\n require(_balances[guy] >= wad, \"ds-token-insufficient-balance\");\n _balances[guy] = sub(_balances[guy], wad);\n _supply = sub(_supply, wad);\n emit Burn(guy, wad);\n }\n\n function unlock() public\n auth\n {\n locked = false;\n }\n}\n", - "sourcePath": "/Users/Elena/colonyToken/contracts/Token.sol", - "ast": { - "absolutePath": "/Users/Elena/colonyToken/contracts/Token.sol", - "exportedSymbols": { - "Token": [ - 335 - ] - }, - "id": 336, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 100, - "literals": [ - "solidity", - "0.5", - ".8" - ], - "nodeType": "PragmaDirective", - "src": "700:22:2" - }, - { - "absolutePath": "/Users/Elena/colonyToken/lib/dappsys/auth.sol", - "file": "../lib/dappsys/auth.sol", - "id": 101, - "nodeType": "ImportDirective", - "scope": 336, - "sourceUnit": 1310, - "src": "724:33:2", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/Elena/colonyToken/lib/dappsys/base.sol", - "file": "../lib/dappsys/base.sol", - "id": 102, - "nodeType": "ImportDirective", - "scope": 336, - "sourceUnit": 1515, - "src": "758:33:2", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/Elena/colonyToken/contracts/ERC20Extended.sol", - "file": "./ERC20Extended.sol", - "id": 103, - "nodeType": "ImportDirective", - "scope": 336, - "sourceUnit": 42, - "src": "792:29:2", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [ - { - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 105, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "854:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "baseName": { - "contractScope": null, - "id": 104, - "name": "DSTokenBase", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1514, - "src": "842:11:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_DSTokenBase_$1514", - "typeString": "contract DSTokenBase" - } - }, - "id": 106, - "nodeType": "InheritanceSpecifier", - "src": "842:14:2" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 107, - "name": "DSAuth", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1309, - "src": "858:6:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_DSAuth_$1309", - "typeString": "contract DSAuth" - } - }, - "id": 108, - "nodeType": "InheritanceSpecifier", - "src": "858:6:2" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 109, - "name": "ERC20Extended", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 41, - "src": "866:13:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20Extended_$41", - "typeString": "contract ERC20Extended" - } - }, - "id": 110, - "nodeType": "InheritanceSpecifier", - "src": "866:13:2" - } - ], - "contractDependencies": [ - 41, - 1195, - 1309, - 1514, - 1533, - 1586, - 1890 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 335, - "linearizedBaseContracts": [ - 335, - 41, - 1309, - 1195, - 1514, - 1890, - 1586, - 1533 - ], - "name": "Token", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 112, - "name": "decimals", - "nodeType": "VariableDeclaration", - "scope": 335, - "src": "884:21:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 111, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "884:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 114, - "name": "symbol", - "nodeType": "VariableDeclaration", - "scope": 335, - "src": "909:20:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string" - }, - "typeName": { - "id": 113, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "909:6:2", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 116, - "name": "name", - "nodeType": "VariableDeclaration", - "scope": 335, - "src": "933:18:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string" - }, - "typeName": { - "id": 115, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "933:6:2", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 118, - "name": "locked", - "nodeType": "VariableDeclaration", - "scope": 335, - "src": "956:18:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 117, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "956:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": { - "id": 134, - "nodeType": "Block", - "src": "997:115:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "id": 120, - "name": "locked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "1007:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 132, - "nodeType": "IfStatement", - "src": "1003:98:2", - "trueBody": { - "id": 131, - "nodeType": "Block", - "src": "1015:86:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 123, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1905, - "src": "1044:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 124, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1044:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 125, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1905, - "src": "1056:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 126, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sig", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1056:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - ], - "id": 122, - "name": "isAuthorized", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1308, - "src": "1031:12:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$_t_bytes4_$returns$_t_bool_$", - "typeString": "function (address,bytes4) view returns (bool)" - } - }, - "id": 127, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1031:33:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "636f6c6f6e792d746f6b656e2d756e617574686f7269736564", - "id": 128, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1066:27:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d37c89ab35379dbbb026297d255b69ea134b61b163699a001e9dbf9a490c7cf2", - "typeString": "literal_string \"colony-token-unauthorised\"" - }, - "value": "colony-token-unauthorised" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_d37c89ab35379dbbb026297d255b69ea134b61b163699a001e9dbf9a490c7cf2", - "typeString": "literal_string \"colony-token-unauthorised\"" - } - ], - "id": 121, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1908, - 1909 - ], - "referencedDeclaration": 1909, - "src": "1023:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 129, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1023:71:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 130, - "nodeType": "ExpressionStatement", - "src": "1023:71:2" - } - ] - } - }, - { - "id": 133, - "nodeType": "PlaceholderStatement", - "src": "1106:1:2" - } - ] - }, - "documentation": null, - "id": 135, - "name": "unlocked", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 119, - "nodeType": "ParameterList", - "parameters": [], - "src": "997:0:2" - }, - "src": "979:133:2", - "visibility": "internal" - }, - { - "body": { - "id": 160, - "nodeType": "Block", - "src": "1196:90:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 146, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 144, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 116, - "src": "1202:4:2", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 145, - "name": "_name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 137, - "src": "1209:5:2", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "1202:12:2", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 147, - "nodeType": "ExpressionStatement", - "src": "1202:12:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 150, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 148, - "name": "symbol", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 114, - "src": "1220:6:2", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 149, - "name": "_symbol", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 139, - "src": "1229:7:2", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "1220:16:2", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 151, - "nodeType": "ExpressionStatement", - "src": "1220:16:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 154, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 152, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 112, - "src": "1242:8:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 153, - "name": "_decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 141, - "src": "1253:9:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "1242:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 155, - "nodeType": "ExpressionStatement", - "src": "1242:20:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 158, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 156, - "name": "locked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "1268:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 157, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1277:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "1268:13:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 159, - "nodeType": "ExpressionStatement", - "src": "1268:13:2" - } - ] - }, - "documentation": null, - "id": 161, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 142, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 137, - "name": "_name", - "nodeType": "VariableDeclaration", - "scope": 161, - "src": "1128:19:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 136, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1128:6:2", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 139, - "name": "_symbol", - "nodeType": "VariableDeclaration", - "scope": 161, - "src": "1149:21:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 138, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1149:6:2", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 141, - "name": "_decimals", - "nodeType": "VariableDeclaration", - "scope": 161, - "src": "1172:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 140, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "1172:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1127:61:2" - }, - "returnParameters": { - "id": 143, - "nodeType": "ParameterList", - "parameters": [], - "src": "1196:0:2" - }, - "scope": 335, - "src": "1116:170:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 181, - "nodeType": "Block", - "src": "1386:51:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 176, - "name": "src", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 163, - "src": "1418:3:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 177, - "name": "dst", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 165, - "src": "1423:3:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 178, - "name": "wad", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 167, - "src": "1428:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 174, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1938, - "src": "1399:5:2", - "typeDescriptions": { - "typeIdentifier": "t_super$_Token_$335", - "typeString": "contract super Token" - } - }, - "id": 175, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 1485, - "src": "1399:18:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) returns (bool)" - } - }, - "id": 179, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1399:33:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 173, - "id": 180, - "nodeType": "Return", - "src": "1392:40:2" - } - ] - }, - "documentation": null, - "id": 182, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 170, - "modifierName": { - "argumentTypes": null, - "id": 169, - "name": "unlocked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 135, - "src": "1358:8:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "1358:8:2" - } - ], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 168, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 163, - "name": "src", - "nodeType": "VariableDeclaration", - "scope": 182, - "src": "1312:11:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 162, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1312:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 165, - "name": "dst", - "nodeType": "VariableDeclaration", - "scope": 182, - "src": "1325:11:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 164, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1325:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 167, - "name": "wad", - "nodeType": "VariableDeclaration", - "scope": 182, - "src": "1338:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 166, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1338:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1311:36:2" - }, - "returnParameters": { - "id": 173, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 172, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 182, - "src": "1378:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 171, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1378:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1377:6:2" - }, - "scope": 335, - "src": "1290:147:2", - "stateMutability": "nonpayable", - "superFunction": 1485, - "visibility": "public" - }, - { - "body": { - "id": 195, - "nodeType": "Block", - "src": "1477:32:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 190, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1905, - "src": "1488:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 191, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1488:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 192, - "name": "wad", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 184, - "src": "1500:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 189, - "name": "mint", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 196, - 249 - ], - "referencedDeclaration": 249, - "src": "1483:4:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 193, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1483:21:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 194, - "nodeType": "ExpressionStatement", - "src": "1483:21:2" - } - ] - }, - "documentation": null, - "id": 196, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 187, - "modifierName": { - "argumentTypes": null, - "id": 186, - "name": "auth", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1263, - "src": "1472:4:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "1472:4:2" - } - ], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 185, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 184, - "name": "wad", - "nodeType": "VariableDeclaration", - "scope": 196, - "src": "1455:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 183, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1455:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1454:10:2" - }, - "returnParameters": { - "id": 188, - "nodeType": "ParameterList", - "parameters": [], - "src": "1477:0:2" - }, - "scope": 335, - "src": "1441:68:2", - "stateMutability": "nonpayable", - "superFunction": 21, - "visibility": "public" - }, - { - "body": { - "id": 207, - "nodeType": "Block", - "src": "1544:32:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 202, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1905, - "src": "1555:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 203, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1555:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 204, - "name": "wad", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 198, - "src": "1567:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 201, - "name": "burn", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 208, - 324 - ], - "referencedDeclaration": 324, - "src": "1550:4:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 205, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1550:21:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 206, - "nodeType": "ExpressionStatement", - "src": "1550:21:2" - } - ] - }, - "documentation": null, - "id": 208, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "burn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 199, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 198, - "name": "wad", - "nodeType": "VariableDeclaration", - "scope": 208, - "src": "1527:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 197, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1527:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1526:10:2" - }, - "returnParameters": { - "id": 200, - "nodeType": "ParameterList", - "parameters": [], - "src": "1544:0:2" - }, - "scope": 335, - "src": "1513:63:2", - "stateMutability": "nonpayable", - "superFunction": 33, - "visibility": "public" - }, - { - "body": { - "id": 248, - "nodeType": "Block", - "src": "1629:153:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 226, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 217, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1323, - "src": "1635:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 219, - "indexExpression": { - "argumentTypes": null, - "id": 218, - "name": "guy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 210, - "src": "1645:3:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1635:14:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 221, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1323, - "src": "1656:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 223, - "indexExpression": { - "argumentTypes": null, - "id": 222, - "name": "guy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 210, - "src": "1666:3:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1656:14:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 224, - "name": "wad", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 212, - "src": "1672:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 220, - "name": "add", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1610, - "src": "1652:3:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 225, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1652:24:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1635:41:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 227, - "nodeType": "ExpressionStatement", - "src": "1635:41:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 233, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 228, - "name": "_supply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1319, - "src": "1682:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 230, - "name": "_supply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1319, - "src": "1696:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 231, - "name": "wad", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 212, - "src": "1705:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 229, - "name": "add", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1610, - "src": "1692:3:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 232, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1692:17:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1682:27:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 234, - "nodeType": "ExpressionStatement", - "src": "1682:27:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 236, - "name": "guy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 210, - "src": "1725:3:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 237, - "name": "wad", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 212, - "src": "1730:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 235, - "name": "Mint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "1720:4:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 238, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1720:14:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 239, - "nodeType": "EmitStatement", - "src": "1715:19:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307830", - "id": 242, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1762:3:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 241, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1754:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 243, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1754:12:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 244, - "name": "guy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 210, - "src": "1768:3:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 245, - "name": "wad", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 212, - "src": "1773:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 240, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1532, - "src": "1745:8:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 246, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1745:32:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 247, - "nodeType": "EmitStatement", - "src": "1740:37:2" - } - ] - }, - "documentation": null, - "id": 249, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 215, - "modifierName": { - "argumentTypes": null, - "id": 214, - "name": "auth", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1263, - "src": "1624:4:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "1624:4:2" - } - ], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 213, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 210, - "name": "guy", - "nodeType": "VariableDeclaration", - "scope": 249, - "src": "1594:11:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 209, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1594:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 212, - "name": "wad", - "nodeType": "VariableDeclaration", - "scope": 249, - "src": "1607:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 211, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1607:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1593:23:2" - }, - "returnParameters": { - "id": 216, - "nodeType": "ParameterList", - "parameters": [], - "src": "1629:0:2" - }, - "scope": 335, - "src": "1580:202:2", - "stateMutability": "nonpayable", - "superFunction": 28, - "visibility": "public" - }, - { - "body": { - "id": 323, - "nodeType": "Block", - "src": "1830:375:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 259, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 256, - "name": "guy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 251, - "src": "1840:3:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 257, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1905, - "src": "1847:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 258, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1847:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "1840:17:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 290, - "nodeType": "IfStatement", - "src": "1836:190:2", - "trueBody": { - "id": 289, - "nodeType": "Block", - "src": "1859:167:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 268, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 261, - "name": "_approvals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1329, - "src": "1875:10:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 263, - "indexExpression": { - "argumentTypes": null, - "id": 262, - "name": "guy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 251, - "src": "1886:3:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1875:15:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 266, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 264, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1905, - "src": "1891:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 265, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1891:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1875:27:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 267, - "name": "wad", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 253, - "src": "1906:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1875:34:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "64732d746f6b656e2d696e73756666696369656e742d617070726f76616c", - "id": 269, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1911:32:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_696d4069430cf8d6cb2027cca74c9eeb7bde4a18fa913c0c20fafe3803d09463", - "typeString": "literal_string \"ds-token-insufficient-approval\"" - }, - "value": "ds-token-insufficient-approval" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_696d4069430cf8d6cb2027cca74c9eeb7bde4a18fa913c0c20fafe3803d09463", - "typeString": "literal_string \"ds-token-insufficient-approval\"" - } - ], - "id": 260, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1908, - 1909 - ], - "referencedDeclaration": 1909, - "src": "1867:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 270, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1867:77:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 271, - "nodeType": "ExpressionStatement", - "src": "1867:77:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 287, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 272, - "name": "_approvals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1329, - "src": "1952:10:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 276, - "indexExpression": { - "argumentTypes": null, - "id": 273, - "name": "guy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 251, - "src": "1963:3:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1952:15:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 277, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 274, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1905, - "src": "1968:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 275, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1968:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1952:27:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 279, - "name": "_approvals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1329, - "src": "1986:10:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 281, - "indexExpression": { - "argumentTypes": null, - "id": 280, - "name": "guy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 251, - "src": "1997:3:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1986:15:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 284, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 282, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1905, - "src": "2002:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 283, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2002:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1986:27:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 285, - "name": "wad", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 253, - "src": "2015:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 278, - "name": "sub", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1632, - "src": "1982:3:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 286, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1982:37:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1952:67:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 288, - "nodeType": "ExpressionStatement", - "src": "1952:67:2" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 296, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 292, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1323, - "src": "2040:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 294, - "indexExpression": { - "argumentTypes": null, - "id": 293, - "name": "guy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 251, - "src": "2050:3:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2040:14:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 295, - "name": "wad", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 253, - "src": "2058:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2040:21:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "64732d746f6b656e2d696e73756666696369656e742d62616c616e6365", - "id": 297, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2063:31:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_58b3253fdcbd27eec9eeef4ab31fa5cbbc7b0eada085070fa774e92cf7110bce", - "typeString": "literal_string \"ds-token-insufficient-balance\"" - }, - "value": "ds-token-insufficient-balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_58b3253fdcbd27eec9eeef4ab31fa5cbbc7b0eada085070fa774e92cf7110bce", - "typeString": "literal_string \"ds-token-insufficient-balance\"" - } - ], - "id": 291, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1908, - 1909 - ], - "referencedDeclaration": 1909, - "src": "2032:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 298, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2032:63:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 299, - "nodeType": "ExpressionStatement", - "src": "2032:63:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 309, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 300, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1323, - "src": "2101:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 302, - "indexExpression": { - "argumentTypes": null, - "id": 301, - "name": "guy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 251, - "src": "2111:3:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "2101:14:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 304, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1323, - "src": "2122:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 306, - "indexExpression": { - "argumentTypes": null, - "id": 305, - "name": "guy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 251, - "src": "2132:3:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2122:14:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 307, - "name": "wad", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 253, - "src": "2138:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 303, - "name": "sub", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1632, - "src": "2118:3:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 308, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2118:24:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2101:41:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 310, - "nodeType": "ExpressionStatement", - "src": "2101:41:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 316, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 311, - "name": "_supply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1319, - "src": "2148:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 313, - "name": "_supply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1319, - "src": "2162:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 314, - "name": "wad", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 253, - "src": "2171:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 312, - "name": "sub", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1632, - "src": "2158:3:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 315, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2158:17:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2148:27:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 317, - "nodeType": "ExpressionStatement", - "src": "2148:27:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 319, - "name": "guy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 251, - "src": "2191:3:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 320, - "name": "wad", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 253, - "src": "2196:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 318, - "name": "Burn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16, - "src": "2186:4:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 321, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2186:14:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 322, - "nodeType": "EmitStatement", - "src": "2181:19:2" - } - ] - }, - "documentation": null, - "id": 324, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "burn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 254, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 251, - "name": "guy", - "nodeType": "VariableDeclaration", - "scope": 324, - "src": "1800:11:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 250, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1800:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 253, - "name": "wad", - "nodeType": "VariableDeclaration", - "scope": 324, - "src": "1813:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 252, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1813:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1799:23:2" - }, - "returnParameters": { - "id": 255, - "nodeType": "ParameterList", - "parameters": [], - "src": "1830:0:2" - }, - "scope": 335, - "src": "1786:419:2", - "stateMutability": "nonpayable", - "superFunction": 40, - "visibility": "public" - }, - { - "body": { - "id": 333, - "nodeType": "Block", - "src": "2243:25:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 331, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 329, - "name": "locked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "2249:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 330, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2258:5:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "2249:14:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 332, - "nodeType": "ExpressionStatement", - "src": "2249:14:2" - } - ] - }, - "documentation": null, - "id": 334, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 327, - "modifierName": { - "argumentTypes": null, - "id": 326, - "name": "auth", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1263, - "src": "2236:4:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "2236:4:2" - } - ], - "name": "unlock", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 325, - "nodeType": "ParameterList", - "parameters": [], - "src": "2224:2:2" - }, - "returnParameters": { - "id": 328, - "nodeType": "ParameterList", - "parameters": [], - "src": "2243:0:2" - }, - "scope": 335, - "src": "2209:59:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 336, - "src": "824:1446:2" - } - ], - "src": "700:1571:2" - }, - "legacyAST": { - "absolutePath": "/Users/Elena/colonyToken/contracts/Token.sol", - "exportedSymbols": { - "Token": [ - 335 - ] - }, - "id": 336, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 100, - "literals": [ - "solidity", - "0.5", - ".8" - ], - "nodeType": "PragmaDirective", - "src": "700:22:2" - }, - { - "absolutePath": "/Users/Elena/colonyToken/lib/dappsys/auth.sol", - "file": "../lib/dappsys/auth.sol", - "id": 101, - "nodeType": "ImportDirective", - "scope": 336, - "sourceUnit": 1310, - "src": "724:33:2", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/Elena/colonyToken/lib/dappsys/base.sol", - "file": "../lib/dappsys/base.sol", - "id": 102, - "nodeType": "ImportDirective", - "scope": 336, - "sourceUnit": 1515, - "src": "758:33:2", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/Users/Elena/colonyToken/contracts/ERC20Extended.sol", - "file": "./ERC20Extended.sol", - "id": 103, - "nodeType": "ImportDirective", - "scope": 336, - "sourceUnit": 42, - "src": "792:29:2", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [ - { - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 105, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "854:1:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "baseName": { - "contractScope": null, - "id": 104, - "name": "DSTokenBase", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1514, - "src": "842:11:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_DSTokenBase_$1514", - "typeString": "contract DSTokenBase" - } - }, - "id": 106, - "nodeType": "InheritanceSpecifier", - "src": "842:14:2" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 107, - "name": "DSAuth", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1309, - "src": "858:6:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_DSAuth_$1309", - "typeString": "contract DSAuth" - } - }, - "id": 108, - "nodeType": "InheritanceSpecifier", - "src": "858:6:2" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 109, - "name": "ERC20Extended", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 41, - "src": "866:13:2", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20Extended_$41", - "typeString": "contract ERC20Extended" - } - }, - "id": 110, - "nodeType": "InheritanceSpecifier", - "src": "866:13:2" - } - ], - "contractDependencies": [ - 41, - 1195, - 1309, - 1514, - 1533, - 1586, - 1890 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 335, - "linearizedBaseContracts": [ - 335, - 41, - 1309, - 1195, - 1514, - 1890, - 1586, - 1533 - ], - "name": "Token", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "id": 112, - "name": "decimals", - "nodeType": "VariableDeclaration", - "scope": 335, - "src": "884:21:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 111, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "884:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 114, - "name": "symbol", - "nodeType": "VariableDeclaration", - "scope": 335, - "src": "909:20:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string" - }, - "typeName": { - "id": 113, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "909:6:2", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 116, - "name": "name", - "nodeType": "VariableDeclaration", - "scope": 335, - "src": "933:18:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string" - }, - "typeName": { - "id": 115, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "933:6:2", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 118, - "name": "locked", - "nodeType": "VariableDeclaration", - "scope": 335, - "src": "956:18:2", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 117, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "956:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": { - "id": 134, - "nodeType": "Block", - "src": "997:115:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "id": 120, - "name": "locked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "1007:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 132, - "nodeType": "IfStatement", - "src": "1003:98:2", - "trueBody": { - "id": 131, - "nodeType": "Block", - "src": "1015:86:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 123, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1905, - "src": "1044:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 124, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1044:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 125, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1905, - "src": "1056:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 126, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sig", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1056:7:2", - "typeDescriptions": { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_bytes4", - "typeString": "bytes4" - } - ], - "id": 122, - "name": "isAuthorized", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1308, - "src": "1031:12:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$_t_bytes4_$returns$_t_bool_$", - "typeString": "function (address,bytes4) view returns (bool)" - } - }, - "id": 127, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1031:33:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "636f6c6f6e792d746f6b656e2d756e617574686f7269736564", - "id": 128, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1066:27:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_d37c89ab35379dbbb026297d255b69ea134b61b163699a001e9dbf9a490c7cf2", - "typeString": "literal_string \"colony-token-unauthorised\"" - }, - "value": "colony-token-unauthorised" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_d37c89ab35379dbbb026297d255b69ea134b61b163699a001e9dbf9a490c7cf2", - "typeString": "literal_string \"colony-token-unauthorised\"" - } - ], - "id": 121, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1908, - 1909 - ], - "referencedDeclaration": 1909, - "src": "1023:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 129, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1023:71:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 130, - "nodeType": "ExpressionStatement", - "src": "1023:71:2" - } - ] - } - }, - { - "id": 133, - "nodeType": "PlaceholderStatement", - "src": "1106:1:2" - } - ] - }, - "documentation": null, - "id": 135, - "name": "unlocked", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 119, - "nodeType": "ParameterList", - "parameters": [], - "src": "997:0:2" - }, - "src": "979:133:2", - "visibility": "internal" - }, - { - "body": { - "id": 160, - "nodeType": "Block", - "src": "1196:90:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 146, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 144, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 116, - "src": "1202:4:2", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 145, - "name": "_name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 137, - "src": "1209:5:2", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "1202:12:2", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 147, - "nodeType": "ExpressionStatement", - "src": "1202:12:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 150, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 148, - "name": "symbol", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 114, - "src": "1220:6:2", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 149, - "name": "_symbol", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 139, - "src": "1229:7:2", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - "src": "1220:16:2", - "typeDescriptions": { - "typeIdentifier": "t_string_storage", - "typeString": "string storage ref" - } - }, - "id": 151, - "nodeType": "ExpressionStatement", - "src": "1220:16:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 154, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 152, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 112, - "src": "1242:8:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 153, - "name": "_decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 141, - "src": "1253:9:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "1242:20:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "id": 155, - "nodeType": "ExpressionStatement", - "src": "1242:20:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 158, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 156, - "name": "locked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "1268:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 157, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1277:4:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "1268:13:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 159, - "nodeType": "ExpressionStatement", - "src": "1268:13:2" - } - ] - }, - "documentation": null, - "id": 161, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 142, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 137, - "name": "_name", - "nodeType": "VariableDeclaration", - "scope": 161, - "src": "1128:19:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 136, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1128:6:2", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 139, - "name": "_symbol", - "nodeType": "VariableDeclaration", - "scope": 161, - "src": "1149:21:2", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 138, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1149:6:2", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 141, - "name": "_decimals", - "nodeType": "VariableDeclaration", - "scope": 161, - "src": "1172:15:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 140, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "1172:5:2", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1127:61:2" - }, - "returnParameters": { - "id": 143, - "nodeType": "ParameterList", - "parameters": [], - "src": "1196:0:2" - }, - "scope": 335, - "src": "1116:170:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 181, - "nodeType": "Block", - "src": "1386:51:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 176, - "name": "src", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 163, - "src": "1418:3:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 177, - "name": "dst", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 165, - "src": "1423:3:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 178, - "name": "wad", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 167, - "src": "1428:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 174, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1938, - "src": "1399:5:2", - "typeDescriptions": { - "typeIdentifier": "t_super$_Token_$335", - "typeString": "contract super Token" - } - }, - "id": 175, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 1485, - "src": "1399:18:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) returns (bool)" - } - }, - "id": 179, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1399:33:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 173, - "id": 180, - "nodeType": "Return", - "src": "1392:40:2" - } - ] - }, - "documentation": null, - "id": 182, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 170, - "modifierName": { - "argumentTypes": null, - "id": 169, - "name": "unlocked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 135, - "src": "1358:8:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "1358:8:2" - } - ], - "name": "transferFrom", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 168, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 163, - "name": "src", - "nodeType": "VariableDeclaration", - "scope": 182, - "src": "1312:11:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 162, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1312:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 165, - "name": "dst", - "nodeType": "VariableDeclaration", - "scope": 182, - "src": "1325:11:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 164, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1325:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 167, - "name": "wad", - "nodeType": "VariableDeclaration", - "scope": 182, - "src": "1338:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 166, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1338:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1311:36:2" - }, - "returnParameters": { - "id": 173, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 172, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 182, - "src": "1378:4:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 171, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1378:4:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1377:6:2" - }, - "scope": 335, - "src": "1290:147:2", - "stateMutability": "nonpayable", - "superFunction": 1485, - "visibility": "public" - }, - { - "body": { - "id": 195, - "nodeType": "Block", - "src": "1477:32:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 190, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1905, - "src": "1488:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 191, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1488:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 192, - "name": "wad", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 184, - "src": "1500:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 189, - "name": "mint", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 196, - 249 - ], - "referencedDeclaration": 249, - "src": "1483:4:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 193, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1483:21:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 194, - "nodeType": "ExpressionStatement", - "src": "1483:21:2" - } - ] - }, - "documentation": null, - "id": 196, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 187, - "modifierName": { - "argumentTypes": null, - "id": 186, - "name": "auth", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1263, - "src": "1472:4:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "1472:4:2" - } - ], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 185, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 184, - "name": "wad", - "nodeType": "VariableDeclaration", - "scope": 196, - "src": "1455:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 183, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1455:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1454:10:2" - }, - "returnParameters": { - "id": 188, - "nodeType": "ParameterList", - "parameters": [], - "src": "1477:0:2" - }, - "scope": 335, - "src": "1441:68:2", - "stateMutability": "nonpayable", - "superFunction": 21, - "visibility": "public" - }, - { - "body": { - "id": 207, - "nodeType": "Block", - "src": "1544:32:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 202, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1905, - "src": "1555:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 203, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1555:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 204, - "name": "wad", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 198, - "src": "1567:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 201, - "name": "burn", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 208, - 324 - ], - "referencedDeclaration": 324, - "src": "1550:4:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 205, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1550:21:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 206, - "nodeType": "ExpressionStatement", - "src": "1550:21:2" - } - ] - }, - "documentation": null, - "id": 208, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "burn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 199, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 198, - "name": "wad", - "nodeType": "VariableDeclaration", - "scope": 208, - "src": "1527:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 197, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1527:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1526:10:2" - }, - "returnParameters": { - "id": 200, - "nodeType": "ParameterList", - "parameters": [], - "src": "1544:0:2" - }, - "scope": 335, - "src": "1513:63:2", - "stateMutability": "nonpayable", - "superFunction": 33, - "visibility": "public" - }, - { - "body": { - "id": 248, - "nodeType": "Block", - "src": "1629:153:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 226, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 217, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1323, - "src": "1635:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 219, - "indexExpression": { - "argumentTypes": null, - "id": 218, - "name": "guy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 210, - "src": "1645:3:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1635:14:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 221, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1323, - "src": "1656:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 223, - "indexExpression": { - "argumentTypes": null, - "id": 222, - "name": "guy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 210, - "src": "1666:3:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1656:14:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 224, - "name": "wad", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 212, - "src": "1672:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 220, - "name": "add", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1610, - "src": "1652:3:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 225, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1652:24:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1635:41:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 227, - "nodeType": "ExpressionStatement", - "src": "1635:41:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 233, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 228, - "name": "_supply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1319, - "src": "1682:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 230, - "name": "_supply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1319, - "src": "1696:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 231, - "name": "wad", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 212, - "src": "1705:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 229, - "name": "add", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1610, - "src": "1692:3:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 232, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1692:17:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1682:27:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 234, - "nodeType": "ExpressionStatement", - "src": "1682:27:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 236, - "name": "guy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 210, - "src": "1725:3:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 237, - "name": "wad", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 212, - "src": "1730:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 235, - "name": "Mint", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "1720:4:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 238, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1720:14:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 239, - "nodeType": "EmitStatement", - "src": "1715:19:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "307830", - "id": 242, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1762:3:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0x0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 241, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1754:7:2", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 243, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1754:12:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 244, - "name": "guy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 210, - "src": "1768:3:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 245, - "name": "wad", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 212, - "src": "1773:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 240, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1532, - "src": "1745:8:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 246, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1745:32:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 247, - "nodeType": "EmitStatement", - "src": "1740:37:2" - } - ] - }, - "documentation": null, - "id": 249, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 215, - "modifierName": { - "argumentTypes": null, - "id": 214, - "name": "auth", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1263, - "src": "1624:4:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "1624:4:2" - } - ], - "name": "mint", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 213, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 210, - "name": "guy", - "nodeType": "VariableDeclaration", - "scope": 249, - "src": "1594:11:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 209, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1594:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 212, - "name": "wad", - "nodeType": "VariableDeclaration", - "scope": 249, - "src": "1607:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 211, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1607:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1593:23:2" - }, - "returnParameters": { - "id": 216, - "nodeType": "ParameterList", - "parameters": [], - "src": "1629:0:2" - }, - "scope": 335, - "src": "1580:202:2", - "stateMutability": "nonpayable", - "superFunction": 28, - "visibility": "public" - }, - { - "body": { - "id": 323, - "nodeType": "Block", - "src": "1830:375:2", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 259, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 256, - "name": "guy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 251, - "src": "1840:3:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 257, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1905, - "src": "1847:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 258, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1847:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "1840:17:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 290, - "nodeType": "IfStatement", - "src": "1836:190:2", - "trueBody": { - "id": 289, - "nodeType": "Block", - "src": "1859:167:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 268, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 261, - "name": "_approvals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1329, - "src": "1875:10:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 263, - "indexExpression": { - "argumentTypes": null, - "id": 262, - "name": "guy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 251, - "src": "1886:3:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1875:15:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 266, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 264, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1905, - "src": "1891:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 265, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1891:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1875:27:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 267, - "name": "wad", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 253, - "src": "1906:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1875:34:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "64732d746f6b656e2d696e73756666696369656e742d617070726f76616c", - "id": 269, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1911:32:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_696d4069430cf8d6cb2027cca74c9eeb7bde4a18fa913c0c20fafe3803d09463", - "typeString": "literal_string \"ds-token-insufficient-approval\"" - }, - "value": "ds-token-insufficient-approval" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_696d4069430cf8d6cb2027cca74c9eeb7bde4a18fa913c0c20fafe3803d09463", - "typeString": "literal_string \"ds-token-insufficient-approval\"" - } - ], - "id": 260, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1908, - 1909 - ], - "referencedDeclaration": 1909, - "src": "1867:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 270, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1867:77:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 271, - "nodeType": "ExpressionStatement", - "src": "1867:77:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 287, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 272, - "name": "_approvals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1329, - "src": "1952:10:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 276, - "indexExpression": { - "argumentTypes": null, - "id": 273, - "name": "guy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 251, - "src": "1963:3:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1952:15:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 277, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 274, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1905, - "src": "1968:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 275, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1968:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1952:27:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 279, - "name": "_approvals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1329, - "src": "1986:10:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", - "typeString": "mapping(address => mapping(address => uint256))" - } - }, - "id": 281, - "indexExpression": { - "argumentTypes": null, - "id": 280, - "name": "guy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 251, - "src": "1997:3:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1986:15:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 284, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 282, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1905, - "src": "2002:3:2", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 283, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2002:10:2", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1986:27:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 285, - "name": "wad", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 253, - "src": "2015:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 278, - "name": "sub", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1632, - "src": "1982:3:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 286, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1982:37:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1952:67:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 288, - "nodeType": "ExpressionStatement", - "src": "1952:67:2" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 296, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 292, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1323, - "src": "2040:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 294, - "indexExpression": { - "argumentTypes": null, - "id": 293, - "name": "guy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 251, - "src": "2050:3:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2040:14:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 295, - "name": "wad", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 253, - "src": "2058:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2040:21:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "64732d746f6b656e2d696e73756666696369656e742d62616c616e6365", - "id": 297, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2063:31:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_58b3253fdcbd27eec9eeef4ab31fa5cbbc7b0eada085070fa774e92cf7110bce", - "typeString": "literal_string \"ds-token-insufficient-balance\"" - }, - "value": "ds-token-insufficient-balance" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_58b3253fdcbd27eec9eeef4ab31fa5cbbc7b0eada085070fa774e92cf7110bce", - "typeString": "literal_string \"ds-token-insufficient-balance\"" - } - ], - "id": 291, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1908, - 1909 - ], - "referencedDeclaration": 1909, - "src": "2032:7:2", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 298, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2032:63:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 299, - "nodeType": "ExpressionStatement", - "src": "2032:63:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 309, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 300, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1323, - "src": "2101:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 302, - "indexExpression": { - "argumentTypes": null, - "id": 301, - "name": "guy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 251, - "src": "2111:3:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "2101:14:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 304, - "name": "_balances", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1323, - "src": "2122:9:2", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", - "typeString": "mapping(address => uint256)" - } - }, - "id": 306, - "indexExpression": { - "argumentTypes": null, - "id": 305, - "name": "guy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 251, - "src": "2132:3:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2122:14:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 307, - "name": "wad", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 253, - "src": "2138:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 303, - "name": "sub", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1632, - "src": "2118:3:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 308, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2118:24:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2101:41:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 310, - "nodeType": "ExpressionStatement", - "src": "2101:41:2" - }, - { - "expression": { - "argumentTypes": null, - "id": 316, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 311, - "name": "_supply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1319, - "src": "2148:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 313, - "name": "_supply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1319, - "src": "2162:7:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 314, - "name": "wad", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 253, - "src": "2171:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 312, - "name": "sub", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1632, - "src": "2158:3:2", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 315, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2158:17:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2148:27:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 317, - "nodeType": "ExpressionStatement", - "src": "2148:27:2" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 319, - "name": "guy", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 251, - "src": "2191:3:2", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 320, - "name": "wad", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 253, - "src": "2196:3:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 318, - "name": "Burn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16, - "src": "2186:4:2", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 321, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2186:14:2", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 322, - "nodeType": "EmitStatement", - "src": "2181:19:2" - } - ] - }, - "documentation": null, - "id": 324, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "burn", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 254, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 251, - "name": "guy", - "nodeType": "VariableDeclaration", - "scope": 324, - "src": "1800:11:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 250, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1800:7:2", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 253, - "name": "wad", - "nodeType": "VariableDeclaration", - "scope": 324, - "src": "1813:8:2", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 252, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1813:4:2", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1799:23:2" - }, - "returnParameters": { - "id": 255, - "nodeType": "ParameterList", - "parameters": [], - "src": "1830:0:2" - }, - "scope": 335, - "src": "1786:419:2", - "stateMutability": "nonpayable", - "superFunction": 40, - "visibility": "public" - }, - { - "body": { - "id": 333, - "nodeType": "Block", - "src": "2243:25:2", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 331, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 329, - "name": "locked", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "2249:6:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 330, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2258:5:2", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "2249:14:2", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 332, - "nodeType": "ExpressionStatement", - "src": "2249:14:2" - } - ] - }, - "documentation": null, - "id": 334, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 327, - "modifierName": { - "argumentTypes": null, - "id": 326, - "name": "auth", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1263, - "src": "2236:4:2", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "2236:4:2" - } - ], - "name": "unlock", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 325, - "nodeType": "ParameterList", - "parameters": [], - "src": "2224:2:2" - }, - "returnParameters": { - "id": 328, - "nodeType": "ParameterList", - "parameters": [], - "src": "2243:0:2" - }, - "scope": 335, - "src": "2209:59:2", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - } - ], - "scope": 336, - "src": "824:1446:2" - } - ], - "src": "700:1571:2" - }, - "compiler": { - "name": "solc", - "version": "0.5.8+commit.23d335f2.Linux.g++" - }, - "networks": {}, - "schemaVersion": "3.0.6", - "updatedAt": "2019-05-23T10:20:55.921Z", - "devdoc": { - "methods": {} - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/src/contracts/extensions/coinMachine/1/CoinMachine.d.ts b/src/contracts/extensions/coinMachine/1/CoinMachine.d.ts new file mode 100644 index 000000000..40998e0bf --- /dev/null +++ b/src/contracts/extensions/coinMachine/1/CoinMachine.d.ts @@ -0,0 +1,898 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-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 CoinMachineInterface extends Interface { + functions: { + authority: TypedFunctionDescription<{ encode([]: []): string }>; + + getColony: TypedFunctionDescription<{ encode([]: []): string }>; + + getDeprecated: TypedFunctionDescription<{ encode([]: []): string }>; + + owner: TypedFunctionDescription<{ encode([]: []): string }>; + + setAuthority: TypedFunctionDescription<{ + encode([authority_]: [string]): string; + }>; + + setOwner: TypedFunctionDescription<{ encode([owner_]: [string]): string }>; + + identifier: TypedFunctionDescription<{ encode([]: []): string }>; + + version: TypedFunctionDescription<{ encode([]: []): string }>; + + install: TypedFunctionDescription<{ encode([_colony]: [string]): string }>; + + finishUpgrade: TypedFunctionDescription<{ encode([]: []): string }>; + + deprecate: TypedFunctionDescription<{ + encode([_deprecated]: [boolean]): string; + }>; + + uninstall: TypedFunctionDescription<{ encode([]: []): string }>; + + initialise: TypedFunctionDescription<{ + encode([ + _purchaseToken, + _periodLength, + _windowSize, + _targetPerPeriod, + _maxPerPeriod, + _tokensToSell, + _startingPrice, + ]: [ + string, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish + ]): string; + }>; + + buyTokens: TypedFunctionDescription<{ + encode([_numTokens]: [BigNumberish]): string; + }>; + + updatePeriod: TypedFunctionDescription<{ encode([]: []): string }>; + + getPeriodLength: TypedFunctionDescription<{ encode([]: []): string }>; + + getWindowSize: TypedFunctionDescription<{ encode([]: []): string }>; + + getTargetPerPeriod: TypedFunctionDescription<{ encode([]: []): string }>; + + getMaxPerPeriod: TypedFunctionDescription<{ encode([]: []): string }>; + + getTokensToSell: TypedFunctionDescription<{ encode([]: []): string }>; + + getCurrentPrice: TypedFunctionDescription<{ encode([]: []): string }>; + + getNumAvailable: TypedFunctionDescription<{ encode([]: []): string }>; + }; + + events: { + ExtensionInitialised: TypedEventDescription<{ + encodeTopics([]: []): string[]; + }>; + + LogSetAuthority: TypedEventDescription<{ + encodeTopics([authority]: [string | null]): string[]; + }>; + + LogSetOwner: TypedEventDescription<{ + encodeTopics([owner]: [string | null]): string[]; + }>; + + PeriodUpdated: TypedEventDescription<{ + encodeTopics([activePeriod, currentPeriod]: [null, null]): string[]; + }>; + + TokensBought: TypedEventDescription<{ + encodeTopics([buyer, numTokens, totalCost]: [null, null, null]): string[]; + }>; + }; +} + +export class CoinMachine extends Contract { + connect(signerOrProvider: Signer | Provider | string): CoinMachine; + attach(addressOrName: string): CoinMachine; + deployed(): Promise; + + on(event: EventFilter | string, listener: Listener): CoinMachine; + once(event: EventFilter | string, listener: Listener): CoinMachine; + addListener(eventName: EventFilter | string, listener: Listener): CoinMachine; + removeAllListeners(eventName: EventFilter | string): CoinMachine; + removeListener(eventName: any, listener: Listener): CoinMachine; + + interface: CoinMachineInterface; + + functions: { + authority(overrides?: TransactionOverrides): Promise; + + "authority()"(overrides?: TransactionOverrides): Promise; + + getColony(overrides?: TransactionOverrides): Promise; + + "getColony()"(overrides?: TransactionOverrides): Promise; + + getDeprecated(overrides?: TransactionOverrides): Promise; + + "getDeprecated()"(overrides?: TransactionOverrides): Promise; + + owner(overrides?: TransactionOverrides): Promise; + + "owner()"(overrides?: TransactionOverrides): Promise; + + setAuthority( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + "setAuthority(address)"( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + setOwner( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + "setOwner(address)"( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the identifier of the extension + */ + identifier(overrides?: TransactionOverrides): Promise; + + /** + * Returns the identifier of the extension + */ + "identifier()"(overrides?: TransactionOverrides): Promise; + + /** + * Returns the version of the extension + */ + version(overrides?: TransactionOverrides): Promise; + + /** + * Returns the version of the extension + */ + "version()"(overrides?: TransactionOverrides): Promise; + + /** + * Configures the extension + * @param _colony The colony in which the extension holds permissions + */ + install( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Configures the extension + * @param _colony The colony in which the extension holds permissions + */ + "install(address)"( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when upgrading the extension + */ + finishUpgrade( + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when upgrading the extension + */ + "finishUpgrade()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + deprecate( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + "deprecate(bool)"( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when uninstalling the extension + */ + uninstall(overrides?: TransactionOverrides): Promise; + + /** + * Called when uninstalling the extension + */ + "uninstall()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Must be called before any sales can be made + * @param _maxPerPeriod The maximum number of tokens that can be sold per period + * @param _periodLength How long in seconds each period of the sale should last + * @param _purchaseToken The token to receive payments in. Use 0x0 for ether + * @param _startingPrice The sale price to start at, expressed in units of _purchaseToken per token being sold, as a WAD + * @param _targetPerPeriod The number of tokens to aim to sell per period + * @param _windowSize Characteristic number of periods that should be used for the moving average. In the long-term, 86% of the weighting will be in this window size. The higher the number, the slower the price will be to adjust + */ + initialise( + _purchaseToken: string, + _periodLength: BigNumberish, + _windowSize: BigNumberish, + _targetPerPeriod: BigNumberish, + _maxPerPeriod: BigNumberish, + _tokensToSell: BigNumberish, + _startingPrice: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Must be called before any sales can be made + * @param _maxPerPeriod The maximum number of tokens that can be sold per period + * @param _periodLength How long in seconds each period of the sale should last + * @param _purchaseToken The token to receive payments in. Use 0x0 for ether + * @param _startingPrice The sale price to start at, expressed in units of _purchaseToken per token being sold, as a WAD + * @param _targetPerPeriod The number of tokens to aim to sell per period + * @param _windowSize Characteristic number of periods that should be used for the moving average. In the long-term, 86% of the weighting will be in this window size. The higher the number, the slower the price will be to adjust + */ + "initialise(address,uint256,uint256,uint256,uint256,uint256,uint256)"( + _purchaseToken: string, + _periodLength: BigNumberish, + _windowSize: BigNumberish, + _targetPerPeriod: BigNumberish, + _maxPerPeriod: BigNumberish, + _tokensToSell: BigNumberish, + _startingPrice: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Purchase tokens from Coin Machine. + * @param _numTokens The number of tokens to purchase + */ + buyTokens( + _numTokens: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Purchase tokens from Coin Machine. + * @param _numTokens The number of tokens to purchase + */ + "buyTokens(uint256)"( + _numTokens: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Bring the token accounting current + */ + updatePeriod( + overrides?: TransactionOverrides + ): Promise; + + /** + * Bring the token accounting current + */ + "updatePeriod()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the length of the sale period + */ + getPeriodLength(overrides?: TransactionOverrides): Promise; + + /** + * Get the length of the sale period + */ + "getPeriodLength()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the size of the averaging window + */ + getWindowSize(overrides?: TransactionOverrides): Promise; + + /** + * Get the size of the averaging window + */ + "getWindowSize()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the target number of tokens to sell per period + */ + getTargetPerPeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the target number of tokens to sell per period + */ + "getTargetPerPeriod()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the maximum number of tokens to sell per period + */ + getMaxPerPeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the maximum number of tokens to sell per period + */ + "getMaxPerPeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the total number of tokens remaining for sale + */ + getTokensToSell(overrides?: TransactionOverrides): Promise; + + /** + * Get the total number of tokens remaining for sale + */ + "getTokensToSell()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the current price per token + */ + getCurrentPrice(overrides?: TransactionOverrides): Promise; + + /** + * Get the current price per token + */ + "getCurrentPrice()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of remaining tokens for sale this period + */ + getNumAvailable(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of remaining tokens for sale this period + */ + "getNumAvailable()"(overrides?: TransactionOverrides): Promise; + }; + + authority(overrides?: TransactionOverrides): Promise; + + "authority()"(overrides?: TransactionOverrides): Promise; + + getColony(overrides?: TransactionOverrides): Promise; + + "getColony()"(overrides?: TransactionOverrides): Promise; + + getDeprecated(overrides?: TransactionOverrides): Promise; + + "getDeprecated()"(overrides?: TransactionOverrides): Promise; + + owner(overrides?: TransactionOverrides): Promise; + + "owner()"(overrides?: TransactionOverrides): Promise; + + setAuthority( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + "setAuthority(address)"( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + setOwner( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + "setOwner(address)"( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the identifier of the extension + */ + identifier(overrides?: TransactionOverrides): Promise; + + /** + * Returns the identifier of the extension + */ + "identifier()"(overrides?: TransactionOverrides): Promise; + + /** + * Returns the version of the extension + */ + version(overrides?: TransactionOverrides): Promise; + + /** + * Returns the version of the extension + */ + "version()"(overrides?: TransactionOverrides): Promise; + + /** + * Configures the extension + * @param _colony The colony in which the extension holds permissions + */ + install( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Configures the extension + * @param _colony The colony in which the extension holds permissions + */ + "install(address)"( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when upgrading the extension + */ + finishUpgrade(overrides?: TransactionOverrides): Promise; + + /** + * Called when upgrading the extension + */ + "finishUpgrade()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + deprecate( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + "deprecate(bool)"( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when uninstalling the extension + */ + uninstall(overrides?: TransactionOverrides): Promise; + + /** + * Called when uninstalling the extension + */ + "uninstall()"(overrides?: TransactionOverrides): Promise; + + /** + * Must be called before any sales can be made + * @param _maxPerPeriod The maximum number of tokens that can be sold per period + * @param _periodLength How long in seconds each period of the sale should last + * @param _purchaseToken The token to receive payments in. Use 0x0 for ether + * @param _startingPrice The sale price to start at, expressed in units of _purchaseToken per token being sold, as a WAD + * @param _targetPerPeriod The number of tokens to aim to sell per period + * @param _windowSize Characteristic number of periods that should be used for the moving average. In the long-term, 86% of the weighting will be in this window size. The higher the number, the slower the price will be to adjust + */ + initialise( + _purchaseToken: string, + _periodLength: BigNumberish, + _windowSize: BigNumberish, + _targetPerPeriod: BigNumberish, + _maxPerPeriod: BigNumberish, + _tokensToSell: BigNumberish, + _startingPrice: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Must be called before any sales can be made + * @param _maxPerPeriod The maximum number of tokens that can be sold per period + * @param _periodLength How long in seconds each period of the sale should last + * @param _purchaseToken The token to receive payments in. Use 0x0 for ether + * @param _startingPrice The sale price to start at, expressed in units of _purchaseToken per token being sold, as a WAD + * @param _targetPerPeriod The number of tokens to aim to sell per period + * @param _windowSize Characteristic number of periods that should be used for the moving average. In the long-term, 86% of the weighting will be in this window size. The higher the number, the slower the price will be to adjust + */ + "initialise(address,uint256,uint256,uint256,uint256,uint256,uint256)"( + _purchaseToken: string, + _periodLength: BigNumberish, + _windowSize: BigNumberish, + _targetPerPeriod: BigNumberish, + _maxPerPeriod: BigNumberish, + _tokensToSell: BigNumberish, + _startingPrice: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Purchase tokens from Coin Machine. + * @param _numTokens The number of tokens to purchase + */ + buyTokens( + _numTokens: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Purchase tokens from Coin Machine. + * @param _numTokens The number of tokens to purchase + */ + "buyTokens(uint256)"( + _numTokens: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Bring the token accounting current + */ + updatePeriod(overrides?: TransactionOverrides): Promise; + + /** + * Bring the token accounting current + */ + "updatePeriod()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the length of the sale period + */ + getPeriodLength(overrides?: TransactionOverrides): Promise; + + /** + * Get the length of the sale period + */ + "getPeriodLength()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the size of the averaging window + */ + getWindowSize(overrides?: TransactionOverrides): Promise; + + /** + * Get the size of the averaging window + */ + "getWindowSize()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the target number of tokens to sell per period + */ + getTargetPerPeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the target number of tokens to sell per period + */ + "getTargetPerPeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the maximum number of tokens to sell per period + */ + getMaxPerPeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the maximum number of tokens to sell per period + */ + "getMaxPerPeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the total number of tokens remaining for sale + */ + getTokensToSell(overrides?: TransactionOverrides): Promise; + + /** + * Get the total number of tokens remaining for sale + */ + "getTokensToSell()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the current price per token + */ + getCurrentPrice(overrides?: TransactionOverrides): Promise; + + /** + * Get the current price per token + */ + "getCurrentPrice()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of remaining tokens for sale this period + */ + getNumAvailable(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of remaining tokens for sale this period + */ + "getNumAvailable()"(overrides?: TransactionOverrides): Promise; + + filters: { + ExtensionInitialised(): EventFilter; + + LogSetAuthority(authority: string | null): EventFilter; + + LogSetOwner(owner: string | null): EventFilter; + + PeriodUpdated(activePeriod: null, currentPeriod: null): EventFilter; + + TokensBought(buyer: null, numTokens: null, totalCost: null): EventFilter; + }; + + estimate: { + authority(overrides?: TransactionOverrides): Promise; + + "authority()"(overrides?: TransactionOverrides): Promise; + + getColony(overrides?: TransactionOverrides): Promise; + + "getColony()"(overrides?: TransactionOverrides): Promise; + + getDeprecated(overrides?: TransactionOverrides): Promise; + + "getDeprecated()"(overrides?: TransactionOverrides): Promise; + + owner(overrides?: TransactionOverrides): Promise; + + "owner()"(overrides?: TransactionOverrides): Promise; + + setAuthority( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + "setAuthority(address)"( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + setOwner( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + "setOwner(address)"( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the identifier of the extension + */ + identifier(overrides?: TransactionOverrides): Promise; + + /** + * Returns the identifier of the extension + */ + "identifier()"(overrides?: TransactionOverrides): Promise; + + /** + * Returns the version of the extension + */ + version(overrides?: TransactionOverrides): Promise; + + /** + * Returns the version of the extension + */ + "version()"(overrides?: TransactionOverrides): Promise; + + /** + * Configures the extension + * @param _colony The colony in which the extension holds permissions + */ + install( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Configures the extension + * @param _colony The colony in which the extension holds permissions + */ + "install(address)"( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when upgrading the extension + */ + finishUpgrade(overrides?: TransactionOverrides): Promise; + + /** + * Called when upgrading the extension + */ + "finishUpgrade()"(overrides?: TransactionOverrides): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + deprecate( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + "deprecate(bool)"( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when uninstalling the extension + */ + uninstall(overrides?: TransactionOverrides): Promise; + + /** + * Called when uninstalling the extension + */ + "uninstall()"(overrides?: TransactionOverrides): Promise; + + /** + * Must be called before any sales can be made + * @param _maxPerPeriod The maximum number of tokens that can be sold per period + * @param _periodLength How long in seconds each period of the sale should last + * @param _purchaseToken The token to receive payments in. Use 0x0 for ether + * @param _startingPrice The sale price to start at, expressed in units of _purchaseToken per token being sold, as a WAD + * @param _targetPerPeriod The number of tokens to aim to sell per period + * @param _windowSize Characteristic number of periods that should be used for the moving average. In the long-term, 86% of the weighting will be in this window size. The higher the number, the slower the price will be to adjust + */ + initialise( + _purchaseToken: string, + _periodLength: BigNumberish, + _windowSize: BigNumberish, + _targetPerPeriod: BigNumberish, + _maxPerPeriod: BigNumberish, + _tokensToSell: BigNumberish, + _startingPrice: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Must be called before any sales can be made + * @param _maxPerPeriod The maximum number of tokens that can be sold per period + * @param _periodLength How long in seconds each period of the sale should last + * @param _purchaseToken The token to receive payments in. Use 0x0 for ether + * @param _startingPrice The sale price to start at, expressed in units of _purchaseToken per token being sold, as a WAD + * @param _targetPerPeriod The number of tokens to aim to sell per period + * @param _windowSize Characteristic number of periods that should be used for the moving average. In the long-term, 86% of the weighting will be in this window size. The higher the number, the slower the price will be to adjust + */ + "initialise(address,uint256,uint256,uint256,uint256,uint256,uint256)"( + _purchaseToken: string, + _periodLength: BigNumberish, + _windowSize: BigNumberish, + _targetPerPeriod: BigNumberish, + _maxPerPeriod: BigNumberish, + _tokensToSell: BigNumberish, + _startingPrice: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Purchase tokens from Coin Machine. + * @param _numTokens The number of tokens to purchase + */ + buyTokens( + _numTokens: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Purchase tokens from Coin Machine. + * @param _numTokens The number of tokens to purchase + */ + "buyTokens(uint256)"( + _numTokens: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Bring the token accounting current + */ + updatePeriod(overrides?: TransactionOverrides): Promise; + + /** + * Bring the token accounting current + */ + "updatePeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the length of the sale period + */ + getPeriodLength(overrides?: TransactionOverrides): Promise; + + /** + * Get the length of the sale period + */ + "getPeriodLength()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the size of the averaging window + */ + getWindowSize(overrides?: TransactionOverrides): Promise; + + /** + * Get the size of the averaging window + */ + "getWindowSize()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the target number of tokens to sell per period + */ + getTargetPerPeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the target number of tokens to sell per period + */ + "getTargetPerPeriod()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the maximum number of tokens to sell per period + */ + getMaxPerPeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the maximum number of tokens to sell per period + */ + "getMaxPerPeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the total number of tokens remaining for sale + */ + getTokensToSell(overrides?: TransactionOverrides): Promise; + + /** + * Get the total number of tokens remaining for sale + */ + "getTokensToSell()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the current price per token + */ + getCurrentPrice(overrides?: TransactionOverrides): Promise; + + /** + * Get the current price per token + */ + "getCurrentPrice()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of remaining tokens for sale this period + */ + getNumAvailable(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of remaining tokens for sale this period + */ + "getNumAvailable()"(overrides?: TransactionOverrides): Promise; + }; +} diff --git a/src/contracts/extensions/coinMachine/1/factories/CoinMachine__factory.ts b/src/contracts/extensions/coinMachine/1/factories/CoinMachine__factory.ts new file mode 100644 index 000000000..be8c2b608 --- /dev/null +++ b/src/contracts/extensions/coinMachine/1/factories/CoinMachine__factory.ts @@ -0,0 +1,415 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, ContractFactory, Signer } from "ethers"; +import { Provider } from "ethers/providers"; +import { UnsignedTransaction } from "ethers/utils/transaction"; + +import { TransactionOverrides } from ".."; +import { CoinMachine } from "../CoinMachine"; + +export class CoinMachine__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy(overrides?: TransactionOverrides): Promise { + return super.deploy(overrides) as Promise; + } + getDeployTransaction(overrides?: TransactionOverrides): UnsignedTransaction { + return super.getDeployTransaction(overrides); + } + attach(address: string): CoinMachine { + return super.attach(address) as CoinMachine; + } + connect(signer: Signer): CoinMachine__factory { + return super.connect(signer) as CoinMachine__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): CoinMachine { + return new Contract(address, _abi, signerOrProvider) as CoinMachine; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [], + name: "ExtensionInitialised", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "authority", + type: "address", + }, + ], + name: "LogSetAuthority", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "LogSetOwner", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "activePeriod", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "currentPeriod", + type: "uint256", + }, + ], + name: "PeriodUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "buyer", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "numTokens", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "totalCost", + type: "uint256", + }, + ], + name: "TokensBought", + type: "event", + }, + { + inputs: [], + name: "authority", + outputs: [ + { + internalType: "contract DSAuthority", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getColony", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getDeprecated", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract DSAuthority", + name: "authority_", + type: "address", + }, + ], + name: "setAuthority", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner_", + type: "address", + }, + ], + name: "setOwner", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "identifier", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_colony", + type: "address", + }, + ], + name: "install", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "finishUpgrade", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bool", + name: "_deprecated", + type: "bool", + }, + ], + name: "deprecate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "uninstall", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_purchaseToken", + type: "address", + }, + { + internalType: "uint256", + name: "_periodLength", + type: "uint256", + }, + { + internalType: "uint256", + name: "_windowSize", + type: "uint256", + }, + { + internalType: "uint256", + name: "_targetPerPeriod", + type: "uint256", + }, + { + internalType: "uint256", + name: "_maxPerPeriod", + type: "uint256", + }, + { + internalType: "uint256", + name: "_tokensToSell", + type: "uint256", + }, + { + internalType: "uint256", + name: "_startingPrice", + type: "uint256", + }, + ], + name: "initialise", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_numTokens", + type: "uint256", + }, + ], + name: "buyTokens", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [], + name: "updatePeriod", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getPeriodLength", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getWindowSize", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getTargetPerPeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getMaxPerPeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getTokensToSell", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getCurrentPrice", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getNumAvailable", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, +]; + +const _bytecode = + "0x608060405234801561001057600080fd5b50600180546001600160a01b031916339081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a26113828061005e6000396000f3fe6080604052600436106101355760003560e01c80637a9e5e4b116100ab578063a83627de1161006f578063a83627de146102e4578063bf7e214f146102f9578063bfd68ab71461030e578063eb91d37e14610323578063fb3d8ee514610338578063fcf6ba931461034d57610135565b80637a9e5e4b146102585780638469ddc7146102785780638da5cb5b1461028d5780639251cff4146102af578063a0e3ad26146102cf57610135565b80632a1b8f9b116100fd5780632a1b8f9b146101d15780632a85c366146101f1578063340df28f146102065780633610724e1461021b57806354fd4d501461022e5780637998a1c41461024357610135565b80630425da2e1461013a5780630d638f301461015c57806313af4035146101715780631f7ea81f1461019157806322706496146101bc575b600080fd5b34801561014657600080fd5b5061015a610155366004610eb5565b61036f565b005b34801561016857600080fd5b5061015a610572565b34801561017d57600080fd5b5061015a61018c366004610e92565b6105b2565b34801561019d57600080fd5b506101a6610634565b6040516101b39190611032565b60405180910390f35b3480156101c857600080fd5b506101a661063b565b3480156101dd57600080fd5b5061015a6101ec366004610e92565b610641565b3480156101fd57600080fd5b506101a66106be565b34801561021257600080fd5b5061015a6106c4565b61015a610229366004610f41565b6106f8565b34801561023a57600080fd5b506101a661092f565b34801561024f57600080fd5b506101a6610934565b34801561026457600080fd5b5061015a610273366004610e92565b610958565b34801561028457600080fd5b506101a66109d6565b34801561029957600080fd5b506102a26109dc565b6040516101b39190610f59565b3480156102bb57600080fd5b5061015a6102ca366004610f09565b6109eb565b3480156102db57600080fd5b506101a6610a3b565b3480156102f057600080fd5b5061015a610a41565b34801561030557600080fd5b506102a2610b18565b34801561031a57600080fd5b506102a2610b27565b34801561032f57600080fd5b506101a6610b36565b34801561034457600080fd5b506101a6610bcb565b34801561035957600080fd5b50610362610c03565b6040516101b39190611027565b600354604051635597bd7160e11b81526001600160a01b039091169063ab2f7ae2906103a49033906001908190600401610f91565b60206040518083038186803b1580156103bc57600080fd5b505afa1580156103d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103f49190610f25565b6104195760405162461bcd60e51b81526004016104109061123c565b60405180910390fd5b600b54156104395760405162461bcd60e51b81526004016104109061112b565b600086116104595760405162461bcd60e51b815260040161041090611273565b600085116104795760405162461bcd60e51b8152600401610410906110c6565b6101ff85111561049b5760405162461bcd60e51b8152600401610410906112aa565b600084116104bb5760405162461bcd60e51b8152600401610410906111ce565b838310156104db5760405162461bcd60e51b815260040161041090611160565b600480546001600160a01b0319166001600160a01b0389161790556005869055610509600260018701610c13565b600655600785905560088490556009839055600a829055600c81905561052d610c44565b600b5560085461053d9082610c57565b600f556040517f690c4b6201f6a4c703f9d21c205d98a08dff8461e7a71e49c6d47cc8b894850190600090a150505050505050565b610588336000356001600160e01b031916610c7f565b6105a45760405162461bcd60e51b81526004016104109061106a565b6003546001600160a01b0316ff5b6105c8336000356001600160e01b031916610c7f565b6105e45760405162461bcd60e51b81526004016104109061106a565b600180546001600160a01b0319166001600160a01b0383811691909117918290556040519116907fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b6009545b90565b600a5490565b610657336000356001600160e01b031916610c7f565b6106735760405162461bcd60e51b81526004016104109061106a565b6003546001600160a01b03161561069c5760405162461bcd60e51b815260040161041090611197565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b60085490565b6106da336000356001600160e01b031916610c7f565b6106f65760405162461bcd60e51b81526004016104109061106a565b565b600354600160a01b900460ff16156107225760405162461bcd60e51b8152600401610410906112e1565b61072a610a41565b600061074761073f83600d5460095403610d5d565b600a54610d5d565b9050600061075782600c54610c57565b9050610765600e5482610d74565b600e55600d546107759083610d74565b600d55600a546107859083610d97565b600a55600954600d54111561079657fe5b6004546001600160a01b031661080457803410156107c65760405162461bcd60e51b815260040161041090611205565b803411156107ff5760405133903483900380156108fc02916000818181858888f193505050501580156107fd573d6000803e3d6000fd5b505b61088b565b600480546040516323b872dd60e01b81526001600160a01b03909116916323b872dd916108379133913091879101610f6d565b602060405180830381600087803b15801561085157600080fd5b505af1158015610865573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108899190610f25565b505b600354604051638f6811a360e01b81526001600160a01b0390911690638f6811a3906108bd9033908690600401610fc0565b600060405180830381600087803b1580156108d757600080fd5b505af11580156108eb573d6000803e3d6000fd5b505050507f8442948036198f1146d3a63c3db355d7e0295c2cc5676c755990445da4fdc1c933848360405161092293929190610fd9565b60405180910390a1505050565b600190565b7f9600bfe26d6984b5236952886f19c3d84b771865e505e2cb8f3a7137b7f3a46590565b61096e336000356001600160e01b031916610c7f565b61098a5760405162461bcd60e51b81526004016104109061106a565b600080546001600160a01b0319166001600160a01b03838116919091178083556040519116917f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada491a250565b60055490565b6001546001600160a01b031681565b610a01336000356001600160e01b031916610c7f565b610a1d5760405162461bcd60e51b81526004016104109061106a565b60038054911515600160a01b0260ff60a01b19909216919091179055565b60075490565b6000610a4b610c44565b600b5490915081811015610adb57610a67600654600e54610c57565b610a7f600654670de0b6b3a764000003600f54610c57565b01600f556000600e819055600d55600b548203600019018015610ac157610abd610ab5600654670de0b6b3a76400000383610dba565b600f54610c57565b600f555b82600b81905550610ad6600f54600854610c13565b600c55505b7f5b873fc01d45058fe77f3883a91020f46d5a7385baac6ceab19748d1d0ae464a8183604051610b0c929190611318565b60405180910390a15050565b6000546001600160a01b031681565b6003546001600160a01b031690565b600080610b41610c44565b905080600b541415610b57575050600c54610638565b600f54600654600e54610b6a9190610c57565b610b80600654670de0b6b3a76400000383610c57565b600b54910191508203600019018015610bb557610bb2610bac600654670de0b6b3a76400000383610dba565b83610c57565b91505b610bc182600854610c13565b9350505050610638565b6000610bfe600a54610bf9600954610be1610c44565b600b5414610bf0576000610bf4565b600d545b610d97565b610d5d565b905090565b600354600160a01b900460ff1690565b600081610c35610c2b85670de0b6b3a7640000610dd1565b6002855b04610d74565b81610c3c57fe5b049392505050565b60006005544281610c5157fe5b04905090565b6000670de0b6b3a7640000610c35610c6f8585610dd1565b6002670de0b6b3a7640000610c2f565b60006001600160a01b038316301415610c9a57506001610d57565b6001546001600160a01b0384811691161415610cb857506001610d57565b6000546001600160a01b0316610cd057506000610d57565b60005460405163b700961360e01b81526001600160a01b039091169063b700961390610d0490869030908790600401610ffa565b60206040518083038186803b158015610d1c57600080fd5b505afa158015610d30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d549190610f25565b90505b92915050565b600081831115610d6d5781610d54565b5090919050565b80820182811015610d575760405162461bcd60e51b8152600401610410906110fd565b80820382811115610d575760405162461bcd60e51b81526004016104109061103b565b6000633b9aca00610c3584633b9aca000284610e08565b6000811580610dec57505080820282828281610de957fe5b04145b610d575760405162461bcd60e51b815260040161041090611098565b600060028206610e24576b033b2e3c9fd0803ce8000000610e26565b825b90506002820491505b8115610d5757610e3f8384610e62565b92506002820615610e5757610e548184610e62565b90505b600282049150610e2f565b60006b033b2e3c9fd0803ce8000000610c35610e7e8585610dd1565b60026b033b2e3c9fd0803ce8000000610c2f565b600060208284031215610ea3578081fd5b8135610eae81611326565b9392505050565b600080600080600080600060e0888a031215610ecf578283fd5b8735610eda81611326565b9960208901359950604089013598606081013598506080810135975060a0810135965060c00135945092505050565b600060208284031215610f1a578081fd5b8135610eae8161133e565b600060208284031215610f36578081fd5b8151610eae8161133e565b600060208284031215610f52578081fd5b5035919050565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b0384168152602081018390526060810160088310610fb257fe5b826040830152949350505050565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039390931683526020830191909152604082015260600190565b6001600160a01b0393841681529190921660208201526001600160e01b0319909116604082015260600190565b901515815260200190565b90815260200190565b60208082526015908201527464732d6d6174682d7375622d756e646572666c6f7760581b604082015260600190565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b60208082526014908201527364732d6d6174682d6d756c2d6f766572666c6f7760601b604082015260600190565b6020808252601d908201527f636f696e2d6d616368696e652d77696e646f772d746f6f2d736d616c6c000000604082015260600190565b60208082526014908201527364732d6d6174682d6164642d6f766572666c6f7760601b604082015260600190565b6020808252818101527f636f696e2d6d616368696e652d616c72656164792d696e697469616c69736564604082015260600190565b6020808252601a908201527f636f696e2d6d616368696e652d6d61782d746f6f2d736d616c6c000000000000604082015260600190565b6020808252601b908201527f657874656e73696f6e2d616c72656164792d696e7374616c6c65640000000000604082015260600190565b6020808252601d908201527f636f696e2d6d616368696e652d7461726765742d746f6f2d736d616c6c000000604082015260600190565b6020808252601f908201527f636f696e2d6d616368696e652d696e73756666696369656e742d66756e647300604082015260600190565b6020808252601c908201527f636f696e2d6d616368696e652d63616c6c65722d6e6f742d726f6f7400000000604082015260600190565b6020808252601d908201527f636f696e2d6d616368696e652d706572696f642d746f6f2d736d616c6c000000604082015260600190565b6020808252601d908201527f636f696e2d6d616368696e652d77696e646f772d746f6f2d6c61726765000000604082015260600190565b6020808252601b908201527f636f6c6f6e792d657874656e73696f6e2d646570726563617465640000000000604082015260600190565b918252602082015260400190565b6001600160a01b038116811461133b57600080fd5b50565b801515811461133b57600080fdfea2646970667358221220a10b8b5354ebb608cf61de8d8ecad0ed054ab75a761c9e93191b85a32e7fad0464736f6c63430007030033"; diff --git a/src/contracts/extensions/coinMachine/1/index.d.ts b/src/contracts/extensions/coinMachine/1/index.d.ts new file mode 100644 index 000000000..910d6a045 --- /dev/null +++ b/src/contracts/extensions/coinMachine/1/index.d.ts @@ -0,0 +1,29 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { + BigNumberish, + EventDescription, + FunctionDescription, +} from "ethers/utils"; + +export interface TransactionOverrides { + gasLimit?: BigNumberish | Promise; + gasPrice?: BigNumberish | Promise; + nonce?: BigNumberish | Promise; + value?: BigNumberish | Promise; + from?: string | Promise; + chainId?: number | Promise; +} + +export interface TypedEventDescription< + T extends Pick +> extends EventDescription { + encodeTopics: T["encodeTopics"]; +} + +export interface TypedFunctionDescription< + T extends Pick +> extends FunctionDescription { + encode: T["encode"]; +} diff --git a/src/contracts/extensions/coinMachine/2/CoinMachine.d.ts b/src/contracts/extensions/coinMachine/2/CoinMachine.d.ts new file mode 100644 index 000000000..db31131fc --- /dev/null +++ b/src/contracts/extensions/coinMachine/2/CoinMachine.d.ts @@ -0,0 +1,1390 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-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 CoinMachineInterface extends Interface { + functions: { + authority: TypedFunctionDescription<{ encode([]: []): string }>; + + getCapabilityRoles: TypedFunctionDescription<{ + encode([_sig]: [Arrayish]): string; + }>; + + getColony: TypedFunctionDescription<{ encode([]: []): string }>; + + getDeprecated: TypedFunctionDescription<{ encode([]: []): string }>; + + owner: TypedFunctionDescription<{ encode([]: []): string }>; + + setAuthority: TypedFunctionDescription<{ + encode([authority_]: [string]): string; + }>; + + setOwner: TypedFunctionDescription<{ encode([owner_]: [string]): string }>; + + identifier: TypedFunctionDescription<{ encode([]: []): string }>; + + version: TypedFunctionDescription<{ encode([]: []): string }>; + + install: TypedFunctionDescription<{ encode([_colony]: [string]): string }>; + + finishUpgrade: TypedFunctionDescription<{ encode([]: []): string }>; + + deprecate: TypedFunctionDescription<{ + encode([_deprecated]: [boolean]): string; + }>; + + uninstall: TypedFunctionDescription<{ encode([]: []): string }>; + + initialise: TypedFunctionDescription<{ + encode([ + _token, + _purchaseToken, + _periodLength, + _windowSize, + _targetPerPeriod, + _maxPerPeriod, + _userLimitFraction, + _startingPrice, + _whitelist, + ]: [ + string, + string, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + string + ]): string; + }>; + + setWhitelist: TypedFunctionDescription<{ + encode([_whitelist]: [string]): string; + }>; + + buyTokens: TypedFunctionDescription<{ + encode([_numTokens]: [BigNumberish]): string; + }>; + + updatePeriod: TypedFunctionDescription<{ encode([]: []): string }>; + + getPurchaseToken: TypedFunctionDescription<{ encode([]: []): string }>; + + getToken: TypedFunctionDescription<{ encode([]: []): string }>; + + getActivePeriod: TypedFunctionDescription<{ encode([]: []): string }>; + + getActiveSold: TypedFunctionDescription<{ encode([]: []): string }>; + + getActiveIntake: TypedFunctionDescription<{ encode([]: []): string }>; + + getEMAIntake: TypedFunctionDescription<{ encode([]: []): string }>; + + getTokenBalance: TypedFunctionDescription<{ encode([]: []): string }>; + + getPeriodLength: TypedFunctionDescription<{ encode([]: []): string }>; + + getWindowSize: TypedFunctionDescription<{ encode([]: []): string }>; + + getTargetPerPeriod: TypedFunctionDescription<{ encode([]: []): string }>; + + getMaxPerPeriod: TypedFunctionDescription<{ encode([]: []): string }>; + + getCurrentPrice: TypedFunctionDescription<{ encode([]: []): string }>; + + getSellableTokens: TypedFunctionDescription<{ encode([]: []): string }>; + + getUserLimit: TypedFunctionDescription<{ + encode([_user]: [string]): string; + }>; + + getMaxPurchase: TypedFunctionDescription<{ + encode([_user]: [string]): string; + }>; + + getWhitelist: TypedFunctionDescription<{ encode([]: []): string }>; + + getEvolvePrice: TypedFunctionDescription<{ encode([]: []): string }>; + }; + + events: { + ExtensionInitialised: TypedEventDescription<{ + encodeTopics([]: []): string[]; + }>; + + LogSetAuthority: TypedEventDescription<{ + encodeTopics([authority]: [string | null]): string[]; + }>; + + LogSetOwner: TypedEventDescription<{ + encodeTopics([owner]: [string | null]): string[]; + }>; + + PeriodUpdated: TypedEventDescription<{ + encodeTopics([activePeriod, currentPeriod]: [null, null]): string[]; + }>; + + PriceEvolutionSet: TypedEventDescription<{ + encodeTopics([evolvePrice]: [null]): string[]; + }>; + + TokensBought: TypedEventDescription<{ + encodeTopics([buyer, numTokens, totalCost]: [null, null, null]): string[]; + }>; + + WhitelistSet: TypedEventDescription<{ + encodeTopics([whitelist]: [null]): string[]; + }>; + }; +} + +export class CoinMachine extends Contract { + connect(signerOrProvider: Signer | Provider | string): CoinMachine; + attach(addressOrName: string): CoinMachine; + deployed(): Promise; + + on(event: EventFilter | string, listener: Listener): CoinMachine; + once(event: EventFilter | string, listener: Listener): CoinMachine; + addListener(eventName: EventFilter | string, listener: Listener): CoinMachine; + removeAllListeners(eventName: EventFilter | string): CoinMachine; + removeListener(eventName: any, listener: Listener): CoinMachine; + + interface: CoinMachineInterface; + + functions: { + authority(overrides?: TransactionOverrides): Promise; + + "authority()"(overrides?: TransactionOverrides): Promise; + + getCapabilityRoles( + _sig: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + "getCapabilityRoles(bytes4)"( + _sig: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + getColony(overrides?: TransactionOverrides): Promise; + + "getColony()"(overrides?: TransactionOverrides): Promise; + + getDeprecated(overrides?: TransactionOverrides): Promise; + + "getDeprecated()"(overrides?: TransactionOverrides): Promise; + + owner(overrides?: TransactionOverrides): Promise; + + "owner()"(overrides?: TransactionOverrides): Promise; + + setAuthority( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + "setAuthority(address)"( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + setOwner( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + "setOwner(address)"( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the identifier of the extension + */ + identifier(overrides?: TransactionOverrides): Promise; + + /** + * Returns the identifier of the extension + */ + "identifier()"(overrides?: TransactionOverrides): Promise; + + /** + * Returns the version of the extension + */ + version(overrides?: TransactionOverrides): Promise; + + /** + * Returns the version of the extension + */ + "version()"(overrides?: TransactionOverrides): Promise; + + /** + * Configures the extension + * @param _colony The colony in which the extension holds permissions + */ + install( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Configures the extension + * @param _colony The colony in which the extension holds permissions + */ + "install(address)"( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when upgrading the extension + */ + finishUpgrade( + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when upgrading the extension + */ + "finishUpgrade()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + deprecate( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + "deprecate(bool)"( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when uninstalling the extension + */ + uninstall(overrides?: TransactionOverrides): Promise; + + /** + * Called when uninstalling the extension + */ + "uninstall()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Must be called before any sales can be made + * @param _maxPerPeriod The maximum number of tokens that can be sold per period + * @param _periodLength How long in seconds each period of the sale should last + * @param _purchaseToken The token to receive payments in. Use 0x0 for ether + * @param _startingPrice The sale price to start at, expressed in units of _purchaseToken per token being sold, as a WAD + * @param _targetPerPeriod The number of tokens to aim to sell per period + * @param _token The token we are selling. Cannot be ether + * @param _whitelist Optionally an address of a whitelist contract to use can be provided. Pass 0x0 if no whitelist being used + * @param _windowSize Characteristic number of periods that should be used for the moving average. In the long-term, 86% of the weighting will be in this window size. The higher the number, the slower the price will be to adjust + */ + initialise( + _token: string, + _purchaseToken: string, + _periodLength: BigNumberish, + _windowSize: BigNumberish, + _targetPerPeriod: BigNumberish, + _maxPerPeriod: BigNumberish, + _userLimitFraction: BigNumberish, + _startingPrice: BigNumberish, + _whitelist: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Must be called before any sales can be made + * @param _maxPerPeriod The maximum number of tokens that can be sold per period + * @param _periodLength How long in seconds each period of the sale should last + * @param _purchaseToken The token to receive payments in. Use 0x0 for ether + * @param _startingPrice The sale price to start at, expressed in units of _purchaseToken per token being sold, as a WAD + * @param _targetPerPeriod The number of tokens to aim to sell per period + * @param _token The token we are selling. Cannot be ether + * @param _whitelist Optionally an address of a whitelist contract to use can be provided. Pass 0x0 if no whitelist being used + * @param _windowSize Characteristic number of periods that should be used for the moving average. In the long-term, 86% of the weighting will be in this window size. The higher the number, the slower the price will be to adjust + */ + "initialise(address,address,uint256,uint256,uint256,uint256,uint256,uint256,address)"( + _token: string, + _purchaseToken: string, + _periodLength: BigNumberish, + _windowSize: BigNumberish, + _targetPerPeriod: BigNumberish, + _maxPerPeriod: BigNumberish, + _userLimitFraction: BigNumberish, + _startingPrice: BigNumberish, + _whitelist: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the address for an (optional) whitelist + * @param _whitelist The address of the whitelist + */ + setWhitelist( + _whitelist: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the address for an (optional) whitelist + * @param _whitelist The address of the whitelist + */ + "setWhitelist(address)"( + _whitelist: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Purchase tokens from Coin Machine. + * @param _numTokens The number of tokens to purchase + */ + buyTokens( + _numTokens: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Purchase tokens from Coin Machine. + * @param _numTokens The number of tokens to purchase + */ + "buyTokens(uint256)"( + _numTokens: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Bring the token accounting current + */ + updatePeriod( + overrides?: TransactionOverrides + ): Promise; + + /** + * Bring the token accounting current + */ + "updatePeriod()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the address of the token being used to make purchases + */ + getPurchaseToken(overrides?: TransactionOverrides): Promise; + + /** + * Get the address of the token being used to make purchases + */ + "getPurchaseToken()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the address of the token being sold + */ + getToken(overrides?: TransactionOverrides): Promise; + + /** + * Get the address of the token being sold + */ + "getToken()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the period that the price was last updated for or a purchase was made + */ + getActivePeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the period that the price was last updated for or a purchase was made + */ + "getActivePeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of tokens sold in the period that the price was last updated for or a purchase was made + */ + getActiveSold(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of tokens sold in the period that the price was last updated for or a purchase was made + */ + "getActiveSold()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of tokens received in the period that the price was last updated for or a purchase was made + */ + getActiveIntake(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of tokens received in the period that the price was last updated for or a purchase was made + */ + "getActiveIntake()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the EMA of the number of tokens received each period + */ + getEMAIntake(overrides?: TransactionOverrides): Promise; + + /** + * Get the EMA of the number of tokens received each period + */ + "getEMAIntake()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the remaining balance of tokens + */ + getTokenBalance(overrides?: TransactionOverrides): Promise; + + /** + * Get the remaining balance of tokens + */ + "getTokenBalance()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the length of the sale period + */ + getPeriodLength(overrides?: TransactionOverrides): Promise; + + /** + * Get the length of the sale period + */ + "getPeriodLength()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the size of the averaging window + */ + getWindowSize(overrides?: TransactionOverrides): Promise; + + /** + * Get the size of the averaging window + */ + "getWindowSize()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the target number of tokens to sell per period + */ + getTargetPerPeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the target number of tokens to sell per period + */ + "getTargetPerPeriod()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the maximum number of tokens to sell per period + */ + getMaxPerPeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the maximum number of tokens to sell per period + */ + "getMaxPerPeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the current price per token + */ + getCurrentPrice(overrides?: TransactionOverrides): Promise; + + /** + * Get the current price per token + */ + "getCurrentPrice()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of remaining tokens for sale this period + */ + getSellableTokens(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of remaining tokens for sale this period + */ + "getSellableTokens()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the maximum amount of tokens a user can purchase in total + */ + getUserLimit( + _user: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the maximum amount of tokens a user can purchase in total + */ + "getUserLimit(address)"( + _user: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the maximum amount of tokens a user can purchase in a period + */ + getMaxPurchase( + _user: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the maximum amount of tokens a user can purchase in a period + */ + "getMaxPurchase(address)"( + _user: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the address of the whitelist (if exists) + */ + getWhitelist(overrides?: TransactionOverrides): Promise; + + /** + * Get the address of the whitelist (if exists) + */ + "getWhitelist()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the evolvePrice boolean + */ + getEvolvePrice(overrides?: TransactionOverrides): Promise; + + /** + * Get the evolvePrice boolean + */ + "getEvolvePrice()"(overrides?: TransactionOverrides): Promise; + }; + + authority(overrides?: TransactionOverrides): Promise; + + "authority()"(overrides?: TransactionOverrides): Promise; + + getCapabilityRoles( + _sig: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + "getCapabilityRoles(bytes4)"( + _sig: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + getColony(overrides?: TransactionOverrides): Promise; + + "getColony()"(overrides?: TransactionOverrides): Promise; + + getDeprecated(overrides?: TransactionOverrides): Promise; + + "getDeprecated()"(overrides?: TransactionOverrides): Promise; + + owner(overrides?: TransactionOverrides): Promise; + + "owner()"(overrides?: TransactionOverrides): Promise; + + setAuthority( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + "setAuthority(address)"( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + setOwner( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + "setOwner(address)"( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the identifier of the extension + */ + identifier(overrides?: TransactionOverrides): Promise; + + /** + * Returns the identifier of the extension + */ + "identifier()"(overrides?: TransactionOverrides): Promise; + + /** + * Returns the version of the extension + */ + version(overrides?: TransactionOverrides): Promise; + + /** + * Returns the version of the extension + */ + "version()"(overrides?: TransactionOverrides): Promise; + + /** + * Configures the extension + * @param _colony The colony in which the extension holds permissions + */ + install( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Configures the extension + * @param _colony The colony in which the extension holds permissions + */ + "install(address)"( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when upgrading the extension + */ + finishUpgrade(overrides?: TransactionOverrides): Promise; + + /** + * Called when upgrading the extension + */ + "finishUpgrade()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + deprecate( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + "deprecate(bool)"( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when uninstalling the extension + */ + uninstall(overrides?: TransactionOverrides): Promise; + + /** + * Called when uninstalling the extension + */ + "uninstall()"(overrides?: TransactionOverrides): Promise; + + /** + * Must be called before any sales can be made + * @param _maxPerPeriod The maximum number of tokens that can be sold per period + * @param _periodLength How long in seconds each period of the sale should last + * @param _purchaseToken The token to receive payments in. Use 0x0 for ether + * @param _startingPrice The sale price to start at, expressed in units of _purchaseToken per token being sold, as a WAD + * @param _targetPerPeriod The number of tokens to aim to sell per period + * @param _token The token we are selling. Cannot be ether + * @param _whitelist Optionally an address of a whitelist contract to use can be provided. Pass 0x0 if no whitelist being used + * @param _windowSize Characteristic number of periods that should be used for the moving average. In the long-term, 86% of the weighting will be in this window size. The higher the number, the slower the price will be to adjust + */ + initialise( + _token: string, + _purchaseToken: string, + _periodLength: BigNumberish, + _windowSize: BigNumberish, + _targetPerPeriod: BigNumberish, + _maxPerPeriod: BigNumberish, + _userLimitFraction: BigNumberish, + _startingPrice: BigNumberish, + _whitelist: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Must be called before any sales can be made + * @param _maxPerPeriod The maximum number of tokens that can be sold per period + * @param _periodLength How long in seconds each period of the sale should last + * @param _purchaseToken The token to receive payments in. Use 0x0 for ether + * @param _startingPrice The sale price to start at, expressed in units of _purchaseToken per token being sold, as a WAD + * @param _targetPerPeriod The number of tokens to aim to sell per period + * @param _token The token we are selling. Cannot be ether + * @param _whitelist Optionally an address of a whitelist contract to use can be provided. Pass 0x0 if no whitelist being used + * @param _windowSize Characteristic number of periods that should be used for the moving average. In the long-term, 86% of the weighting will be in this window size. The higher the number, the slower the price will be to adjust + */ + "initialise(address,address,uint256,uint256,uint256,uint256,uint256,uint256,address)"( + _token: string, + _purchaseToken: string, + _periodLength: BigNumberish, + _windowSize: BigNumberish, + _targetPerPeriod: BigNumberish, + _maxPerPeriod: BigNumberish, + _userLimitFraction: BigNumberish, + _startingPrice: BigNumberish, + _whitelist: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the address for an (optional) whitelist + * @param _whitelist The address of the whitelist + */ + setWhitelist( + _whitelist: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the address for an (optional) whitelist + * @param _whitelist The address of the whitelist + */ + "setWhitelist(address)"( + _whitelist: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Purchase tokens from Coin Machine. + * @param _numTokens The number of tokens to purchase + */ + buyTokens( + _numTokens: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Purchase tokens from Coin Machine. + * @param _numTokens The number of tokens to purchase + */ + "buyTokens(uint256)"( + _numTokens: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Bring the token accounting current + */ + updatePeriod(overrides?: TransactionOverrides): Promise; + + /** + * Bring the token accounting current + */ + "updatePeriod()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the address of the token being used to make purchases + */ + getPurchaseToken(overrides?: TransactionOverrides): Promise; + + /** + * Get the address of the token being used to make purchases + */ + "getPurchaseToken()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the address of the token being sold + */ + getToken(overrides?: TransactionOverrides): Promise; + + /** + * Get the address of the token being sold + */ + "getToken()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the period that the price was last updated for or a purchase was made + */ + getActivePeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the period that the price was last updated for or a purchase was made + */ + "getActivePeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of tokens sold in the period that the price was last updated for or a purchase was made + */ + getActiveSold(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of tokens sold in the period that the price was last updated for or a purchase was made + */ + "getActiveSold()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of tokens received in the period that the price was last updated for or a purchase was made + */ + getActiveIntake(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of tokens received in the period that the price was last updated for or a purchase was made + */ + "getActiveIntake()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the EMA of the number of tokens received each period + */ + getEMAIntake(overrides?: TransactionOverrides): Promise; + + /** + * Get the EMA of the number of tokens received each period + */ + "getEMAIntake()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the remaining balance of tokens + */ + getTokenBalance(overrides?: TransactionOverrides): Promise; + + /** + * Get the remaining balance of tokens + */ + "getTokenBalance()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the length of the sale period + */ + getPeriodLength(overrides?: TransactionOverrides): Promise; + + /** + * Get the length of the sale period + */ + "getPeriodLength()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the size of the averaging window + */ + getWindowSize(overrides?: TransactionOverrides): Promise; + + /** + * Get the size of the averaging window + */ + "getWindowSize()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the target number of tokens to sell per period + */ + getTargetPerPeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the target number of tokens to sell per period + */ + "getTargetPerPeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the maximum number of tokens to sell per period + */ + getMaxPerPeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the maximum number of tokens to sell per period + */ + "getMaxPerPeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the current price per token + */ + getCurrentPrice(overrides?: TransactionOverrides): Promise; + + /** + * Get the current price per token + */ + "getCurrentPrice()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of remaining tokens for sale this period + */ + getSellableTokens(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of remaining tokens for sale this period + */ + "getSellableTokens()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the maximum amount of tokens a user can purchase in total + */ + getUserLimit( + _user: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the maximum amount of tokens a user can purchase in total + */ + "getUserLimit(address)"( + _user: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the maximum amount of tokens a user can purchase in a period + */ + getMaxPurchase( + _user: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the maximum amount of tokens a user can purchase in a period + */ + "getMaxPurchase(address)"( + _user: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the address of the whitelist (if exists) + */ + getWhitelist(overrides?: TransactionOverrides): Promise; + + /** + * Get the address of the whitelist (if exists) + */ + "getWhitelist()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the evolvePrice boolean + */ + getEvolvePrice(overrides?: TransactionOverrides): Promise; + + /** + * Get the evolvePrice boolean + */ + "getEvolvePrice()"(overrides?: TransactionOverrides): Promise; + + filters: { + ExtensionInitialised(): EventFilter; + + LogSetAuthority(authority: string | null): EventFilter; + + LogSetOwner(owner: string | null): EventFilter; + + PeriodUpdated(activePeriod: null, currentPeriod: null): EventFilter; + + PriceEvolutionSet(evolvePrice: null): EventFilter; + + TokensBought(buyer: null, numTokens: null, totalCost: null): EventFilter; + + WhitelistSet(whitelist: null): EventFilter; + }; + + estimate: { + authority(overrides?: TransactionOverrides): Promise; + + "authority()"(overrides?: TransactionOverrides): Promise; + + getCapabilityRoles( + _sig: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + "getCapabilityRoles(bytes4)"( + _sig: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + getColony(overrides?: TransactionOverrides): Promise; + + "getColony()"(overrides?: TransactionOverrides): Promise; + + getDeprecated(overrides?: TransactionOverrides): Promise; + + "getDeprecated()"(overrides?: TransactionOverrides): Promise; + + owner(overrides?: TransactionOverrides): Promise; + + "owner()"(overrides?: TransactionOverrides): Promise; + + setAuthority( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + "setAuthority(address)"( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + setOwner( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + "setOwner(address)"( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the identifier of the extension + */ + identifier(overrides?: TransactionOverrides): Promise; + + /** + * Returns the identifier of the extension + */ + "identifier()"(overrides?: TransactionOverrides): Promise; + + /** + * Returns the version of the extension + */ + version(overrides?: TransactionOverrides): Promise; + + /** + * Returns the version of the extension + */ + "version()"(overrides?: TransactionOverrides): Promise; + + /** + * Configures the extension + * @param _colony The colony in which the extension holds permissions + */ + install( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Configures the extension + * @param _colony The colony in which the extension holds permissions + */ + "install(address)"( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when upgrading the extension + */ + finishUpgrade(overrides?: TransactionOverrides): Promise; + + /** + * Called when upgrading the extension + */ + "finishUpgrade()"(overrides?: TransactionOverrides): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + deprecate( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + "deprecate(bool)"( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when uninstalling the extension + */ + uninstall(overrides?: TransactionOverrides): Promise; + + /** + * Called when uninstalling the extension + */ + "uninstall()"(overrides?: TransactionOverrides): Promise; + + /** + * Must be called before any sales can be made + * @param _maxPerPeriod The maximum number of tokens that can be sold per period + * @param _periodLength How long in seconds each period of the sale should last + * @param _purchaseToken The token to receive payments in. Use 0x0 for ether + * @param _startingPrice The sale price to start at, expressed in units of _purchaseToken per token being sold, as a WAD + * @param _targetPerPeriod The number of tokens to aim to sell per period + * @param _token The token we are selling. Cannot be ether + * @param _whitelist Optionally an address of a whitelist contract to use can be provided. Pass 0x0 if no whitelist being used + * @param _windowSize Characteristic number of periods that should be used for the moving average. In the long-term, 86% of the weighting will be in this window size. The higher the number, the slower the price will be to adjust + */ + initialise( + _token: string, + _purchaseToken: string, + _periodLength: BigNumberish, + _windowSize: BigNumberish, + _targetPerPeriod: BigNumberish, + _maxPerPeriod: BigNumberish, + _userLimitFraction: BigNumberish, + _startingPrice: BigNumberish, + _whitelist: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Must be called before any sales can be made + * @param _maxPerPeriod The maximum number of tokens that can be sold per period + * @param _periodLength How long in seconds each period of the sale should last + * @param _purchaseToken The token to receive payments in. Use 0x0 for ether + * @param _startingPrice The sale price to start at, expressed in units of _purchaseToken per token being sold, as a WAD + * @param _targetPerPeriod The number of tokens to aim to sell per period + * @param _token The token we are selling. Cannot be ether + * @param _whitelist Optionally an address of a whitelist contract to use can be provided. Pass 0x0 if no whitelist being used + * @param _windowSize Characteristic number of periods that should be used for the moving average. In the long-term, 86% of the weighting will be in this window size. The higher the number, the slower the price will be to adjust + */ + "initialise(address,address,uint256,uint256,uint256,uint256,uint256,uint256,address)"( + _token: string, + _purchaseToken: string, + _periodLength: BigNumberish, + _windowSize: BigNumberish, + _targetPerPeriod: BigNumberish, + _maxPerPeriod: BigNumberish, + _userLimitFraction: BigNumberish, + _startingPrice: BigNumberish, + _whitelist: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the address for an (optional) whitelist + * @param _whitelist The address of the whitelist + */ + setWhitelist( + _whitelist: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Set the address for an (optional) whitelist + * @param _whitelist The address of the whitelist + */ + "setWhitelist(address)"( + _whitelist: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Purchase tokens from Coin Machine. + * @param _numTokens The number of tokens to purchase + */ + buyTokens( + _numTokens: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Purchase tokens from Coin Machine. + * @param _numTokens The number of tokens to purchase + */ + "buyTokens(uint256)"( + _numTokens: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Bring the token accounting current + */ + updatePeriod(overrides?: TransactionOverrides): Promise; + + /** + * Bring the token accounting current + */ + "updatePeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the address of the token being used to make purchases + */ + getPurchaseToken(overrides?: TransactionOverrides): Promise; + + /** + * Get the address of the token being used to make purchases + */ + "getPurchaseToken()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the address of the token being sold + */ + getToken(overrides?: TransactionOverrides): Promise; + + /** + * Get the address of the token being sold + */ + "getToken()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the period that the price was last updated for or a purchase was made + */ + getActivePeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the period that the price was last updated for or a purchase was made + */ + "getActivePeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of tokens sold in the period that the price was last updated for or a purchase was made + */ + getActiveSold(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of tokens sold in the period that the price was last updated for or a purchase was made + */ + "getActiveSold()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of tokens received in the period that the price was last updated for or a purchase was made + */ + getActiveIntake(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of tokens received in the period that the price was last updated for or a purchase was made + */ + "getActiveIntake()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the EMA of the number of tokens received each period + */ + getEMAIntake(overrides?: TransactionOverrides): Promise; + + /** + * Get the EMA of the number of tokens received each period + */ + "getEMAIntake()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the remaining balance of tokens + */ + getTokenBalance(overrides?: TransactionOverrides): Promise; + + /** + * Get the remaining balance of tokens + */ + "getTokenBalance()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the length of the sale period + */ + getPeriodLength(overrides?: TransactionOverrides): Promise; + + /** + * Get the length of the sale period + */ + "getPeriodLength()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the size of the averaging window + */ + getWindowSize(overrides?: TransactionOverrides): Promise; + + /** + * Get the size of the averaging window + */ + "getWindowSize()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the target number of tokens to sell per period + */ + getTargetPerPeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the target number of tokens to sell per period + */ + "getTargetPerPeriod()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the maximum number of tokens to sell per period + */ + getMaxPerPeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the maximum number of tokens to sell per period + */ + "getMaxPerPeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the current price per token + */ + getCurrentPrice(overrides?: TransactionOverrides): Promise; + + /** + * Get the current price per token + */ + "getCurrentPrice()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of remaining tokens for sale this period + */ + getSellableTokens(overrides?: TransactionOverrides): Promise; + + /** + * Get the number of remaining tokens for sale this period + */ + "getSellableTokens()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the maximum amount of tokens a user can purchase in total + */ + getUserLimit( + _user: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the maximum amount of tokens a user can purchase in total + */ + "getUserLimit(address)"( + _user: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the maximum amount of tokens a user can purchase in a period + */ + getMaxPurchase( + _user: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the maximum amount of tokens a user can purchase in a period + */ + "getMaxPurchase(address)"( + _user: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the address of the whitelist (if exists) + */ + getWhitelist(overrides?: TransactionOverrides): Promise; + + /** + * Get the address of the whitelist (if exists) + */ + "getWhitelist()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the evolvePrice boolean + */ + getEvolvePrice(overrides?: TransactionOverrides): Promise; + + /** + * Get the evolvePrice boolean + */ + "getEvolvePrice()"(overrides?: TransactionOverrides): Promise; + }; +} diff --git a/src/contracts/extensions/coinMachine/2/factories/CoinMachine__factory.ts b/src/contracts/extensions/coinMachine/2/factories/CoinMachine__factory.ts new file mode 100644 index 000000000..d0cc2d908 --- /dev/null +++ b/src/contracts/extensions/coinMachine/2/factories/CoinMachine__factory.ts @@ -0,0 +1,625 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, ContractFactory, Signer } from "ethers"; +import { Provider } from "ethers/providers"; +import { UnsignedTransaction } from "ethers/utils/transaction"; + +import { TransactionOverrides } from ".."; +import { CoinMachine } from "../CoinMachine"; + +export class CoinMachine__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy(overrides?: TransactionOverrides): Promise { + return super.deploy(overrides) as Promise; + } + getDeployTransaction(overrides?: TransactionOverrides): UnsignedTransaction { + return super.getDeployTransaction(overrides); + } + attach(address: string): CoinMachine { + return super.attach(address) as CoinMachine; + } + connect(signer: Signer): CoinMachine__factory { + return super.connect(signer) as CoinMachine__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): CoinMachine { + return new Contract(address, _abi, signerOrProvider) as CoinMachine; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [], + name: "ExtensionInitialised", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "authority", + type: "address", + }, + ], + name: "LogSetAuthority", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "LogSetOwner", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "activePeriod", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "currentPeriod", + type: "uint256", + }, + ], + name: "PeriodUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bool", + name: "evolvePrice", + type: "bool", + }, + ], + name: "PriceEvolutionSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "buyer", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "numTokens", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "totalCost", + type: "uint256", + }, + ], + name: "TokensBought", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "whitelist", + type: "address", + }, + ], + name: "WhitelistSet", + type: "event", + }, + { + inputs: [], + name: "authority", + outputs: [ + { + internalType: "contract DSAuthority", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "_sig", + type: "bytes4", + }, + ], + name: "getCapabilityRoles", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getColony", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getDeprecated", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract DSAuthority", + name: "authority_", + type: "address", + }, + ], + name: "setAuthority", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner_", + type: "address", + }, + ], + name: "setOwner", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "identifier", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_colony", + type: "address", + }, + ], + name: "install", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "finishUpgrade", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bool", + name: "_deprecated", + type: "bool", + }, + ], + name: "deprecate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "uninstall", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "address", + name: "_purchaseToken", + type: "address", + }, + { + internalType: "uint256", + name: "_periodLength", + type: "uint256", + }, + { + internalType: "uint256", + name: "_windowSize", + type: "uint256", + }, + { + internalType: "uint256", + name: "_targetPerPeriod", + type: "uint256", + }, + { + internalType: "uint256", + name: "_maxPerPeriod", + type: "uint256", + }, + { + internalType: "uint256", + name: "_userLimitFraction", + type: "uint256", + }, + { + internalType: "uint256", + name: "_startingPrice", + type: "uint256", + }, + { + internalType: "address", + name: "_whitelist", + type: "address", + }, + ], + name: "initialise", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_whitelist", + type: "address", + }, + ], + name: "setWhitelist", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_numTokens", + type: "uint256", + }, + ], + name: "buyTokens", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [], + name: "updatePeriod", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getPurchaseToken", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getToken", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getActivePeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getActiveSold", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getActiveIntake", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getEMAIntake", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getTokenBalance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getPeriodLength", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getWindowSize", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getTargetPerPeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getMaxPerPeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getCurrentPrice", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getSellableTokens", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + ], + name: "getUserLimit", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address", + }, + ], + name: "getMaxPurchase", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getWhitelist", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getEvolvePrice", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, +]; + +const _bytecode = + "0x608060405234801561001057600080fd5b50600180546001600160a01b031916339081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a2611e788061005e6000396000f3fe6080604052600436106101f95760003560e01c80638469ddc71161010d578063bf7e214f116100a0578063e9587e861161006f578063e9587e86146104da578063eb91d37e146104fa578063f51361c71461050f578063f9f81e0914610524578063fcf6ba9314610546576101f9565b8063bf7e214f1461047b578063bfd68ab714610490578063c6ea3b0b146104a5578063d01f63f5146104c5576101f9565b8063a0e3ad26116100dc578063a0e3ad2614610427578063a5c56a2b1461043c578063a83627de14610451578063b5b2f1ef14610466576101f9565b80638469ddc7146103bd578063854cff2f146103d25780638da5cb5b146103f25780639251cff414610407576101f9565b80632a1b8f9b116101905780633610724e1161015f5780633610724e1461034b57806354fd4d501461035e5780637998a1c4146103735780637a9e5e4b1461038857806382b2e257146103a8576101f9565b80632a1b8f9b146102e15780632a85c366146103015780632dfbb08314610316578063340df28f14610336576101f9565b806313af4035116101cc57806313af4035146102825780631f7ea81f146102a257806321df0da7146102b757806329287b46146102cc576101f9565b80630a1e0c22146101fe5780630d638f3014610229578063114f67691461024057806312defc731461026d575b600080fd5b34801561020a57600080fd5b5061021361055b565b6040516102209190611908565b60405180910390f35b34801561023557600080fd5b5061023e61056b565b005b34801561024c57600080fd5b5061026061025b3660046117bb565b61067d565b60405161022091906119e1565b34801561027957600080fd5b506102606106bf565b34801561028e57600080fd5b5061023e61029d3660046117bb565b6106c5565b3480156102ae57600080fd5b50610260610747565b3480156102c357600080fd5b5061021361074d565b3480156102d857600080fd5b5061026061075c565b3480156102ed57600080fd5b5061023e6102fc3660046117bb565b610762565b34801561030d57600080fd5b506102606107df565b34801561032257600080fd5b506102606103313660046118b0565b6107e5565b34801561034257600080fd5b5061023e6107eb565b61023e6103593660046118d8565b6108fa565b34801561036a57600080fd5b50610260610cd6565b34801561037f57600080fd5b50610260610cdb565b34801561039457600080fd5b5061023e6103a33660046117bb565b610cff565b3480156103b457600080fd5b50610260610d7d565b3480156103c957600080fd5b50610260610e03565b3480156103de57600080fd5b5061023e6103ed3660046117bb565b610e09565b3480156103fe57600080fd5b50610213610f2a565b34801561041357600080fd5b5061023e610422366004611878565b610f39565b34801561043357600080fd5b50610260610f97565b34801561044857600080fd5b50610260610f9d565b34801561045d57600080fd5b5061023e610fa3565b34801561047257600080fd5b506102606110ad565b34801561048757600080fd5b506102136110d6565b34801561049c57600080fd5b506102136110e5565b3480156104b157600080fd5b5061023e6104c03660046117f3565b6110f4565b3480156104d157600080fd5b50610213611398565b3480156104e657600080fd5b506102606104f53660046117bb565b6113a7565b34801561050657600080fd5b50610260611433565b34801561051b57600080fd5b506102606114de565b34801561053057600080fd5b506105396114e4565b60405161022091906119d6565b34801561055257600080fd5b506105396114f4565b6004546001600160a01b03165b90565b610581336000356001600160e01b031916611504565b6105a65760405162461bcd60e51b815260040161059d90611a19565b60405180910390fd5b6010546001600160a01b03161561066f5760006105c1610d7d565b9050801561066d5760105460035460405163a9059cbb60e01b81526001600160a01b039283169263a9059cbb926105ff92911690859060040161196f565b602060405180830381600087803b15801561061957600080fd5b505af115801561062d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106519190611894565b61066d5760405162461bcd60e51b815260040161059d90611cc7565b505b6003546001600160a01b0316ff5b600080610688610d7d565b905060006106946110ad565b905060006106a1856113a7565b90506106b6816106b185856115e0565b6115e0565b95945050505050565b600e5490565b6106db336000356001600160e01b031916611504565b6106f75760405162461bcd60e51b815260040161059d90611a19565b600180546001600160a01b0319166001600160a01b0383811691909117918290556040519116907fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60095490565b6010546001600160a01b031690565b600f5490565b610778336000356001600160e01b031916611504565b6107945760405162461bcd60e51b815260040161059d90611a19565b6003546001600160a01b0316156107bd5760405162461bcd60e51b815260040161059d90611bb4565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b60085490565b50600090565b610801336000356001600160e01b031916611504565b61081d5760405162461bcd60e51b815260040161059d90611a19565b600360009054906101000a90046001600160a01b03166001600160a01b03166321df0da76040518163ffffffff1660e01b815260040160206040518083038186803b15801561086b57600080fd5b505afa15801561087f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a391906117d7565b601080546001600160a01b0319166001600160a01b0392909216919091179055670de0b6b3a76400006012556108f860006108dc610d7d565b1180156108f35750600354600160a01b900460ff16155b6115f7565b565b600354600160a01b900460ff16156109245760405162461bcd60e51b815260040161059d90611dda565b61092c610fa3565b6011546001600160a01b031615806109bf575060115460405163673448dd60e01b81526001600160a01b039091169063673448dd9061096f903390600401611908565b60206040518083038186803b15801561098757600080fd5b505afa15801561099b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109bf9190611894565b6109db5760405162461bcd60e51b815260040161059d90611a75565b60006109e63361067d565b905060006109f482846115e0565b90506000610a0482600c54611658565b905060008211610a1657505050610cd3565b610a22600e548261167c565b600e55600d54610a32908361167c565b600d8190556009541015610a4257fe5b670de0b6b3a76400006012541015610a8e57610a606013548361167c565b60135533600090815260146020526040902054610a7d908361167c565b336000908152601460205260409020555b610a96610d7d565b8210610aa657610aa660006115f7565b6004546001600160a01b0316610b4f5780341015610ad65760405162461bcd60e51b815260040161059d90611c90565b80341115610b0f5760405133903483900380156108fc02916000818181858888f19350505050158015610b0d573d6000803e3d6000fd5b505b6003546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610b49573d6000803e3d6000fd5b50610bf4565b600480546003546040516323b872dd60e01b81526001600160a01b03928316936323b872dd93610b8693339391169187910161191c565b602060405180830381600087803b158015610ba057600080fd5b505af1158015610bb4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bd89190611894565b610bf45760405162461bcd60e51b815260040161059d90611beb565b60105460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb90610c26903390869060040161196f565b602060405180830381600087803b158015610c4057600080fd5b505af1158015610c54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c789190611894565b610c945760405162461bcd60e51b815260040161059d90611cc7565b7f8442948036198f1146d3a63c3db355d7e0295c2cc5676c755990445da4fdc1c9338383604051610cc793929190611988565b60405180910390a15050505b50565b600290565b7f9600bfe26d6984b5236952886f19c3d84b771865e505e2cb8f3a7137b7f3a46590565b610d15336000356001600160e01b031916611504565b610d315760405162461bcd60e51b815260040161059d90611a19565b600080546001600160a01b0319166001600160a01b03838116919091178083556040519116917f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada491a250565b6010546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610dae903090600401611908565b60206040518083038186803b158015610dc657600080fd5b505afa158015610dda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dfe91906118f0565b905090565b60055490565b600354604051635597bd7160e11b81526001600160a01b039091169063ab2f7ae290610e3e9033906001908190600401611940565b60206040518083038186803b158015610e5657600080fd5b505afa158015610e6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e8e9190611894565b610eaa5760405162461bcd60e51b815260040161059d90611d35565b600354600160a01b900460ff1615610ed45760405162461bcd60e51b815260040161059d90611dda565b601180546001600160a01b0319166001600160a01b0383161790556040517f29d77446d0fb0dcebabf25ce79ea69ba1382a4525d4acf615a38c89c798aef7190610f1f908390611908565b60405180910390a150565b6001546001600160a01b031681565b610f4f336000356001600160e01b031916611504565b610f6b5760405162461bcd60e51b815260040161059d90611a19565b6003805482158015600160a01b0260ff60a01b1990921691909117909155610cd357610cd360006115f7565b60075490565b600b5490565b6000610fad61169f565b600b54909150818110610fc15750506108f8565b601154600160a01b900460ff16610fe457600b829055610fe460006108dc610d7d565b81600b54101561107057610ffc600654600e54611658565b611014600654670de0b6b3a764000003600f54611658565b01600f556000600e819055600d55600b5482036000190180156110565761105261104a600654670de0b6b3a764000003836116b2565b600f54611658565b600f555b82600b8190555061106b600f546008546116c9565b600c55505b7f5b873fc01d45058fe77f3883a91020f46d5a7385baac6ceab19748d1d0ae464a81836040516110a1929190611e11565b60405180910390a15050565b6000610dfe6009546110bd61169f565b600b5410156110cd5760006110d1565b600d545b6116de565b6000546001600160a01b031681565b6003546001600160a01b031690565b600354604051635597bd7160e11b81526001600160a01b039091169063ab2f7ae2906111299033906001908190600401611940565b60206040518083038186803b15801561114157600080fd5b505afa158015611155573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111799190611894565b6111955760405162461bcd60e51b815260040161059d90611d35565b600b54156111b55760405162461bcd60e51b815260040161059d90611b11565b6001600160a01b0389166111db5760405162461bcd60e51b815260040161059d90611b46565b600087116111fb5760405162461bcd60e51b815260040161059d90611d6c565b6000861161121b5760405162461bcd60e51b815260040161059d90611aac565b6101ff86111561123d5760405162461bcd60e51b815260040161059d90611da3565b6000851161125d5760405162461bcd60e51b815260040161059d90611c22565b8484101561127d5760405162461bcd60e51b815260040161059d90611b7d565b670de0b6b3a76400008311156112a55760405162461bcd60e51b815260040161059d90611cfe565b600083116112c55760405162461bcd60e51b815260040161059d90611c59565b601080546001600160a01b03808c166001600160a01b03199283161790925560048054928b169290911691909117905560058790556113086002600188016116c9565b6006556007869055600885905560098490556012839055600c82905561132c61169f565b600b5560085461133c9083611658565b600f556001600160a01b038116156113575761135781610e09565b61136460006108dc610d7d565b6040517f690c4b6201f6a4c703f9d21c205d98a08dff8461e7a71e49c6d47cc8b894850190600090a1505050505050505050565b6011546001600160a01b031690565b6000670de0b6b3a764000060125414806113ca57506011546001600160a01b0316155b6114295761142461140b6113ed6113e5601354600854611701565b601254611658565b6001600160a01b0385166000908152601460205260409020546116de565b61141f670de0b6b3a76400006012546116de565b6116c9565b61142d565b6000195b92915050565b60008061143e61169f565b905080600b5410158061145b5750601154600160a01b900460ff16155b1561146a575050600c54610568565b600f54600654600e5461147d9190611658565b611493600654670de0b6b3a76400000383611658565b600b549101915082036000190180156114c8576114c56114bf600654670de0b6b3a764000003836116b2565b83611658565b91505b6114d4826008546116c9565b9350505050610568565b600d5490565b601154600160a01b900460ff1690565b600354600160a01b900460ff1690565b60006001600160a01b03831630141561151f5750600161142d565b6001546001600160a01b038481169116141561153d5750600161142d565b6000546001600160a01b03166115555750600061142d565b60005460405163b700961360e01b81526001600160a01b039091169063b700961390611589908690309087906004016119a9565b60206040518083038186803b1580156115a157600080fd5b505afa1580156115b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115d99190611894565b9392505050565b6000818311156115f057816115d9565b5090919050565b601160149054906101000a900460ff16151581151514610cd3576011805460ff60a01b1916600160a01b831515021790556040517f5b4e200daa1a93764a810c35f18f2fcfb14b5e95df6ae7ac1ffdc8eec425babc90610f1f9083906119d6565b6000670de0b6b3a764000061166d8484611711565b8161167457fe5b049392505050565b8082018281101561142d5760405162461bcd60e51b815260040161059d90611ae3565b600060055442816116ac57fe5b04905090565b6000633b9aca0061166d84633b9aca000284611748565b60008161166d84670de0b6b3a7640000611711565b8082038281111561142d5760405162461bcd60e51b815260040161059d906119ea565b6000818310156115f057816115d9565b600081158061172c5750508082028282828161172957fe5b04145b61142d5760405162461bcd60e51b815260040161059d90611a47565b600060028206611764576b033b2e3c9fd0803ce8000000611766565b825b90506002820491505b811561142d5761177f83846117a2565b925060028206156117975761179481846117a2565b90505b60028204915061176f565b60006b033b2e3c9fd0803ce800000061166d8484611711565b6000602082840312156117cc578081fd5b81356115d981611e1f565b6000602082840312156117e8578081fd5b81516115d981611e1f565b60008060008060008060008060006101208a8c031215611811578485fd5b893561181c81611e1f565b985060208a013561182c81611e1f565b975060408a0135965060608a0135955060808a0135945060a08a0135935060c08a0135925060e08a013591506101008a013561186781611e1f565b809150509295985092959850929598565b600060208284031215611889578081fd5b81356115d981611e34565b6000602082840312156118a5578081fd5b81516115d981611e34565b6000602082840312156118c1578081fd5b81356001600160e01b0319811681146115d9578182fd5b6000602082840312156118e9578081fd5b5035919050565b600060208284031215611901578081fd5b5051919050565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b038416815260208101839052606081016008831061196157fe5b826040830152949350505050565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039390931683526020830191909152604082015260600190565b6001600160a01b0393841681529190921660208201526001600160e01b0319909116604082015260600190565b901515815260200190565b90815260200190565b60208082526015908201527464732d6d6174682d7375622d756e646572666c6f7760581b604082015260600190565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b60208082526014908201527364732d6d6174682d6d756c2d6f766572666c6f7760601b604082015260600190565b60208082526019908201527f636f696e2d6d616368696e652d756e617574686f726973656400000000000000604082015260600190565b6020808252601d908201527f636f696e2d6d616368696e652d77696e646f772d746f6f2d736d616c6c000000604082015260600190565b60208082526014908201527364732d6d6174682d6164642d6f766572666c6f7760601b604082015260600190565b6020808252818101527f636f696e2d6d616368696e652d616c72656164792d696e697469616c69736564604082015260600190565b6020808252601a908201527f636f696e2d6d616368696e652d696e76616c69642d746f6b656e000000000000604082015260600190565b6020808252601a908201527f636f696e2d6d616368696e652d6d61782d746f6f2d736d616c6c000000000000604082015260600190565b6020808252601b908201527f657874656e73696f6e2d616c72656164792d696e7374616c6c65640000000000604082015260600190565b6020808252601c908201527f636f696e2d6d616368696e652d70757263686173652d6661696c656400000000604082015260600190565b6020808252601d908201527f636f696e2d6d616368696e652d7461726765742d746f6f2d736d616c6c000000604082015260600190565b6020808252601c908201527f636f696e2d6d616368696e652d6c696d69742d746f6f2d736d616c6c00000000604082015260600190565b6020808252601f908201527f636f696e2d6d616368696e652d696e73756666696369656e742d66756e647300604082015260600190565b6020808252601c908201527f636f696e2d6d616368696e652d7472616e736665722d6661696c656400000000604082015260600190565b6020808252601c908201527f636f696e2d6d616368696e652d6c696d69742d746f6f2d6c6172676500000000604082015260600190565b6020808252601c908201527f636f696e2d6d616368696e652d63616c6c65722d6e6f742d726f6f7400000000604082015260600190565b6020808252601d908201527f636f696e2d6d616368696e652d706572696f642d746f6f2d736d616c6c000000604082015260600190565b6020808252601d908201527f636f696e2d6d616368696e652d77696e646f772d746f6f2d6c61726765000000604082015260600190565b6020808252601b908201527f636f6c6f6e792d657874656e73696f6e2d646570726563617465640000000000604082015260600190565b918252602082015260400190565b6001600160a01b0381168114610cd357600080fd5b8015158114610cd357600080fdfea264697066735822122008328cd18e5e2706cd2e7d4f716a5b1ed6c29a0d58e6d394781f231208b98efe64736f6c63430007030033"; diff --git a/src/contracts/extensions/coinMachine/2/index.d.ts b/src/contracts/extensions/coinMachine/2/index.d.ts new file mode 100644 index 000000000..910d6a045 --- /dev/null +++ b/src/contracts/extensions/coinMachine/2/index.d.ts @@ -0,0 +1,29 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { + BigNumberish, + EventDescription, + FunctionDescription, +} from "ethers/utils"; + +export interface TransactionOverrides { + gasLimit?: BigNumberish | Promise; + gasPrice?: BigNumberish | Promise; + nonce?: BigNumberish | Promise; + value?: BigNumberish | Promise; + from?: string | Promise; + chainId?: number | Promise; +} + +export interface TypedEventDescription< + T extends Pick +> extends EventDescription { + encodeTopics: T["encodeTopics"]; +} + +export interface TypedFunctionDescription< + T extends Pick +> extends FunctionDescription { + encode: T["encode"]; +} diff --git a/src/contracts/extensions/oneTxPayment/1/OneTxPayment.d.ts b/src/contracts/extensions/oneTxPayment/1/OneTxPayment.d.ts new file mode 100644 index 000000000..dea30739e --- /dev/null +++ b/src/contracts/extensions/oneTxPayment/1/OneTxPayment.d.ts @@ -0,0 +1,799 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-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 OneTxPaymentInterface extends Interface { + functions: { + authority: TypedFunctionDescription<{ encode([]: []): string }>; + + getColony: TypedFunctionDescription<{ encode([]: []): string }>; + + getDeprecated: TypedFunctionDescription<{ encode([]: []): string }>; + + owner: TypedFunctionDescription<{ encode([]: []): string }>; + + setAuthority: TypedFunctionDescription<{ + encode([authority_]: [string]): string; + }>; + + setOwner: TypedFunctionDescription<{ encode([owner_]: [string]): string }>; + + identifier: TypedFunctionDescription<{ encode([]: []): string }>; + + version: TypedFunctionDescription<{ encode([]: []): string }>; + + install: TypedFunctionDescription<{ encode([_colony]: [string]): string }>; + + finishUpgrade: TypedFunctionDescription<{ encode([]: []): string }>; + + deprecate: TypedFunctionDescription<{ + encode([_deprecated]: [boolean]): string; + }>; + + uninstall: TypedFunctionDescription<{ encode([]: []): string }>; + + makePayment: TypedFunctionDescription<{ + encode([ + _permissionDomainId, + _childSkillIndex, + _callerPermissionDomainId, + _callerChildSkillIndex, + _workers, + _tokens, + _amounts, + _domainId, + _skillId, + ]: [ + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + string[], + string[], + BigNumberish[], + BigNumberish, + BigNumberish + ]): string; + }>; + + makePaymentFundedFromDomain: TypedFunctionDescription<{ + encode([ + _permissionDomainId, + _childSkillIndex, + _callerPermissionDomainId, + _callerChildSkillIndex, + _workers, + _tokens, + _amounts, + _domainId, + _skillId, + ]: [ + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + string[], + string[], + BigNumberish[], + BigNumberish, + BigNumberish + ]): string; + }>; + }; + + events: { + ExtensionInitialised: TypedEventDescription<{ + encodeTopics([]: []): string[]; + }>; + + LogSetAuthority: TypedEventDescription<{ + encodeTopics([authority]: [string | null]): string[]; + }>; + + LogSetOwner: TypedEventDescription<{ + encodeTopics([owner]: [string | null]): string[]; + }>; + + OneTxPaymentMade: TypedEventDescription<{ + encodeTopics([agent, fundamentalId, nPayouts]: [ + null, + null, + null + ]): string[]; + }>; + }; +} + +export class OneTxPayment extends Contract { + connect(signerOrProvider: Signer | Provider | string): OneTxPayment; + attach(addressOrName: string): OneTxPayment; + deployed(): Promise; + + on(event: EventFilter | string, listener: Listener): OneTxPayment; + once(event: EventFilter | string, listener: Listener): OneTxPayment; + addListener( + eventName: EventFilter | string, + listener: Listener + ): OneTxPayment; + removeAllListeners(eventName: EventFilter | string): OneTxPayment; + removeListener(eventName: any, listener: Listener): OneTxPayment; + + interface: OneTxPaymentInterface; + + functions: { + authority(overrides?: TransactionOverrides): Promise; + + "authority()"(overrides?: TransactionOverrides): Promise; + + getColony(overrides?: TransactionOverrides): Promise; + + "getColony()"(overrides?: TransactionOverrides): Promise; + + getDeprecated(overrides?: TransactionOverrides): Promise; + + "getDeprecated()"(overrides?: TransactionOverrides): Promise; + + owner(overrides?: TransactionOverrides): Promise; + + "owner()"(overrides?: TransactionOverrides): Promise; + + setAuthority( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + "setAuthority(address)"( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + setOwner( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + "setOwner(address)"( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the identifier of the extension + */ + identifier(overrides?: TransactionOverrides): Promise; + + /** + * Returns the identifier of the extension + */ + "identifier()"(overrides?: TransactionOverrides): Promise; + + /** + * Returns the version of the extension + */ + version(overrides?: TransactionOverrides): Promise; + + /** + * Returns the version of the extension + */ + "version()"(overrides?: TransactionOverrides): Promise; + + /** + * Configures the extension + * @param _colony The colony in which the extension holds permissions + */ + install( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Configures the extension + * @param _colony The colony in which the extension holds permissions + */ + "install(address)"( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when upgrading the extension + */ + finishUpgrade( + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when upgrading the extension + */ + "finishUpgrade()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + deprecate( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + "deprecate(bool)"( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when uninstalling the extension + */ + uninstall(overrides?: TransactionOverrides): Promise; + + /** + * Called when uninstalling the extension + */ + "uninstall()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Assumes that each entity holds administration and funding roles in the root domain + * Completes a colony payment in a single transaction + * @param _amounts amounts of the tokens being paid out + * @param _callerChildSkillIndex Index of the _callerPermissionDomainId skill.children array to get + * @param _callerPermissionDomainId The domainId in which the _caller_ has the administration permission (must have funding in root) + * @param _childSkillIndex Index of the _permissionDomainId skill.children array to get + * @param _domainId The domainId the payment should be coming from + * @param _permissionDomainId The domainId in which the _contract_ has permissions to add a payment and fund it + * @param _skillId The skillId that the payment should be marked with, possibly awarding reputation in this skill. + * @param _tokens Addresses of the tokens the payments are being made in. 0x00 for Ether. + * @param _workers The addresses of the recipients of the payment + */ + makePayment( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _callerPermissionDomainId: BigNumberish, + _callerChildSkillIndex: BigNumberish, + _workers: string[], + _tokens: string[], + _amounts: BigNumberish[], + _domainId: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Assumes that each entity holds administration and funding roles in the root domain + * Completes a colony payment in a single transaction + * @param _amounts amounts of the tokens being paid out + * @param _callerChildSkillIndex Index of the _callerPermissionDomainId skill.children array to get + * @param _callerPermissionDomainId The domainId in which the _caller_ has the administration permission (must have funding in root) + * @param _childSkillIndex Index of the _permissionDomainId skill.children array to get + * @param _domainId The domainId the payment should be coming from + * @param _permissionDomainId The domainId in which the _contract_ has permissions to add a payment and fund it + * @param _skillId The skillId that the payment should be marked with, possibly awarding reputation in this skill. + * @param _tokens Addresses of the tokens the payments are being made in. 0x00 for Ether. + * @param _workers The addresses of the recipients of the payment + */ + "makePayment(uint256,uint256,uint256,uint256,address[],address[],uint256[],uint256,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _callerPermissionDomainId: BigNumberish, + _callerChildSkillIndex: BigNumberish, + _workers: string[], + _tokens: string[], + _amounts: BigNumberish[], + _domainId: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Assumes that each entity holds administration and funding roles in the same domain, although contract and caller can have the permissions in different domains. Payment is taken from domain funds - if the domain does not have sufficient funds, call will fail. + * Completes a colony payment in a single transaction + * @param _amounts The amounts of the tokens being paid out + * @param _callerChildSkillIndex Index of the _callerPermissionDomainId skill.children array to get + * @param _callerPermissionDomainId The domainId in which the _caller_ has permissions to add a payment and fund it + * @param _childSkillIndex Index of the _permissionDomainId skill.children array to get + * @param _domainId The domainId the payment should be coming from + * @param _permissionDomainId The domainId in which the _contract_ has permissions to add a payment and fund it + * @param _skillId The skillId that the payment should be marked with, possibly awarding reputation in this skill. + * @param _tokens The addresses of the token the payments are being made in. 0x00 for Ether. + * @param _workers The addresses of the recipients of the payment + */ + makePaymentFundedFromDomain( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _callerPermissionDomainId: BigNumberish, + _callerChildSkillIndex: BigNumberish, + _workers: string[], + _tokens: string[], + _amounts: BigNumberish[], + _domainId: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Assumes that each entity holds administration and funding roles in the same domain, although contract and caller can have the permissions in different domains. Payment is taken from domain funds - if the domain does not have sufficient funds, call will fail. + * Completes a colony payment in a single transaction + * @param _amounts The amounts of the tokens being paid out + * @param _callerChildSkillIndex Index of the _callerPermissionDomainId skill.children array to get + * @param _callerPermissionDomainId The domainId in which the _caller_ has permissions to add a payment and fund it + * @param _childSkillIndex Index of the _permissionDomainId skill.children array to get + * @param _domainId The domainId the payment should be coming from + * @param _permissionDomainId The domainId in which the _contract_ has permissions to add a payment and fund it + * @param _skillId The skillId that the payment should be marked with, possibly awarding reputation in this skill. + * @param _tokens The addresses of the token the payments are being made in. 0x00 for Ether. + * @param _workers The addresses of the recipients of the payment + */ + "makePaymentFundedFromDomain(uint256,uint256,uint256,uint256,address[],address[],uint256[],uint256,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _callerPermissionDomainId: BigNumberish, + _callerChildSkillIndex: BigNumberish, + _workers: string[], + _tokens: string[], + _amounts: BigNumberish[], + _domainId: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + }; + + authority(overrides?: TransactionOverrides): Promise; + + "authority()"(overrides?: TransactionOverrides): Promise; + + getColony(overrides?: TransactionOverrides): Promise; + + "getColony()"(overrides?: TransactionOverrides): Promise; + + getDeprecated(overrides?: TransactionOverrides): Promise; + + "getDeprecated()"(overrides?: TransactionOverrides): Promise; + + owner(overrides?: TransactionOverrides): Promise; + + "owner()"(overrides?: TransactionOverrides): Promise; + + setAuthority( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + "setAuthority(address)"( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + setOwner( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + "setOwner(address)"( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the identifier of the extension + */ + identifier(overrides?: TransactionOverrides): Promise; + + /** + * Returns the identifier of the extension + */ + "identifier()"(overrides?: TransactionOverrides): Promise; + + /** + * Returns the version of the extension + */ + version(overrides?: TransactionOverrides): Promise; + + /** + * Returns the version of the extension + */ + "version()"(overrides?: TransactionOverrides): Promise; + + /** + * Configures the extension + * @param _colony The colony in which the extension holds permissions + */ + install( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Configures the extension + * @param _colony The colony in which the extension holds permissions + */ + "install(address)"( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when upgrading the extension + */ + finishUpgrade(overrides?: TransactionOverrides): Promise; + + /** + * Called when upgrading the extension + */ + "finishUpgrade()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + deprecate( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + "deprecate(bool)"( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when uninstalling the extension + */ + uninstall(overrides?: TransactionOverrides): Promise; + + /** + * Called when uninstalling the extension + */ + "uninstall()"(overrides?: TransactionOverrides): Promise; + + /** + * Assumes that each entity holds administration and funding roles in the root domain + * Completes a colony payment in a single transaction + * @param _amounts amounts of the tokens being paid out + * @param _callerChildSkillIndex Index of the _callerPermissionDomainId skill.children array to get + * @param _callerPermissionDomainId The domainId in which the _caller_ has the administration permission (must have funding in root) + * @param _childSkillIndex Index of the _permissionDomainId skill.children array to get + * @param _domainId The domainId the payment should be coming from + * @param _permissionDomainId The domainId in which the _contract_ has permissions to add a payment and fund it + * @param _skillId The skillId that the payment should be marked with, possibly awarding reputation in this skill. + * @param _tokens Addresses of the tokens the payments are being made in. 0x00 for Ether. + * @param _workers The addresses of the recipients of the payment + */ + makePayment( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _callerPermissionDomainId: BigNumberish, + _callerChildSkillIndex: BigNumberish, + _workers: string[], + _tokens: string[], + _amounts: BigNumberish[], + _domainId: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Assumes that each entity holds administration and funding roles in the root domain + * Completes a colony payment in a single transaction + * @param _amounts amounts of the tokens being paid out + * @param _callerChildSkillIndex Index of the _callerPermissionDomainId skill.children array to get + * @param _callerPermissionDomainId The domainId in which the _caller_ has the administration permission (must have funding in root) + * @param _childSkillIndex Index of the _permissionDomainId skill.children array to get + * @param _domainId The domainId the payment should be coming from + * @param _permissionDomainId The domainId in which the _contract_ has permissions to add a payment and fund it + * @param _skillId The skillId that the payment should be marked with, possibly awarding reputation in this skill. + * @param _tokens Addresses of the tokens the payments are being made in. 0x00 for Ether. + * @param _workers The addresses of the recipients of the payment + */ + "makePayment(uint256,uint256,uint256,uint256,address[],address[],uint256[],uint256,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _callerPermissionDomainId: BigNumberish, + _callerChildSkillIndex: BigNumberish, + _workers: string[], + _tokens: string[], + _amounts: BigNumberish[], + _domainId: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Assumes that each entity holds administration and funding roles in the same domain, although contract and caller can have the permissions in different domains. Payment is taken from domain funds - if the domain does not have sufficient funds, call will fail. + * Completes a colony payment in a single transaction + * @param _amounts The amounts of the tokens being paid out + * @param _callerChildSkillIndex Index of the _callerPermissionDomainId skill.children array to get + * @param _callerPermissionDomainId The domainId in which the _caller_ has permissions to add a payment and fund it + * @param _childSkillIndex Index of the _permissionDomainId skill.children array to get + * @param _domainId The domainId the payment should be coming from + * @param _permissionDomainId The domainId in which the _contract_ has permissions to add a payment and fund it + * @param _skillId The skillId that the payment should be marked with, possibly awarding reputation in this skill. + * @param _tokens The addresses of the token the payments are being made in. 0x00 for Ether. + * @param _workers The addresses of the recipients of the payment + */ + makePaymentFundedFromDomain( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _callerPermissionDomainId: BigNumberish, + _callerChildSkillIndex: BigNumberish, + _workers: string[], + _tokens: string[], + _amounts: BigNumberish[], + _domainId: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Assumes that each entity holds administration and funding roles in the same domain, although contract and caller can have the permissions in different domains. Payment is taken from domain funds - if the domain does not have sufficient funds, call will fail. + * Completes a colony payment in a single transaction + * @param _amounts The amounts of the tokens being paid out + * @param _callerChildSkillIndex Index of the _callerPermissionDomainId skill.children array to get + * @param _callerPermissionDomainId The domainId in which the _caller_ has permissions to add a payment and fund it + * @param _childSkillIndex Index of the _permissionDomainId skill.children array to get + * @param _domainId The domainId the payment should be coming from + * @param _permissionDomainId The domainId in which the _contract_ has permissions to add a payment and fund it + * @param _skillId The skillId that the payment should be marked with, possibly awarding reputation in this skill. + * @param _tokens The addresses of the token the payments are being made in. 0x00 for Ether. + * @param _workers The addresses of the recipients of the payment + */ + "makePaymentFundedFromDomain(uint256,uint256,uint256,uint256,address[],address[],uint256[],uint256,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _callerPermissionDomainId: BigNumberish, + _callerChildSkillIndex: BigNumberish, + _workers: string[], + _tokens: string[], + _amounts: BigNumberish[], + _domainId: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + filters: { + ExtensionInitialised(): EventFilter; + + LogSetAuthority(authority: string | null): EventFilter; + + LogSetOwner(owner: string | null): EventFilter; + + OneTxPaymentMade( + agent: null, + fundamentalId: null, + nPayouts: null + ): EventFilter; + }; + + estimate: { + authority(overrides?: TransactionOverrides): Promise; + + "authority()"(overrides?: TransactionOverrides): Promise; + + getColony(overrides?: TransactionOverrides): Promise; + + "getColony()"(overrides?: TransactionOverrides): Promise; + + getDeprecated(overrides?: TransactionOverrides): Promise; + + "getDeprecated()"(overrides?: TransactionOverrides): Promise; + + owner(overrides?: TransactionOverrides): Promise; + + "owner()"(overrides?: TransactionOverrides): Promise; + + setAuthority( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + "setAuthority(address)"( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + setOwner( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + "setOwner(address)"( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the identifier of the extension + */ + identifier(overrides?: TransactionOverrides): Promise; + + /** + * Returns the identifier of the extension + */ + "identifier()"(overrides?: TransactionOverrides): Promise; + + /** + * Returns the version of the extension + */ + version(overrides?: TransactionOverrides): Promise; + + /** + * Returns the version of the extension + */ + "version()"(overrides?: TransactionOverrides): Promise; + + /** + * Configures the extension + * @param _colony The colony in which the extension holds permissions + */ + install( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Configures the extension + * @param _colony The colony in which the extension holds permissions + */ + "install(address)"( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when upgrading the extension + */ + finishUpgrade(overrides?: TransactionOverrides): Promise; + + /** + * Called when upgrading the extension + */ + "finishUpgrade()"(overrides?: TransactionOverrides): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + deprecate( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + "deprecate(bool)"( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when uninstalling the extension + */ + uninstall(overrides?: TransactionOverrides): Promise; + + /** + * Called when uninstalling the extension + */ + "uninstall()"(overrides?: TransactionOverrides): Promise; + + /** + * Assumes that each entity holds administration and funding roles in the root domain + * Completes a colony payment in a single transaction + * @param _amounts amounts of the tokens being paid out + * @param _callerChildSkillIndex Index of the _callerPermissionDomainId skill.children array to get + * @param _callerPermissionDomainId The domainId in which the _caller_ has the administration permission (must have funding in root) + * @param _childSkillIndex Index of the _permissionDomainId skill.children array to get + * @param _domainId The domainId the payment should be coming from + * @param _permissionDomainId The domainId in which the _contract_ has permissions to add a payment and fund it + * @param _skillId The skillId that the payment should be marked with, possibly awarding reputation in this skill. + * @param _tokens Addresses of the tokens the payments are being made in. 0x00 for Ether. + * @param _workers The addresses of the recipients of the payment + */ + makePayment( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _callerPermissionDomainId: BigNumberish, + _callerChildSkillIndex: BigNumberish, + _workers: string[], + _tokens: string[], + _amounts: BigNumberish[], + _domainId: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Assumes that each entity holds administration and funding roles in the root domain + * Completes a colony payment in a single transaction + * @param _amounts amounts of the tokens being paid out + * @param _callerChildSkillIndex Index of the _callerPermissionDomainId skill.children array to get + * @param _callerPermissionDomainId The domainId in which the _caller_ has the administration permission (must have funding in root) + * @param _childSkillIndex Index of the _permissionDomainId skill.children array to get + * @param _domainId The domainId the payment should be coming from + * @param _permissionDomainId The domainId in which the _contract_ has permissions to add a payment and fund it + * @param _skillId The skillId that the payment should be marked with, possibly awarding reputation in this skill. + * @param _tokens Addresses of the tokens the payments are being made in. 0x00 for Ether. + * @param _workers The addresses of the recipients of the payment + */ + "makePayment(uint256,uint256,uint256,uint256,address[],address[],uint256[],uint256,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _callerPermissionDomainId: BigNumberish, + _callerChildSkillIndex: BigNumberish, + _workers: string[], + _tokens: string[], + _amounts: BigNumberish[], + _domainId: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Assumes that each entity holds administration and funding roles in the same domain, although contract and caller can have the permissions in different domains. Payment is taken from domain funds - if the domain does not have sufficient funds, call will fail. + * Completes a colony payment in a single transaction + * @param _amounts The amounts of the tokens being paid out + * @param _callerChildSkillIndex Index of the _callerPermissionDomainId skill.children array to get + * @param _callerPermissionDomainId The domainId in which the _caller_ has permissions to add a payment and fund it + * @param _childSkillIndex Index of the _permissionDomainId skill.children array to get + * @param _domainId The domainId the payment should be coming from + * @param _permissionDomainId The domainId in which the _contract_ has permissions to add a payment and fund it + * @param _skillId The skillId that the payment should be marked with, possibly awarding reputation in this skill. + * @param _tokens The addresses of the token the payments are being made in. 0x00 for Ether. + * @param _workers The addresses of the recipients of the payment + */ + makePaymentFundedFromDomain( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _callerPermissionDomainId: BigNumberish, + _callerChildSkillIndex: BigNumberish, + _workers: string[], + _tokens: string[], + _amounts: BigNumberish[], + _domainId: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Assumes that each entity holds administration and funding roles in the same domain, although contract and caller can have the permissions in different domains. Payment is taken from domain funds - if the domain does not have sufficient funds, call will fail. + * Completes a colony payment in a single transaction + * @param _amounts The amounts of the tokens being paid out + * @param _callerChildSkillIndex Index of the _callerPermissionDomainId skill.children array to get + * @param _callerPermissionDomainId The domainId in which the _caller_ has permissions to add a payment and fund it + * @param _childSkillIndex Index of the _permissionDomainId skill.children array to get + * @param _domainId The domainId the payment should be coming from + * @param _permissionDomainId The domainId in which the _contract_ has permissions to add a payment and fund it + * @param _skillId The skillId that the payment should be marked with, possibly awarding reputation in this skill. + * @param _tokens The addresses of the token the payments are being made in. 0x00 for Ether. + * @param _workers The addresses of the recipients of the payment + */ + "makePaymentFundedFromDomain(uint256,uint256,uint256,uint256,address[],address[],uint256[],uint256,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _callerPermissionDomainId: BigNumberish, + _callerChildSkillIndex: BigNumberish, + _workers: string[], + _tokens: string[], + _amounts: BigNumberish[], + _domainId: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + }; +} diff --git a/src/contracts/extensions/oneTxPayment/1/factories/OneTxPayment__factory.ts b/src/contracts/extensions/oneTxPayment/1/factories/OneTxPayment__factory.ts new file mode 100644 index 000000000..e1aebb7ce --- /dev/null +++ b/src/contracts/extensions/oneTxPayment/1/factories/OneTxPayment__factory.ts @@ -0,0 +1,348 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, ContractFactory, Signer } from "ethers"; +import { Provider } from "ethers/providers"; +import { UnsignedTransaction } from "ethers/utils/transaction"; + +import { TransactionOverrides } from ".."; +import { OneTxPayment } from "../OneTxPayment"; + +export class OneTxPayment__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy(overrides?: TransactionOverrides): Promise { + return super.deploy(overrides) as Promise; + } + getDeployTransaction(overrides?: TransactionOverrides): UnsignedTransaction { + return super.getDeployTransaction(overrides); + } + attach(address: string): OneTxPayment { + return super.attach(address) as OneTxPayment; + } + connect(signer: Signer): OneTxPayment__factory { + return super.connect(signer) as OneTxPayment__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): OneTxPayment { + return new Contract(address, _abi, signerOrProvider) as OneTxPayment; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [], + name: "ExtensionInitialised", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "authority", + type: "address", + }, + ], + name: "LogSetAuthority", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "LogSetOwner", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "fundamentalId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "nPayouts", + type: "uint256", + }, + ], + name: "OneTxPaymentMade", + type: "event", + }, + { + inputs: [], + name: "authority", + outputs: [ + { + internalType: "contract DSAuthority", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getColony", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getDeprecated", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract DSAuthority", + name: "authority_", + type: "address", + }, + ], + name: "setAuthority", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner_", + type: "address", + }, + ], + name: "setOwner", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "identifier", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_colony", + type: "address", + }, + ], + name: "install", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "finishUpgrade", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bool", + name: "_deprecated", + type: "bool", + }, + ], + name: "deprecate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "uninstall", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_callerPermissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_callerChildSkillIndex", + type: "uint256", + }, + { + internalType: "address payable[]", + name: "_workers", + type: "address[]", + }, + { + internalType: "address[]", + name: "_tokens", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "_amounts", + type: "uint256[]", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_skillId", + type: "uint256", + }, + ], + name: "makePayment", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_callerPermissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_callerChildSkillIndex", + type: "uint256", + }, + { + internalType: "address payable[]", + name: "_workers", + type: "address[]", + }, + { + internalType: "address[]", + name: "_tokens", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "_amounts", + type: "uint256[]", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_skillId", + type: "uint256", + }, + ], + name: "makePaymentFundedFromDomain", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; + +const _bytecode = + "0x608060405234801561001057600080fd5b50600180546001600160a01b031916339081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a26124c68061005e6000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80637998a1c41161008c5780639251cff4116100665780639251cff41461019b578063bf7e214f146101ae578063bfd68ab7146101b6578063fcf6ba93146101be576100ea565b80637998a1c41461016b5780637a9e5e4b146101735780638da5cb5b14610186576100ea565b80632a2678bb116100c85780632a2678bb1461011f578063340df28f1461013257806354fd4d501461013a5780636bf2dc4314610158576100ea565b80630d638f30146100ef57806313af4035146100f95780632a1b8f9b1461010c575b600080fd5b6100f76101d3565b005b6100f7610107366004611e4f565b61021c565b6100f761011a366004611e4f565b61029e565b6100f761012d36600461203d565b61031b565b6100f7610c56565b610142610c8a565b60405161014f91906121ae565b60405180910390f35b6100f761016636600461203d565b610c8f565b61014261152e565b6100f7610181366004611e4f565b611552565b61018e6115d0565b60405161014f919061210a565b6100f76101a9366004611e72565b6115df565b61018e611614565b61018e611623565b6101c6611632565b60405161014f91906121a3565b6101e9336000356001600160e01b031916611642565b61020e5760405162461bcd60e51b815260040161020590612242565b60405180910390fd5b6003546001600160a01b0316ff5b610232336000356001600160e01b031916611642565b61024e5760405162461bcd60e51b815260040161020590612242565b600180546001600160a01b0319166001600160a01b0383811691909117918290556040519116907fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b6102b4336000356001600160e01b031916611642565b6102d05760405162461bcd60e51b815260040161020590612242565b6003546001600160a01b0316156102f95760405162461bcd60e51b81526004016102059061230c565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b8351855114801561032d575082518551145b6103495760405162461bcd60e51b815260040161020590612343565b60035460405163066a9e2760e31b81526001600160a01b0390911690633354f138906103829033908b906005908c90899060040161211e565b60206040518083038186803b15801561039a57600080fd5b505afa1580156103ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103d29190611e8e565b8015610462575060035460405163066a9e2760e31b81526001600160a01b0390911690633354f138906104129033908b906006908c90899060040161211e565b60206040518083038186803b15801561042a57600080fd5b505afa15801561043e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104629190611e8e565b61047e5760405162461bcd60e51b815260040161020590612270565b8451600114156107b75760035485516000916001600160a01b031690634f8df643908c908c908a9086906104ae57fe5b6020026020010151896000815181106104c357fe5b6020026020010151896000815181106104d857fe5b602002602001015189896040518863ffffffff1660e01b815260040161050497969594939291906121b7565b602060405180830381600087803b15801561051e57600080fd5b505af1158015610532573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105569190612025565b600354604051631940541b60e11b81529192506000916001600160a01b0390911690633280a8369061058c9085906004016121ae565b60006040518083038186803b1580156105a457600080fd5b505afa1580156105b8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105e09190810190611f76565b6040908101516003549151630d3d4c7160e11b81529092506000916001600160a01b031690631a7a98e2906106199088906004016121ae565b604080518083038186803b15801561063057600080fd5b505afa158015610644573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106689190611eaa565b6020015190506106a48c8c83858a60008151811061068257fe5b60200260200101518c60008151811061069757fe5b6020026020010151611720565b6003546040516306cb0d2160e51b81526001600160a01b039091169063d961a420906106d8908f908f9088906004016121f3565b600060405180830381600087803b1580156106f257600080fd5b505af1158015610706573d6000803e3d6000fd5b505060035489516001600160a01b039091169250630f4c52f3915085908a9060009061072e57fe5b60200260200101516040518363ffffffff1660e01b81526004016107539291906123b1565b600060405180830381600087803b15801561076d57600080fd5b505af1158015610781573d6000803e3d6000fd5b5050505060008051602061247183398151915233848a516040516107a793929190612155565b60405180910390a1505050610c4b565b60035460405163a5487a3760e01b81526000916001600160a01b03169063a5487a37906107ec908d908d9088906004016121f3565b602060405180830381600087803b15801561080657600080fd5b505af115801561081a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061083e9190612025565b6003546040516374b556c360e11b81529192506000916001600160a01b039091169063e96aad86906108749085906004016121ae565b60c06040518083038186803b15801561088c57600080fd5b505afa1580156108a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c49190611ef2565b6040908101516003549151630d3d4c7160e11b81529092506000916001600160a01b031690631a7a98e2906108fd9088906004016121ae565b604080518083038186803b15801561091457600080fd5b505afa158015610928573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061094c9190611eaa565b6020015190506109608c8c83858b8b611796565b6000805b8951821015610c10578115806109b5575089600183038151811061098457fe5b60200260200101516001600160a01b03168a83815181106109a157fe5b60200260200101516001600160a01b031614155b15610b1657811580610a0157508960018303815181106109d157fe5b60200260200101516001600160a01b03168a83815181106109ee57fe5b60200260200101516001600160a01b0316115b610a1d5760405162461bcd60e51b8152600401610205906122d5565b6003548a516001909201916001600160a01b03909116906317b46cb790879084908e9087908110610a4a57fe5b60200260200101516040518463ffffffff1660e01b8152600401610a70939291906123c8565b600060405180830381600087803b158015610a8a57600080fd5b505af1158015610a9e573d6000803e3d6000fd5b5050505085600014610b1157600354604051637d09f6b960e11b81526001600160a01b039091169063fa13ed7290610ade90889085908b906004016121f3565b600060405180830381600087803b158015610af857600080fd5b505af1158015610b0c573d6000803e3d6000fd5b505050505b610b70565b886001830381518110610b2557fe5b60200260200101516001600160a01b0316898381518110610b4257fe5b60200260200101516001600160a01b031611610b705760405162461bcd60e51b81526004016102059061237a565b60035489516001600160a01b039091169063476d1d0590879084908d9087908110610b9757fe5b60200260200101518c8781518110610bab57fe5b60200260200101516040518563ffffffff1660e01b8152600401610bd294939291906123e7565b600060405180830381600087803b158015610bec57600080fd5b505af1158015610c00573d6000803e3d6000fd5b5050600190930192506109649050565b610c1b858b8b611867565b60008051602061247183398151915233868c51604051610c3d93929190612155565b60405180910390a150505050505b505050505050505050565b610c6c336000356001600160e01b031916611642565b610c885760405162461bcd60e51b815260040161020590612242565b565b600190565b83518551148015610ca1575082518551145b610cbd5760405162461bcd60e51b815260040161020590612343565b60035460405163066a9e2760e31b81526001600160a01b0390911690633354f13890610cf79033906001906005908e90899060040161211e565b60206040518083038186803b158015610d0f57600080fd5b505afa158015610d23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d479190611e8e565b8015610dd7575060035460405163066a9e2760e31b81526001600160a01b0390911690633354f13890610d879033908b906006908c90899060040161211e565b60206040518083038186803b158015610d9f57600080fd5b505afa158015610db3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dd79190611e8e565b610df35760405162461bcd60e51b815260040161020590612270565b84516001141561111a5760035485516000916001600160a01b031690634f8df643906001908c908a908690610e2457fe5b602002602001015189600081518110610e3957fe5b602002602001015189600081518110610e4e57fe5b602002602001015189896040518863ffffffff1660e01b8152600401610e7a97969594939291906121b7565b602060405180830381600087803b158015610e9457600080fd5b505af1158015610ea8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ecc9190612025565b600354604051631940541b60e11b81529192506000916001600160a01b0390911690633280a83690610f029085906004016121ae565b60006040518083038186803b158015610f1a57600080fd5b505afa158015610f2e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f569190810190611f76565b604001519050600360009054906101000a90046001600160a01b03166001600160a01b031663c68d19ea60016000198d6001868b600081518110610f9657fe5b60200260200101518d600081518110610fab57fe5b60200260200101516040518863ffffffff1660e01b8152600401610fd59796959493929190612209565b600060405180830381600087803b158015610fef57600080fd5b505af1158015611003573d6000803e3d6000fd5b50506003546040516306cb0d2160e51b81526001600160a01b03909116925063d961a420915061103c906001908e9087906004016121f3565b600060405180830381600087803b15801561105657600080fd5b505af115801561106a573d6000803e3d6000fd5b505060035488516001600160a01b039091169250630f4c52f391508490899060009061109257fe5b60200260200101516040518363ffffffff1660e01b81526004016110b79291906123b1565b600060405180830381600087803b1580156110d157600080fd5b505af11580156110e5573d6000803e3d6000fd5b505050506000805160206124718339815191523383895160405161110b93929190612155565b60405180910390a15050610c4b565b60035460405163a5487a3760e01b81526000916001600160a01b03169063a5487a3790611150906001908d9088906004016121f3565b602060405180830381600087803b15801561116a57600080fd5b505af115801561117e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a29190612025565b6003546040516374b556c360e11b81529192506000916001600160a01b039091169063e96aad86906111d89085906004016121ae565b60c06040518083038186803b1580156111f057600080fd5b505afa158015611204573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112289190611ef2565b60400151905061123a8a8288886119bc565b6000805b88518210156114ea5781158061128f575088600183038151811061125e57fe5b60200260200101516001600160a01b031689838151811061127b57fe5b60200260200101516001600160a01b031614155b156113f0578115806112db57508860018303815181106112ab57fe5b60200260200101516001600160a01b03168983815181106112c857fe5b60200260200101516001600160a01b0316115b6112f75760405162461bcd60e51b8152600401610205906122d5565b60035489516001909201916001600160a01b03909116906317b46cb790869084908d908790811061132457fe5b60200260200101516040518463ffffffff1660e01b815260040161134a939291906123c8565b600060405180830381600087803b15801561136457600080fd5b505af1158015611378573d6000803e3d6000fd5b50505050846000146113eb57600354604051637d09f6b960e11b81526001600160a01b039091169063fa13ed72906113b890879085908a906004016121f3565b600060405180830381600087803b1580156113d257600080fd5b505af11580156113e6573d6000803e3d6000fd5b505050505b61144a565b8760018303815181106113ff57fe5b60200260200101516001600160a01b031688838151811061141c57fe5b60200260200101516001600160a01b03161161144a5760405162461bcd60e51b81526004016102059061237a565b60035488516001600160a01b039091169063476d1d0590869084908c908790811061147157fe5b60200260200101518b878151811061148557fe5b60200260200101516040518563ffffffff1660e01b81526004016114ac94939291906123e7565b600060405180830381600087803b1580156114c657600080fd5b505af11580156114da573d6000803e3d6000fd5b50506001909301925061123e9050565b6114f5848a8a611867565b60008051602061247183398151915233858b5160405161151793929190612155565b60405180910390a150505050505050505050505050565b7fa89bc527362fca70a521a083b19b3b6bad9d33d24617254f625ef38bda0407cd90565b611568336000356001600160e01b031916611642565b6115845760405162461bcd60e51b815260040161020590612242565b600080546001600160a01b0319166001600160a01b03838116919091178083556040519116917f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada491a250565b6001546001600160a01b031681565b6115f5336000356001600160e01b031916611642565b6116115760405162461bcd60e51b815260040161020590612242565b50565b6000546001600160a01b031681565b6003546001600160a01b031690565b600354600160a01b900460ff1690565b60006001600160a01b03831630141561165d5750600161171a565b6001546001600160a01b038481169116141561167b5750600161171a565b6000546001600160a01b03166116935750600061171a565b60005460405163b700961360e01b81526001600160a01b039091169063b7009613906116c790869030908790600401612176565b60206040518083038186803b1580156116df57600080fd5b505afa1580156116f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117179190611e8e565b90505b92915050565b6003546040516363468cf560e11b81526001600160a01b039091169063c68d19ea9061175c908990899081908a908a908a908a90600401612209565b600060405180830381600087803b15801561177657600080fd5b505af115801561178a573d6000803e3d6000fd5b50505050505050505050565b60006060806117a58585611a9b565b92509250925060005b8381101561178a57600360009054906101000a90046001600160a01b03166001600160a01b031663c68d19ea8b8b8c8c8c8888815181106117eb57fe5b60200260200101518a89815181106117ff57fe5b60200260200101516040518863ffffffff1660e01b81526004016118299796959493929190612209565b600060405180830381600087803b15801561184357600080fd5b505af1158015611857573d6000803e3d6000fd5b5050600190920191506117ae9050565b6003546040516359f3af6360e11b81526001600160a01b039091169063b3e75ec6906118979086906004016121ae565b600060405180830381600087803b1580156118b157600080fd5b505af11580156118c5573d6000803e3d6000fd5b505050506000805b83518110156119b55780158061191e57508360018203815181106118ed57fe5b60200260200101516001600160a01b031684828151811061190a57fe5b60200260200101516001600160a01b031614155b1561192a576001909101905b60035483516001600160a01b0390911690632fe96899908790859087908690811061195157fe5b60200260200101516040518463ffffffff1660e01b8152600401611977939291906123c8565b600060405180830381600087803b15801561199157600080fd5b505af11580156119a5573d6000803e3d6000fd5b5050600190920191506118cd9050565b5050505050565b60006060806119cb8585611a9b565b92509250925060005b83811015611a9157600360009054906101000a90046001600160a01b03166001600160a01b031663c68d19ea60016000198b60018c888881518110611a1557fe5b60200260200101518a8981518110611a2957fe5b60200260200101516040518863ffffffff1660e01b8152600401611a539796959493929190612209565b600060405180830381600087803b158015611a6d57600080fd5b505af1158015611a81573d6000803e3d6000fd5b5050600190920191506119d49050565b5050505050505050565b600060608060006060865167ffffffffffffffff81118015611abc57600080fd5b50604051908082528060200260200182016040528015611ae6578160200160208202803683370190505b5090506060875167ffffffffffffffff81118015611b0357600080fd5b50604051908082528060200260200182016040528015611b2d578160200160208202803683370190505b50905060005b8851811015611c68576000805b8581108015611b4d575081155b15611be757848181518110611b5e57fe5b60200260200101516001600160a01b03168b8481518110611b7b57fe5b60200260200101516001600160a01b03161415611bdf5760019150611bc6848281518110611ba557fe5b60200260200101518b8581518110611bb957fe5b6020026020010151611c77565b848281518110611bd257fe5b6020026020010181815250505b600101611b40565b81611c5e578a8381518110611bf857fe5b6020026020010151858781518110611c0c57fe5b60200260200101906001600160a01b031690816001600160a01b031681525050898381518110611c3857fe5b6020026020010151848781518110611c4c57fe5b60209081029190910101526001909501945b5050600101611b33565b50919450925090509250925092565b8082018281101561171a5760405162461bcd60e51b8152600401610205906122a7565b8051611ca58161244d565b919050565b600082601f830112611cba578081fd5b8135611ccd611cc88261242f565b61240b565b818152915060208083019084810181840286018201871015611cee57600080fd5b60005b84811015611d16578135611d048161244d565b84529282019290820190600101611cf1565b505050505092915050565b600082601f830112611d31578081fd5b8135611d3f611cc88261242f565b818152915060208083019084810181840286018201871015611d6057600080fd5b60005b84811015611d16578135611d768161244d565b84529282019290820190600101611d63565b600082601f830112611d98578081fd5b8135611da6611cc88261242f565b818152915060208083019084810181840286018201871015611dc757600080fd5b60005b84811015611d1657813584529282019290820190600101611dca565b600082601f830112611df6578081fd5b8151611e04611cc88261242f565b818152915060208083019084810181840286018201871015611e2557600080fd5b60005b84811015611d1657815184529282019290820190600101611e28565b8051611ca581612462565b600060208284031215611e60578081fd5b8135611e6b8161244d565b9392505050565b600060208284031215611e83578081fd5b8135611e6b81612462565b600060208284031215611e9f578081fd5b8151611e6b81612462565b600060408284031215611ebb578081fd5b6040516040810181811067ffffffffffffffff82111715611ed857fe5b604052825181526020928301519281019290925250919050565b600060c08284031215611f03578081fd5b60405160c0810181811067ffffffffffffffff82111715611f2057fe5b604052825160038110611f31578283fd5b8152611f3f60208401611c9a565b602082015260408301516040820152606083015160608201526080830151608082015260a083015160a08201528091505092915050565b600060208284031215611f87578081fd5b815167ffffffffffffffff80821115611f9e578283fd5b9083019060a08286031215611fb1578283fd5b60405160a081018181108382111715611fc657fe5b604052611fd283611c9a565b8152611fe060208401611e44565b6020820152604083015160408201526060830151606082015260808301518281111561200a578485fd5b61201687828601611de6565b60808301525095945050505050565b600060208284031215612036578081fd5b5051919050565b60008060008060008060008060006101208a8c03121561205b578485fd5b8935985060208a0135975060408a0135965060608a0135955060808a013567ffffffffffffffff8082111561208e578687fd5b61209a8d838e01611d21565b965060a08c01359150808211156120af578586fd5b6120bb8d838e01611caa565b955060c08c01359150808211156120d0578485fd5b506120dd8c828d01611d88565b93505060e08a013591506101008a013590509295985092959850929598565b6008811061210657fe5b9052565b6001600160a01b0391909116815260200190565b6001600160a01b03861681526020810185905260a0810161214260408301866120fc565b6060820193909352608001529392505050565b6001600160a01b039390931683526020830191909152604082015260600190565b6001600160a01b0393841681529190921660208201526001600160e01b0319909116604082015260600190565b901515815260200190565b90815260200190565b96875260208701959095526001600160a01b039384166040870152919092166060850152608084019190915260a083015260c082015260e00190565b9283526020830191909152604082015260600190565b968752602087019590955260408601939093526060850191909152608084015260a08301526001600160a01b031660c082015260e00190565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b6020808252601d908201527f6f6e652d74782d7061796d656e742d6e6f742d617574686f72697a6564000000604082015260600190565b60208082526014908201527364732d6d6174682d6164642d6f766572666c6f7760601b604082015260600190565b6020808252601f908201527f6f6e652d74782d7061796d656e742d6261642d776f726b65722d6f7264657200604082015260600190565b6020808252601b908201527f657874656e73696f6e2d616c72656164792d696e7374616c6c65640000000000604082015260600190565b6020808252601c908201527f6f6e652d74782d7061796d656e742d696e76616c69642d696e70757400000000604082015260600190565b6020808252601e908201527f6f6e652d74782d7061796d656e742d6261642d746f6b656e2d6f726465720000604082015260600190565b9182526001600160a01b0316602082015260400190565b92835260208301919091526001600160a01b0316604082015260600190565b93845260208401929092526001600160a01b03166040830152606082015260800190565b60405181810167ffffffffffffffff8111828210171561242757fe5b604052919050565b600067ffffffffffffffff82111561244357fe5b5060209081020190565b6001600160a01b038116811461161157600080fd5b801515811461161157600080fdfed9a1ad84578b017e90e4244baf045bcabf50583f51887a391bbe8183e8e34ecaa26469706673582212205621e312a1dd89cfe3eafa90b22c22917ac7a62d5472c8ca14cf1b18e1ad4aa964736f6c63430007030033"; diff --git a/src/contracts/extensions/oneTxPayment/1/index.d.ts b/src/contracts/extensions/oneTxPayment/1/index.d.ts new file mode 100644 index 000000000..910d6a045 --- /dev/null +++ b/src/contracts/extensions/oneTxPayment/1/index.d.ts @@ -0,0 +1,29 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { + BigNumberish, + EventDescription, + FunctionDescription, +} from "ethers/utils"; + +export interface TransactionOverrides { + gasLimit?: BigNumberish | Promise; + gasPrice?: BigNumberish | Promise; + nonce?: BigNumberish | Promise; + value?: BigNumberish | Promise; + from?: string | Promise; + chainId?: number | Promise; +} + +export interface TypedEventDescription< + T extends Pick +> extends EventDescription { + encodeTopics: T["encodeTopics"]; +} + +export interface TypedFunctionDescription< + T extends Pick +> extends FunctionDescription { + encode: T["encode"]; +} diff --git a/src/contracts/extensions/oneTxPayment/2/OneTxPayment.d.ts b/src/contracts/extensions/oneTxPayment/2/OneTxPayment.d.ts new file mode 100644 index 000000000..78aba5bc5 --- /dev/null +++ b/src/contracts/extensions/oneTxPayment/2/OneTxPayment.d.ts @@ -0,0 +1,857 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-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 OneTxPaymentInterface extends Interface { + functions: { + authority: TypedFunctionDescription<{ encode([]: []): string }>; + + getColony: TypedFunctionDescription<{ encode([]: []): string }>; + + getDeprecated: TypedFunctionDescription<{ encode([]: []): string }>; + + owner: TypedFunctionDescription<{ encode([]: []): string }>; + + setAuthority: TypedFunctionDescription<{ + encode([authority_]: [string]): string; + }>; + + setOwner: TypedFunctionDescription<{ encode([owner_]: [string]): string }>; + + identifier: TypedFunctionDescription<{ encode([]: []): string }>; + + version: TypedFunctionDescription<{ encode([]: []): string }>; + + install: TypedFunctionDescription<{ encode([_colony]: [string]): string }>; + + finishUpgrade: TypedFunctionDescription<{ encode([]: []): string }>; + + deprecate: TypedFunctionDescription<{ + encode([_deprecated]: [boolean]): string; + }>; + + uninstall: TypedFunctionDescription<{ encode([]: []): string }>; + + getCapabilityRoles: TypedFunctionDescription<{ + encode([_sig]: [Arrayish]): string; + }>; + + makePayment: TypedFunctionDescription<{ + encode([ + _permissionDomainId, + _childSkillIndex, + _callerPermissionDomainId, + _callerChildSkillIndex, + _workers, + _tokens, + _amounts, + _domainId, + _skillId, + ]: [ + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + string[], + string[], + BigNumberish[], + BigNumberish, + BigNumberish + ]): string; + }>; + + makePaymentFundedFromDomain: TypedFunctionDescription<{ + encode([ + _permissionDomainId, + _childSkillIndex, + _callerPermissionDomainId, + _callerChildSkillIndex, + _workers, + _tokens, + _amounts, + _domainId, + _skillId, + ]: [ + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + string[], + string[], + BigNumberish[], + BigNumberish, + BigNumberish + ]): string; + }>; + }; + + events: { + ExtensionInitialised: TypedEventDescription<{ + encodeTopics([]: []): string[]; + }>; + + LogSetAuthority: TypedEventDescription<{ + encodeTopics([authority]: [string | null]): string[]; + }>; + + LogSetOwner: TypedEventDescription<{ + encodeTopics([owner]: [string | null]): string[]; + }>; + + OneTxPaymentMade: TypedEventDescription<{ + encodeTopics([agent, fundamentalId, nPayouts]: [ + null, + null, + null + ]): string[]; + }>; + }; +} + +export class OneTxPayment extends Contract { + connect(signerOrProvider: Signer | Provider | string): OneTxPayment; + attach(addressOrName: string): OneTxPayment; + deployed(): Promise; + + on(event: EventFilter | string, listener: Listener): OneTxPayment; + once(event: EventFilter | string, listener: Listener): OneTxPayment; + addListener( + eventName: EventFilter | string, + listener: Listener + ): OneTxPayment; + removeAllListeners(eventName: EventFilter | string): OneTxPayment; + removeListener(eventName: any, listener: Listener): OneTxPayment; + + interface: OneTxPaymentInterface; + + functions: { + authority(overrides?: TransactionOverrides): Promise; + + "authority()"(overrides?: TransactionOverrides): Promise; + + getColony(overrides?: TransactionOverrides): Promise; + + "getColony()"(overrides?: TransactionOverrides): Promise; + + getDeprecated(overrides?: TransactionOverrides): Promise; + + "getDeprecated()"(overrides?: TransactionOverrides): Promise; + + owner(overrides?: TransactionOverrides): Promise; + + "owner()"(overrides?: TransactionOverrides): Promise; + + setAuthority( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + "setAuthority(address)"( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + setOwner( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + "setOwner(address)"( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the identifier of the extension + */ + identifier(overrides?: TransactionOverrides): Promise; + + /** + * Returns the identifier of the extension + */ + "identifier()"(overrides?: TransactionOverrides): Promise; + + /** + * Returns the version of the extension + */ + version(overrides?: TransactionOverrides): Promise; + + /** + * Returns the version of the extension + */ + "version()"(overrides?: TransactionOverrides): Promise; + + /** + * Configures the extension + * @param _colony The colony in which the extension holds permissions + */ + install( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Configures the extension + * @param _colony The colony in which the extension holds permissions + */ + "install(address)"( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when upgrading the extension + */ + finishUpgrade( + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when upgrading the extension + */ + "finishUpgrade()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + deprecate( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + "deprecate(bool)"( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when uninstalling the extension + */ + uninstall(overrides?: TransactionOverrides): Promise; + + /** + * Called when uninstalling the extension + */ + "uninstall()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Return the permissions required for each function + * @param _sig The function signature + */ + getCapabilityRoles( + _sig: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Return the permissions required for each function + * @param _sig The function signature + */ + "getCapabilityRoles(bytes4)"( + _sig: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Assumes that each entity holds administration and funding roles in the root domain + * Completes a colony payment in a single transaction + * @param _amounts amounts of the tokens being paid out + * @param _callerChildSkillIndex Index of the _callerPermissionDomainId skill.children array to get + * @param _callerPermissionDomainId The domainId in which the _caller_ has the administration permission (must have funding in root) + * @param _childSkillIndex Index of the _permissionDomainId skill.children array to get + * @param _domainId The domainId the payment should be coming from + * @param _permissionDomainId The domainId in which the _contract_ has permissions to add a payment and fund it + * @param _skillId The skillId that the payment should be marked with, possibly awarding reputation in this skill. + * @param _tokens Addresses of the tokens the payments are being made in. 0x00 for Ether. + * @param _workers The addresses of the recipients of the payment + */ + makePayment( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _callerPermissionDomainId: BigNumberish, + _callerChildSkillIndex: BigNumberish, + _workers: string[], + _tokens: string[], + _amounts: BigNumberish[], + _domainId: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Assumes that each entity holds administration and funding roles in the root domain + * Completes a colony payment in a single transaction + * @param _amounts amounts of the tokens being paid out + * @param _callerChildSkillIndex Index of the _callerPermissionDomainId skill.children array to get + * @param _callerPermissionDomainId The domainId in which the _caller_ has the administration permission (must have funding in root) + * @param _childSkillIndex Index of the _permissionDomainId skill.children array to get + * @param _domainId The domainId the payment should be coming from + * @param _permissionDomainId The domainId in which the _contract_ has permissions to add a payment and fund it + * @param _skillId The skillId that the payment should be marked with, possibly awarding reputation in this skill. + * @param _tokens Addresses of the tokens the payments are being made in. 0x00 for Ether. + * @param _workers The addresses of the recipients of the payment + */ + "makePayment(uint256,uint256,uint256,uint256,address[],address[],uint256[],uint256,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _callerPermissionDomainId: BigNumberish, + _callerChildSkillIndex: BigNumberish, + _workers: string[], + _tokens: string[], + _amounts: BigNumberish[], + _domainId: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Assumes that each entity holds administration and funding roles in the same domain, although contract and caller can have the permissions in different domains. Payment is taken from domain funds - if the domain does not have sufficient funds, call will fail. + * Completes a colony payment in a single transaction + * @param _amounts The amounts of the tokens being paid out + * @param _callerChildSkillIndex Index of the _callerPermissionDomainId skill.children array to get + * @param _callerPermissionDomainId The domainId in which the _caller_ has permissions to add a payment and fund it + * @param _childSkillIndex Index of the _permissionDomainId skill.children array to get + * @param _domainId The domainId the payment should be coming from + * @param _permissionDomainId The domainId in which the _contract_ has permissions to add a payment and fund it + * @param _skillId The skillId that the payment should be marked with, possibly awarding reputation in this skill. + * @param _tokens The addresses of the token the payments are being made in. 0x00 for Ether. + * @param _workers The addresses of the recipients of the payment + */ + makePaymentFundedFromDomain( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _callerPermissionDomainId: BigNumberish, + _callerChildSkillIndex: BigNumberish, + _workers: string[], + _tokens: string[], + _amounts: BigNumberish[], + _domainId: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Assumes that each entity holds administration and funding roles in the same domain, although contract and caller can have the permissions in different domains. Payment is taken from domain funds - if the domain does not have sufficient funds, call will fail. + * Completes a colony payment in a single transaction + * @param _amounts The amounts of the tokens being paid out + * @param _callerChildSkillIndex Index of the _callerPermissionDomainId skill.children array to get + * @param _callerPermissionDomainId The domainId in which the _caller_ has permissions to add a payment and fund it + * @param _childSkillIndex Index of the _permissionDomainId skill.children array to get + * @param _domainId The domainId the payment should be coming from + * @param _permissionDomainId The domainId in which the _contract_ has permissions to add a payment and fund it + * @param _skillId The skillId that the payment should be marked with, possibly awarding reputation in this skill. + * @param _tokens The addresses of the token the payments are being made in. 0x00 for Ether. + * @param _workers The addresses of the recipients of the payment + */ + "makePaymentFundedFromDomain(uint256,uint256,uint256,uint256,address[],address[],uint256[],uint256,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _callerPermissionDomainId: BigNumberish, + _callerChildSkillIndex: BigNumberish, + _workers: string[], + _tokens: string[], + _amounts: BigNumberish[], + _domainId: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + }; + + authority(overrides?: TransactionOverrides): Promise; + + "authority()"(overrides?: TransactionOverrides): Promise; + + getColony(overrides?: TransactionOverrides): Promise; + + "getColony()"(overrides?: TransactionOverrides): Promise; + + getDeprecated(overrides?: TransactionOverrides): Promise; + + "getDeprecated()"(overrides?: TransactionOverrides): Promise; + + owner(overrides?: TransactionOverrides): Promise; + + "owner()"(overrides?: TransactionOverrides): Promise; + + setAuthority( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + "setAuthority(address)"( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + setOwner( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + "setOwner(address)"( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the identifier of the extension + */ + identifier(overrides?: TransactionOverrides): Promise; + + /** + * Returns the identifier of the extension + */ + "identifier()"(overrides?: TransactionOverrides): Promise; + + /** + * Returns the version of the extension + */ + version(overrides?: TransactionOverrides): Promise; + + /** + * Returns the version of the extension + */ + "version()"(overrides?: TransactionOverrides): Promise; + + /** + * Configures the extension + * @param _colony The colony in which the extension holds permissions + */ + install( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Configures the extension + * @param _colony The colony in which the extension holds permissions + */ + "install(address)"( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when upgrading the extension + */ + finishUpgrade(overrides?: TransactionOverrides): Promise; + + /** + * Called when upgrading the extension + */ + "finishUpgrade()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + deprecate( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + "deprecate(bool)"( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when uninstalling the extension + */ + uninstall(overrides?: TransactionOverrides): Promise; + + /** + * Called when uninstalling the extension + */ + "uninstall()"(overrides?: TransactionOverrides): Promise; + + /** + * Return the permissions required for each function + * @param _sig The function signature + */ + getCapabilityRoles( + _sig: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Return the permissions required for each function + * @param _sig The function signature + */ + "getCapabilityRoles(bytes4)"( + _sig: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Assumes that each entity holds administration and funding roles in the root domain + * Completes a colony payment in a single transaction + * @param _amounts amounts of the tokens being paid out + * @param _callerChildSkillIndex Index of the _callerPermissionDomainId skill.children array to get + * @param _callerPermissionDomainId The domainId in which the _caller_ has the administration permission (must have funding in root) + * @param _childSkillIndex Index of the _permissionDomainId skill.children array to get + * @param _domainId The domainId the payment should be coming from + * @param _permissionDomainId The domainId in which the _contract_ has permissions to add a payment and fund it + * @param _skillId The skillId that the payment should be marked with, possibly awarding reputation in this skill. + * @param _tokens Addresses of the tokens the payments are being made in. 0x00 for Ether. + * @param _workers The addresses of the recipients of the payment + */ + makePayment( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _callerPermissionDomainId: BigNumberish, + _callerChildSkillIndex: BigNumberish, + _workers: string[], + _tokens: string[], + _amounts: BigNumberish[], + _domainId: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Assumes that each entity holds administration and funding roles in the root domain + * Completes a colony payment in a single transaction + * @param _amounts amounts of the tokens being paid out + * @param _callerChildSkillIndex Index of the _callerPermissionDomainId skill.children array to get + * @param _callerPermissionDomainId The domainId in which the _caller_ has the administration permission (must have funding in root) + * @param _childSkillIndex Index of the _permissionDomainId skill.children array to get + * @param _domainId The domainId the payment should be coming from + * @param _permissionDomainId The domainId in which the _contract_ has permissions to add a payment and fund it + * @param _skillId The skillId that the payment should be marked with, possibly awarding reputation in this skill. + * @param _tokens Addresses of the tokens the payments are being made in. 0x00 for Ether. + * @param _workers The addresses of the recipients of the payment + */ + "makePayment(uint256,uint256,uint256,uint256,address[],address[],uint256[],uint256,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _callerPermissionDomainId: BigNumberish, + _callerChildSkillIndex: BigNumberish, + _workers: string[], + _tokens: string[], + _amounts: BigNumberish[], + _domainId: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Assumes that each entity holds administration and funding roles in the same domain, although contract and caller can have the permissions in different domains. Payment is taken from domain funds - if the domain does not have sufficient funds, call will fail. + * Completes a colony payment in a single transaction + * @param _amounts The amounts of the tokens being paid out + * @param _callerChildSkillIndex Index of the _callerPermissionDomainId skill.children array to get + * @param _callerPermissionDomainId The domainId in which the _caller_ has permissions to add a payment and fund it + * @param _childSkillIndex Index of the _permissionDomainId skill.children array to get + * @param _domainId The domainId the payment should be coming from + * @param _permissionDomainId The domainId in which the _contract_ has permissions to add a payment and fund it + * @param _skillId The skillId that the payment should be marked with, possibly awarding reputation in this skill. + * @param _tokens The addresses of the token the payments are being made in. 0x00 for Ether. + * @param _workers The addresses of the recipients of the payment + */ + makePaymentFundedFromDomain( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _callerPermissionDomainId: BigNumberish, + _callerChildSkillIndex: BigNumberish, + _workers: string[], + _tokens: string[], + _amounts: BigNumberish[], + _domainId: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Assumes that each entity holds administration and funding roles in the same domain, although contract and caller can have the permissions in different domains. Payment is taken from domain funds - if the domain does not have sufficient funds, call will fail. + * Completes a colony payment in a single transaction + * @param _amounts The amounts of the tokens being paid out + * @param _callerChildSkillIndex Index of the _callerPermissionDomainId skill.children array to get + * @param _callerPermissionDomainId The domainId in which the _caller_ has permissions to add a payment and fund it + * @param _childSkillIndex Index of the _permissionDomainId skill.children array to get + * @param _domainId The domainId the payment should be coming from + * @param _permissionDomainId The domainId in which the _contract_ has permissions to add a payment and fund it + * @param _skillId The skillId that the payment should be marked with, possibly awarding reputation in this skill. + * @param _tokens The addresses of the token the payments are being made in. 0x00 for Ether. + * @param _workers The addresses of the recipients of the payment + */ + "makePaymentFundedFromDomain(uint256,uint256,uint256,uint256,address[],address[],uint256[],uint256,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _callerPermissionDomainId: BigNumberish, + _callerChildSkillIndex: BigNumberish, + _workers: string[], + _tokens: string[], + _amounts: BigNumberish[], + _domainId: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + filters: { + ExtensionInitialised(): EventFilter; + + LogSetAuthority(authority: string | null): EventFilter; + + LogSetOwner(owner: string | null): EventFilter; + + OneTxPaymentMade( + agent: null, + fundamentalId: null, + nPayouts: null + ): EventFilter; + }; + + estimate: { + authority(overrides?: TransactionOverrides): Promise; + + "authority()"(overrides?: TransactionOverrides): Promise; + + getColony(overrides?: TransactionOverrides): Promise; + + "getColony()"(overrides?: TransactionOverrides): Promise; + + getDeprecated(overrides?: TransactionOverrides): Promise; + + "getDeprecated()"(overrides?: TransactionOverrides): Promise; + + owner(overrides?: TransactionOverrides): Promise; + + "owner()"(overrides?: TransactionOverrides): Promise; + + setAuthority( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + "setAuthority(address)"( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + setOwner( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + "setOwner(address)"( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the identifier of the extension + */ + identifier(overrides?: TransactionOverrides): Promise; + + /** + * Returns the identifier of the extension + */ + "identifier()"(overrides?: TransactionOverrides): Promise; + + /** + * Returns the version of the extension + */ + version(overrides?: TransactionOverrides): Promise; + + /** + * Returns the version of the extension + */ + "version()"(overrides?: TransactionOverrides): Promise; + + /** + * Configures the extension + * @param _colony The colony in which the extension holds permissions + */ + install( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Configures the extension + * @param _colony The colony in which the extension holds permissions + */ + "install(address)"( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when upgrading the extension + */ + finishUpgrade(overrides?: TransactionOverrides): Promise; + + /** + * Called when upgrading the extension + */ + "finishUpgrade()"(overrides?: TransactionOverrides): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + deprecate( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + "deprecate(bool)"( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when uninstalling the extension + */ + uninstall(overrides?: TransactionOverrides): Promise; + + /** + * Called when uninstalling the extension + */ + "uninstall()"(overrides?: TransactionOverrides): Promise; + + /** + * Return the permissions required for each function + * @param _sig The function signature + */ + getCapabilityRoles( + _sig: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Return the permissions required for each function + * @param _sig The function signature + */ + "getCapabilityRoles(bytes4)"( + _sig: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Assumes that each entity holds administration and funding roles in the root domain + * Completes a colony payment in a single transaction + * @param _amounts amounts of the tokens being paid out + * @param _callerChildSkillIndex Index of the _callerPermissionDomainId skill.children array to get + * @param _callerPermissionDomainId The domainId in which the _caller_ has the administration permission (must have funding in root) + * @param _childSkillIndex Index of the _permissionDomainId skill.children array to get + * @param _domainId The domainId the payment should be coming from + * @param _permissionDomainId The domainId in which the _contract_ has permissions to add a payment and fund it + * @param _skillId The skillId that the payment should be marked with, possibly awarding reputation in this skill. + * @param _tokens Addresses of the tokens the payments are being made in. 0x00 for Ether. + * @param _workers The addresses of the recipients of the payment + */ + makePayment( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _callerPermissionDomainId: BigNumberish, + _callerChildSkillIndex: BigNumberish, + _workers: string[], + _tokens: string[], + _amounts: BigNumberish[], + _domainId: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Assumes that each entity holds administration and funding roles in the root domain + * Completes a colony payment in a single transaction + * @param _amounts amounts of the tokens being paid out + * @param _callerChildSkillIndex Index of the _callerPermissionDomainId skill.children array to get + * @param _callerPermissionDomainId The domainId in which the _caller_ has the administration permission (must have funding in root) + * @param _childSkillIndex Index of the _permissionDomainId skill.children array to get + * @param _domainId The domainId the payment should be coming from + * @param _permissionDomainId The domainId in which the _contract_ has permissions to add a payment and fund it + * @param _skillId The skillId that the payment should be marked with, possibly awarding reputation in this skill. + * @param _tokens Addresses of the tokens the payments are being made in. 0x00 for Ether. + * @param _workers The addresses of the recipients of the payment + */ + "makePayment(uint256,uint256,uint256,uint256,address[],address[],uint256[],uint256,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _callerPermissionDomainId: BigNumberish, + _callerChildSkillIndex: BigNumberish, + _workers: string[], + _tokens: string[], + _amounts: BigNumberish[], + _domainId: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Assumes that each entity holds administration and funding roles in the same domain, although contract and caller can have the permissions in different domains. Payment is taken from domain funds - if the domain does not have sufficient funds, call will fail. + * Completes a colony payment in a single transaction + * @param _amounts The amounts of the tokens being paid out + * @param _callerChildSkillIndex Index of the _callerPermissionDomainId skill.children array to get + * @param _callerPermissionDomainId The domainId in which the _caller_ has permissions to add a payment and fund it + * @param _childSkillIndex Index of the _permissionDomainId skill.children array to get + * @param _domainId The domainId the payment should be coming from + * @param _permissionDomainId The domainId in which the _contract_ has permissions to add a payment and fund it + * @param _skillId The skillId that the payment should be marked with, possibly awarding reputation in this skill. + * @param _tokens The addresses of the token the payments are being made in. 0x00 for Ether. + * @param _workers The addresses of the recipients of the payment + */ + makePaymentFundedFromDomain( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _callerPermissionDomainId: BigNumberish, + _callerChildSkillIndex: BigNumberish, + _workers: string[], + _tokens: string[], + _amounts: BigNumberish[], + _domainId: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Assumes that each entity holds administration and funding roles in the same domain, although contract and caller can have the permissions in different domains. Payment is taken from domain funds - if the domain does not have sufficient funds, call will fail. + * Completes a colony payment in a single transaction + * @param _amounts The amounts of the tokens being paid out + * @param _callerChildSkillIndex Index of the _callerPermissionDomainId skill.children array to get + * @param _callerPermissionDomainId The domainId in which the _caller_ has permissions to add a payment and fund it + * @param _childSkillIndex Index of the _permissionDomainId skill.children array to get + * @param _domainId The domainId the payment should be coming from + * @param _permissionDomainId The domainId in which the _contract_ has permissions to add a payment and fund it + * @param _skillId The skillId that the payment should be marked with, possibly awarding reputation in this skill. + * @param _tokens The addresses of the token the payments are being made in. 0x00 for Ether. + * @param _workers The addresses of the recipients of the payment + */ + "makePaymentFundedFromDomain(uint256,uint256,uint256,uint256,address[],address[],uint256[],uint256,uint256)"( + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _callerPermissionDomainId: BigNumberish, + _callerChildSkillIndex: BigNumberish, + _workers: string[], + _tokens: string[], + _amounts: BigNumberish[], + _domainId: BigNumberish, + _skillId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + }; +} diff --git a/src/contracts/extensions/oneTxPayment/2/factories/OneTxPayment__factory.ts b/src/contracts/extensions/oneTxPayment/2/factories/OneTxPayment__factory.ts new file mode 100644 index 000000000..8819f2e4c --- /dev/null +++ b/src/contracts/extensions/oneTxPayment/2/factories/OneTxPayment__factory.ts @@ -0,0 +1,367 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, ContractFactory, Signer } from "ethers"; +import { Provider } from "ethers/providers"; +import { UnsignedTransaction } from "ethers/utils/transaction"; + +import { TransactionOverrides } from ".."; +import { OneTxPayment } from "../OneTxPayment"; + +export class OneTxPayment__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy(overrides?: TransactionOverrides): Promise { + return super.deploy(overrides) as Promise; + } + getDeployTransaction(overrides?: TransactionOverrides): UnsignedTransaction { + return super.getDeployTransaction(overrides); + } + attach(address: string): OneTxPayment { + return super.attach(address) as OneTxPayment; + } + connect(signer: Signer): OneTxPayment__factory { + return super.connect(signer) as OneTxPayment__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): OneTxPayment { + return new Contract(address, _abi, signerOrProvider) as OneTxPayment; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [], + name: "ExtensionInitialised", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "authority", + type: "address", + }, + ], + name: "LogSetAuthority", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "LogSetOwner", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "agent", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "fundamentalId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "nPayouts", + type: "uint256", + }, + ], + name: "OneTxPaymentMade", + type: "event", + }, + { + inputs: [], + name: "authority", + outputs: [ + { + internalType: "contract DSAuthority", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getColony", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getDeprecated", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract DSAuthority", + name: "authority_", + type: "address", + }, + ], + name: "setAuthority", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner_", + type: "address", + }, + ], + name: "setOwner", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "identifier", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_colony", + type: "address", + }, + ], + name: "install", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "finishUpgrade", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bool", + name: "_deprecated", + type: "bool", + }, + ], + name: "deprecate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "uninstall", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "_sig", + type: "bytes4", + }, + ], + name: "getCapabilityRoles", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_callerPermissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_callerChildSkillIndex", + type: "uint256", + }, + { + internalType: "address payable[]", + name: "_workers", + type: "address[]", + }, + { + internalType: "address[]", + name: "_tokens", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "_amounts", + type: "uint256[]", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_skillId", + type: "uint256", + }, + ], + name: "makePayment", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_callerPermissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_callerChildSkillIndex", + type: "uint256", + }, + { + internalType: "address payable[]", + name: "_workers", + type: "address[]", + }, + { + internalType: "address[]", + name: "_tokens", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "_amounts", + type: "uint256[]", + }, + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_skillId", + type: "uint256", + }, + ], + name: "makePaymentFundedFromDomain", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; + +const _bytecode = + "0x608060405234801561001057600080fd5b50600180546001600160a01b031916339081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a261254e8061005e6000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c80636bf2dc43116100975780639251cff4116100665780639251cff4146101b9578063bf7e214f146101cc578063bfd68ab7146101d4578063fcf6ba93146101dc576100f5565b80636bf2dc43146101765780637998a1c4146101895780637a9e5e4b146101915780638da5cb5b146101a4576100f5565b80632a2678bb116100d35780632a2678bb1461012a5780632dfbb0831461013d578063340df28f1461016657806354fd4d501461016e576100f5565b80630d638f30146100fa57806313af4035146101045780632a1b8f9b14610117575b600080fd5b6101026101f1565b005b610102610112366004611eaf565b61023a565b610102610125366004611eaf565b6102bc565b6101026101383660046120c5565b610339565b61015061014b366004611f0a565b610c74565b60405161015d9190612236565b60405180910390f35b610102610cbb565b610150610cef565b6101026101843660046120c5565b610cf4565b610150611593565b61010261019f366004611eaf565b6115b7565b6101ac611635565b60405161015d9190612192565b6101026101c7366004611ed2565b611644565b6101ac611679565b6101ac611688565b6101e4611697565b60405161015d919061222b565b610207336000356001600160e01b0319166116a7565b61022c5760405162461bcd60e51b8152600401610223906122ca565b60405180910390fd5b6003546001600160a01b0316ff5b610250336000356001600160e01b0319166116a7565b61026c5760405162461bcd60e51b8152600401610223906122ca565b600180546001600160a01b0319166001600160a01b0383811691909117918290556040519116907fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b6102d2336000356001600160e01b0319166116a7565b6102ee5760405162461bcd60e51b8152600401610223906122ca565b6003546001600160a01b0316156103175760405162461bcd60e51b815260040161022390612394565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b8351855114801561034b575082518551145b6103675760405162461bcd60e51b8152600401610223906123cb565b60035460405163066a9e2760e31b81526001600160a01b0390911690633354f138906103a09033908b906005908c9089906004016121a6565b60206040518083038186803b1580156103b857600080fd5b505afa1580156103cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103f09190611eee565b8015610480575060035460405163066a9e2760e31b81526001600160a01b0390911690633354f138906104309033908b906006908c9089906004016121a6565b60206040518083038186803b15801561044857600080fd5b505afa15801561045c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104809190611eee565b61049c5760405162461bcd60e51b8152600401610223906122f8565b8451600114156107d55760035485516000916001600160a01b031690634f8df643908c908c908a9086906104cc57fe5b6020026020010151896000815181106104e157fe5b6020026020010151896000815181106104f657fe5b602002602001015189896040518863ffffffff1660e01b8152600401610522979695949392919061223f565b602060405180830381600087803b15801561053c57600080fd5b505af1158015610550573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061057491906120ad565b600354604051631940541b60e11b81529192506000916001600160a01b0390911690633280a836906105aa908590600401612236565b60006040518083038186803b1580156105c257600080fd5b505afa1580156105d6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105fe9190810190611ffe565b6040908101516003549151630d3d4c7160e11b81529092506000916001600160a01b031690631a7a98e290610637908890600401612236565b604080518083038186803b15801561064e57600080fd5b505afa158015610662573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106869190611f32565b6020015190506106c28c8c83858a6000815181106106a057fe5b60200260200101518c6000815181106106b557fe5b6020026020010151611785565b6003546040516306cb0d2160e51b81526001600160a01b039091169063d961a420906106f6908f908f90889060040161227b565b600060405180830381600087803b15801561071057600080fd5b505af1158015610724573d6000803e3d6000fd5b505060035489516001600160a01b039091169250630f4c52f3915085908a9060009061074c57fe5b60200260200101516040518363ffffffff1660e01b8152600401610771929190612439565b600060405180830381600087803b15801561078b57600080fd5b505af115801561079f573d6000803e3d6000fd5b505050506000805160206124f983398151915233848a516040516107c5939291906121dd565b60405180910390a1505050610c69565b60035460405163a5487a3760e01b81526000916001600160a01b03169063a5487a379061080a908d908d90889060040161227b565b602060405180830381600087803b15801561082457600080fd5b505af1158015610838573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085c91906120ad565b6003546040516374b556c360e11b81529192506000916001600160a01b039091169063e96aad8690610892908590600401612236565b60c06040518083038186803b1580156108aa57600080fd5b505afa1580156108be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e29190611f7a565b6040908101516003549151630d3d4c7160e11b81529092506000916001600160a01b031690631a7a98e29061091b908890600401612236565b604080518083038186803b15801561093257600080fd5b505afa158015610946573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096a9190611f32565b60200151905061097e8c8c83858b8b6117fb565b6000805b8951821015610c2e578115806109d357508960018303815181106109a257fe5b60200260200101516001600160a01b03168a83815181106109bf57fe5b60200260200101516001600160a01b031614155b15610b3457811580610a1f57508960018303815181106109ef57fe5b60200260200101516001600160a01b03168a8381518110610a0c57fe5b60200260200101516001600160a01b0316115b610a3b5760405162461bcd60e51b81526004016102239061235d565b6003548a516001909201916001600160a01b03909116906317b46cb790879084908e9087908110610a6857fe5b60200260200101516040518463ffffffff1660e01b8152600401610a8e93929190612450565b600060405180830381600087803b158015610aa857600080fd5b505af1158015610abc573d6000803e3d6000fd5b5050505085600014610b2f57600354604051637d09f6b960e11b81526001600160a01b039091169063fa13ed7290610afc90889085908b9060040161227b565b600060405180830381600087803b158015610b1657600080fd5b505af1158015610b2a573d6000803e3d6000fd5b505050505b610b8e565b886001830381518110610b4357fe5b60200260200101516001600160a01b0316898381518110610b6057fe5b60200260200101516001600160a01b031611610b8e5760405162461bcd60e51b815260040161022390612402565b60035489516001600160a01b039091169063476d1d0590879084908d9087908110610bb557fe5b60200260200101518c8781518110610bc957fe5b60200260200101516040518563ffffffff1660e01b8152600401610bf0949392919061246f565b600060405180830381600087803b158015610c0a57600080fd5b505af1158015610c1e573d6000803e3d6000fd5b5050600190930192506109829050565b610c39858b8b6118cc565b6000805160206124f983398151915233868c51604051610c5b939291906121dd565b60405180910390a150505050505b505050505050505050565b60006001600160e01b03198216636bf2dc4360e01b1480610ca557506001600160e01b03198216632a2678bb60e01b145b15610cb257506060610cb6565b5060005b919050565b610cd1336000356001600160e01b0319166116a7565b610ced5760405162461bcd60e51b8152600401610223906122ca565b565b600290565b83518551148015610d06575082518551145b610d225760405162461bcd60e51b8152600401610223906123cb565b60035460405163066a9e2760e31b81526001600160a01b0390911690633354f13890610d5c9033906001906005908e9089906004016121a6565b60206040518083038186803b158015610d7457600080fd5b505afa158015610d88573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dac9190611eee565b8015610e3c575060035460405163066a9e2760e31b81526001600160a01b0390911690633354f13890610dec9033908b906006908c9089906004016121a6565b60206040518083038186803b158015610e0457600080fd5b505afa158015610e18573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e3c9190611eee565b610e585760405162461bcd60e51b8152600401610223906122f8565b84516001141561117f5760035485516000916001600160a01b031690634f8df643906001908c908a908690610e8957fe5b602002602001015189600081518110610e9e57fe5b602002602001015189600081518110610eb357fe5b602002602001015189896040518863ffffffff1660e01b8152600401610edf979695949392919061223f565b602060405180830381600087803b158015610ef957600080fd5b505af1158015610f0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3191906120ad565b600354604051631940541b60e11b81529192506000916001600160a01b0390911690633280a83690610f67908590600401612236565b60006040518083038186803b158015610f7f57600080fd5b505afa158015610f93573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610fbb9190810190611ffe565b604001519050600360009054906101000a90046001600160a01b03166001600160a01b031663c68d19ea60016000198d6001868b600081518110610ffb57fe5b60200260200101518d60008151811061101057fe5b60200260200101516040518863ffffffff1660e01b815260040161103a9796959493929190612291565b600060405180830381600087803b15801561105457600080fd5b505af1158015611068573d6000803e3d6000fd5b50506003546040516306cb0d2160e51b81526001600160a01b03909116925063d961a42091506110a1906001908e90879060040161227b565b600060405180830381600087803b1580156110bb57600080fd5b505af11580156110cf573d6000803e3d6000fd5b505060035488516001600160a01b039091169250630f4c52f39150849089906000906110f757fe5b60200260200101516040518363ffffffff1660e01b815260040161111c929190612439565b600060405180830381600087803b15801561113657600080fd5b505af115801561114a573d6000803e3d6000fd5b505050506000805160206124f983398151915233838951604051611170939291906121dd565b60405180910390a15050610c69565b60035460405163a5487a3760e01b81526000916001600160a01b03169063a5487a37906111b5906001908d90889060040161227b565b602060405180830381600087803b1580156111cf57600080fd5b505af11580156111e3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061120791906120ad565b6003546040516374b556c360e11b81529192506000916001600160a01b039091169063e96aad869061123d908590600401612236565b60c06040518083038186803b15801561125557600080fd5b505afa158015611269573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061128d9190611f7a565b60400151905061129f8a828888611a21565b6000805b885182101561154f578115806112f457508860018303815181106112c357fe5b60200260200101516001600160a01b03168983815181106112e057fe5b60200260200101516001600160a01b031614155b1561145557811580611340575088600183038151811061131057fe5b60200260200101516001600160a01b031689838151811061132d57fe5b60200260200101516001600160a01b0316115b61135c5760405162461bcd60e51b81526004016102239061235d565b60035489516001909201916001600160a01b03909116906317b46cb790869084908d908790811061138957fe5b60200260200101516040518463ffffffff1660e01b81526004016113af93929190612450565b600060405180830381600087803b1580156113c957600080fd5b505af11580156113dd573d6000803e3d6000fd5b505050508460001461145057600354604051637d09f6b960e11b81526001600160a01b039091169063fa13ed729061141d90879085908a9060040161227b565b600060405180830381600087803b15801561143757600080fd5b505af115801561144b573d6000803e3d6000fd5b505050505b6114af565b87600183038151811061146457fe5b60200260200101516001600160a01b031688838151811061148157fe5b60200260200101516001600160a01b0316116114af5760405162461bcd60e51b815260040161022390612402565b60035488516001600160a01b039091169063476d1d0590869084908c90879081106114d657fe5b60200260200101518b87815181106114ea57fe5b60200260200101516040518563ffffffff1660e01b8152600401611511949392919061246f565b600060405180830381600087803b15801561152b57600080fd5b505af115801561153f573d6000803e3d6000fd5b5050600190930192506112a39050565b61155a848a8a6118cc565b6000805160206124f983398151915233858b5160405161157c939291906121dd565b60405180910390a150505050505050505050505050565b7fa89bc527362fca70a521a083b19b3b6bad9d33d24617254f625ef38bda0407cd90565b6115cd336000356001600160e01b0319166116a7565b6115e95760405162461bcd60e51b8152600401610223906122ca565b600080546001600160a01b0319166001600160a01b03838116919091178083556040519116917f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada491a250565b6001546001600160a01b031681565b61165a336000356001600160e01b0319166116a7565b6116765760405162461bcd60e51b8152600401610223906122ca565b50565b6000546001600160a01b031681565b6003546001600160a01b031690565b600354600160a01b900460ff1690565b60006001600160a01b0383163014156116c25750600161177f565b6001546001600160a01b03848116911614156116e05750600161177f565b6000546001600160a01b03166116f85750600061177f565b60005460405163b700961360e01b81526001600160a01b039091169063b70096139061172c908690309087906004016121fe565b60206040518083038186803b15801561174457600080fd5b505afa158015611758573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061177c9190611eee565b90505b92915050565b6003546040516363468cf560e11b81526001600160a01b039091169063c68d19ea906117c1908990899081908a908a908a908a90600401612291565b600060405180830381600087803b1580156117db57600080fd5b505af11580156117ef573d6000803e3d6000fd5b50505050505050505050565b600060608061180a8585611b00565b92509250925060005b838110156117ef57600360009054906101000a90046001600160a01b03166001600160a01b031663c68d19ea8b8b8c8c8c88888151811061185057fe5b60200260200101518a898151811061186457fe5b60200260200101516040518863ffffffff1660e01b815260040161188e9796959493929190612291565b600060405180830381600087803b1580156118a857600080fd5b505af11580156118bc573d6000803e3d6000fd5b5050600190920191506118139050565b6003546040516359f3af6360e11b81526001600160a01b039091169063b3e75ec6906118fc908690600401612236565b600060405180830381600087803b15801561191657600080fd5b505af115801561192a573d6000803e3d6000fd5b505050506000805b8351811015611a1a57801580611983575083600182038151811061195257fe5b60200260200101516001600160a01b031684828151811061196f57fe5b60200260200101516001600160a01b031614155b1561198f576001909101905b60035483516001600160a01b0390911690632fe9689990879085908790869081106119b657fe5b60200260200101516040518463ffffffff1660e01b81526004016119dc93929190612450565b600060405180830381600087803b1580156119f657600080fd5b505af1158015611a0a573d6000803e3d6000fd5b5050600190920191506119329050565b5050505050565b6000606080611a308585611b00565b92509250925060005b83811015611af657600360009054906101000a90046001600160a01b03166001600160a01b031663c68d19ea60016000198b60018c888881518110611a7a57fe5b60200260200101518a8981518110611a8e57fe5b60200260200101516040518863ffffffff1660e01b8152600401611ab89796959493929190612291565b600060405180830381600087803b158015611ad257600080fd5b505af1158015611ae6573d6000803e3d6000fd5b505060019092019150611a399050565b5050505050505050565b600060608060006060865167ffffffffffffffff81118015611b2157600080fd5b50604051908082528060200260200182016040528015611b4b578160200160208202803683370190505b5090506060875167ffffffffffffffff81118015611b6857600080fd5b50604051908082528060200260200182016040528015611b92578160200160208202803683370190505b50905060005b8851811015611ccd576000805b8581108015611bb2575081155b15611c4c57848181518110611bc357fe5b60200260200101516001600160a01b03168b8481518110611be057fe5b60200260200101516001600160a01b03161415611c445760019150611c2b848281518110611c0a57fe5b60200260200101518b8581518110611c1e57fe5b6020026020010151611cdc565b848281518110611c3757fe5b6020026020010181815250505b600101611ba5565b81611cc3578a8381518110611c5d57fe5b6020026020010151858781518110611c7157fe5b60200260200101906001600160a01b031690816001600160a01b031681525050898381518110611c9d57fe5b6020026020010151848781518110611cb157fe5b60209081029190910101526001909501945b5050600101611b98565b50919450925090509250925092565b8082018281101561177f5760405162461bcd60e51b81526004016102239061232f565b8051610cb6816124d5565b600082601f830112611d1a578081fd5b8135611d2d611d28826124b7565b612493565b818152915060208083019084810181840286018201871015611d4e57600080fd5b60005b84811015611d76578135611d64816124d5565b84529282019290820190600101611d51565b505050505092915050565b600082601f830112611d91578081fd5b8135611d9f611d28826124b7565b818152915060208083019084810181840286018201871015611dc057600080fd5b60005b84811015611d76578135611dd6816124d5565b84529282019290820190600101611dc3565b600082601f830112611df8578081fd5b8135611e06611d28826124b7565b818152915060208083019084810181840286018201871015611e2757600080fd5b60005b84811015611d7657813584529282019290820190600101611e2a565b600082601f830112611e56578081fd5b8151611e64611d28826124b7565b818152915060208083019084810181840286018201871015611e8557600080fd5b60005b84811015611d7657815184529282019290820190600101611e88565b8051610cb6816124ea565b600060208284031215611ec0578081fd5b8135611ecb816124d5565b9392505050565b600060208284031215611ee3578081fd5b8135611ecb816124ea565b600060208284031215611eff578081fd5b8151611ecb816124ea565b600060208284031215611f1b578081fd5b81356001600160e01b031981168114611ecb578182fd5b600060408284031215611f43578081fd5b6040516040810181811067ffffffffffffffff82111715611f6057fe5b604052825181526020928301519281019290925250919050565b600060c08284031215611f8b578081fd5b60405160c0810181811067ffffffffffffffff82111715611fa857fe5b604052825160038110611fb9578283fd5b8152611fc760208401611cff565b602082015260408301516040820152606083015160608201526080830151608082015260a083015160a08201528091505092915050565b60006020828403121561200f578081fd5b815167ffffffffffffffff80821115612026578283fd5b9083019060a08286031215612039578283fd5b60405160a08101818110838211171561204e57fe5b60405261205a83611cff565b815261206860208401611ea4565b60208201526040830151604082015260608301516060820152608083015182811115612092578485fd5b61209e87828601611e46565b60808301525095945050505050565b6000602082840312156120be578081fd5b5051919050565b60008060008060008060008060006101208a8c0312156120e3578485fd5b8935985060208a0135975060408a0135965060608a0135955060808a013567ffffffffffffffff80821115612116578687fd5b6121228d838e01611d81565b965060a08c0135915080821115612137578586fd5b6121438d838e01611d0a565b955060c08c0135915080821115612158578485fd5b506121658c828d01611de8565b93505060e08a013591506101008a013590509295985092959850929598565b6008811061218e57fe5b9052565b6001600160a01b0391909116815260200190565b6001600160a01b03861681526020810185905260a081016121ca6040830186612184565b6060820193909352608001529392505050565b6001600160a01b039390931683526020830191909152604082015260600190565b6001600160a01b0393841681529190921660208201526001600160e01b0319909116604082015260600190565b901515815260200190565b90815260200190565b96875260208701959095526001600160a01b039384166040870152919092166060850152608084019190915260a083015260c082015260e00190565b9283526020830191909152604082015260600190565b968752602087019590955260408601939093526060850191909152608084015260a08301526001600160a01b031660c082015260e00190565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b6020808252601d908201527f6f6e652d74782d7061796d656e742d6e6f742d617574686f72697a6564000000604082015260600190565b60208082526014908201527364732d6d6174682d6164642d6f766572666c6f7760601b604082015260600190565b6020808252601f908201527f6f6e652d74782d7061796d656e742d6261642d776f726b65722d6f7264657200604082015260600190565b6020808252601b908201527f657874656e73696f6e2d616c72656164792d696e7374616c6c65640000000000604082015260600190565b6020808252601c908201527f6f6e652d74782d7061796d656e742d696e76616c69642d696e70757400000000604082015260600190565b6020808252601e908201527f6f6e652d74782d7061796d656e742d6261642d746f6b656e2d6f726465720000604082015260600190565b9182526001600160a01b0316602082015260400190565b92835260208301919091526001600160a01b0316604082015260600190565b93845260208401929092526001600160a01b03166040830152606082015260800190565b60405181810167ffffffffffffffff811182821017156124af57fe5b604052919050565b600067ffffffffffffffff8211156124cb57fe5b5060209081020190565b6001600160a01b038116811461167657600080fd5b801515811461167657600080fdfed9a1ad84578b017e90e4244baf045bcabf50583f51887a391bbe8183e8e34ecaa264697066735822122061763b80947fc27b1168ef9797198767951149ae4c4b97dc9a959893c77d79d864736f6c63430007030033"; diff --git a/src/contracts/extensions/oneTxPayment/2/index.d.ts b/src/contracts/extensions/oneTxPayment/2/index.d.ts new file mode 100644 index 000000000..910d6a045 --- /dev/null +++ b/src/contracts/extensions/oneTxPayment/2/index.d.ts @@ -0,0 +1,29 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { + BigNumberish, + EventDescription, + FunctionDescription, +} from "ethers/utils"; + +export interface TransactionOverrides { + gasLimit?: BigNumberish | Promise; + gasPrice?: BigNumberish | Promise; + nonce?: BigNumberish | Promise; + value?: BigNumberish | Promise; + from?: string | Promise; + chainId?: number | Promise; +} + +export interface TypedEventDescription< + T extends Pick +> extends EventDescription { + encodeTopics: T["encodeTopics"]; +} + +export interface TypedFunctionDescription< + T extends Pick +> extends FunctionDescription { + encode: T["encode"]; +} diff --git a/src/contracts/extensions/votingReputation/1/VotingReputation.d.ts b/src/contracts/extensions/votingReputation/1/VotingReputation.d.ts new file mode 100644 index 000000000..033fd4c17 --- /dev/null +++ b/src/contracts/extensions/votingReputation/1/VotingReputation.d.ts @@ -0,0 +1,2667 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-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 VotingReputationInterface extends Interface { + functions: { + authority: TypedFunctionDescription<{ encode([]: []): string }>; + + getColony: TypedFunctionDescription<{ encode([]: []): string }>; + + getDeprecated: TypedFunctionDescription<{ encode([]: []): string }>; + + owner: TypedFunctionDescription<{ encode([]: []): string }>; + + setAuthority: TypedFunctionDescription<{ + encode([authority_]: [string]): string; + }>; + + setOwner: TypedFunctionDescription<{ encode([owner_]: [string]): string }>; + + identifier: TypedFunctionDescription<{ encode([]: []): string }>; + + version: TypedFunctionDescription<{ encode([]: []): string }>; + + install: TypedFunctionDescription<{ encode([_colony]: [string]): string }>; + + initialise: TypedFunctionDescription<{ + encode([ + _totalStakeFraction, + _voterRewardFraction, + _userMinStakeFraction, + _maxVoteFraction, + _stakePeriod, + _submitPeriod, + _revealPeriod, + _escalationPeriod, + ]: [ + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish + ]): string; + }>; + + finishUpgrade: TypedFunctionDescription<{ encode([]: []): string }>; + + deprecate: TypedFunctionDescription<{ + encode([_deprecated]: [boolean]): string; + }>; + + uninstall: TypedFunctionDescription<{ encode([]: []): string }>; + + createRootMotion: TypedFunctionDescription<{ + encode([_altTarget, _action, _key, _value, _branchMask, _siblings]: [ + string, + Arrayish, + Arrayish, + Arrayish, + BigNumberish, + Arrayish[] + ]): string; + }>; + + createDomainMotion: TypedFunctionDescription<{ + encode([ + _domainId, + _childSkillIndex, + _action, + _key, + _value, + _branchMask, + _siblings, + ]: [ + BigNumberish, + BigNumberish, + Arrayish, + Arrayish, + Arrayish, + BigNumberish, + Arrayish[] + ]): string; + }>; + + stakeMotion: TypedFunctionDescription<{ + encode([ + _motionId, + _permissionDomainId, + _childSkillIndex, + _vote, + _amount, + _key, + _value, + _branchMask, + _siblings, + ]: [ + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + Arrayish, + Arrayish, + BigNumberish, + Arrayish[] + ]): string; + }>; + + submitVote: TypedFunctionDescription<{ + encode([_motionId, _voteSecret, _key, _value, _branchMask, _siblings]: [ + BigNumberish, + Arrayish, + Arrayish, + Arrayish, + BigNumberish, + Arrayish[] + ]): string; + }>; + + revealVote: TypedFunctionDescription<{ + encode([_motionId, _salt, _vote, _key, _value, _branchMask, _siblings]: [ + BigNumberish, + Arrayish, + BigNumberish, + Arrayish, + Arrayish, + BigNumberish, + Arrayish[] + ]): string; + }>; + + escalateMotion: TypedFunctionDescription<{ + encode([ + _motionId, + _newDomainId, + _childSkillIndex, + _key, + _value, + _branchMask, + _siblings, + ]: [ + BigNumberish, + BigNumberish, + BigNumberish, + Arrayish, + Arrayish, + BigNumberish, + Arrayish[] + ]): string; + }>; + + finalizeMotion: TypedFunctionDescription<{ + encode([_motionId]: [BigNumberish]): string; + }>; + + claimReward: TypedFunctionDescription<{ + encode([ + _motionId, + _permissionDomainId, + _childSkillIndex, + _staker, + _vote, + ]: [ + BigNumberish, + BigNumberish, + BigNumberish, + string, + BigNumberish + ]): string; + }>; + + getTotalStakeFraction: TypedFunctionDescription<{ encode([]: []): string }>; + + getVoterRewardFraction: TypedFunctionDescription<{ + encode([]: []): string; + }>; + + getUserMinStakeFraction: TypedFunctionDescription<{ + encode([]: []): string; + }>; + + getMaxVoteFraction: TypedFunctionDescription<{ encode([]: []): string }>; + + getStakePeriod: TypedFunctionDescription<{ encode([]: []): string }>; + + getSubmitPeriod: TypedFunctionDescription<{ encode([]: []): string }>; + + getRevealPeriod: TypedFunctionDescription<{ encode([]: []): string }>; + + getEscalationPeriod: TypedFunctionDescription<{ encode([]: []): string }>; + + getMotionCount: TypedFunctionDescription<{ encode([]: []): string }>; + + getMotion: TypedFunctionDescription<{ + encode([_motionId]: [BigNumberish]): string; + }>; + + getStake: TypedFunctionDescription<{ + encode([_motionId, _staker, _vote]: [ + BigNumberish, + string, + BigNumberish + ]): string; + }>; + + getExpenditureMotionCount: TypedFunctionDescription<{ + encode([_structHash]: [Arrayish]): string; + }>; + + getExpenditurePastVote: TypedFunctionDescription<{ + encode([_actionHash]: [Arrayish]): string; + }>; + + getMotionState: TypedFunctionDescription<{ + encode([_motionId]: [BigNumberish]): string; + }>; + + getVoterReward: TypedFunctionDescription<{ + encode([_motionId, _voterRep]: [BigNumberish, BigNumberish]): string; + }>; + + getStakerReward: TypedFunctionDescription<{ + encode([_motionId, _staker, _vote]: [ + BigNumberish, + string, + BigNumberish + ]): string; + }>; + + createClaimDelayAction: TypedFunctionDescription<{ + encode([action, value]: [Arrayish, BigNumberish]): string; + }>; + }; + + events: { + ExtensionInitialised: TypedEventDescription<{ + encodeTopics([]: []): string[]; + }>; + + LogSetAuthority: TypedEventDescription<{ + encodeTopics([authority]: [string | null]): string[]; + }>; + + LogSetOwner: TypedEventDescription<{ + encodeTopics([owner]: [string | null]): string[]; + }>; + + MotionCreated: TypedEventDescription<{ + encodeTopics([motionId, creator, domainId]: [ + BigNumberish | null, + null, + BigNumberish | null + ]): string[]; + }>; + + MotionEscalated: TypedEventDescription<{ + encodeTopics([motionId, escalator, domainId, newDomainId]: [ + BigNumberish | null, + null, + BigNumberish | null, + BigNumberish | null + ]): string[]; + }>; + + MotionEventSet: TypedEventDescription<{ + encodeTopics([motionId, eventIndex]: [ + BigNumberish | null, + null + ]): string[]; + }>; + + MotionFinalized: TypedEventDescription<{ + encodeTopics([motionId, action, executed]: [ + BigNumberish | null, + null, + null + ]): string[]; + }>; + + MotionRewardClaimed: TypedEventDescription<{ + encodeTopics([motionId, staker, vote, amount]: [ + BigNumberish | null, + string | null, + BigNumberish | null, + null + ]): string[]; + }>; + + MotionStaked: TypedEventDescription<{ + encodeTopics([motionId, staker, vote, amount]: [ + BigNumberish | null, + string | null, + BigNumberish | null, + null + ]): string[]; + }>; + + MotionVoteRevealed: TypedEventDescription<{ + encodeTopics([motionId, voter, vote]: [ + BigNumberish | null, + string | null, + BigNumberish | null + ]): string[]; + }>; + + MotionVoteSubmitted: TypedEventDescription<{ + encodeTopics([motionId, voter]: [ + BigNumberish | null, + string | null + ]): string[]; + }>; + }; +} + +export class VotingReputation extends Contract { + connect(signerOrProvider: Signer | Provider | string): VotingReputation; + attach(addressOrName: string): VotingReputation; + deployed(): Promise; + + on(event: EventFilter | string, listener: Listener): VotingReputation; + once(event: EventFilter | string, listener: Listener): VotingReputation; + addListener( + eventName: EventFilter | string, + listener: Listener + ): VotingReputation; + removeAllListeners(eventName: EventFilter | string): VotingReputation; + removeListener(eventName: any, listener: Listener): VotingReputation; + + interface: VotingReputationInterface; + + functions: { + authority(overrides?: TransactionOverrides): Promise; + + "authority()"(overrides?: TransactionOverrides): Promise; + + getColony(overrides?: TransactionOverrides): Promise; + + "getColony()"(overrides?: TransactionOverrides): Promise; + + getDeprecated(overrides?: TransactionOverrides): Promise; + + "getDeprecated()"(overrides?: TransactionOverrides): Promise; + + owner(overrides?: TransactionOverrides): Promise; + + "owner()"(overrides?: TransactionOverrides): Promise; + + setAuthority( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + "setAuthority(address)"( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + setOwner( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + "setOwner(address)"( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the identifier of the extension + */ + identifier(overrides?: TransactionOverrides): Promise; + + /** + * Returns the identifier of the extension + */ + "identifier()"(overrides?: TransactionOverrides): Promise; + + /** + * Return the version number + */ + version(overrides?: TransactionOverrides): Promise; + + /** + * Return the version number + */ + "version()"(overrides?: TransactionOverrides): Promise; + + /** + * Install the extension + * @param _colony Base colony for the installation + */ + install( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Install the extension + * @param _colony Base colony for the installation + */ + "install(address)"( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Initialise the extension + * @param _escalationPeriod The length of the escalation period in seconds + * @param _maxVoteFraction The fraction of the domain's reputation which must submit for quick-end + * @param _revealPeriod The length of the reveal period in seconds + * @param _stakePeriod The length of the staking period in seconds + * @param _submitPeriod The length of the submit period in seconds + * @param _totalStakeFraction The fraction of the domain's reputation we need to stake + * @param _userMinStakeFraction The minimum per-user stake as fraction of total stake + * @param _voterRewardFraction The fraction of the total stake paid out to voters as rewards + */ + initialise( + _totalStakeFraction: BigNumberish, + _voterRewardFraction: BigNumberish, + _userMinStakeFraction: BigNumberish, + _maxVoteFraction: BigNumberish, + _stakePeriod: BigNumberish, + _submitPeriod: BigNumberish, + _revealPeriod: BigNumberish, + _escalationPeriod: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Initialise the extension + * @param _escalationPeriod The length of the escalation period in seconds + * @param _maxVoteFraction The fraction of the domain's reputation which must submit for quick-end + * @param _revealPeriod The length of the reveal period in seconds + * @param _stakePeriod The length of the staking period in seconds + * @param _submitPeriod The length of the submit period in seconds + * @param _totalStakeFraction The fraction of the domain's reputation we need to stake + * @param _userMinStakeFraction The minimum per-user stake as fraction of total stake + * @param _voterRewardFraction The fraction of the total stake paid out to voters as rewards + */ + "initialise(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)"( + _totalStakeFraction: BigNumberish, + _voterRewardFraction: BigNumberish, + _userMinStakeFraction: BigNumberish, + _maxVoteFraction: BigNumberish, + _stakePeriod: BigNumberish, + _submitPeriod: BigNumberish, + _revealPeriod: BigNumberish, + _escalationPeriod: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when upgrading the extension + */ + finishUpgrade( + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when upgrading the extension + */ + "finishUpgrade()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + deprecate( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + "deprecate(bool)"( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when uninstalling the extension + */ + uninstall(overrides?: TransactionOverrides): Promise; + + /** + * Called when uninstalling the extension + */ + "uninstall()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Create a motion in the root domain + * @param _action A bytes array encoding a function call + * @param _altTarget The contract to which we send the action (0x0 for the colony) + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the root domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the root domain + */ + createRootMotion( + _altTarget: string, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Create a motion in the root domain + * @param _action A bytes array encoding a function call + * @param _altTarget The contract to which we send the action (0x0 for the colony) + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the root domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the root domain + */ + "createRootMotion(address,bytes,bytes,bytes,uint256,bytes32[])"( + _altTarget: string, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Create a motion in any domain + * @param _action A bytes array encoding a function call + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex The childSkillIndex pointing to the domain of the action + * @param _domainId The domain where we vote on the motion + * @param _key Reputation tree key for the domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the domain + */ + createDomainMotion( + _domainId: BigNumberish, + _childSkillIndex: BigNumberish, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Create a motion in any domain + * @param _action A bytes array encoding a function call + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex The childSkillIndex pointing to the domain of the action + * @param _domainId The domain where we vote on the motion + * @param _key Reputation tree key for the domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the domain + */ + "createDomainMotion(uint256,uint256,bytes,bytes,bytes,uint256,bytes32[])"( + _domainId: BigNumberish, + _childSkillIndex: BigNumberish, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Stake on a motion + * @param _amount The amount of tokens being staked + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex For the domain in which the motion is occurring + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _permissionDomainId The domain where the extension has the arbitration permission + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + stakeMotion( + _motionId: BigNumberish, + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _vote: BigNumberish, + _amount: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Stake on a motion + * @param _amount The amount of tokens being staked + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex For the domain in which the motion is occurring + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _permissionDomainId The domain where the extension has the arbitration permission + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + "stakeMotion(uint256,uint256,uint256,uint256,uint256,bytes,bytes,uint256,bytes32[])"( + _motionId: BigNumberish, + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _vote: BigNumberish, + _amount: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Submit a vote secret for a motion + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _voteSecret The hashed vote secret + */ + submitVote( + _motionId: BigNumberish, + _voteSecret: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Submit a vote secret for a motion + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _voteSecret The hashed vote secret + */ + "submitVote(uint256,bytes32,bytes,bytes,uint256,bytes32[])"( + _motionId: BigNumberish, + _voteSecret: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Reveal a vote secret for a motion + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _salt The salt used to hash the vote + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + revealVote( + _motionId: BigNumberish, + _salt: Arrayish, + _vote: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Reveal a vote secret for a motion + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _salt The salt used to hash the vote + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + "revealVote(uint256,bytes32,uint256,bytes,bytes,uint256,bytes32[])"( + _motionId: BigNumberish, + _salt: Arrayish, + _vote: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Escalate a motion to a higher domain + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex For the current domain, relative to the escalated domain + * @param _key Reputation tree key for the new domain + * @param _motionId The id of the motion + * @param _newDomainId The desired domain of escalation + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the new domain + */ + escalateMotion( + _motionId: BigNumberish, + _newDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Escalate a motion to a higher domain + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex For the current domain, relative to the escalated domain + * @param _key Reputation tree key for the new domain + * @param _motionId The id of the motion + * @param _newDomainId The desired domain of escalation + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the new domain + */ + "escalateMotion(uint256,uint256,uint256,bytes,bytes,uint256,bytes32[])"( + _motionId: BigNumberish, + _newDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + finalizeMotion( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "finalizeMotion(uint256)"( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Claim the staker's reward + * @param _childSkillIndex For the domain in which the motion is occurring + * @param _motionId The id of the motion + * @param _permissionDomainId The domain where the extension has the arbitration permission + * @param _staker The staker whose reward is being claimed + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + claimReward( + _motionId: BigNumberish, + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Claim the staker's reward + * @param _childSkillIndex For the domain in which the motion is occurring + * @param _motionId The id of the motion + * @param _permissionDomainId The domain where the extension has the arbitration permission + * @param _staker The staker whose reward is being claimed + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + "claimReward(uint256,uint256,uint256,address,uint256)"( + _motionId: BigNumberish, + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the total stake fraction + */ + getTotalStakeFraction(overrides?: TransactionOverrides): Promise; + + /** + * Get the total stake fraction + */ + "getTotalStakeFraction()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the voter reward fraction + */ + getVoterRewardFraction( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the voter reward fraction + */ + "getVoterRewardFraction()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the user min stake fraction + */ + getUserMinStakeFraction( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the user min stake fraction + */ + "getUserMinStakeFraction()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the max vote fraction + */ + getMaxVoteFraction(overrides?: TransactionOverrides): Promise; + + /** + * Get the max vote fraction + */ + "getMaxVoteFraction()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the stake period + */ + getStakePeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the stake period + */ + "getStakePeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the submit period + */ + getSubmitPeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the submit period + */ + "getSubmitPeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the reveal period + */ + getRevealPeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the reveal period + */ + "getRevealPeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the escalation period + */ + getEscalationPeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the escalation period + */ + "getEscalationPeriod()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the total motion count + */ + getMotionCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the total motion count + */ + "getMotionCount()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the data for a single motion + * @param _motionId The id of the motion + */ + getMotion( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [ + BigNumber[], + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber[], + BigNumber[], + BigNumber[], + boolean, + boolean, + string, + string + ] & { + events: BigNumber[]; + rootHash: string; + domainId: BigNumber; + skillId: BigNumber; + skillRep: BigNumber; + repSubmitted: BigNumber; + paidVoterComp: BigNumber; + pastVoterComp: BigNumber[]; + stakes: BigNumber[]; + votes: BigNumber[]; + escalated: boolean; + finalized: boolean; + altTarget: string; + action: string; + } + >; + + /** + * Get the data for a single motion + * @param _motionId The id of the motion + */ + "getMotion(uint256)"( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [ + BigNumber[], + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber[], + BigNumber[], + BigNumber[], + boolean, + boolean, + string, + string + ] & { + events: BigNumber[]; + rootHash: string; + domainId: BigNumber; + skillId: BigNumber; + skillRep: BigNumber; + repSubmitted: BigNumber; + paidVoterComp: BigNumber; + pastVoterComp: BigNumber[]; + stakes: BigNumber[]; + votes: BigNumber[]; + escalated: boolean; + finalized: boolean; + altTarget: string; + action: string; + } + >; + + /** + * Get a user's stake on a motion + * @param _motionId The id of the motion + * @param _staker The staker address + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + getStake( + _motionId: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a user's stake on a motion + * @param _motionId The id of the motion + * @param _staker The staker address + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + "getStake(uint256,address,uint256)"( + _motionId: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of ongoing motions for a single expenditure / expenditure slot + * @param _structHash The hash of the expenditureId or expenditureId*expenditureSlot + */ + getExpenditureMotionCount( + _structHash: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of ongoing motions for a single expenditure / expenditure slot + * @param _structHash The hash of the expenditureId or expenditureId*expenditureSlot + */ + "getExpenditureMotionCount(bytes32)"( + _structHash: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the largest past vote on a single expenditure variable + * @param _actionHash The hash of the particular expenditure action + */ + getExpenditurePastVote( + _actionHash: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the largest past vote on a single expenditure variable + * @param _actionHash The hash of the particular expenditure action + */ + "getExpenditurePastVote(bytes32)"( + _actionHash: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the current state of the motion + */ + getMotionState( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the current state of the motion + */ + "getMotionState(uint256)"( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the voter reward + * @param _motionId The id of the motion + * @param _voterRep The reputation the voter has in the domain + */ + getVoterReward( + _motionId: BigNumberish, + _voterRep: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the voter reward + * @param _motionId The id of the motion + * @param _voterRep The reputation the voter has in the domain + */ + "getVoterReward(uint256,uint256)"( + _motionId: BigNumberish, + _voterRep: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the staker reward + * @param _motionId The id of the motion + * @param _staker The staker's address + * @param _vote The vote (0 = NAY, 1 = YAY) + */ + getStakerReward( + _motionId: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise<[BigNumber, BigNumber]>; + + /** + * Get the staker reward + * @param _motionId The id of the motion + * @param _staker The staker's address + * @param _vote The vote (0 = NAY, 1 = YAY) + */ + "getStakerReward(uint256,address,uint256)"( + _motionId: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise<[BigNumber, BigNumber]>; + + createClaimDelayAction( + action: Arrayish, + value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "createClaimDelayAction(bytes,uint256)"( + action: Arrayish, + value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + }; + + authority(overrides?: TransactionOverrides): Promise; + + "authority()"(overrides?: TransactionOverrides): Promise; + + getColony(overrides?: TransactionOverrides): Promise; + + "getColony()"(overrides?: TransactionOverrides): Promise; + + getDeprecated(overrides?: TransactionOverrides): Promise; + + "getDeprecated()"(overrides?: TransactionOverrides): Promise; + + owner(overrides?: TransactionOverrides): Promise; + + "owner()"(overrides?: TransactionOverrides): Promise; + + setAuthority( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + "setAuthority(address)"( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + setOwner( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + "setOwner(address)"( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the identifier of the extension + */ + identifier(overrides?: TransactionOverrides): Promise; + + /** + * Returns the identifier of the extension + */ + "identifier()"(overrides?: TransactionOverrides): Promise; + + /** + * Return the version number + */ + version(overrides?: TransactionOverrides): Promise; + + /** + * Return the version number + */ + "version()"(overrides?: TransactionOverrides): Promise; + + /** + * Install the extension + * @param _colony Base colony for the installation + */ + install( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Install the extension + * @param _colony Base colony for the installation + */ + "install(address)"( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Initialise the extension + * @param _escalationPeriod The length of the escalation period in seconds + * @param _maxVoteFraction The fraction of the domain's reputation which must submit for quick-end + * @param _revealPeriod The length of the reveal period in seconds + * @param _stakePeriod The length of the staking period in seconds + * @param _submitPeriod The length of the submit period in seconds + * @param _totalStakeFraction The fraction of the domain's reputation we need to stake + * @param _userMinStakeFraction The minimum per-user stake as fraction of total stake + * @param _voterRewardFraction The fraction of the total stake paid out to voters as rewards + */ + initialise( + _totalStakeFraction: BigNumberish, + _voterRewardFraction: BigNumberish, + _userMinStakeFraction: BigNumberish, + _maxVoteFraction: BigNumberish, + _stakePeriod: BigNumberish, + _submitPeriod: BigNumberish, + _revealPeriod: BigNumberish, + _escalationPeriod: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Initialise the extension + * @param _escalationPeriod The length of the escalation period in seconds + * @param _maxVoteFraction The fraction of the domain's reputation which must submit for quick-end + * @param _revealPeriod The length of the reveal period in seconds + * @param _stakePeriod The length of the staking period in seconds + * @param _submitPeriod The length of the submit period in seconds + * @param _totalStakeFraction The fraction of the domain's reputation we need to stake + * @param _userMinStakeFraction The minimum per-user stake as fraction of total stake + * @param _voterRewardFraction The fraction of the total stake paid out to voters as rewards + */ + "initialise(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)"( + _totalStakeFraction: BigNumberish, + _voterRewardFraction: BigNumberish, + _userMinStakeFraction: BigNumberish, + _maxVoteFraction: BigNumberish, + _stakePeriod: BigNumberish, + _submitPeriod: BigNumberish, + _revealPeriod: BigNumberish, + _escalationPeriod: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when upgrading the extension + */ + finishUpgrade(overrides?: TransactionOverrides): Promise; + + /** + * Called when upgrading the extension + */ + "finishUpgrade()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + deprecate( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + "deprecate(bool)"( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when uninstalling the extension + */ + uninstall(overrides?: TransactionOverrides): Promise; + + /** + * Called when uninstalling the extension + */ + "uninstall()"(overrides?: TransactionOverrides): Promise; + + /** + * Create a motion in the root domain + * @param _action A bytes array encoding a function call + * @param _altTarget The contract to which we send the action (0x0 for the colony) + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the root domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the root domain + */ + createRootMotion( + _altTarget: string, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Create a motion in the root domain + * @param _action A bytes array encoding a function call + * @param _altTarget The contract to which we send the action (0x0 for the colony) + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the root domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the root domain + */ + "createRootMotion(address,bytes,bytes,bytes,uint256,bytes32[])"( + _altTarget: string, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Create a motion in any domain + * @param _action A bytes array encoding a function call + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex The childSkillIndex pointing to the domain of the action + * @param _domainId The domain where we vote on the motion + * @param _key Reputation tree key for the domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the domain + */ + createDomainMotion( + _domainId: BigNumberish, + _childSkillIndex: BigNumberish, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Create a motion in any domain + * @param _action A bytes array encoding a function call + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex The childSkillIndex pointing to the domain of the action + * @param _domainId The domain where we vote on the motion + * @param _key Reputation tree key for the domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the domain + */ + "createDomainMotion(uint256,uint256,bytes,bytes,bytes,uint256,bytes32[])"( + _domainId: BigNumberish, + _childSkillIndex: BigNumberish, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Stake on a motion + * @param _amount The amount of tokens being staked + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex For the domain in which the motion is occurring + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _permissionDomainId The domain where the extension has the arbitration permission + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + stakeMotion( + _motionId: BigNumberish, + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _vote: BigNumberish, + _amount: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Stake on a motion + * @param _amount The amount of tokens being staked + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex For the domain in which the motion is occurring + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _permissionDomainId The domain where the extension has the arbitration permission + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + "stakeMotion(uint256,uint256,uint256,uint256,uint256,bytes,bytes,uint256,bytes32[])"( + _motionId: BigNumberish, + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _vote: BigNumberish, + _amount: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Submit a vote secret for a motion + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _voteSecret The hashed vote secret + */ + submitVote( + _motionId: BigNumberish, + _voteSecret: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Submit a vote secret for a motion + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _voteSecret The hashed vote secret + */ + "submitVote(uint256,bytes32,bytes,bytes,uint256,bytes32[])"( + _motionId: BigNumberish, + _voteSecret: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Reveal a vote secret for a motion + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _salt The salt used to hash the vote + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + revealVote( + _motionId: BigNumberish, + _salt: Arrayish, + _vote: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Reveal a vote secret for a motion + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _salt The salt used to hash the vote + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + "revealVote(uint256,bytes32,uint256,bytes,bytes,uint256,bytes32[])"( + _motionId: BigNumberish, + _salt: Arrayish, + _vote: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Escalate a motion to a higher domain + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex For the current domain, relative to the escalated domain + * @param _key Reputation tree key for the new domain + * @param _motionId The id of the motion + * @param _newDomainId The desired domain of escalation + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the new domain + */ + escalateMotion( + _motionId: BigNumberish, + _newDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Escalate a motion to a higher domain + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex For the current domain, relative to the escalated domain + * @param _key Reputation tree key for the new domain + * @param _motionId The id of the motion + * @param _newDomainId The desired domain of escalation + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the new domain + */ + "escalateMotion(uint256,uint256,uint256,bytes,bytes,uint256,bytes32[])"( + _motionId: BigNumberish, + _newDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + finalizeMotion( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "finalizeMotion(uint256)"( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Claim the staker's reward + * @param _childSkillIndex For the domain in which the motion is occurring + * @param _motionId The id of the motion + * @param _permissionDomainId The domain where the extension has the arbitration permission + * @param _staker The staker whose reward is being claimed + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + claimReward( + _motionId: BigNumberish, + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Claim the staker's reward + * @param _childSkillIndex For the domain in which the motion is occurring + * @param _motionId The id of the motion + * @param _permissionDomainId The domain where the extension has the arbitration permission + * @param _staker The staker whose reward is being claimed + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + "claimReward(uint256,uint256,uint256,address,uint256)"( + _motionId: BigNumberish, + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the total stake fraction + */ + getTotalStakeFraction(overrides?: TransactionOverrides): Promise; + + /** + * Get the total stake fraction + */ + "getTotalStakeFraction()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the voter reward fraction + */ + getVoterRewardFraction(overrides?: TransactionOverrides): Promise; + + /** + * Get the voter reward fraction + */ + "getVoterRewardFraction()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the user min stake fraction + */ + getUserMinStakeFraction(overrides?: TransactionOverrides): Promise; + + /** + * Get the user min stake fraction + */ + "getUserMinStakeFraction()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the max vote fraction + */ + getMaxVoteFraction(overrides?: TransactionOverrides): Promise; + + /** + * Get the max vote fraction + */ + "getMaxVoteFraction()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the stake period + */ + getStakePeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the stake period + */ + "getStakePeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the submit period + */ + getSubmitPeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the submit period + */ + "getSubmitPeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the reveal period + */ + getRevealPeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the reveal period + */ + "getRevealPeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the escalation period + */ + getEscalationPeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the escalation period + */ + "getEscalationPeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the total motion count + */ + getMotionCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the total motion count + */ + "getMotionCount()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the data for a single motion + * @param _motionId The id of the motion + */ + getMotion( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [ + BigNumber[], + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber[], + BigNumber[], + BigNumber[], + boolean, + boolean, + string, + string + ] & { + events: BigNumber[]; + rootHash: string; + domainId: BigNumber; + skillId: BigNumber; + skillRep: BigNumber; + repSubmitted: BigNumber; + paidVoterComp: BigNumber; + pastVoterComp: BigNumber[]; + stakes: BigNumber[]; + votes: BigNumber[]; + escalated: boolean; + finalized: boolean; + altTarget: string; + action: string; + } + >; + + /** + * Get the data for a single motion + * @param _motionId The id of the motion + */ + "getMotion(uint256)"( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [ + BigNumber[], + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber[], + BigNumber[], + BigNumber[], + boolean, + boolean, + string, + string + ] & { + events: BigNumber[]; + rootHash: string; + domainId: BigNumber; + skillId: BigNumber; + skillRep: BigNumber; + repSubmitted: BigNumber; + paidVoterComp: BigNumber; + pastVoterComp: BigNumber[]; + stakes: BigNumber[]; + votes: BigNumber[]; + escalated: boolean; + finalized: boolean; + altTarget: string; + action: string; + } + >; + + /** + * Get a user's stake on a motion + * @param _motionId The id of the motion + * @param _staker The staker address + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + getStake( + _motionId: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a user's stake on a motion + * @param _motionId The id of the motion + * @param _staker The staker address + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + "getStake(uint256,address,uint256)"( + _motionId: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of ongoing motions for a single expenditure / expenditure slot + * @param _structHash The hash of the expenditureId or expenditureId*expenditureSlot + */ + getExpenditureMotionCount( + _structHash: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of ongoing motions for a single expenditure / expenditure slot + * @param _structHash The hash of the expenditureId or expenditureId*expenditureSlot + */ + "getExpenditureMotionCount(bytes32)"( + _structHash: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the largest past vote on a single expenditure variable + * @param _actionHash The hash of the particular expenditure action + */ + getExpenditurePastVote( + _actionHash: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the largest past vote on a single expenditure variable + * @param _actionHash The hash of the particular expenditure action + */ + "getExpenditurePastVote(bytes32)"( + _actionHash: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the current state of the motion + */ + getMotionState( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the current state of the motion + */ + "getMotionState(uint256)"( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the voter reward + * @param _motionId The id of the motion + * @param _voterRep The reputation the voter has in the domain + */ + getVoterReward( + _motionId: BigNumberish, + _voterRep: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the voter reward + * @param _motionId The id of the motion + * @param _voterRep The reputation the voter has in the domain + */ + "getVoterReward(uint256,uint256)"( + _motionId: BigNumberish, + _voterRep: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the staker reward + * @param _motionId The id of the motion + * @param _staker The staker's address + * @param _vote The vote (0 = NAY, 1 = YAY) + */ + getStakerReward( + _motionId: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise<[BigNumber, BigNumber]>; + + /** + * Get the staker reward + * @param _motionId The id of the motion + * @param _staker The staker's address + * @param _vote The vote (0 = NAY, 1 = YAY) + */ + "getStakerReward(uint256,address,uint256)"( + _motionId: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise<[BigNumber, BigNumber]>; + + createClaimDelayAction( + action: Arrayish, + value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "createClaimDelayAction(bytes,uint256)"( + action: Arrayish, + value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + filters: { + ExtensionInitialised(): EventFilter; + + LogSetAuthority(authority: string | null): EventFilter; + + LogSetOwner(owner: string | null): EventFilter; + + MotionCreated( + motionId: BigNumberish | null, + creator: null, + domainId: BigNumberish | null + ): EventFilter; + + MotionEscalated( + motionId: BigNumberish | null, + escalator: null, + domainId: BigNumberish | null, + newDomainId: BigNumberish | null + ): EventFilter; + + MotionEventSet( + motionId: BigNumberish | null, + eventIndex: null + ): EventFilter; + + MotionFinalized( + motionId: BigNumberish | null, + action: null, + executed: null + ): EventFilter; + + MotionRewardClaimed( + motionId: BigNumberish | null, + staker: string | null, + vote: BigNumberish | null, + amount: null + ): EventFilter; + + MotionStaked( + motionId: BigNumberish | null, + staker: string | null, + vote: BigNumberish | null, + amount: null + ): EventFilter; + + MotionVoteRevealed( + motionId: BigNumberish | null, + voter: string | null, + vote: BigNumberish | null + ): EventFilter; + + MotionVoteSubmitted( + motionId: BigNumberish | null, + voter: string | null + ): EventFilter; + }; + + estimate: { + authority(overrides?: TransactionOverrides): Promise; + + "authority()"(overrides?: TransactionOverrides): Promise; + + getColony(overrides?: TransactionOverrides): Promise; + + "getColony()"(overrides?: TransactionOverrides): Promise; + + getDeprecated(overrides?: TransactionOverrides): Promise; + + "getDeprecated()"(overrides?: TransactionOverrides): Promise; + + owner(overrides?: TransactionOverrides): Promise; + + "owner()"(overrides?: TransactionOverrides): Promise; + + setAuthority( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + "setAuthority(address)"( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + setOwner( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + "setOwner(address)"( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the identifier of the extension + */ + identifier(overrides?: TransactionOverrides): Promise; + + /** + * Returns the identifier of the extension + */ + "identifier()"(overrides?: TransactionOverrides): Promise; + + /** + * Return the version number + */ + version(overrides?: TransactionOverrides): Promise; + + /** + * Return the version number + */ + "version()"(overrides?: TransactionOverrides): Promise; + + /** + * Install the extension + * @param _colony Base colony for the installation + */ + install( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Install the extension + * @param _colony Base colony for the installation + */ + "install(address)"( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Initialise the extension + * @param _escalationPeriod The length of the escalation period in seconds + * @param _maxVoteFraction The fraction of the domain's reputation which must submit for quick-end + * @param _revealPeriod The length of the reveal period in seconds + * @param _stakePeriod The length of the staking period in seconds + * @param _submitPeriod The length of the submit period in seconds + * @param _totalStakeFraction The fraction of the domain's reputation we need to stake + * @param _userMinStakeFraction The minimum per-user stake as fraction of total stake + * @param _voterRewardFraction The fraction of the total stake paid out to voters as rewards + */ + initialise( + _totalStakeFraction: BigNumberish, + _voterRewardFraction: BigNumberish, + _userMinStakeFraction: BigNumberish, + _maxVoteFraction: BigNumberish, + _stakePeriod: BigNumberish, + _submitPeriod: BigNumberish, + _revealPeriod: BigNumberish, + _escalationPeriod: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Initialise the extension + * @param _escalationPeriod The length of the escalation period in seconds + * @param _maxVoteFraction The fraction of the domain's reputation which must submit for quick-end + * @param _revealPeriod The length of the reveal period in seconds + * @param _stakePeriod The length of the staking period in seconds + * @param _submitPeriod The length of the submit period in seconds + * @param _totalStakeFraction The fraction of the domain's reputation we need to stake + * @param _userMinStakeFraction The minimum per-user stake as fraction of total stake + * @param _voterRewardFraction The fraction of the total stake paid out to voters as rewards + */ + "initialise(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)"( + _totalStakeFraction: BigNumberish, + _voterRewardFraction: BigNumberish, + _userMinStakeFraction: BigNumberish, + _maxVoteFraction: BigNumberish, + _stakePeriod: BigNumberish, + _submitPeriod: BigNumberish, + _revealPeriod: BigNumberish, + _escalationPeriod: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when upgrading the extension + */ + finishUpgrade(overrides?: TransactionOverrides): Promise; + + /** + * Called when upgrading the extension + */ + "finishUpgrade()"(overrides?: TransactionOverrides): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + deprecate( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + "deprecate(bool)"( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when uninstalling the extension + */ + uninstall(overrides?: TransactionOverrides): Promise; + + /** + * Called when uninstalling the extension + */ + "uninstall()"(overrides?: TransactionOverrides): Promise; + + /** + * Create a motion in the root domain + * @param _action A bytes array encoding a function call + * @param _altTarget The contract to which we send the action (0x0 for the colony) + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the root domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the root domain + */ + createRootMotion( + _altTarget: string, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Create a motion in the root domain + * @param _action A bytes array encoding a function call + * @param _altTarget The contract to which we send the action (0x0 for the colony) + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the root domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the root domain + */ + "createRootMotion(address,bytes,bytes,bytes,uint256,bytes32[])"( + _altTarget: string, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Create a motion in any domain + * @param _action A bytes array encoding a function call + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex The childSkillIndex pointing to the domain of the action + * @param _domainId The domain where we vote on the motion + * @param _key Reputation tree key for the domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the domain + */ + createDomainMotion( + _domainId: BigNumberish, + _childSkillIndex: BigNumberish, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Create a motion in any domain + * @param _action A bytes array encoding a function call + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex The childSkillIndex pointing to the domain of the action + * @param _domainId The domain where we vote on the motion + * @param _key Reputation tree key for the domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the domain + */ + "createDomainMotion(uint256,uint256,bytes,bytes,bytes,uint256,bytes32[])"( + _domainId: BigNumberish, + _childSkillIndex: BigNumberish, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Stake on a motion + * @param _amount The amount of tokens being staked + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex For the domain in which the motion is occurring + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _permissionDomainId The domain where the extension has the arbitration permission + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + stakeMotion( + _motionId: BigNumberish, + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _vote: BigNumberish, + _amount: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Stake on a motion + * @param _amount The amount of tokens being staked + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex For the domain in which the motion is occurring + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _permissionDomainId The domain where the extension has the arbitration permission + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + "stakeMotion(uint256,uint256,uint256,uint256,uint256,bytes,bytes,uint256,bytes32[])"( + _motionId: BigNumberish, + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _vote: BigNumberish, + _amount: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Submit a vote secret for a motion + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _voteSecret The hashed vote secret + */ + submitVote( + _motionId: BigNumberish, + _voteSecret: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Submit a vote secret for a motion + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _voteSecret The hashed vote secret + */ + "submitVote(uint256,bytes32,bytes,bytes,uint256,bytes32[])"( + _motionId: BigNumberish, + _voteSecret: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Reveal a vote secret for a motion + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _salt The salt used to hash the vote + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + revealVote( + _motionId: BigNumberish, + _salt: Arrayish, + _vote: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Reveal a vote secret for a motion + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _salt The salt used to hash the vote + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + "revealVote(uint256,bytes32,uint256,bytes,bytes,uint256,bytes32[])"( + _motionId: BigNumberish, + _salt: Arrayish, + _vote: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Escalate a motion to a higher domain + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex For the current domain, relative to the escalated domain + * @param _key Reputation tree key for the new domain + * @param _motionId The id of the motion + * @param _newDomainId The desired domain of escalation + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the new domain + */ + escalateMotion( + _motionId: BigNumberish, + _newDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Escalate a motion to a higher domain + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex For the current domain, relative to the escalated domain + * @param _key Reputation tree key for the new domain + * @param _motionId The id of the motion + * @param _newDomainId The desired domain of escalation + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the new domain + */ + "escalateMotion(uint256,uint256,uint256,bytes,bytes,uint256,bytes32[])"( + _motionId: BigNumberish, + _newDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + finalizeMotion( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "finalizeMotion(uint256)"( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Claim the staker's reward + * @param _childSkillIndex For the domain in which the motion is occurring + * @param _motionId The id of the motion + * @param _permissionDomainId The domain where the extension has the arbitration permission + * @param _staker The staker whose reward is being claimed + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + claimReward( + _motionId: BigNumberish, + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Claim the staker's reward + * @param _childSkillIndex For the domain in which the motion is occurring + * @param _motionId The id of the motion + * @param _permissionDomainId The domain where the extension has the arbitration permission + * @param _staker The staker whose reward is being claimed + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + "claimReward(uint256,uint256,uint256,address,uint256)"( + _motionId: BigNumberish, + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the total stake fraction + */ + getTotalStakeFraction(overrides?: TransactionOverrides): Promise; + + /** + * Get the total stake fraction + */ + "getTotalStakeFraction()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the voter reward fraction + */ + getVoterRewardFraction( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the voter reward fraction + */ + "getVoterRewardFraction()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the user min stake fraction + */ + getUserMinStakeFraction( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the user min stake fraction + */ + "getUserMinStakeFraction()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the max vote fraction + */ + getMaxVoteFraction(overrides?: TransactionOverrides): Promise; + + /** + * Get the max vote fraction + */ + "getMaxVoteFraction()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the stake period + */ + getStakePeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the stake period + */ + "getStakePeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the submit period + */ + getSubmitPeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the submit period + */ + "getSubmitPeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the reveal period + */ + getRevealPeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the reveal period + */ + "getRevealPeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the escalation period + */ + getEscalationPeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the escalation period + */ + "getEscalationPeriod()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the total motion count + */ + getMotionCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the total motion count + */ + "getMotionCount()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the data for a single motion + * @param _motionId The id of the motion + */ + getMotion( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the data for a single motion + * @param _motionId The id of the motion + */ + "getMotion(uint256)"( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a user's stake on a motion + * @param _motionId The id of the motion + * @param _staker The staker address + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + getStake( + _motionId: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a user's stake on a motion + * @param _motionId The id of the motion + * @param _staker The staker address + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + "getStake(uint256,address,uint256)"( + _motionId: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of ongoing motions for a single expenditure / expenditure slot + * @param _structHash The hash of the expenditureId or expenditureId*expenditureSlot + */ + getExpenditureMotionCount( + _structHash: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of ongoing motions for a single expenditure / expenditure slot + * @param _structHash The hash of the expenditureId or expenditureId*expenditureSlot + */ + "getExpenditureMotionCount(bytes32)"( + _structHash: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the largest past vote on a single expenditure variable + * @param _actionHash The hash of the particular expenditure action + */ + getExpenditurePastVote( + _actionHash: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the largest past vote on a single expenditure variable + * @param _actionHash The hash of the particular expenditure action + */ + "getExpenditurePastVote(bytes32)"( + _actionHash: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the current state of the motion + */ + getMotionState( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the current state of the motion + */ + "getMotionState(uint256)"( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the voter reward + * @param _motionId The id of the motion + * @param _voterRep The reputation the voter has in the domain + */ + getVoterReward( + _motionId: BigNumberish, + _voterRep: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the voter reward + * @param _motionId The id of the motion + * @param _voterRep The reputation the voter has in the domain + */ + "getVoterReward(uint256,uint256)"( + _motionId: BigNumberish, + _voterRep: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the staker reward + * @param _motionId The id of the motion + * @param _staker The staker's address + * @param _vote The vote (0 = NAY, 1 = YAY) + */ + getStakerReward( + _motionId: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the staker reward + * @param _motionId The id of the motion + * @param _staker The staker's address + * @param _vote The vote (0 = NAY, 1 = YAY) + */ + "getStakerReward(uint256,address,uint256)"( + _motionId: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + createClaimDelayAction( + action: Arrayish, + value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "createClaimDelayAction(bytes,uint256)"( + action: Arrayish, + value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + }; +} diff --git a/src/contracts/extensions/votingReputation/1/factories/VotingReputation__factory.ts b/src/contracts/extensions/votingReputation/1/factories/VotingReputation__factory.ts new file mode 100644 index 000000000..7c99fae3f --- /dev/null +++ b/src/contracts/extensions/votingReputation/1/factories/VotingReputation__factory.ts @@ -0,0 +1,1151 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, ContractFactory, Signer } from "ethers"; +import { Provider } from "ethers/providers"; +import { UnsignedTransaction } from "ethers/utils/transaction"; + +import { TransactionOverrides } from ".."; +import { VotingReputation } from "../VotingReputation"; + +export class VotingReputation__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy(overrides?: TransactionOverrides): Promise { + return super.deploy(overrides) as Promise; + } + getDeployTransaction(overrides?: TransactionOverrides): UnsignedTransaction { + return super.getDeployTransaction(overrides); + } + attach(address: string): VotingReputation { + return super.attach(address) as VotingReputation; + } + connect(signer: Signer): VotingReputation__factory { + return super.connect(signer) as VotingReputation__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): VotingReputation { + return new Contract(address, _abi, signerOrProvider) as VotingReputation; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [], + name: "ExtensionInitialised", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "authority", + type: "address", + }, + ], + name: "LogSetAuthority", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "LogSetOwner", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "motionId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "creator", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "domainId", + type: "uint256", + }, + ], + name: "MotionCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "motionId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "escalator", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "domainId", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "newDomainId", + type: "uint256", + }, + ], + name: "MotionEscalated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "motionId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "eventIndex", + type: "uint256", + }, + ], + name: "MotionEventSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "motionId", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "action", + type: "bytes", + }, + { + indexed: false, + internalType: "bool", + name: "executed", + type: "bool", + }, + ], + name: "MotionFinalized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "motionId", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "staker", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "vote", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "MotionRewardClaimed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "motionId", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "staker", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "vote", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "MotionStaked", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "motionId", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "voter", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "vote", + type: "uint256", + }, + ], + name: "MotionVoteRevealed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "motionId", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "voter", + type: "address", + }, + ], + name: "MotionVoteSubmitted", + type: "event", + }, + { + inputs: [], + name: "authority", + outputs: [ + { + internalType: "contract DSAuthority", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getColony", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getDeprecated", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract DSAuthority", + name: "authority_", + type: "address", + }, + ], + name: "setAuthority", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner_", + type: "address", + }, + ], + name: "setOwner", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "identifier", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_colony", + type: "address", + }, + ], + name: "install", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_totalStakeFraction", + type: "uint256", + }, + { + internalType: "uint256", + name: "_voterRewardFraction", + type: "uint256", + }, + { + internalType: "uint256", + name: "_userMinStakeFraction", + type: "uint256", + }, + { + internalType: "uint256", + name: "_maxVoteFraction", + type: "uint256", + }, + { + internalType: "uint256", + name: "_stakePeriod", + type: "uint256", + }, + { + internalType: "uint256", + name: "_submitPeriod", + type: "uint256", + }, + { + internalType: "uint256", + name: "_revealPeriod", + type: "uint256", + }, + { + internalType: "uint256", + name: "_escalationPeriod", + type: "uint256", + }, + ], + name: "initialise", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "finishUpgrade", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bool", + name: "_deprecated", + type: "bool", + }, + ], + name: "deprecate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "uninstall", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_altTarget", + type: "address", + }, + { + internalType: "bytes", + name: "_action", + type: "bytes", + }, + { + internalType: "bytes", + name: "_key", + type: "bytes", + }, + { + internalType: "bytes", + name: "_value", + type: "bytes", + }, + { + internalType: "uint256", + name: "_branchMask", + type: "uint256", + }, + { + internalType: "bytes32[]", + name: "_siblings", + type: "bytes32[]", + }, + ], + name: "createRootMotion", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "bytes", + name: "_action", + type: "bytes", + }, + { + internalType: "bytes", + name: "_key", + type: "bytes", + }, + { + internalType: "bytes", + name: "_value", + type: "bytes", + }, + { + internalType: "uint256", + name: "_branchMask", + type: "uint256", + }, + { + internalType: "bytes32[]", + name: "_siblings", + type: "bytes32[]", + }, + ], + name: "createDomainMotion", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_motionId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_vote", + type: "uint256", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "_key", + type: "bytes", + }, + { + internalType: "bytes", + name: "_value", + type: "bytes", + }, + { + internalType: "uint256", + name: "_branchMask", + type: "uint256", + }, + { + internalType: "bytes32[]", + name: "_siblings", + type: "bytes32[]", + }, + ], + name: "stakeMotion", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_motionId", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_voteSecret", + type: "bytes32", + }, + { + internalType: "bytes", + name: "_key", + type: "bytes", + }, + { + internalType: "bytes", + name: "_value", + type: "bytes", + }, + { + internalType: "uint256", + name: "_branchMask", + type: "uint256", + }, + { + internalType: "bytes32[]", + name: "_siblings", + type: "bytes32[]", + }, + ], + name: "submitVote", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_motionId", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_salt", + type: "bytes32", + }, + { + internalType: "uint256", + name: "_vote", + type: "uint256", + }, + { + internalType: "bytes", + name: "_key", + type: "bytes", + }, + { + internalType: "bytes", + name: "_value", + type: "bytes", + }, + { + internalType: "uint256", + name: "_branchMask", + type: "uint256", + }, + { + internalType: "bytes32[]", + name: "_siblings", + type: "bytes32[]", + }, + ], + name: "revealVote", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_motionId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_newDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "bytes", + name: "_key", + type: "bytes", + }, + { + internalType: "bytes", + name: "_value", + type: "bytes", + }, + { + internalType: "uint256", + name: "_branchMask", + type: "uint256", + }, + { + internalType: "bytes32[]", + name: "_siblings", + type: "bytes32[]", + }, + ], + name: "escalateMotion", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_motionId", + type: "uint256", + }, + ], + name: "finalizeMotion", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_motionId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "address", + name: "_staker", + type: "address", + }, + { + internalType: "uint256", + name: "_vote", + type: "uint256", + }, + ], + name: "claimReward", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getTotalStakeFraction", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getVoterRewardFraction", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getUserMinStakeFraction", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getMaxVoteFraction", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getStakePeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getSubmitPeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getRevealPeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getEscalationPeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getMotionCount", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_motionId", + type: "uint256", + }, + ], + name: "getMotion", + outputs: [ + { + components: [ + { + internalType: "uint64[3]", + name: "events", + type: "uint64[3]", + }, + { + internalType: "bytes32", + name: "rootHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "domainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "skillId", + type: "uint256", + }, + { + internalType: "uint256", + name: "skillRep", + type: "uint256", + }, + { + internalType: "uint256", + name: "repSubmitted", + type: "uint256", + }, + { + internalType: "uint256", + name: "paidVoterComp", + type: "uint256", + }, + { + internalType: "uint256[2]", + name: "pastVoterComp", + type: "uint256[2]", + }, + { + internalType: "uint256[2]", + name: "stakes", + type: "uint256[2]", + }, + { + internalType: "uint256[2]", + name: "votes", + type: "uint256[2]", + }, + { + internalType: "bool", + name: "escalated", + type: "bool", + }, + { + internalType: "bool", + name: "finalized", + type: "bool", + }, + { + internalType: "address", + name: "altTarget", + type: "address", + }, + { + internalType: "bytes", + name: "action", + type: "bytes", + }, + ], + internalType: "struct VotingReputation.Motion", + name: "motion", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_motionId", + type: "uint256", + }, + { + internalType: "address", + name: "_staker", + type: "address", + }, + { + internalType: "uint256", + name: "_vote", + type: "uint256", + }, + ], + name: "getStake", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_structHash", + type: "bytes32", + }, + ], + name: "getExpenditureMotionCount", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_actionHash", + type: "bytes32", + }, + ], + name: "getExpenditurePastVote", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_motionId", + type: "uint256", + }, + ], + name: "getMotionState", + outputs: [ + { + internalType: "enum VotingReputation.MotionState", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_motionId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_voterRep", + type: "uint256", + }, + ], + name: "getVoterReward", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_motionId", + type: "uint256", + }, + { + internalType: "address", + name: "_staker", + type: "address", + }, + { + internalType: "uint256", + name: "_vote", + type: "uint256", + }, + ], + name: "getStakerReward", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "action", + type: "bytes", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "createClaimDelayAction", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +]; + +const _bytecode = + "0x608060405234801561001057600080fd5b50600180546001600160a01b031916339081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a2614a4b8061005e6000396000f3fe608060405234801561001057600080fd5b50600436106102325760003560e01c80637b9afba611610130578063bbd2f6c5116100b8578063da2332591161007c578063da23325914610454578063de3b0aa414610467578063deac280f1461047a578063ee2cf4731461048d578063fcf6ba93146104a057610232565b8063bbd2f6c51461040b578063bf7e214f1461041e578063bfd68ab714610426578063c06e47d61461042e578063d84eb9ee1461044157610232565b80639251cff4116100ff5780639251cff4146103aa578063ad15aad2146103bd578063b0048647146103dd578063b57025d4146103e5578063b9a8c27a146103f857610232565b80637b9afba61461035a5780637de22eb41461036d578063835ddcc11461038d5780638da5cb5b1461039557610232565b8063420b900c116101be5780636e7375b0116101825780636e7375b01461031c57806372d8bd7b146103245780637998a1c41461032c5780637a3dc330146103345780637a9e5e4b1461034757610232565b8063420b900c146102b857806354fd4d50146102d85780635c0d9d53146102e05780635d0050b2146102e85780636acd7fe61461030957610232565b80631a7dad2e116102055780631a7dad2e146102855780632363df0e1461028d5780632a1b8f9b146102955780632a1c708b146102a8578063340df28f146102b057610232565b806302d15d64146102375780630d638f301461025557806313af40351461025f578063157eb07214610272575b600080fd5b61023f6104b5565b60405161024c9190613eba565b60405180910390f35b61025d6104bb565b005b61025d61026d3660046138b5565b610504565b61025d610280366004613bdc565b610586565b61023f610788565b61023f61078e565b61025d6102a33660046138b5565b610794565b61023f610993565b61025d610999565b6102cb6102c63660046139e5565b6109cd565b60405161024c9190614066565b61023f610b37565b61023f610b3c565b6102fb6102f6366004613a9e565b610b42565b60405161024c929190613e96565b61025d6103173660046139e5565b610e00565b61023f6112f4565b61023f6112fa565b61023f611300565b61023f6103423660046139e5565b611324565b61025d6103553660046138b5565b611336565b61025d610368366004613d5b565b6113b4565b61038061037b366004613a15565b61162a565b60405161024c9190613fc0565b61023f611780565b61039d611786565b60405161024c9190613ec3565b61025d6103b83660046139ad565b611795565b6103d06103cb3660046139e5565b6117e5565b60405161024c9190614837565b61023f611a30565b61025d6103f3366004613c83565b611a36565b61025d610406366004613b11565b611d83565b61025d610419366004613c9d565b611fb1565b61039d6126af565b61039d6126be565b61025d61043c366004613ad5565b6126cd565b61023f61044f366004613bbb565b612850565b61025d610462366004613c3b565b6128ab565b61023f6104753660046139e5565b612a99565b61025d6104883660046138ed565b612aab565b61023f61049b366004613a9e565b612b49565b6104a8612b7c565b60405161024c9190613fa0565b600d5490565b6104d1336000356001600160e01b031916612b8c565b6104f65760405162461bcd60e51b81526004016104ed90614158565b60405180910390fd5b6003546001600160a01b0316ff5b61051a336000356001600160e01b031916612b8c565b6105365760405162461bcd60e51b81526004016104ed90614158565b600180546001600160a01b0319166001600160a01b0383811691909117918290556040519116907fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b6003805481906001600160a01b0316632dfbb0836105a389612c68565b6040518263ffffffff1660e01b81526004016105bf9190613fab565b60206040518083038186803b1580156105d757600080fd5b505afa1580156105eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060f91906139fd565b17141561062e5760405162461bcd60e51b81526004016104ed90614724565b600354604051630d3d4c7160e11b81526000916001600160a01b031690631a7a98e29061065f908b90600401613eba565b604080518083038186803b15801561067657600080fd5b505afa15801561068a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ae9190613a57565b51905060006106bc87612c6f565b905080821461076c57600480546040516304e8852f60e11b81526000926001600160a01b03909216916309d10a5e916106f99187918e9101613e96565b60206040518083038186803b15801561071157600080fd5b505afa158015610725573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061074991906139fd565b905081811461076a5760405162461bcd60e51b81526004016104ed906143a2565b505b61077d6000888b858a8a8a8a612da9565b505050505050505050565b600c5490565b60085490565b6003546001600160a01b0316156107bd5760405162461bcd60e51b81526004016104ed9061447e565b600380546001600160a01b0319166001600160a01b03838116919091179182905560408051634e5e839560e01b815290519290911691634e5e839591600480820192602092909190829003018186803b15801561081957600080fd5b505afa15801561082d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085191906138d1565b600480546001600160a01b0319166001600160a01b03928316178082556040805163598cc81560e11b81529051919093169263b319902a9281810192602092909190829003018186803b1580156108a757600080fd5b505afa1580156108bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108df91906138d1565b600580546001600160a01b0319166001600160a01b03928316179055600354604080516321df0da760e01b8152905191909216916321df0da7916004808301926020929190829003018186803b15801561093857600080fd5b505afa15801561094c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061097091906138d1565b600680546001600160a01b0319166001600160a01b039290921691909117905550565b60075490565b6109af336000356001600160e01b031916612b8c565b6109cb5760405162461bcd60e51b81526004016104ed90614158565b565b6000818152601060205260408120816109e584612fea565b90508315806109f55750600f5484115b15610a0557600092505050610b32565b600d820154610100900460ff1615610a2257600692505050610b32565b600a820154811180610a375750600982015481115b15610aa45781546001600160401b0316421015610a5957600192505050610b32565b600a820154811415610a7057600592505050610b32565b600b82018054600091610a88919060015b0154613009565b1115610a9957600592505050610b32565b600792505050610b32565b8154600160401b90046001600160401b0316421015610ac857600292505050610b32565b8154600160801b90046001600160401b0316421015610aec57600392505050610b32565b600e548254600160801b90046001600160401b03160142108015610b14575060018260020154115b15610b2457600492505050610b32565b600592505050610b32565b50505b919050565b600190565b60095490565b6000838152601060209081526040808320601183528184206001600160a01b038716855283528184208585529092528220548291908290610ba590610ba0600985018860028110610b8f57fe5b0154856007018960028110610a8157fe5b61302c565b90506000610bc382846009018860028110610bbc57fe5b015461305d565b90506000610bd089612fea565b905060008080610beb600b8801820154600b89016001610a81565b1115610ccc576000610c01848860060154613085565b600b88018054919250600091610c18916001610a81565b90506000610c3689600b018d60028110610c2e57fe5b01548361302c565b90506000610c4c82671bc16d674ec8000061305d565b9050670de0b6b3a7640000811180610c745750670de0b6b3a764000081148015610c7457508c155b15610ca657610c9f89610c9a89610c9588670de0b6b3a7640000870361305d565b613009565b61305d565b9550610cc3565b610cb489610c9a868461305d565b9550610cc08887613085565b94505b50505050610df0565b600686015415610cd857fe5b82866009018a60028110610ce857fe5b0154148015610d0e57508286600901610d008b6130a8565b60028110610d0a57fe5b0154105b15610d6157600086600901610d228b6130a8565b60028110610d2c57fe5b015490506000610d4882600a670de0b6b3a76400005b0461305d565b9050610d5887610c9a8784613009565b93505050610df0565b82866009018a60028110610d7157fe5b0154108015610d9757508286600901610d898b6130a8565b60028110610d9357fe5b0154145b15610dec576000866009018a60028110610dad57fe5b015490506000610dc782600a670de0b6b3a7640000610d42565b9050610dd787610c9a8484613085565b9350610de38685613085565b92505050610df0565b8391505b909a909950975050505050505050565b60008181526010602052604090206005610e19836109cd565b6007811115610e2457fe5b14610e415760405162461bcd60e51b81526004016104ed906146e3565b610e4a82612fea565b600a8201541480610e6d5750600b81018054600091610e6b91906001610a81565b115b610e7357fe5b600d8101805461ff0019166101001790556000600982016001015460098301600001541080610ea95750600c820154600b830154105b600e83018054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152939450633268b39f60e21b93610f4e9390929091830182828015610f445780601f10610f1957610100808354040283529160200191610f44565b820191906000526020600020905b815481529060010190602001808311610f2757829003601f168201915b5050505050612c68565b6001600160e01b031916148015610f765750600d8201546201000090046001600160a01b0316155b1561120c57600e8201805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152600093611016939192909183018282801561100c5780601f10610fe15761010080835404028352916020019161100c565b820191906000526020600020905b815481529060010190602001808311610fef57829003601f168201915b50505050506130b5565b600081815260146020526040902054909150611033906001613085565b60008281526014602052604090208190556110f457600e8301805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181526060936110e593919290918301828280156110d95780601f106110ae576101008083540402835291602001916110d9565b820191906000526020600020905b8154815290600101906020018083116110bc57829003601f168201915b5050505050600061162a565b90506110f18582613153565b50505b600e8301805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815260009361118f93919290918301828280156111855780601f1061115a57610100808354040283529160200191611185565b820191906000526020600020905b81548152906001019060200180831161116857829003601f168201915b50505050506131a7565b90506000806111a9600b8701820154600b88016001610a81565b116111b857600a8501546111be565b600c8501545b6000838152601360205260409020549091508111156111fa5760008281526013602052604090208190558380156111f3575060015b9350611208565b838015611205575060005b93505b5050505b600081156112b157600e8301805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181526112ae938893919290918301828280156112a45780601f10611279576101008083540402835291602001916112a4565b820191906000526020600020905b81548152906001019060200180831161128757829003601f168201915b5050505050613153565b90505b837f30a64da5658ebdc08619e03d1f155ef960c07fa9b332002f9ad606ec64b6096484600e01836040516112e6929190613fd3565b60405180910390a250505050565b600a5490565b600e5490565b7fdc951b3d4193c331186bc2de3b4e659e51d8b00ef92751ae69abaa48a6ab38dd90565b60009081526013602052604090205490565b61134c336000356001600160e01b031916612b8c565b6113685760405162461bcd60e51b81526004016104ed90614158565b600080546001600160a01b0319166001600160a01b03838116919091178083556040519116917f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada491a250565b600354604051635597bd7160e11b81526001600160a01b039091169063ab2f7ae2906113e99033906001908190600401613ed7565b60206040518083038186803b15801561140157600080fd5b505afa158015611415573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061143991906139c9565b6114555760405162461bcd60e51b81526004016104ed906143d9565b6000600354600160a81b900460ff16600281111561146f57fe5b1461148c5760405162461bcd60e51b81526004016104ed906141f5565b6706f05b59d3b200008811156114b45760405162461bcd60e51b81526004016104ed906142d1565b6706f05b59d3b200008711156114dc5760405162461bcd60e51b81526004016104ed906142d1565b670de0b6b3a76400008611156115045760405162461bcd60e51b81526004016104ed9061475b565b670de0b6b3a764000085111561152c5760405162461bcd60e51b81526004016104ed9061475b565b6301e133808411156115505760405162461bcd60e51b81526004016104ed906147c9565b6301e133808311156115745760405162461bcd60e51b81526004016104ed906147c9565b6301e133808211156115985760405162461bcd60e51b81526004016104ed906147c9565b6301e133808111156115bc5760405162461bcd60e51b81526004016104ed906147c9565b6003805460ff60a81b1916600160a81b179055600788905560088790556009869055600a859055600b849055600c839055600d829055600e8190556040517f690c4b6201f6a4c703f9d21c205d98a08dff8461e7a71e49c6d47cc8b894850190600090a15050505050505050565b602082015160248301516044840151606485015160848601516060949392919060198114156116d457604080516101648082526101a08201909252606091602082018180368337505050602081019690965250506024840192909252604483015260648201526019608482015260e060a482015261012060c482015260e481018390526001610104820181905261012482018190526101448201526004610164820152905061177a565b604080516101a48082526101e0820190925260609160208201818036833701905050905060006101848a01519050866020830152856024830152846044830152836064830152601a608483015260e060a483015261014060c48301528860e483015260026101048301526000610124830152600161014483015260026101648301528061018483015260016101a48301528197505050505050505061177a565b50505050505b92915050565b600f5490565b6001546001600160a01b031681565b6117ab336000356001600160e01b031916612b8c565b6117c75760405162461bcd60e51b81526004016104ed90614158565b60038054911515600160a01b0260ff60a01b19909216919091179055565b6117ed613633565b6000828152601060205260409081902081516102208101909252816101c081018260038282826020028201916000905b82829054906101000a90046001600160401b03166001600160401b03168152602001906008019060208260070104928301926001038202915080841161181d57905050505050508152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782016002806020026040519081016040528092919082600280156118e0576020028201915b8154815260200190600101908083116118cc575b5050509183525050604080518082019182905260209092019190600984019060029082845b815481526020019060010190808311611905575050509183525050604080518082019182905260209092019190600b84019060029082845b81548152602001906001019080831161193d575050509183525050600d82015460ff80821615156020808501919091526101008084049092161515604080860191909152620100009093046001600160a01b03166060850152600e850180548451600260018316159095026000190190911693909304601f8101839004830284018301909452838352608090940193919290830182828015611a205780601f106119f557610100808354040283529160200191611a20565b820191906000526020600020905b815481529060010190602001808311611a0357829003601f168201915b5050505050815250509050919050565b600b5490565b60008781526010602052604090206004611a4f896109cd565b6007811115611a5a57fe5b14611a775760405162461bcd60e51b81526004016104ed9061451b565b600354604051630d3d4c7160e11b81526000916001600160a01b031690631a7a98e290611aa8908b90600401613eba565b604080518083038186803b158015611abf57600080fd5b505afa158015611ad3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611af79190613a57565b51600480546040516304e8852f60e11b81529293506000926001600160a01b03909116916309d10a5e91611b2f9186918d9101613e96565b60206040518083038186803b158015611b4757600080fd5b505afa158015611b5b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b7f91906139fd565b905082600301548114611ba45760405162461bcd60e51b81526004016104ed90614447565b600283018054908a905560038401839055611bc48b60008a8a8a8a6131bd565b6004850155600c840154600b85015460009111611be2576001611be5565b60005b9050611c05856009018260028110611bf957fe5b01548660060154613085565b856009018260028110611c1457fe5b0155611c34600786018260028110611c2857fe5b01548660060154613009565b856007018260028110611c4357fe5b0155600060068601819055611c578d612fea565b90508060098701600001541080611c715750600a86015481115b611c7b5742611c81565b600b5442015b865467ffffffffffffffff19166001600160401b0391821617808855600c5467ffffffffffffffff60401b198216600160401b9284169091018316820217808955600d805467ffffffffffffffff60801b198316600160801b94909304851601909316919091021787558601805460ff191660011790556040518c9084908f907fd11ec0a82b67846e80d77c897fa0e54e2d81a0275e18cb2d40b9f534d9b738ad90611d2e903390613ec3565b60405180910390a48554426001600160401b0390811691161415611d74578c6000805160206149f68339815191526000604051611d6b9190613eba565b60405180910390a25b50505050505050505050505050565b60008781526010602052604090206003611d9c896109cd565b6007811115611da757fe5b14611dc45760405162461bcd60e51b81526004016104ed90614552565b6001861115611de55760405162461bcd60e51b81526004016104ed906145ce565b6000611df58933888888886131bd565b9050611e1182600b018860028110611e0957fe5b015482613009565b82600b018860028110611e2057fe5b01556000898152601260209081526040808320338452909152902054611e4689896132b1565b8114611e645760405162461bcd60e51b81526004016104ed9061422c565b60008a81526012602090815260408083203384529091528120819055611e8a8b84612850565b9050611e9a846006015482613009565b6006850155604051899033908d907f90285c90067ec863f95f2423d6cc031a545257d9b53dfb1974a65b46bd4a55bd90600090a46005840154600b85018054611ee4916001610a81565b1415611f3757835467ffffffffffffffff60801b1916600160801b426001600160401b0316021784556040518b906000805160206149f683398151915290611f2e90600290613eba565b60405180910390a25b6005546006546040516393c4553560e01b81526001600160a01b03928316926393c4553592611f729291169085903390600190600401613f76565b600060405180830381600087803b158015611f8c57600080fd5b505af1158015611fa0573d6000803e3d6000fd5b505050505050505050505050505050565b60008981526010602052604090206001871115611fe05760405162461bcd60e51b81526004016104ed906145ce565b6001611feb8b6109cd565b6007811115611ff657fe5b146120135760405162461bcd60e51b81526004016104ed90614263565b600061201e8b612fea565b905060006120458861204084866009018d6002811061203957fe5b0154613085565b6132e4565b9050600081116120675760405162461bcd60e51b81526004016104ed906145fb565b60008c815260116020908152604080832033845282528083208c84529091528120546120939083613009565b90506120a38d338a8a8a8a6131bd565b8111156120c25760405162461bcd60e51b81526004016104ed90614306565b6120ce8360095461305d565b811015806120f45750826120f2856009018c600281106120ea57fe5b015484613009565b145b6121105760405162461bcd60e51b81526004016104ed90614121565b6005546006546040516307dba22560e31b81526001600160a01b0392831692633edd11289261214a92911690600090600190600401613f53565b600060405180830381600087803b15801561216457600080fd5b505af1158015612178573d6000803e3d6000fd5b5050600354600287015460405163096abb4960e01b81526001600160a01b03909216935063096abb4992506121b4913391908790600401613f05565b600060405180830381600087803b1580156121ce57600080fd5b505af11580156121e2573d6000803e3d6000fd5b50505050600360009054906101000a90046001600160a01b03166001600160a01b031663446c1aa28d8d3033896002015488306040518863ffffffff1660e01b81526004016122379796959493929190614931565b600060405180830381600087803b15801561225157600080fd5b505af1158015612265573d6000803e3d6000fd5b50505050612283846009018b6002811061227b57fe5b015483613009565b846009018b6002811061229257fe5b015560008d815260116020908152604080832033845282528083208d8452909152902081905560018a1480156122cd5750600d84015460ff16155b80156122dc5750600a84015483145b801561235b5750600e8401805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152633268b39f60e21b9361234f9391929091830182828015610f445780601f10610f1957610100808354040283529160200191610f44565b6001600160e01b031916145b80156123785750600d8401546201000090046001600160a01b0316155b156124e557600e8401805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181526000936123e3939192909183018282801561100c5780601f10610fe15761010080835404028352916020019161100c565b600081815260146020526040902054909150612400906001613009565b60008281526014602090815260409182902092909255600e870180548251601f600260001961010060018616150201909316929092049182018590048502810185019093528083526060936124ba939291908301828280156124a35780601f10612478576101008083540402835291602001916124a3565b820191906000526020600020905b81548152906001019060200180831161248657829003601f168201915b50505050506003600019816124b457fe5b0461162a565b90506124c68f82613153565b6124e25760405162461bcd60e51b81526004016104ed90614079565b50505b89336001600160a01b03168e7f36de51a8af0dcecf368691aa77f69ba4d4e7974e9c709f33aeaad0e7ac5af1b8856040516125209190613eba565b60405180910390a460098401548314801561253e5750600a84015483145b156125db57835467ffffffffffffffff1916426001600160401b0390811691909117808655600c5467ffffffffffffffff60401b198216600160401b9284169091018316820217808755600d5467ffffffffffffffff60801b198216600160801b93909204841601909216021784556040518d906000805160206149f6833981519152906125ce90600090613eba565b60405180910390a2611d74565b891580156125ec5750600984015483145b80612605575060018a1480156126055750600a84015483145b15611d7457600b8054855467ffffffffffffffff1916429091016001600160401b0390811691909117808755600c5467ffffffffffffffff60401b198216600160401b9284169091018316820217808855600d5467ffffffffffffffff60801b198216600160801b939092048416019092160217855561268890850160006136bf565b83600501600090558c6000805160206149f68339815191526000604051611d6b9190613eba565b6000546001600160a01b031681565b6003546001600160a01b031690565b600086815260106020526040902060026126e6886109cd565b60078111156126f157fe5b1461270e5760405162461bcd60e51b81526004016104ed906140bb565b8561272b5760405162461bcd60e51b81526004016104ed906146ac565b600061273b8833888888886131bd565b60008981526012602090815260408083203384529091529020549091506127705761276a826005015482613009565b60058301555b60008881526012602090815260408083203380855292528083208a90555190918a917f918e84941a111dde88f3d5739c3e63ffa70d869cbbfd4ecbab1dbb3b379055f99190a36127c68260040154600a5461305d565b82600501541061284657815467ffffffffffffffff60401b1916600160401b426001600160401b038181169290920292909217808555600d5490920116600160801b0267ffffffffffffffff60801b1990911617825560405188906000805160206149f68339815191529061283d90600190613eba565b60405180910390a25b5050505050505050565b60008281526010602052604081206004810154829061287090859061302c565b9050600061288a6009840160010154600985016000610a81565b90506128a1612899838361305d565b60085461305d565b9695505050505050565b600085815260106020526040902060066128c4876109cd565b60078111156128cf57fe5b14806128ee575060076128e1876109cd565b60078111156128ec57fe5b145b61290a5760405162461bcd60e51b81526004016104ed90614800565b600080612918888686610b42565b915091506000821161293c5760405162461bcd60e51b81526004016104ed9061429a565b60008881526011602090815260408083206001600160a01b03808a1685529083528184208885529092528083209290925560055460065492516393c4553560e01b8152908216926393c455359261299f9291169086908a90600190600401613f76565b600060405180830381600087803b1580156129b957600080fd5b505af11580156129cd573d6000803e3d6000fd5b505050506000811115612a4c57600354600284015460405163fce891a560e01b81526001600160a01b039092169163fce891a591612a19918b918b918b9060008990039060040161496a565b600060405180830381600087803b158015612a3357600080fd5b505af1158015612a47573d6000803e3d6000fd5b505050505b83856001600160a01b0316897f388e060f12fe3bf76a4ba6d79050cbfa0484dfbfc3a2b866afbcbf4058b24bfe85604051612a879190613eba565b60405180910390a45050505050505050565b60009081526014602052604090205490565b600354604051630d3d4c7160e11b81526000916001600160a01b031690631a7a98e290612add90600190600401613eba565b604080518083038186803b158015612af457600080fd5b505afa158015612b08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b2c9190613a57565b519050612b40878760018489898989612da9565b50505050505050565b60008381526011602090815260408083206001600160a01b038616845282528083208484529091529020545b9392505050565b600354600160a01b900460ff1690565b60006001600160a01b038316301415612ba75750600161177a565b6001546001600160a01b0384811691161415612bc55750600161177a565b6000546001600160a01b0316612bdd5750600061177a565b60005460405163b700961360e01b81526001600160a01b039091169063b700961390612c1190869030908790600401613f26565b60206040518083038186803b158015612c2957600080fd5b505afa158015612c3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c6191906139c9565b905061177a565b6020015190565b60248101516044820151600354604051630d3d4c7160e11b8152600093929184916001600160a01b0390911690631a7a98e290612cb0908690600401613eba565b604080518083038186803b158015612cc757600080fd5b505afa158015612cdb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cff9190613a57565b519050600019821415612d16579250610b32915050565b600480546040516304e8852f60e11b81526001600160a01b03909116916309d10a5e91612d47918591879101613e96565b60206040518083038186803b158015612d5f57600080fd5b505afa158015612d73573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d9791906139fd565b9350505050610b32565b505050919050565b600354600160a01b900460ff1615612dd35760405162461bcd60e51b81526004016104ed90614792565b6001600354600160a81b900460ff166002811115612ded57fe5b14612e0a5760405162461bcd60e51b81526004016104ed906144ec565b6003546001600160a01b0389811691161415612e385760405162461bcd60e51b81526004016104ed9061462a565b600f805460010190819055600090815260106020908152604091829020600b54815467ffffffffffffffff1916429091016001600160401b0390811691909117808355600c5467ffffffffffffffff60401b198216600160401b9284169091018316820217808455600d5467ffffffffffffffff60801b198216600160801b93909204841601909216021781556004805484516397824c3f60e01b8152945192946001600160a01b03909116936397824c3f93828401939192909190829003018186803b158015612f0857600080fd5b505afa158015612f1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f4091906139fd565b60018201556002810187905560038101869055600f54612f65906000878787876131bd565b6004820155600d8101805462010000600160b01b031916620100006001600160a01b038c16021790558751612fa390600e83019060208b01906136cd565b5086600f547fec8f382abfacc0416a7b1eca9ddfcb6f79f9ee369eba7478f5471bd692bb5db733604051612fd79190613ec3565b60405180910390a3505050505050505050565b60008181526010602052604081206004015460075461177a919061305d565b8082018281101561177a5760405162461bcd60e51b81526004016104ed9061433d565b60008161304e61304485670de0b6b3a76400006132fb565b6002855b04613009565b8161305557fe5b049392505050565b6000670de0b6b3a764000061304e61307585856132fb565b6002670de0b6b3a7640000613048565b8082038281111561177a5760405162461bcd60e51b81526004016104ed906140f2565b600061177a600183613085565b6000633268b39f60e21b6130c883612c68565b6001600160e01b031916146130d957fe5b60648201516084830151610184840151601982141561312057826040516020016131039190613eba565b604051602081830303815290604052805190602001209350612da1565b8281604051602001613133929190613e96565b604051602081830303815290604052805190602001209350505050919050565b6000828152601060205260408120600d01546201000090046001600160a01b0316818115613181578161318e565b6003546001600160a01b03165b90506000808551602087016000855af195945050505050565b600060e482015280516043190160649091012090565b6000806131cc86868686613332565b60008981526010602052604090206001015490915081146131ff5760405162461bcd60e51b81526004016104ed9061436b565b60208501516014870151603488015160488901516003546001600160a01b038085169116146132405760405162461bcd60e51b81526004016104ed90614186565b60008c81526010602052604090206003015482146132705760405162461bcd60e51b81526004016104ed90614675565b8a6001600160a01b0316816001600160a01b0316146132a15760405162461bcd60e51b81526004016104ed906144b5565b50919a9950505050505050505050565b600082826040516020016132c6929190613e96565b60405160208183030381529060405280519060200120905092915050565b6000818311156132f45781612b75565b5090919050565b60008115806133165750508082028282828161331357fe5b04145b61177a5760405162461bcd60e51b81526004016104ed906141c7565b60008061334f86805190602001208680519060200120868661335a565b509695505050505050565b600061336461374b565b61336c613769565b5060408051808201909152868152610100602082015261338a613780565b86815261339561374b565b60005b86518110156134715760006133ac896134db565b60ff169050806001901b19891698506133d18160ff038661353390919063ffffffff16565b602086018190529095506000906133e79061359a565b602087015290506133f7856135f4565b84826002811061340357fe5b6020020152885189906000198582030190811061341c57fe5b602002602001015184826001036002811061343357fe5b6020020181815250508360405160200161344d9190613e62565b60408051601f19818403018152919052805160209091012085525050600101613398565b508661348357602082018390526134c4565b600061348e886134db565b60ff1690506134a98160ff038561353390919063ffffffff16565b602085018190529094506134bc9061359a565b602085015250505b6134cd826135f4565b999098509650505050505050565b6000816134fa5760405162461bcd60e51b81526004016104ed90614410565b8160805b60018160ff1610610b2f57600019600160ff83161b018216613528579182019160ff81169190911c905b60011c607f166134fe565b61353b613769565b613543613769565b8360200151831115801561355957506101008311155b61355f57fe5b60208201839052826135745760008252613583565b835160011960ff8590031b1682525b60208085015184900390820152925190911b825291565b60006135a4613769565b60008360200151116135c85760405162461bcd60e51b81526004016104ed90614589565b5050805160408051808201909152825160011b8152602092830151600019019281019290925260ff1c91565b8051602080830151808201519051604051600094613616949093929101613ea4565b604051602081830303815290604052805190602001209050919050565b604051806101c0016040528061364761379f565b815260200160008019168152602001600081526020016000815260200160008152602001600081526020016000815260200161368161374b565b815260200161368e61374b565b815260200161369b61374b565b81526000602082018190526040820181905260608083019190915260809091015290565b506000815560010160009055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061370e57805160ff191683800117855561373b565b8280016001018555821561373b579182015b8281111561373b578251825591602001919060010190613720565b506137479291506137bd565b5090565b60405180604001604052806002906020820280368337509192915050565b604080518082019091526000808252602082015290565b60408051808201909152600081526020810161379a613769565b905290565b60405180606001604052806003906020820280368337509192915050565b5b8082111561374757600081556001016137be565b8035610b32816149d2565b600082601f8301126137ed578081fd5b81356001600160401b0381111561380057fe5b6020808202613810828201614996565b8381529350818401858301828701840188101561382c57600080fd5b600092505b84831015611774578035825260019290920191908301908301613831565b600082601f83011261385f578081fd5b81356001600160401b0381111561387257fe5b613885601f8201601f1916602001614996565b915080825283602082850101111561389c57600080fd5b8060208401602084013760009082016020015292915050565b6000602082840312156138c6578081fd5b8135612b75816149d2565b6000602082840312156138e2578081fd5b8151612b75816149d2565b60008060008060008060c08789031215613905578182fd5b61390e876137d2565b955060208701356001600160401b0380821115613929578384fd5b6139358a838b0161384f565b9650604089013591508082111561394a578384fd5b6139568a838b0161384f565b9550606089013591508082111561396b578384fd5b6139778a838b0161384f565b94506080890135935060a0890135915080821115613993578283fd5b506139a089828a016137dd565b9150509295509295509295565b6000602082840312156139be578081fd5b8135612b75816149e7565b6000602082840312156139da578081fd5b8151612b75816149e7565b6000602082840312156139f6578081fd5b5035919050565b600060208284031215613a0e578081fd5b5051919050565b60008060408385031215613a27578182fd5b82356001600160401b03811115613a3c578283fd5b613a488582860161384f565b95602094909401359450505050565b600060408284031215613a68578081fd5b604051604081018181106001600160401b0382111715613a8457fe5b604052825181526020928301519281019290925250919050565b600080600060608486031215613ab2578283fd5b833592506020840135613ac4816149d2565b929592945050506040919091013590565b60008060008060008060c08789031215613aed578384fd5b863595506020870135945060408701356001600160401b038082111561394a578586fd5b600080600080600080600060e0888a031215613b2b578485fd5b87359650602088013595506040880135945060608801356001600160401b0380821115613b56578283fd5b613b628b838c0161384f565b955060808a0135915080821115613b77578283fd5b613b838b838c0161384f565b945060a08a0135935060c08a0135915080821115613b9f578283fd5b50613bac8a828b016137dd565b91505092959891949750929550565b60008060408385031215613bcd578182fd5b50508035926020909101359150565b600080600080600080600060e0888a031215613bf6578081fd5b873596506020880135955060408801356001600160401b0380821115613c1a578283fd5b613c268b838c0161384f565b965060608a0135915080821115613b56578283fd5b600080600080600060a08688031215613c52578283fd5b8535945060208601359350604086013592506060860135613c72816149d2565b949793965091946080013592915050565b600080600080600080600060e0888a031215613b2b578081fd5b60008060008060008060008060006101208a8c031215613cbb578283fd5b8935985060208a0135975060408a0135965060608a0135955060808a0135945060a08a01356001600160401b0380821115613cf4578485fd5b613d008d838e0161384f565b955060c08c0135915080821115613d15578485fd5b613d218d838e0161384f565b945060e08c013593506101008c0135915080821115613d3e578283fd5b50613d4b8c828d016137dd565b9150509295985092959850929598565b600080600080600080600080610100898b031215613d77578182fd5b505086359860208801359850604088013597606081013597506080810135965060a0810135955060c0810135945060e0013592509050565b6001600160a01b03169052565b8060005b6002811015613ddf578151845260209384019390910190600101613dc0565b50505050565b8060005b6003811015613ddf5781516001600160401b0316845260209384019390910190600101613de9565b15159052565b60008151808452815b81811015613e3c57602081850181015186830182015201613e20565b81811115613e4d5782602083870101525b50601f01601f19169290920160200192915050565b60008183825b6002811015613e87578151835260209283019290910190600101613e68565b50505060408201905092915050565b918252602082015260400190565b9283526020830191909152604082015260600190565b90815260200190565b6001600160a01b0391909116815260200190565b6001600160a01b03841681526020810183905260608101613ef7836149c5565b826040830152949350505050565b6001600160a01b039390931683526020830191909152604082015260600190565b6001600160a01b0393841681529190921660208201526001600160e01b0319909116604082015260600190565b6001600160a01b0393909316835260208301919091521515604082015260600190565b6001600160a01b039485168152602081019390935292166040820152901515606082015260800190565b901515815260200190565b6001600160e01b031991909116815260200190565b600060208252612b756020830184613e17565b60006040820160408352818554600180821660008114613ffa576001811461401857614051565b60028304607f16855260ff1983166060880152608087019350614051565b600283048086526140288a6149b9565b875b828110156140475781548a8201606001529084019060200161402a565b8901606001955050505b5050508092505050612b756020830184613e11565b60208101614073836149c5565b91905290565b60208082526022908201527f766f74696e672d7265702d657870656e6469747572652d6c6f636b2d6661696c604082015261195960f21b606082015260800190565b6020808252601a908201527f766f74696e672d7265702d6d6f74696f6e2d6e6f742d6f70656e000000000000604082015260600190565b60208082526015908201527464732d6d6174682d7375622d756e646572666c6f7760581b604082015260600190565b6020808252601d908201527f766f74696e672d7265702d696e73756666696369656e742d7374616b65000000604082015260600190565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b60208082526021908201527f766f74696e672d7265702d696e76616c69642d636f6c6f6e792d6164647265736040820152607360f81b606082015260800190565b60208082526014908201527364732d6d6174682d6d756c2d6f766572666c6f7760601b604082015260600190565b6020808252601e908201527f766f74696e672d7265702d616c72656164792d696e697469616c697365640000604082015260600190565b6020808252601a908201527f766f74696e672d7265702d7365637265742d6e6f2d6d61746368000000000000604082015260600190565b6020808252601d908201527f766f74696e672d7265702d6d6f74696f6e2d6e6f742d7374616b696e67000000604082015260600190565b6020808252601b908201527f766f74696e672d7265702d6e6f7468696e672d746f2d636c61696d0000000000604082015260600190565b6020808252818101527f766f74696e672d7265702d677265617465722d7468616e2d68616c662d776164604082015260600190565b6020808252601b908201527f766f74696e672d7265702d696e73756666696369656e742d7265700000000000604082015260600190565b60208082526014908201527364732d6d6174682d6164642d6f766572666c6f7760601b604082015260600190565b6020808252601c908201527f766f74696e672d7265702d696e76616c69642d726f6f742d6861736800000000604082015260600190565b6020808252601c908201527f766f74696e672d7265702d696e76616c69642d646f6d61696e2d696400000000604082015260600190565b6020808252601a908201527f766f74696e672d7265702d63616c6c65722d6e6f742d726f6f74000000000000604082015260600190565b6020808252601e908201527f636f6c6f6e792d70617472696369612d747265652d7a65726f2d73656c660000604082015260600190565b6020808252601f908201527f766f74696e672d7265702d696e76616c69642d646f6d61696e2d70726f6f6600604082015260600190565b6020808252601b908201527f657874656e73696f6e2d616c72656164792d696e7374616c6c65640000000000604082015260600190565b6020808252601f908201527f766f74696e672d7265702d696e76616c69642d757365722d6164647265737300604082015260600190565b602080825260159082015274766f74696e672d7265702d6e6f742d61637469766560581b604082015260600190565b6020808252601c908201527f766f74696e672d7265702d6d6f74696f6e2d6e6f742d636c6f73656400000000604082015260600190565b6020808252601c908201527f766f74696e672d7265702d6d6f74696f6e2d6e6f742d72657665616c00000000604082015260600190565b60208082526025908201527f636f6c6f6e792d70617472696369612d747265652d7a65726f2d73656c662d6c6040820152640cadccee8d60db1b606082015260800190565b602080825260139082015272766f74696e672d7265702d6261642d766f746560681b604082015260600190565b6020808252601590820152741d9bdd1a5b99cb5c995c0b5898590b585b5bdd5b9d605a1b604082015260600190565b6020808252602b908201527f766f74696e672d7265702d616c742d7461726765742d63616e6e6f742d62652d60408201526a626173652d636f6c6f6e7960a81b606082015260800190565b6020808252601b908201527f766f74696e672d7265702d696e76616c69642d736b696c6c2d69640000000000604082015260600190565b60208082526019908201527f766f74696e672d7265702d696e76616c69642d73656372657400000000000000604082015260600190565b60208082526021908201527f766f74696e672d7265702d6d6f74696f6e2d6e6f742d66696e616c697a61626c6040820152606560f81b606082015260800190565b6020808252601b908201527f766f74696e672d7265702d696e76616c69642d66756e6374696f6e0000000000604082015260600190565b6020808252601b908201527f766f74696e672d7265702d677265617465722d7468616e2d7761640000000000604082015260600190565b6020808252601b908201527f636f6c6f6e792d657874656e73696f6e2d646570726563617465640000000000604082015260600190565b6020808252601a908201527f766f74696e672d7265702d706572696f642d746f6f2d6c6f6e67000000000000604082015260600190565b6020808252601f908201527f766f74696e672d7265702d6d6f74696f6e2d6e6f742d636c61696d61626c6500604082015260600190565b60006020825261484b602083018451613de5565b60208301516080830152604083015160a0830152606083015160c0830152608083015160e083015260a0830151610100818185015260c08501519150610120828186015260e086015192506101406148a581870185613dbc565b918601519250610180916148bb86840185613dbc565b8187015193506148cf6101c0870185613dbc565b86015192506148e49050610200850183613e11565b61016085015191506148fa610220850183613e11565b840151905061490d610240840182613daf565b506101a083015161026083810152614929610280840182613e17565b949350505050565b96875260208701959095526001600160a01b0393841660408701529183166060860152608085015260a08401521660c082015260e00190565b948552602085019390935260408401919091526001600160a01b03166060830152608082015260a00190565b6040518181016001600160401b03811182821017156149b157fe5b604052919050565b60009081526020902090565b600881106149cf57fe5b50565b6001600160a01b03811681146149cf57600080fd5b80151581146149cf57600080fdfe0ae897e29e11067b0051d7f0047638509aeaeacf4e5c4146283aa5dd6ad03fd4a264697066735822122070c71b4c098633d9bd5f8191b72bc2b4fb870b5c9b448c842851c1827e11258364736f6c63430007030033"; diff --git a/src/contracts/extensions/votingReputation/1/index.d.ts b/src/contracts/extensions/votingReputation/1/index.d.ts new file mode 100644 index 000000000..910d6a045 --- /dev/null +++ b/src/contracts/extensions/votingReputation/1/index.d.ts @@ -0,0 +1,29 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { + BigNumberish, + EventDescription, + FunctionDescription, +} from "ethers/utils"; + +export interface TransactionOverrides { + gasLimit?: BigNumberish | Promise; + gasPrice?: BigNumberish | Promise; + nonce?: BigNumberish | Promise; + value?: BigNumberish | Promise; + from?: string | Promise; + chainId?: number | Promise; +} + +export interface TypedEventDescription< + T extends Pick +> extends EventDescription { + encodeTopics: T["encodeTopics"]; +} + +export interface TypedFunctionDescription< + T extends Pick +> extends FunctionDescription { + encode: T["encode"]; +} diff --git a/src/contracts/extensions/votingReputation/2/VotingReputation.d.ts b/src/contracts/extensions/votingReputation/2/VotingReputation.d.ts new file mode 100644 index 000000000..2f52bd6c0 --- /dev/null +++ b/src/contracts/extensions/votingReputation/2/VotingReputation.d.ts @@ -0,0 +1,2947 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-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 VotingReputationInterface extends Interface { + functions: { + authority: TypedFunctionDescription<{ encode([]: []): string }>; + + getCapabilityRoles: TypedFunctionDescription<{ + encode([_sig]: [Arrayish]): string; + }>; + + getColony: TypedFunctionDescription<{ encode([]: []): string }>; + + getDeprecated: TypedFunctionDescription<{ encode([]: []): string }>; + + owner: TypedFunctionDescription<{ encode([]: []): string }>; + + setAuthority: TypedFunctionDescription<{ + encode([authority_]: [string]): string; + }>; + + setOwner: TypedFunctionDescription<{ encode([owner_]: [string]): string }>; + + identifier: TypedFunctionDescription<{ encode([]: []): string }>; + + version: TypedFunctionDescription<{ encode([]: []): string }>; + + install: TypedFunctionDescription<{ encode([_colony]: [string]): string }>; + + initialise: TypedFunctionDescription<{ + encode([ + _totalStakeFraction, + _voterRewardFraction, + _userMinStakeFraction, + _maxVoteFraction, + _stakePeriod, + _submitPeriod, + _revealPeriod, + _escalationPeriod, + ]: [ + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish + ]): string; + }>; + + finishUpgrade: TypedFunctionDescription<{ encode([]: []): string }>; + + deprecate: TypedFunctionDescription<{ + encode([_deprecated]: [boolean]): string; + }>; + + uninstall: TypedFunctionDescription<{ encode([]: []): string }>; + + createMotion: TypedFunctionDescription<{ + encode([ + _domainId, + _childSkillIndex, + _altTarget, + _action, + _key, + _value, + _branchMask, + _siblings, + ]: [ + BigNumberish, + BigNumberish, + string, + Arrayish, + Arrayish, + Arrayish, + BigNumberish, + Arrayish[] + ]): string; + }>; + + createRootMotion: TypedFunctionDescription<{ + encode([_altTarget, _action, _key, _value, _branchMask, _siblings]: [ + string, + Arrayish, + Arrayish, + Arrayish, + BigNumberish, + Arrayish[] + ]): string; + }>; + + createDomainMotion: TypedFunctionDescription<{ + encode([ + _domainId, + _childSkillIndex, + _action, + _key, + _value, + _branchMask, + _siblings, + ]: [ + BigNumberish, + BigNumberish, + Arrayish, + Arrayish, + Arrayish, + BigNumberish, + Arrayish[] + ]): string; + }>; + + stakeMotion: TypedFunctionDescription<{ + encode([ + _motionId, + _permissionDomainId, + _childSkillIndex, + _vote, + _amount, + _key, + _value, + _branchMask, + _siblings, + ]: [ + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + Arrayish, + Arrayish, + BigNumberish, + Arrayish[] + ]): string; + }>; + + submitVote: TypedFunctionDescription<{ + encode([_motionId, _voteSecret, _key, _value, _branchMask, _siblings]: [ + BigNumberish, + Arrayish, + Arrayish, + Arrayish, + BigNumberish, + Arrayish[] + ]): string; + }>; + + revealVote: TypedFunctionDescription<{ + encode([_motionId, _salt, _vote, _key, _value, _branchMask, _siblings]: [ + BigNumberish, + Arrayish, + BigNumberish, + Arrayish, + Arrayish, + BigNumberish, + Arrayish[] + ]): string; + }>; + + escalateMotion: TypedFunctionDescription<{ + encode([ + _motionId, + _newDomainId, + _childSkillIndex, + _key, + _value, + _branchMask, + _siblings, + ]: [ + BigNumberish, + BigNumberish, + BigNumberish, + Arrayish, + Arrayish, + BigNumberish, + Arrayish[] + ]): string; + }>; + + finalizeMotion: TypedFunctionDescription<{ + encode([_motionId]: [BigNumberish]): string; + }>; + + claimReward: TypedFunctionDescription<{ + encode([ + _motionId, + _permissionDomainId, + _childSkillIndex, + _staker, + _vote, + ]: [ + BigNumberish, + BigNumberish, + BigNumberish, + string, + BigNumberish + ]): string; + }>; + + getTotalStakeFraction: TypedFunctionDescription<{ encode([]: []): string }>; + + getVoterRewardFraction: TypedFunctionDescription<{ + encode([]: []): string; + }>; + + getUserMinStakeFraction: TypedFunctionDescription<{ + encode([]: []): string; + }>; + + getMaxVoteFraction: TypedFunctionDescription<{ encode([]: []): string }>; + + getStakePeriod: TypedFunctionDescription<{ encode([]: []): string }>; + + getSubmitPeriod: TypedFunctionDescription<{ encode([]: []): string }>; + + getRevealPeriod: TypedFunctionDescription<{ encode([]: []): string }>; + + getEscalationPeriod: TypedFunctionDescription<{ encode([]: []): string }>; + + getMotionCount: TypedFunctionDescription<{ encode([]: []): string }>; + + getMotion: TypedFunctionDescription<{ + encode([_motionId]: [BigNumberish]): string; + }>; + + getStake: TypedFunctionDescription<{ + encode([_motionId, _staker, _vote]: [ + BigNumberish, + string, + BigNumberish + ]): string; + }>; + + getExpenditureMotionCount: TypedFunctionDescription<{ + encode([_structHash]: [Arrayish]): string; + }>; + + getExpenditurePastVote: TypedFunctionDescription<{ + encode([_actionHash]: [Arrayish]): string; + }>; + + getMotionState: TypedFunctionDescription<{ + encode([_motionId]: [BigNumberish]): string; + }>; + + getVoterReward: TypedFunctionDescription<{ + encode([_motionId, _voterRep]: [BigNumberish, BigNumberish]): string; + }>; + + getVoterRewardRange: TypedFunctionDescription<{ + encode([_motionId, _voterRep, _voterAddress]: [ + BigNumberish, + BigNumberish, + string + ]): string; + }>; + + getStakerReward: TypedFunctionDescription<{ + encode([_motionId, _staker, _vote]: [ + BigNumberish, + string, + BigNumberish + ]): string; + }>; + + createClaimDelayAction: TypedFunctionDescription<{ + encode([action, value]: [Arrayish, BigNumberish]): string; + }>; + }; + + events: { + ExtensionInitialised: TypedEventDescription<{ + encodeTopics([]: []): string[]; + }>; + + LogSetAuthority: TypedEventDescription<{ + encodeTopics([authority]: [string | null]): string[]; + }>; + + LogSetOwner: TypedEventDescription<{ + encodeTopics([owner]: [string | null]): string[]; + }>; + + MotionCreated: TypedEventDescription<{ + encodeTopics([motionId, creator, domainId]: [ + BigNumberish | null, + null, + BigNumberish | null + ]): string[]; + }>; + + MotionEscalated: TypedEventDescription<{ + encodeTopics([motionId, escalator, domainId, newDomainId]: [ + BigNumberish | null, + null, + BigNumberish | null, + BigNumberish | null + ]): string[]; + }>; + + MotionEventSet: TypedEventDescription<{ + encodeTopics([motionId, eventIndex]: [ + BigNumberish | null, + null + ]): string[]; + }>; + + MotionFinalized: TypedEventDescription<{ + encodeTopics([motionId, action, executed]: [ + BigNumberish | null, + null, + null + ]): string[]; + }>; + + MotionRewardClaimed: TypedEventDescription<{ + encodeTopics([motionId, staker, vote, amount]: [ + BigNumberish | null, + string | null, + BigNumberish | null, + null + ]): string[]; + }>; + + MotionStaked: TypedEventDescription<{ + encodeTopics([motionId, staker, vote, amount]: [ + BigNumberish | null, + string | null, + BigNumberish | null, + null + ]): string[]; + }>; + + MotionVoteRevealed: TypedEventDescription<{ + encodeTopics([motionId, voter, vote]: [ + BigNumberish | null, + string | null, + BigNumberish | null + ]): string[]; + }>; + + MotionVoteSubmitted: TypedEventDescription<{ + encodeTopics([motionId, voter]: [ + BigNumberish | null, + string | null + ]): string[]; + }>; + }; +} + +export class VotingReputation extends Contract { + connect(signerOrProvider: Signer | Provider | string): VotingReputation; + attach(addressOrName: string): VotingReputation; + deployed(): Promise; + + on(event: EventFilter | string, listener: Listener): VotingReputation; + once(event: EventFilter | string, listener: Listener): VotingReputation; + addListener( + eventName: EventFilter | string, + listener: Listener + ): VotingReputation; + removeAllListeners(eventName: EventFilter | string): VotingReputation; + removeListener(eventName: any, listener: Listener): VotingReputation; + + interface: VotingReputationInterface; + + functions: { + authority(overrides?: TransactionOverrides): Promise; + + "authority()"(overrides?: TransactionOverrides): Promise; + + getCapabilityRoles( + _sig: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + "getCapabilityRoles(bytes4)"( + _sig: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + getColony(overrides?: TransactionOverrides): Promise; + + "getColony()"(overrides?: TransactionOverrides): Promise; + + getDeprecated(overrides?: TransactionOverrides): Promise; + + "getDeprecated()"(overrides?: TransactionOverrides): Promise; + + owner(overrides?: TransactionOverrides): Promise; + + "owner()"(overrides?: TransactionOverrides): Promise; + + setAuthority( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + "setAuthority(address)"( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + setOwner( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + "setOwner(address)"( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the identifier of the extension + */ + identifier(overrides?: TransactionOverrides): Promise; + + /** + * Returns the identifier of the extension + */ + "identifier()"(overrides?: TransactionOverrides): Promise; + + /** + * Return the version number + */ + version(overrides?: TransactionOverrides): Promise; + + /** + * Return the version number + */ + "version()"(overrides?: TransactionOverrides): Promise; + + /** + * Install the extension + * @param _colony Base colony for the installation + */ + install( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Install the extension + * @param _colony Base colony for the installation + */ + "install(address)"( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Initialise the extension + * @param _escalationPeriod The length of the escalation period in seconds + * @param _maxVoteFraction The fraction of the domain's reputation which must submit for quick-end + * @param _revealPeriod The length of the reveal period in seconds + * @param _stakePeriod The length of the staking period in seconds + * @param _submitPeriod The length of the submit period in seconds + * @param _totalStakeFraction The fraction of the domain's reputation we need to stake + * @param _userMinStakeFraction The minimum per-user stake as fraction of total stake + * @param _voterRewardFraction The fraction of the total stake paid out to voters as rewards + */ + initialise( + _totalStakeFraction: BigNumberish, + _voterRewardFraction: BigNumberish, + _userMinStakeFraction: BigNumberish, + _maxVoteFraction: BigNumberish, + _stakePeriod: BigNumberish, + _submitPeriod: BigNumberish, + _revealPeriod: BigNumberish, + _escalationPeriod: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Initialise the extension + * @param _escalationPeriod The length of the escalation period in seconds + * @param _maxVoteFraction The fraction of the domain's reputation which must submit for quick-end + * @param _revealPeriod The length of the reveal period in seconds + * @param _stakePeriod The length of the staking period in seconds + * @param _submitPeriod The length of the submit period in seconds + * @param _totalStakeFraction The fraction of the domain's reputation we need to stake + * @param _userMinStakeFraction The minimum per-user stake as fraction of total stake + * @param _voterRewardFraction The fraction of the total stake paid out to voters as rewards + */ + "initialise(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)"( + _totalStakeFraction: BigNumberish, + _voterRewardFraction: BigNumberish, + _userMinStakeFraction: BigNumberish, + _maxVoteFraction: BigNumberish, + _stakePeriod: BigNumberish, + _submitPeriod: BigNumberish, + _revealPeriod: BigNumberish, + _escalationPeriod: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when upgrading the extension + */ + finishUpgrade( + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when upgrading the extension + */ + "finishUpgrade()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + deprecate( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + "deprecate(bool)"( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when uninstalling the extension + */ + uninstall(overrides?: TransactionOverrides): Promise; + + /** + * Called when uninstalling the extension + */ + "uninstall()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Create a motion + * @param _action A bytes array encoding a function call + * @param _altTarget The contract to which we send the action (0x0 for the colony) + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex The childSkillIndex pointing to the domain of the action + * @param _domainId The domain where we vote on the motion + * @param _key Reputation tree key for the root domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the root domain + */ + createMotion( + _domainId: BigNumberish, + _childSkillIndex: BigNumberish, + _altTarget: string, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Create a motion + * @param _action A bytes array encoding a function call + * @param _altTarget The contract to which we send the action (0x0 for the colony) + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex The childSkillIndex pointing to the domain of the action + * @param _domainId The domain where we vote on the motion + * @param _key Reputation tree key for the root domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the root domain + */ + "createMotion(uint256,uint256,address,bytes,bytes,bytes,uint256,bytes32[])"( + _domainId: BigNumberish, + _childSkillIndex: BigNumberish, + _altTarget: string, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Create a motion in the root domain (DEPRECATED) + * @param _action A bytes array encoding a function call + * @param _altTarget The contract to which we send the action (0x0 for the colony) + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the root domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the root domain + */ + createRootMotion( + _altTarget: string, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Create a motion in the root domain (DEPRECATED) + * @param _action A bytes array encoding a function call + * @param _altTarget The contract to which we send the action (0x0 for the colony) + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the root domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the root domain + */ + "createRootMotion(address,bytes,bytes,bytes,uint256,bytes32[])"( + _altTarget: string, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Create a motion in any domain (DEPRECATED) + * @param _action A bytes array encoding a function call + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex The childSkillIndex pointing to the domain of the action + * @param _domainId The domain where we vote on the motion + * @param _key Reputation tree key for the domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the domain + */ + createDomainMotion( + _domainId: BigNumberish, + _childSkillIndex: BigNumberish, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Create a motion in any domain (DEPRECATED) + * @param _action A bytes array encoding a function call + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex The childSkillIndex pointing to the domain of the action + * @param _domainId The domain where we vote on the motion + * @param _key Reputation tree key for the domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the domain + */ + "createDomainMotion(uint256,uint256,bytes,bytes,bytes,uint256,bytes32[])"( + _domainId: BigNumberish, + _childSkillIndex: BigNumberish, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Stake on a motion + * @param _amount The amount of tokens being staked + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex For the domain in which the motion is occurring + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _permissionDomainId The domain where the extension has the arbitration permission + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + stakeMotion( + _motionId: BigNumberish, + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _vote: BigNumberish, + _amount: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Stake on a motion + * @param _amount The amount of tokens being staked + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex For the domain in which the motion is occurring + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _permissionDomainId The domain where the extension has the arbitration permission + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + "stakeMotion(uint256,uint256,uint256,uint256,uint256,bytes,bytes,uint256,bytes32[])"( + _motionId: BigNumberish, + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _vote: BigNumberish, + _amount: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Submit a vote secret for a motion + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _voteSecret The hashed vote secret + */ + submitVote( + _motionId: BigNumberish, + _voteSecret: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Submit a vote secret for a motion + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _voteSecret The hashed vote secret + */ + "submitVote(uint256,bytes32,bytes,bytes,uint256,bytes32[])"( + _motionId: BigNumberish, + _voteSecret: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Reveal a vote secret for a motion + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _salt The salt used to hash the vote + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + revealVote( + _motionId: BigNumberish, + _salt: Arrayish, + _vote: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Reveal a vote secret for a motion + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _salt The salt used to hash the vote + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + "revealVote(uint256,bytes32,uint256,bytes,bytes,uint256,bytes32[])"( + _motionId: BigNumberish, + _salt: Arrayish, + _vote: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Escalate a motion to a higher domain + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex For the current domain, relative to the escalated domain + * @param _key Reputation tree key for the new domain + * @param _motionId The id of the motion + * @param _newDomainId The desired domain of escalation + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the new domain + */ + escalateMotion( + _motionId: BigNumberish, + _newDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Escalate a motion to a higher domain + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex For the current domain, relative to the escalated domain + * @param _key Reputation tree key for the new domain + * @param _motionId The id of the motion + * @param _newDomainId The desired domain of escalation + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the new domain + */ + "escalateMotion(uint256,uint256,uint256,bytes,bytes,uint256,bytes32[])"( + _motionId: BigNumberish, + _newDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + finalizeMotion( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "finalizeMotion(uint256)"( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Claim the staker's reward + * @param _childSkillIndex For the domain in which the motion is occurring + * @param _motionId The id of the motion + * @param _permissionDomainId The domain where the extension has the arbitration permission + * @param _staker The staker whose reward is being claimed + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + claimReward( + _motionId: BigNumberish, + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Claim the staker's reward + * @param _childSkillIndex For the domain in which the motion is occurring + * @param _motionId The id of the motion + * @param _permissionDomainId The domain where the extension has the arbitration permission + * @param _staker The staker whose reward is being claimed + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + "claimReward(uint256,uint256,uint256,address,uint256)"( + _motionId: BigNumberish, + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the total stake fraction + */ + getTotalStakeFraction(overrides?: TransactionOverrides): Promise; + + /** + * Get the total stake fraction + */ + "getTotalStakeFraction()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the voter reward fraction + */ + getVoterRewardFraction( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the voter reward fraction + */ + "getVoterRewardFraction()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the user min stake fraction + */ + getUserMinStakeFraction( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the user min stake fraction + */ + "getUserMinStakeFraction()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the max vote fraction + */ + getMaxVoteFraction(overrides?: TransactionOverrides): Promise; + + /** + * Get the max vote fraction + */ + "getMaxVoteFraction()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the stake period + */ + getStakePeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the stake period + */ + "getStakePeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the submit period + */ + getSubmitPeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the submit period + */ + "getSubmitPeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the reveal period + */ + getRevealPeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the reveal period + */ + "getRevealPeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the escalation period + */ + getEscalationPeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the escalation period + */ + "getEscalationPeriod()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the total motion count + */ + getMotionCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the total motion count + */ + "getMotionCount()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the data for a single motion + * @param _motionId The id of the motion + */ + getMotion( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [ + BigNumber[], + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber[], + BigNumber[], + BigNumber[], + boolean, + boolean, + string, + string + ] & { + events: BigNumber[]; + rootHash: string; + domainId: BigNumber; + skillId: BigNumber; + skillRep: BigNumber; + repSubmitted: BigNumber; + paidVoterComp: BigNumber; + pastVoterComp: BigNumber[]; + stakes: BigNumber[]; + votes: BigNumber[]; + escalated: boolean; + finalized: boolean; + altTarget: string; + action: string; + } + >; + + /** + * Get the data for a single motion + * @param _motionId The id of the motion + */ + "getMotion(uint256)"( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [ + BigNumber[], + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber[], + BigNumber[], + BigNumber[], + boolean, + boolean, + string, + string + ] & { + events: BigNumber[]; + rootHash: string; + domainId: BigNumber; + skillId: BigNumber; + skillRep: BigNumber; + repSubmitted: BigNumber; + paidVoterComp: BigNumber; + pastVoterComp: BigNumber[]; + stakes: BigNumber[]; + votes: BigNumber[]; + escalated: boolean; + finalized: boolean; + altTarget: string; + action: string; + } + >; + + /** + * Get a user's stake on a motion + * @param _motionId The id of the motion + * @param _staker The staker address + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + getStake( + _motionId: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a user's stake on a motion + * @param _motionId The id of the motion + * @param _staker The staker address + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + "getStake(uint256,address,uint256)"( + _motionId: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of ongoing motions for a single expenditure / expenditure slot + * @param _structHash The hash of the expenditureId or expenditureId*expenditureSlot + */ + getExpenditureMotionCount( + _structHash: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of ongoing motions for a single expenditure / expenditure slot + * @param _structHash The hash of the expenditureId or expenditureId*expenditureSlot + */ + "getExpenditureMotionCount(bytes32)"( + _structHash: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the largest past vote on a single expenditure variable + * @param _actionHash The hash of the particular expenditure action + */ + getExpenditurePastVote( + _actionHash: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the largest past vote on a single expenditure variable + * @param _actionHash The hash of the particular expenditure action + */ + "getExpenditurePastVote(bytes32)"( + _actionHash: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the current state of the motion + */ + getMotionState( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the current state of the motion + */ + "getMotionState(uint256)"( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the voter reward NB This function will only return a meaningful value if in the reveal state. Prior to the reveal state, getVoterRewardRange should be used. + * @param _motionId The id of the motion + * @param _voterRep The reputation the voter has in the domain + */ + getVoterReward( + _motionId: BigNumberish, + _voterRep: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the voter reward NB This function will only return a meaningful value if in the reveal state. Prior to the reveal state, getVoterRewardRange should be used. + * @param _motionId The id of the motion + * @param _voterRep The reputation the voter has in the domain + */ + "getVoterReward(uint256,uint256)"( + _motionId: BigNumberish, + _voterRep: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the range of potential rewards for a voter on a specific motion, intended to be used when the motion is in the reveal state. Once a motion is in the reveal state the reward is known, and getVoterRewardRange should be used. + * @param _motionId The id of the motion + * @param _voterAddress The address the user will be voting as + * @param _voterRep The reputation the voter has in the domain + */ + getVoterRewardRange( + _motionId: BigNumberish, + _voterRep: BigNumberish, + _voterAddress: string, + overrides?: TransactionOverrides + ): Promise<[BigNumber, BigNumber]>; + + /** + * Get the range of potential rewards for a voter on a specific motion, intended to be used when the motion is in the reveal state. Once a motion is in the reveal state the reward is known, and getVoterRewardRange should be used. + * @param _motionId The id of the motion + * @param _voterAddress The address the user will be voting as + * @param _voterRep The reputation the voter has in the domain + */ + "getVoterRewardRange(uint256,uint256,address)"( + _motionId: BigNumberish, + _voterRep: BigNumberish, + _voterAddress: string, + overrides?: TransactionOverrides + ): Promise<[BigNumber, BigNumber]>; + + /** + * Get the staker reward + * @param _motionId The id of the motion + * @param _staker The staker's address + * @param _vote The vote (0 = NAY, 1 = YAY) + */ + getStakerReward( + _motionId: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise<[BigNumber, BigNumber]>; + + /** + * Get the staker reward + * @param _motionId The id of the motion + * @param _staker The staker's address + * @param _vote The vote (0 = NAY, 1 = YAY) + */ + "getStakerReward(uint256,address,uint256)"( + _motionId: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise<[BigNumber, BigNumber]>; + + createClaimDelayAction( + action: Arrayish, + value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "createClaimDelayAction(bytes,uint256)"( + action: Arrayish, + value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + }; + + authority(overrides?: TransactionOverrides): Promise; + + "authority()"(overrides?: TransactionOverrides): Promise; + + getCapabilityRoles( + _sig: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + "getCapabilityRoles(bytes4)"( + _sig: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + getColony(overrides?: TransactionOverrides): Promise; + + "getColony()"(overrides?: TransactionOverrides): Promise; + + getDeprecated(overrides?: TransactionOverrides): Promise; + + "getDeprecated()"(overrides?: TransactionOverrides): Promise; + + owner(overrides?: TransactionOverrides): Promise; + + "owner()"(overrides?: TransactionOverrides): Promise; + + setAuthority( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + "setAuthority(address)"( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + setOwner( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + "setOwner(address)"( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the identifier of the extension + */ + identifier(overrides?: TransactionOverrides): Promise; + + /** + * Returns the identifier of the extension + */ + "identifier()"(overrides?: TransactionOverrides): Promise; + + /** + * Return the version number + */ + version(overrides?: TransactionOverrides): Promise; + + /** + * Return the version number + */ + "version()"(overrides?: TransactionOverrides): Promise; + + /** + * Install the extension + * @param _colony Base colony for the installation + */ + install( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Install the extension + * @param _colony Base colony for the installation + */ + "install(address)"( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Initialise the extension + * @param _escalationPeriod The length of the escalation period in seconds + * @param _maxVoteFraction The fraction of the domain's reputation which must submit for quick-end + * @param _revealPeriod The length of the reveal period in seconds + * @param _stakePeriod The length of the staking period in seconds + * @param _submitPeriod The length of the submit period in seconds + * @param _totalStakeFraction The fraction of the domain's reputation we need to stake + * @param _userMinStakeFraction The minimum per-user stake as fraction of total stake + * @param _voterRewardFraction The fraction of the total stake paid out to voters as rewards + */ + initialise( + _totalStakeFraction: BigNumberish, + _voterRewardFraction: BigNumberish, + _userMinStakeFraction: BigNumberish, + _maxVoteFraction: BigNumberish, + _stakePeriod: BigNumberish, + _submitPeriod: BigNumberish, + _revealPeriod: BigNumberish, + _escalationPeriod: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Initialise the extension + * @param _escalationPeriod The length of the escalation period in seconds + * @param _maxVoteFraction The fraction of the domain's reputation which must submit for quick-end + * @param _revealPeriod The length of the reveal period in seconds + * @param _stakePeriod The length of the staking period in seconds + * @param _submitPeriod The length of the submit period in seconds + * @param _totalStakeFraction The fraction of the domain's reputation we need to stake + * @param _userMinStakeFraction The minimum per-user stake as fraction of total stake + * @param _voterRewardFraction The fraction of the total stake paid out to voters as rewards + */ + "initialise(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)"( + _totalStakeFraction: BigNumberish, + _voterRewardFraction: BigNumberish, + _userMinStakeFraction: BigNumberish, + _maxVoteFraction: BigNumberish, + _stakePeriod: BigNumberish, + _submitPeriod: BigNumberish, + _revealPeriod: BigNumberish, + _escalationPeriod: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when upgrading the extension + */ + finishUpgrade(overrides?: TransactionOverrides): Promise; + + /** + * Called when upgrading the extension + */ + "finishUpgrade()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + deprecate( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + "deprecate(bool)"( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when uninstalling the extension + */ + uninstall(overrides?: TransactionOverrides): Promise; + + /** + * Called when uninstalling the extension + */ + "uninstall()"(overrides?: TransactionOverrides): Promise; + + /** + * Create a motion + * @param _action A bytes array encoding a function call + * @param _altTarget The contract to which we send the action (0x0 for the colony) + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex The childSkillIndex pointing to the domain of the action + * @param _domainId The domain where we vote on the motion + * @param _key Reputation tree key for the root domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the root domain + */ + createMotion( + _domainId: BigNumberish, + _childSkillIndex: BigNumberish, + _altTarget: string, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Create a motion + * @param _action A bytes array encoding a function call + * @param _altTarget The contract to which we send the action (0x0 for the colony) + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex The childSkillIndex pointing to the domain of the action + * @param _domainId The domain where we vote on the motion + * @param _key Reputation tree key for the root domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the root domain + */ + "createMotion(uint256,uint256,address,bytes,bytes,bytes,uint256,bytes32[])"( + _domainId: BigNumberish, + _childSkillIndex: BigNumberish, + _altTarget: string, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Create a motion in the root domain (DEPRECATED) + * @param _action A bytes array encoding a function call + * @param _altTarget The contract to which we send the action (0x0 for the colony) + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the root domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the root domain + */ + createRootMotion( + _altTarget: string, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Create a motion in the root domain (DEPRECATED) + * @param _action A bytes array encoding a function call + * @param _altTarget The contract to which we send the action (0x0 for the colony) + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the root domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the root domain + */ + "createRootMotion(address,bytes,bytes,bytes,uint256,bytes32[])"( + _altTarget: string, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Create a motion in any domain (DEPRECATED) + * @param _action A bytes array encoding a function call + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex The childSkillIndex pointing to the domain of the action + * @param _domainId The domain where we vote on the motion + * @param _key Reputation tree key for the domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the domain + */ + createDomainMotion( + _domainId: BigNumberish, + _childSkillIndex: BigNumberish, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Create a motion in any domain (DEPRECATED) + * @param _action A bytes array encoding a function call + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex The childSkillIndex pointing to the domain of the action + * @param _domainId The domain where we vote on the motion + * @param _key Reputation tree key for the domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the domain + */ + "createDomainMotion(uint256,uint256,bytes,bytes,bytes,uint256,bytes32[])"( + _domainId: BigNumberish, + _childSkillIndex: BigNumberish, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Stake on a motion + * @param _amount The amount of tokens being staked + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex For the domain in which the motion is occurring + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _permissionDomainId The domain where the extension has the arbitration permission + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + stakeMotion( + _motionId: BigNumberish, + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _vote: BigNumberish, + _amount: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Stake on a motion + * @param _amount The amount of tokens being staked + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex For the domain in which the motion is occurring + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _permissionDomainId The domain where the extension has the arbitration permission + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + "stakeMotion(uint256,uint256,uint256,uint256,uint256,bytes,bytes,uint256,bytes32[])"( + _motionId: BigNumberish, + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _vote: BigNumberish, + _amount: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Submit a vote secret for a motion + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _voteSecret The hashed vote secret + */ + submitVote( + _motionId: BigNumberish, + _voteSecret: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Submit a vote secret for a motion + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _voteSecret The hashed vote secret + */ + "submitVote(uint256,bytes32,bytes,bytes,uint256,bytes32[])"( + _motionId: BigNumberish, + _voteSecret: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Reveal a vote secret for a motion + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _salt The salt used to hash the vote + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + revealVote( + _motionId: BigNumberish, + _salt: Arrayish, + _vote: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Reveal a vote secret for a motion + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _salt The salt used to hash the vote + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + "revealVote(uint256,bytes32,uint256,bytes,bytes,uint256,bytes32[])"( + _motionId: BigNumberish, + _salt: Arrayish, + _vote: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Escalate a motion to a higher domain + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex For the current domain, relative to the escalated domain + * @param _key Reputation tree key for the new domain + * @param _motionId The id of the motion + * @param _newDomainId The desired domain of escalation + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the new domain + */ + escalateMotion( + _motionId: BigNumberish, + _newDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Escalate a motion to a higher domain + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex For the current domain, relative to the escalated domain + * @param _key Reputation tree key for the new domain + * @param _motionId The id of the motion + * @param _newDomainId The desired domain of escalation + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the new domain + */ + "escalateMotion(uint256,uint256,uint256,bytes,bytes,uint256,bytes32[])"( + _motionId: BigNumberish, + _newDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + finalizeMotion( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "finalizeMotion(uint256)"( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Claim the staker's reward + * @param _childSkillIndex For the domain in which the motion is occurring + * @param _motionId The id of the motion + * @param _permissionDomainId The domain where the extension has the arbitration permission + * @param _staker The staker whose reward is being claimed + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + claimReward( + _motionId: BigNumberish, + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Claim the staker's reward + * @param _childSkillIndex For the domain in which the motion is occurring + * @param _motionId The id of the motion + * @param _permissionDomainId The domain where the extension has the arbitration permission + * @param _staker The staker whose reward is being claimed + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + "claimReward(uint256,uint256,uint256,address,uint256)"( + _motionId: BigNumberish, + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the total stake fraction + */ + getTotalStakeFraction(overrides?: TransactionOverrides): Promise; + + /** + * Get the total stake fraction + */ + "getTotalStakeFraction()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the voter reward fraction + */ + getVoterRewardFraction(overrides?: TransactionOverrides): Promise; + + /** + * Get the voter reward fraction + */ + "getVoterRewardFraction()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the user min stake fraction + */ + getUserMinStakeFraction(overrides?: TransactionOverrides): Promise; + + /** + * Get the user min stake fraction + */ + "getUserMinStakeFraction()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the max vote fraction + */ + getMaxVoteFraction(overrides?: TransactionOverrides): Promise; + + /** + * Get the max vote fraction + */ + "getMaxVoteFraction()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the stake period + */ + getStakePeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the stake period + */ + "getStakePeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the submit period + */ + getSubmitPeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the submit period + */ + "getSubmitPeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the reveal period + */ + getRevealPeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the reveal period + */ + "getRevealPeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the escalation period + */ + getEscalationPeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the escalation period + */ + "getEscalationPeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the total motion count + */ + getMotionCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the total motion count + */ + "getMotionCount()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the data for a single motion + * @param _motionId The id of the motion + */ + getMotion( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [ + BigNumber[], + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber[], + BigNumber[], + BigNumber[], + boolean, + boolean, + string, + string + ] & { + events: BigNumber[]; + rootHash: string; + domainId: BigNumber; + skillId: BigNumber; + skillRep: BigNumber; + repSubmitted: BigNumber; + paidVoterComp: BigNumber; + pastVoterComp: BigNumber[]; + stakes: BigNumber[]; + votes: BigNumber[]; + escalated: boolean; + finalized: boolean; + altTarget: string; + action: string; + } + >; + + /** + * Get the data for a single motion + * @param _motionId The id of the motion + */ + "getMotion(uint256)"( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise< + [ + BigNumber[], + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber[], + BigNumber[], + BigNumber[], + boolean, + boolean, + string, + string + ] & { + events: BigNumber[]; + rootHash: string; + domainId: BigNumber; + skillId: BigNumber; + skillRep: BigNumber; + repSubmitted: BigNumber; + paidVoterComp: BigNumber; + pastVoterComp: BigNumber[]; + stakes: BigNumber[]; + votes: BigNumber[]; + escalated: boolean; + finalized: boolean; + altTarget: string; + action: string; + } + >; + + /** + * Get a user's stake on a motion + * @param _motionId The id of the motion + * @param _staker The staker address + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + getStake( + _motionId: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a user's stake on a motion + * @param _motionId The id of the motion + * @param _staker The staker address + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + "getStake(uint256,address,uint256)"( + _motionId: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of ongoing motions for a single expenditure / expenditure slot + * @param _structHash The hash of the expenditureId or expenditureId*expenditureSlot + */ + getExpenditureMotionCount( + _structHash: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of ongoing motions for a single expenditure / expenditure slot + * @param _structHash The hash of the expenditureId or expenditureId*expenditureSlot + */ + "getExpenditureMotionCount(bytes32)"( + _structHash: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the largest past vote on a single expenditure variable + * @param _actionHash The hash of the particular expenditure action + */ + getExpenditurePastVote( + _actionHash: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the largest past vote on a single expenditure variable + * @param _actionHash The hash of the particular expenditure action + */ + "getExpenditurePastVote(bytes32)"( + _actionHash: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the current state of the motion + */ + getMotionState( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the current state of the motion + */ + "getMotionState(uint256)"( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the voter reward NB This function will only return a meaningful value if in the reveal state. Prior to the reveal state, getVoterRewardRange should be used. + * @param _motionId The id of the motion + * @param _voterRep The reputation the voter has in the domain + */ + getVoterReward( + _motionId: BigNumberish, + _voterRep: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the voter reward NB This function will only return a meaningful value if in the reveal state. Prior to the reveal state, getVoterRewardRange should be used. + * @param _motionId The id of the motion + * @param _voterRep The reputation the voter has in the domain + */ + "getVoterReward(uint256,uint256)"( + _motionId: BigNumberish, + _voterRep: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the range of potential rewards for a voter on a specific motion, intended to be used when the motion is in the reveal state. Once a motion is in the reveal state the reward is known, and getVoterRewardRange should be used. + * @param _motionId The id of the motion + * @param _voterAddress The address the user will be voting as + * @param _voterRep The reputation the voter has in the domain + */ + getVoterRewardRange( + _motionId: BigNumberish, + _voterRep: BigNumberish, + _voterAddress: string, + overrides?: TransactionOverrides + ): Promise<[BigNumber, BigNumber]>; + + /** + * Get the range of potential rewards for a voter on a specific motion, intended to be used when the motion is in the reveal state. Once a motion is in the reveal state the reward is known, and getVoterRewardRange should be used. + * @param _motionId The id of the motion + * @param _voterAddress The address the user will be voting as + * @param _voterRep The reputation the voter has in the domain + */ + "getVoterRewardRange(uint256,uint256,address)"( + _motionId: BigNumberish, + _voterRep: BigNumberish, + _voterAddress: string, + overrides?: TransactionOverrides + ): Promise<[BigNumber, BigNumber]>; + + /** + * Get the staker reward + * @param _motionId The id of the motion + * @param _staker The staker's address + * @param _vote The vote (0 = NAY, 1 = YAY) + */ + getStakerReward( + _motionId: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise<[BigNumber, BigNumber]>; + + /** + * Get the staker reward + * @param _motionId The id of the motion + * @param _staker The staker's address + * @param _vote The vote (0 = NAY, 1 = YAY) + */ + "getStakerReward(uint256,address,uint256)"( + _motionId: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise<[BigNumber, BigNumber]>; + + createClaimDelayAction( + action: Arrayish, + value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "createClaimDelayAction(bytes,uint256)"( + action: Arrayish, + value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + filters: { + ExtensionInitialised(): EventFilter; + + LogSetAuthority(authority: string | null): EventFilter; + + LogSetOwner(owner: string | null): EventFilter; + + MotionCreated( + motionId: BigNumberish | null, + creator: null, + domainId: BigNumberish | null + ): EventFilter; + + MotionEscalated( + motionId: BigNumberish | null, + escalator: null, + domainId: BigNumberish | null, + newDomainId: BigNumberish | null + ): EventFilter; + + MotionEventSet( + motionId: BigNumberish | null, + eventIndex: null + ): EventFilter; + + MotionFinalized( + motionId: BigNumberish | null, + action: null, + executed: null + ): EventFilter; + + MotionRewardClaimed( + motionId: BigNumberish | null, + staker: string | null, + vote: BigNumberish | null, + amount: null + ): EventFilter; + + MotionStaked( + motionId: BigNumberish | null, + staker: string | null, + vote: BigNumberish | null, + amount: null + ): EventFilter; + + MotionVoteRevealed( + motionId: BigNumberish | null, + voter: string | null, + vote: BigNumberish | null + ): EventFilter; + + MotionVoteSubmitted( + motionId: BigNumberish | null, + voter: string | null + ): EventFilter; + }; + + estimate: { + authority(overrides?: TransactionOverrides): Promise; + + "authority()"(overrides?: TransactionOverrides): Promise; + + getCapabilityRoles( + _sig: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + "getCapabilityRoles(bytes4)"( + _sig: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + getColony(overrides?: TransactionOverrides): Promise; + + "getColony()"(overrides?: TransactionOverrides): Promise; + + getDeprecated(overrides?: TransactionOverrides): Promise; + + "getDeprecated()"(overrides?: TransactionOverrides): Promise; + + owner(overrides?: TransactionOverrides): Promise; + + "owner()"(overrides?: TransactionOverrides): Promise; + + setAuthority( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + "setAuthority(address)"( + authority_: string, + overrides?: TransactionOverrides + ): Promise; + + setOwner( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + "setOwner(address)"( + owner_: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Returns the identifier of the extension + */ + identifier(overrides?: TransactionOverrides): Promise; + + /** + * Returns the identifier of the extension + */ + "identifier()"(overrides?: TransactionOverrides): Promise; + + /** + * Return the version number + */ + version(overrides?: TransactionOverrides): Promise; + + /** + * Return the version number + */ + "version()"(overrides?: TransactionOverrides): Promise; + + /** + * Install the extension + * @param _colony Base colony for the installation + */ + install( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Install the extension + * @param _colony Base colony for the installation + */ + "install(address)"( + _colony: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Initialise the extension + * @param _escalationPeriod The length of the escalation period in seconds + * @param _maxVoteFraction The fraction of the domain's reputation which must submit for quick-end + * @param _revealPeriod The length of the reveal period in seconds + * @param _stakePeriod The length of the staking period in seconds + * @param _submitPeriod The length of the submit period in seconds + * @param _totalStakeFraction The fraction of the domain's reputation we need to stake + * @param _userMinStakeFraction The minimum per-user stake as fraction of total stake + * @param _voterRewardFraction The fraction of the total stake paid out to voters as rewards + */ + initialise( + _totalStakeFraction: BigNumberish, + _voterRewardFraction: BigNumberish, + _userMinStakeFraction: BigNumberish, + _maxVoteFraction: BigNumberish, + _stakePeriod: BigNumberish, + _submitPeriod: BigNumberish, + _revealPeriod: BigNumberish, + _escalationPeriod: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Initialise the extension + * @param _escalationPeriod The length of the escalation period in seconds + * @param _maxVoteFraction The fraction of the domain's reputation which must submit for quick-end + * @param _revealPeriod The length of the reveal period in seconds + * @param _stakePeriod The length of the staking period in seconds + * @param _submitPeriod The length of the submit period in seconds + * @param _totalStakeFraction The fraction of the domain's reputation we need to stake + * @param _userMinStakeFraction The minimum per-user stake as fraction of total stake + * @param _voterRewardFraction The fraction of the total stake paid out to voters as rewards + */ + "initialise(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)"( + _totalStakeFraction: BigNumberish, + _voterRewardFraction: BigNumberish, + _userMinStakeFraction: BigNumberish, + _maxVoteFraction: BigNumberish, + _stakePeriod: BigNumberish, + _submitPeriod: BigNumberish, + _revealPeriod: BigNumberish, + _escalationPeriod: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when upgrading the extension + */ + finishUpgrade(overrides?: TransactionOverrides): Promise; + + /** + * Called when upgrading the extension + */ + "finishUpgrade()"(overrides?: TransactionOverrides): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + deprecate( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when deprecating (or undeprecating) the extension + */ + "deprecate(bool)"( + _deprecated: boolean, + overrides?: TransactionOverrides + ): Promise; + + /** + * Called when uninstalling the extension + */ + uninstall(overrides?: TransactionOverrides): Promise; + + /** + * Called when uninstalling the extension + */ + "uninstall()"(overrides?: TransactionOverrides): Promise; + + /** + * Create a motion + * @param _action A bytes array encoding a function call + * @param _altTarget The contract to which we send the action (0x0 for the colony) + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex The childSkillIndex pointing to the domain of the action + * @param _domainId The domain where we vote on the motion + * @param _key Reputation tree key for the root domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the root domain + */ + createMotion( + _domainId: BigNumberish, + _childSkillIndex: BigNumberish, + _altTarget: string, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Create a motion + * @param _action A bytes array encoding a function call + * @param _altTarget The contract to which we send the action (0x0 for the colony) + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex The childSkillIndex pointing to the domain of the action + * @param _domainId The domain where we vote on the motion + * @param _key Reputation tree key for the root domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the root domain + */ + "createMotion(uint256,uint256,address,bytes,bytes,bytes,uint256,bytes32[])"( + _domainId: BigNumberish, + _childSkillIndex: BigNumberish, + _altTarget: string, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Create a motion in the root domain (DEPRECATED) + * @param _action A bytes array encoding a function call + * @param _altTarget The contract to which we send the action (0x0 for the colony) + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the root domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the root domain + */ + createRootMotion( + _altTarget: string, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Create a motion in the root domain (DEPRECATED) + * @param _action A bytes array encoding a function call + * @param _altTarget The contract to which we send the action (0x0 for the colony) + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the root domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the root domain + */ + "createRootMotion(address,bytes,bytes,bytes,uint256,bytes32[])"( + _altTarget: string, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Create a motion in any domain (DEPRECATED) + * @param _action A bytes array encoding a function call + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex The childSkillIndex pointing to the domain of the action + * @param _domainId The domain where we vote on the motion + * @param _key Reputation tree key for the domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the domain + */ + createDomainMotion( + _domainId: BigNumberish, + _childSkillIndex: BigNumberish, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Create a motion in any domain (DEPRECATED) + * @param _action A bytes array encoding a function call + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex The childSkillIndex pointing to the domain of the action + * @param _domainId The domain where we vote on the motion + * @param _key Reputation tree key for the domain + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the domain + */ + "createDomainMotion(uint256,uint256,bytes,bytes,bytes,uint256,bytes32[])"( + _domainId: BigNumberish, + _childSkillIndex: BigNumberish, + _action: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Stake on a motion + * @param _amount The amount of tokens being staked + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex For the domain in which the motion is occurring + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _permissionDomainId The domain where the extension has the arbitration permission + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + stakeMotion( + _motionId: BigNumberish, + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _vote: BigNumberish, + _amount: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Stake on a motion + * @param _amount The amount of tokens being staked + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex For the domain in which the motion is occurring + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _permissionDomainId The domain where the extension has the arbitration permission + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + "stakeMotion(uint256,uint256,uint256,uint256,uint256,bytes,bytes,uint256,bytes32[])"( + _motionId: BigNumberish, + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _vote: BigNumberish, + _amount: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Submit a vote secret for a motion + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _voteSecret The hashed vote secret + */ + submitVote( + _motionId: BigNumberish, + _voteSecret: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Submit a vote secret for a motion + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _voteSecret The hashed vote secret + */ + "submitVote(uint256,bytes32,bytes,bytes,uint256,bytes32[])"( + _motionId: BigNumberish, + _voteSecret: Arrayish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Reveal a vote secret for a motion + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _salt The salt used to hash the vote + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + revealVote( + _motionId: BigNumberish, + _salt: Arrayish, + _vote: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Reveal a vote secret for a motion + * @param _branchMask The branchmask of the proof + * @param _key Reputation tree key for the staker/domain + * @param _motionId The id of the motion + * @param _salt The salt used to hash the vote + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the staker/domain + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + "revealVote(uint256,bytes32,uint256,bytes,bytes,uint256,bytes32[])"( + _motionId: BigNumberish, + _salt: Arrayish, + _vote: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Escalate a motion to a higher domain + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex For the current domain, relative to the escalated domain + * @param _key Reputation tree key for the new domain + * @param _motionId The id of the motion + * @param _newDomainId The desired domain of escalation + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the new domain + */ + escalateMotion( + _motionId: BigNumberish, + _newDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + /** + * Escalate a motion to a higher domain + * @param _branchMask The branchmask of the proof + * @param _childSkillIndex For the current domain, relative to the escalated domain + * @param _key Reputation tree key for the new domain + * @param _motionId The id of the motion + * @param _newDomainId The desired domain of escalation + * @param _siblings The siblings of the proof + * @param _value Reputation tree value for the new domain + */ + "escalateMotion(uint256,uint256,uint256,bytes,bytes,uint256,bytes32[])"( + _motionId: BigNumberish, + _newDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _key: Arrayish, + _value: Arrayish, + _branchMask: BigNumberish, + _siblings: Arrayish[], + overrides?: TransactionOverrides + ): Promise; + + finalizeMotion( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "finalizeMotion(uint256)"( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Claim the staker's reward + * @param _childSkillIndex For the domain in which the motion is occurring + * @param _motionId The id of the motion + * @param _permissionDomainId The domain where the extension has the arbitration permission + * @param _staker The staker whose reward is being claimed + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + claimReward( + _motionId: BigNumberish, + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Claim the staker's reward + * @param _childSkillIndex For the domain in which the motion is occurring + * @param _motionId The id of the motion + * @param _permissionDomainId The domain where the extension has the arbitration permission + * @param _staker The staker whose reward is being claimed + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + "claimReward(uint256,uint256,uint256,address,uint256)"( + _motionId: BigNumberish, + _permissionDomainId: BigNumberish, + _childSkillIndex: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the total stake fraction + */ + getTotalStakeFraction(overrides?: TransactionOverrides): Promise; + + /** + * Get the total stake fraction + */ + "getTotalStakeFraction()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the voter reward fraction + */ + getVoterRewardFraction( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the voter reward fraction + */ + "getVoterRewardFraction()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the user min stake fraction + */ + getUserMinStakeFraction( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the user min stake fraction + */ + "getUserMinStakeFraction()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the max vote fraction + */ + getMaxVoteFraction(overrides?: TransactionOverrides): Promise; + + /** + * Get the max vote fraction + */ + "getMaxVoteFraction()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the stake period + */ + getStakePeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the stake period + */ + "getStakePeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the submit period + */ + getSubmitPeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the submit period + */ + "getSubmitPeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the reveal period + */ + getRevealPeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the reveal period + */ + "getRevealPeriod()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the escalation period + */ + getEscalationPeriod(overrides?: TransactionOverrides): Promise; + + /** + * Get the escalation period + */ + "getEscalationPeriod()"( + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the total motion count + */ + getMotionCount(overrides?: TransactionOverrides): Promise; + + /** + * Get the total motion count + */ + "getMotionCount()"(overrides?: TransactionOverrides): Promise; + + /** + * Get the data for a single motion + * @param _motionId The id of the motion + */ + getMotion( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the data for a single motion + * @param _motionId The id of the motion + */ + "getMotion(uint256)"( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a user's stake on a motion + * @param _motionId The id of the motion + * @param _staker The staker address + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + getStake( + _motionId: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get a user's stake on a motion + * @param _motionId The id of the motion + * @param _staker The staker address + * @param _vote The side being supported (0 = NAY, 1 = YAY) + */ + "getStake(uint256,address,uint256)"( + _motionId: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of ongoing motions for a single expenditure / expenditure slot + * @param _structHash The hash of the expenditureId or expenditureId*expenditureSlot + */ + getExpenditureMotionCount( + _structHash: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the number of ongoing motions for a single expenditure / expenditure slot + * @param _structHash The hash of the expenditureId or expenditureId*expenditureSlot + */ + "getExpenditureMotionCount(bytes32)"( + _structHash: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the largest past vote on a single expenditure variable + * @param _actionHash The hash of the particular expenditure action + */ + getExpenditurePastVote( + _actionHash: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the largest past vote on a single expenditure variable + * @param _actionHash The hash of the particular expenditure action + */ + "getExpenditurePastVote(bytes32)"( + _actionHash: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the current state of the motion + */ + getMotionState( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the current state of the motion + */ + "getMotionState(uint256)"( + _motionId: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the voter reward NB This function will only return a meaningful value if in the reveal state. Prior to the reveal state, getVoterRewardRange should be used. + * @param _motionId The id of the motion + * @param _voterRep The reputation the voter has in the domain + */ + getVoterReward( + _motionId: BigNumberish, + _voterRep: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the voter reward NB This function will only return a meaningful value if in the reveal state. Prior to the reveal state, getVoterRewardRange should be used. + * @param _motionId The id of the motion + * @param _voterRep The reputation the voter has in the domain + */ + "getVoterReward(uint256,uint256)"( + _motionId: BigNumberish, + _voterRep: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the range of potential rewards for a voter on a specific motion, intended to be used when the motion is in the reveal state. Once a motion is in the reveal state the reward is known, and getVoterRewardRange should be used. + * @param _motionId The id of the motion + * @param _voterAddress The address the user will be voting as + * @param _voterRep The reputation the voter has in the domain + */ + getVoterRewardRange( + _motionId: BigNumberish, + _voterRep: BigNumberish, + _voterAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the range of potential rewards for a voter on a specific motion, intended to be used when the motion is in the reveal state. Once a motion is in the reveal state the reward is known, and getVoterRewardRange should be used. + * @param _motionId The id of the motion + * @param _voterAddress The address the user will be voting as + * @param _voterRep The reputation the voter has in the domain + */ + "getVoterRewardRange(uint256,uint256,address)"( + _motionId: BigNumberish, + _voterRep: BigNumberish, + _voterAddress: string, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the staker reward + * @param _motionId The id of the motion + * @param _staker The staker's address + * @param _vote The vote (0 = NAY, 1 = YAY) + */ + getStakerReward( + _motionId: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + /** + * Get the staker reward + * @param _motionId The id of the motion + * @param _staker The staker's address + * @param _vote The vote (0 = NAY, 1 = YAY) + */ + "getStakerReward(uint256,address,uint256)"( + _motionId: BigNumberish, + _staker: string, + _vote: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + createClaimDelayAction( + action: Arrayish, + value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + "createClaimDelayAction(bytes,uint256)"( + action: Arrayish, + value: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + }; +} diff --git a/src/contracts/extensions/votingReputation/2/factories/VotingReputation__factory.ts b/src/contracts/extensions/votingReputation/2/factories/VotingReputation__factory.ts new file mode 100644 index 000000000..9156c4477 --- /dev/null +++ b/src/contracts/extensions/votingReputation/2/factories/VotingReputation__factory.ts @@ -0,0 +1,1252 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, ContractFactory, Signer } from "ethers"; +import { Provider } from "ethers/providers"; +import { UnsignedTransaction } from "ethers/utils/transaction"; + +import { TransactionOverrides } from ".."; +import { VotingReputation } from "../VotingReputation"; + +export class VotingReputation__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy(overrides?: TransactionOverrides): Promise { + return super.deploy(overrides) as Promise; + } + getDeployTransaction(overrides?: TransactionOverrides): UnsignedTransaction { + return super.getDeployTransaction(overrides); + } + attach(address: string): VotingReputation { + return super.attach(address) as VotingReputation; + } + connect(signer: Signer): VotingReputation__factory { + return super.connect(signer) as VotingReputation__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): VotingReputation { + return new Contract(address, _abi, signerOrProvider) as VotingReputation; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [], + name: "ExtensionInitialised", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "authority", + type: "address", + }, + ], + name: "LogSetAuthority", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "LogSetOwner", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "motionId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "creator", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "domainId", + type: "uint256", + }, + ], + name: "MotionCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "motionId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "escalator", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "domainId", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "newDomainId", + type: "uint256", + }, + ], + name: "MotionEscalated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "motionId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "eventIndex", + type: "uint256", + }, + ], + name: "MotionEventSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "motionId", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "action", + type: "bytes", + }, + { + indexed: false, + internalType: "bool", + name: "executed", + type: "bool", + }, + ], + name: "MotionFinalized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "motionId", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "staker", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "vote", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "MotionRewardClaimed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "motionId", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "staker", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "vote", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "MotionStaked", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "motionId", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "voter", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "vote", + type: "uint256", + }, + ], + name: "MotionVoteRevealed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "motionId", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "voter", + type: "address", + }, + ], + name: "MotionVoteSubmitted", + type: "event", + }, + { + inputs: [], + name: "authority", + outputs: [ + { + internalType: "contract DSAuthority", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "_sig", + type: "bytes4", + }, + ], + name: "getCapabilityRoles", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getColony", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getDeprecated", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract DSAuthority", + name: "authority_", + type: "address", + }, + ], + name: "setAuthority", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner_", + type: "address", + }, + ], + name: "setOwner", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "identifier", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_colony", + type: "address", + }, + ], + name: "install", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_totalStakeFraction", + type: "uint256", + }, + { + internalType: "uint256", + name: "_voterRewardFraction", + type: "uint256", + }, + { + internalType: "uint256", + name: "_userMinStakeFraction", + type: "uint256", + }, + { + internalType: "uint256", + name: "_maxVoteFraction", + type: "uint256", + }, + { + internalType: "uint256", + name: "_stakePeriod", + type: "uint256", + }, + { + internalType: "uint256", + name: "_submitPeriod", + type: "uint256", + }, + { + internalType: "uint256", + name: "_revealPeriod", + type: "uint256", + }, + { + internalType: "uint256", + name: "_escalationPeriod", + type: "uint256", + }, + ], + name: "initialise", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "finishUpgrade", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bool", + name: "_deprecated", + type: "bool", + }, + ], + name: "deprecate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "uninstall", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "address", + name: "_altTarget", + type: "address", + }, + { + internalType: "bytes", + name: "_action", + type: "bytes", + }, + { + internalType: "bytes", + name: "_key", + type: "bytes", + }, + { + internalType: "bytes", + name: "_value", + type: "bytes", + }, + { + internalType: "uint256", + name: "_branchMask", + type: "uint256", + }, + { + internalType: "bytes32[]", + name: "_siblings", + type: "bytes32[]", + }, + ], + name: "createMotion", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_altTarget", + type: "address", + }, + { + internalType: "bytes", + name: "_action", + type: "bytes", + }, + { + internalType: "bytes", + name: "_key", + type: "bytes", + }, + { + internalType: "bytes", + name: "_value", + type: "bytes", + }, + { + internalType: "uint256", + name: "_branchMask", + type: "uint256", + }, + { + internalType: "bytes32[]", + name: "_siblings", + type: "bytes32[]", + }, + ], + name: "createRootMotion", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_domainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "bytes", + name: "_action", + type: "bytes", + }, + { + internalType: "bytes", + name: "_key", + type: "bytes", + }, + { + internalType: "bytes", + name: "_value", + type: "bytes", + }, + { + internalType: "uint256", + name: "_branchMask", + type: "uint256", + }, + { + internalType: "bytes32[]", + name: "_siblings", + type: "bytes32[]", + }, + ], + name: "createDomainMotion", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_motionId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "uint256", + name: "_vote", + type: "uint256", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "_key", + type: "bytes", + }, + { + internalType: "bytes", + name: "_value", + type: "bytes", + }, + { + internalType: "uint256", + name: "_branchMask", + type: "uint256", + }, + { + internalType: "bytes32[]", + name: "_siblings", + type: "bytes32[]", + }, + ], + name: "stakeMotion", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_motionId", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_voteSecret", + type: "bytes32", + }, + { + internalType: "bytes", + name: "_key", + type: "bytes", + }, + { + internalType: "bytes", + name: "_value", + type: "bytes", + }, + { + internalType: "uint256", + name: "_branchMask", + type: "uint256", + }, + { + internalType: "bytes32[]", + name: "_siblings", + type: "bytes32[]", + }, + ], + name: "submitVote", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_motionId", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_salt", + type: "bytes32", + }, + { + internalType: "uint256", + name: "_vote", + type: "uint256", + }, + { + internalType: "bytes", + name: "_key", + type: "bytes", + }, + { + internalType: "bytes", + name: "_value", + type: "bytes", + }, + { + internalType: "uint256", + name: "_branchMask", + type: "uint256", + }, + { + internalType: "bytes32[]", + name: "_siblings", + type: "bytes32[]", + }, + ], + name: "revealVote", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_motionId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_newDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "bytes", + name: "_key", + type: "bytes", + }, + { + internalType: "bytes", + name: "_value", + type: "bytes", + }, + { + internalType: "uint256", + name: "_branchMask", + type: "uint256", + }, + { + internalType: "bytes32[]", + name: "_siblings", + type: "bytes32[]", + }, + ], + name: "escalateMotion", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_motionId", + type: "uint256", + }, + ], + name: "finalizeMotion", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_motionId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_permissionDomainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_childSkillIndex", + type: "uint256", + }, + { + internalType: "address", + name: "_staker", + type: "address", + }, + { + internalType: "uint256", + name: "_vote", + type: "uint256", + }, + ], + name: "claimReward", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getTotalStakeFraction", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getVoterRewardFraction", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getUserMinStakeFraction", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getMaxVoteFraction", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getStakePeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getSubmitPeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getRevealPeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getEscalationPeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getMotionCount", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_motionId", + type: "uint256", + }, + ], + name: "getMotion", + outputs: [ + { + components: [ + { + internalType: "uint64[3]", + name: "events", + type: "uint64[3]", + }, + { + internalType: "bytes32", + name: "rootHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "domainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "skillId", + type: "uint256", + }, + { + internalType: "uint256", + name: "skillRep", + type: "uint256", + }, + { + internalType: "uint256", + name: "repSubmitted", + type: "uint256", + }, + { + internalType: "uint256", + name: "paidVoterComp", + type: "uint256", + }, + { + internalType: "uint256[2]", + name: "pastVoterComp", + type: "uint256[2]", + }, + { + internalType: "uint256[2]", + name: "stakes", + type: "uint256[2]", + }, + { + internalType: "uint256[2]", + name: "votes", + type: "uint256[2]", + }, + { + internalType: "bool", + name: "escalated", + type: "bool", + }, + { + internalType: "bool", + name: "finalized", + type: "bool", + }, + { + internalType: "address", + name: "altTarget", + type: "address", + }, + { + internalType: "bytes", + name: "action", + type: "bytes", + }, + ], + internalType: "struct VotingReputation.Motion", + name: "motion", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_motionId", + type: "uint256", + }, + { + internalType: "address", + name: "_staker", + type: "address", + }, + { + internalType: "uint256", + name: "_vote", + type: "uint256", + }, + ], + name: "getStake", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_structHash", + type: "bytes32", + }, + ], + name: "getExpenditureMotionCount", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_actionHash", + type: "bytes32", + }, + ], + name: "getExpenditurePastVote", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_motionId", + type: "uint256", + }, + ], + name: "getMotionState", + outputs: [ + { + internalType: "enum VotingReputation.MotionState", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_motionId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_voterRep", + type: "uint256", + }, + ], + name: "getVoterReward", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_motionId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_voterRep", + type: "uint256", + }, + { + internalType: "address", + name: "_voterAddress", + type: "address", + }, + ], + name: "getVoterRewardRange", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_motionId", + type: "uint256", + }, + { + internalType: "address", + name: "_staker", + type: "address", + }, + { + internalType: "uint256", + name: "_vote", + type: "uint256", + }, + ], + name: "getStakerReward", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "action", + type: "bytes", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "createClaimDelayAction", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +]; + +const _bytecode = + "0x608060405234801561001057600080fd5b50600180546001600160a01b031916339081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a2614d748061005e6000396000f3fe608060405234801561001057600080fd5b50600436106102535760003560e01c80637a9e5e4b11610146578063bbd2f6c5116100c3578063da23325911610087578063da2332591461049b578063de3b0aa4146104ae578063deac280f146104c1578063ee2cf473146104d4578063fc4af53f146104e7578063fcf6ba93146104fa57610253565b8063bbd2f6c514610452578063bf7e214f14610465578063bfd68ab71461046d578063c06e47d614610475578063d84eb9ee1461048857610253565b80639251cff41161010a5780639251cff4146103f1578063ad15aad214610404578063b004864714610424578063b57025d41461042c578063b9a8c27a1461043f57610253565b80637a9e5e4b1461038e5780637b9afba6146103a15780637de22eb4146103b4578063835ddcc1146103d45780638da5cb5b146103dc57610253565b8063420b900c116101d45780636acd7fe6116101985780636acd7fe6146103505780636e7375b01461036357806372d8bd7b1461036b5780637998a1c4146103735780637a3dc3301461037b57610253565b8063420b900c146102ec57806354fd4d501461030c5780635c0d9d53146103145780635cda01351461031c5780635d0050b21461032f57610253565b80632363df0e1161021b5780632363df0e146102ae5780632a1b8f9b146102b65780632a1c708b146102c95780632dfbb083146102d1578063340df28f146102e457610253565b806302d15d64146102585780630d638f301461027657806313af403514610280578063157eb072146102935780631a7dad2e146102a6575b600080fd5b61026061050f565b60405161026d91906141e3565b60405180910390f35b61027e610515565b005b61027e61028e366004613aa9565b61055e565b61027e6102a1366004613f05565b6105e0565b6102606105fa565b610260610600565b61027e6102c4366004613aa9565b610606565b610260610805565b6102606102df366004613c09565b61080b565b61027e610813565b6102ff6102fa366004613bd9565b610847565b60405161026d919061438f565b6102606109b0565b6102606109b5565b61027e61032a366004613e30565b6109bb565b61034261033d366004613cba565b610eda565b60405161026d9291906141bf565b61027e61035e366004613bd9565b6111e9565b6102606116e0565b6102606116e6565b6102606116ec565b610260610389366004613bd9565b611710565b61027e61039c366004613aa9565b611722565b61027e6103af366004614084565b6117a0565b6103c76103c2366004613c31565b611a16565b60405161026d91906142e9565b610260611b6c565b6103e4611b72565b60405161026d91906141ec565b61027e6103ff366004613ba1565b611b81565b610417610412366004613bd9565b611bd1565b60405161026d9190614b60565b610260611e1c565b61027e61043a366004613fac565b611e22565b61027e61044d366004613d2d565b61216d565b61027e610460366004613fc6565b61239b565b6103e4612ab1565b6103e4612ac0565b61027e610483366004613cf1565b612acf565b610260610496366004613dd7565b612c52565b61027e6104a9366004613f64565b612cad565b6102606104bc366004613bd9565b612ec3565b61027e6104cf366004613ae1565b612ed5565b6102606104e2366004613cba565b612ef0565b6103426104f5366004613df8565b612f23565b610502612fd6565b60405161026d91906142c9565b600d5490565b61052b336000356001600160e01b031916612fe6565b6105505760405162461bcd60e51b815260040161054790614481565b60405180910390fd5b6003546001600160a01b0316ff5b610574336000356001600160e01b031916612fe6565b6105905760405162461bcd60e51b815260040161054790614481565b600180546001600160a01b0319166001600160a01b0383811691909117918290556040519116907fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b6105f18787600088888888886109bb565b50505050505050565b600c5490565b60085490565b6003546001600160a01b03161561062f5760405162461bcd60e51b8152600401610547906147a7565b600380546001600160a01b0319166001600160a01b03838116919091179182905560408051634e5e839560e01b815290519290911691634e5e839591600480820192602092909190829003018186803b15801561068b57600080fd5b505afa15801561069f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c39190613ac5565b600480546001600160a01b0319166001600160a01b03928316178082556040805163598cc81560e11b81529051919093169263b319902a9281810192602092909190829003018186803b15801561071957600080fd5b505afa15801561072d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107519190613ac5565b600580546001600160a01b0319166001600160a01b03928316179055600354604080516321df0da760e01b8152905191909216916321df0da7916004808301926020929190829003018186803b1580156107aa57600080fd5b505afa1580156107be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107e29190613ac5565b600680546001600160a01b0319166001600160a01b039290921691909117905550565b60075490565b60005b919050565b610829336000356001600160e01b031916612fe6565b6108455760405162461bcd60e51b815260040161054790614481565b565b60008181526010602052604081208161085f846130c2565b905083158061086f5750600f5484115b1561087f5760009250505061080e565b600d820154610100900460ff161561089c5760069250505061080e565b600a8201548111806108b15750600982015481115b1561091e5781546001600160401b03164210156108d35760019250505061080e565b600a8201548114156108ea5760059250505061080e565b600b82018054600091610902919060015b01546130e1565b11156109135760059250505061080e565b60079250505061080e565b8154600160401b90046001600160401b03164210156109425760029250505061080e565b8154600160801b90046001600160401b03164210156109665760039250505061080e565b600e548254600160801b90046001600160401b0316014210801561098e575060018260020154115b1561099e5760049250505061080e565b60059250505061080e565b5050919050565b600290565b60095490565b600354600160a01b900460ff16156109e55760405162461bcd60e51b815260040161054790614abb565b6001600354600160a81b900460ff1660028111156109ff57fe5b14610a1c5760405162461bcd60e51b81526004016105479061484c565b6003546001600160a01b0387811691161415610a4a5760405162461bcd60e51b81526004016105479061498a565b6000610a5587613104565b90506000610a628761312c565b90506001600160e01b031981166363468cf560e11b1415610a955760405162461bcd60e51b8152600401610547906147de565b604051632dfbb08360e01b815260009060039081906001600160a01b03861690632dfbb08390610ac99087906004016142d4565b60206040518083038186803b158015610ae157600080fd5b505afa158015610af5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b199190613bf1565b171415610bd5578a6001148015610b3157506000198a145b610b4d5760405162461bcd60e51b8152600401610547906146cb565b600354604051630d3d4c7160e11b81526001600160a01b0390911690631a7a98e290610b7e906001906004016141e3565b604080518083038186803b158015610b9557600080fd5b505afa158015610ba9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bcd9190613c73565b519050610d25565b600354604051630d3d4c7160e11b81526001600160a01b0390911690631a7a98e290610c05908e906004016141e3565b604080518083038186803b158015610c1c57600080fd5b505afa158015610c30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c549190613c73565b5190506000610c6289613133565b9050808214610d23576000600460009054906101000a90046001600160a01b03166001600160a01b03166309d10a5e848e6040518363ffffffff1660e01b8152600401610cb09291906141bf565b60206040518083038186803b158015610cc857600080fd5b505afa158015610cdc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d009190613bf1565b9050818114610d215760405162461bcd60e51b8152600401610547906146cb565b505b505b600f805460010190819055600090815260106020908152604091829020600b54815467ffffffffffffffff1916429091016001600160401b0390811691909117808355600c5467ffffffffffffffff60401b198216600160401b9284169091018316820217808455600d5467ffffffffffffffff60801b198216600160801b93909204841601909216021781556004805484516397824c3f60e01b8152945192946001600160a01b03909116936397824c3f93828401939192909190829003018186803b158015610df557600080fd5b505afa158015610e09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2d9190613bf1565b6001820155600281018c905560038101829055600f54610e529060008a8a8a8a61324f565b6004820155600d8101805462010000600160b01b031916620100006001600160a01b038d16021790558851610e9090600e83019060208c0190613827565b508b600f547fec8f382abfacc0416a7b1eca9ddfcb6f79f9ee369eba7478f5471bd692bb5db733604051610ec491906141ec565b60405180910390a3505050505050505050505050565b6000838152601060205260408120819081610f0e600983018660028110610efd57fe5b01548360070187600281106108fb57fe5b905080610f23576000809350935050506111e1565b60008781526011602090815260408083206001600160a01b038a1684528252808320888452909152812054610f589083613343565b90506000610f7682856009018960028110610f6f57fe5b0154613367565b905060008080610f91600b8801820154600b890160016108fb565b11156110a457600b860154600c87015460009182911115610fbd5750506009860154600a870154610fca565b5050600a86015460098701545b610fd882896006015461337c565b600b89018054919350600091610fef9160016108fb565b9050600061100d8a600b018e6002811061100557fe5b015483613343565b9050600061102382671bc16d674ec80000613367565b9050670de0b6b3a764000081118061104b5750670de0b6b3a76400008114801561104b57508d155b1561107d57611076896110718661106c89670de0b6b3a76400008703613367565b6130e1565b613367565b965061109a565b61108b896110718784613367565b9650611097888861337c565b95505b50505050506111d7565b6006860154156110b057fe5b60006110bb8c6130c2565b905080876009018b600281106110cd57fe5b01541480156110f3575080876009016110e58c61339f565b600281106110ef57fe5b0154105b15611146576000876009016111078c61339f565b6002811061111157fe5b01549050600061112d82600a670de0b6b3a76400005b04613367565b905061113d8761107185846130e1565b945050506111d5565b80876009018b6002811061115657fe5b015410801561117c5750808760090161116e8c61339f565b6002811061117857fe5b0154145b156111d1576000876009018b6002811061119257fe5b0154905060006111ac82600a670de0b6b3a7640000611127565b90506111bc87611071848461337c565b94506111c8868661337c565b935050506111d5565b8392505b505b9096509450505050505b935093915050565b6000818152601060205260409020600561120283610847565b600781111561120d57fe5b1461122a5760405162461bcd60e51b815260040161054790614a43565b611233826130c2565b600a82015414806112565750600b81018054600091611254919060016108fb565b115b61125c57fe5b600d8101805461ff00191661010017905560006009820160010154600983016000015410806112925750600c820154600b830154105b600e83018054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152939450633268b39f60e21b93611337939092909183018282801561132d5780601f106113025761010080835404028352916020019161132d565b820191906000526020600020905b81548152906001019060200180831161131057829003601f168201915b505050505061312c565b6001600160e01b0319161480156113785750600354600d8301546001600160a01b039182169161136d9162010000900416613104565b6001600160a01b0316145b156115f857600e8201805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152600093611418939192909183018282801561140e5780601f106113e35761010080835404028352916020019161140e565b820191906000526020600020905b8154815290600101906020018083116113f157829003601f168201915b50505050506133ac565b60008181526014602052604090205490915061143590600161337c565b60008281526014602052604090208190556114f657600e8301805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181526060936114e793919290918301828280156114db5780601f106114b0576101008083540402835291602001916114db565b820191906000526020600020905b8154815290600101906020018083116114be57829003601f168201915b50505050506000611a16565b90506114f3858261344b565b50505b600e8301805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815260009361159193919290918301828280156115875780601f1061155c57610100808354040283529160200191611587565b820191906000526020600020905b81548152906001019060200180831161156a57829003601f168201915b505050505061348f565b90506000806115ab600b8701820154600b880160016108fb565b116115ba57600a8501546115c0565b600c8501545b6000838152601360205260409020549091508111156115ef5760008281526013602052604090208190556115f4565b600093505b5050505b6000811561169d57600e8301805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815261169a938893919290918301828280156116905780601f1061166557610100808354040283529160200191611690565b820191906000526020600020905b81548152906001019060200180831161167357829003601f168201915b505050505061344b565b90505b837f30a64da5658ebdc08619e03d1f155ef960c07fa9b332002f9ad606ec64b6096484600e01836040516116d29291906142fc565b60405180910390a250505050565b600a5490565b600e5490565b7fdc951b3d4193c331186bc2de3b4e659e51d8b00ef92751ae69abaa48a6ab38dd90565b60009081526013602052604090205490565b611738336000356001600160e01b031916612fe6565b6117545760405162461bcd60e51b815260040161054790614481565b600080546001600160a01b0319166001600160a01b03838116919091178083556040519116917f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada491a250565b600354604051635597bd7160e11b81526001600160a01b039091169063ab2f7ae2906117d59033906001908190600401614200565b60206040518083038186803b1580156117ed57600080fd5b505afa158015611801573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118259190613bbd565b6118415760405162461bcd60e51b815260040161054790614702565b6000600354600160a81b900460ff16600281111561185b57fe5b146118785760405162461bcd60e51b81526004016105479061451e565b6706f05b59d3b200008811156118a05760405162461bcd60e51b8152600401610547906145fa565b6706f05b59d3b200008711156118c85760405162461bcd60e51b8152600401610547906145fa565b670de0b6b3a76400008611156118f05760405162461bcd60e51b815260040161054790614a84565b670de0b6b3a76400008511156119185760405162461bcd60e51b815260040161054790614a84565b6301e1338084111561193c5760405162461bcd60e51b815260040161054790614af2565b6301e133808311156119605760405162461bcd60e51b815260040161054790614af2565b6301e133808211156119845760405162461bcd60e51b815260040161054790614af2565b6301e133808111156119a85760405162461bcd60e51b815260040161054790614af2565b6003805460ff60a81b1916600160a81b179055600788905560088790556009869055600a859055600b849055600c839055600d829055600e8190556040517f690c4b6201f6a4c703f9d21c205d98a08dff8461e7a71e49c6d47cc8b894850190600090a15050505050505050565b60208201516024830151604484015160648501516084860151606094939291906019811415611ac057604080516101648082526101a08201909252606091602082018180368337505050602081019690965250506024840192909252604483015260648201526019608482015260e060a482015261012060c482015260e4810183905260016101048201819052610124820181905261014482015260046101648201529050611b66565b604080516101a48082526101e0820190925260609160208201818036833701905050905060006101848a01519050866020830152856024830152846044830152836064830152601a608483015260e060a483015261014060c48301528860e483015260026101048301526000610124830152600161014483015260026101648301528061018483015260016101a483015281975050505050505050611b66565b50505050505b92915050565b600f5490565b6001546001600160a01b031681565b611b97336000356001600160e01b031916612fe6565b611bb35760405162461bcd60e51b815260040161054790614481565b60038054911515600160a01b0260ff60a01b19909216919091179055565b611bd96138a5565b6000828152601060205260409081902081516102208101909252816101c081018260038282826020028201916000905b82829054906101000a90046001600160401b03166001600160401b031681526020019060080190602082600701049283019260010382029150808411611c095790505050505050815260200160018201548152602001600282015481526020016003820154815260200160048201548152602001600582015481526020016006820154815260200160078201600280602002604051908101604052809291908260028015611ccc576020028201915b815481526020019060010190808311611cb8575b5050509183525050604080518082019182905260209092019190600984019060029082845b815481526020019060010190808311611cf1575050509183525050604080518082019182905260209092019190600b84019060029082845b815481526020019060010190808311611d29575050509183525050600d82015460ff80821615156020808501919091526101008084049092161515604080860191909152620100009093046001600160a01b03166060850152600e850180548451600260018316159095026000190190911693909304601f8101839004830284018301909452838352608090940193919290830182828015611e0c5780601f10611de157610100808354040283529160200191611e0c565b820191906000526020600020905b815481529060010190602001808311611def57829003601f168201915b5050505050815250509050919050565b600b5490565b60008781526010602052604090206004611e3b89610847565b6007811115611e4657fe5b14611e635760405162461bcd60e51b81526004016105479061487b565b600354604051630d3d4c7160e11b81526000916001600160a01b031690631a7a98e290611e94908b906004016141e3565b604080518083038186803b158015611eab57600080fd5b505afa158015611ebf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ee39190613c73565b51600480546040516304e8852f60e11b81529293506000926001600160a01b03909116916309d10a5e91611f1b9186918d91016141bf565b60206040518083038186803b158015611f3357600080fd5b505afa158015611f47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f6b9190613bf1565b905082600301548114611f905760405162461bcd60e51b815260040161054790614770565b600283018054908a905560038401839055611fb08b60008a8a8a8a61324f565b6004850155600c840154600b85015460009111611fce576001611fd1565b60005b9050611ff1856009018260028110611fe557fe5b0154866006015461337c565b85600901826002811061200057fe5b015561202060078601826002811061201457fe5b015486600601546130e1565b85600701826002811061202f57fe5b01556000600686018190556120438d6130c2565b9050806009870160000154108061205d5750600a86015481115b612067574261206d565b600b5442015b865467ffffffffffffffff19166001600160401b0391821617808855600c5467ffffffffffffffff60401b198216600160401b9284169091018316820217808955600d805467ffffffffffffffff60801b198316600160801b94909304851601909316919091021787558601805460ff191660011790556040518c9084908f907fd11ec0a82b67846e80d77c897fa0e54e2d81a0275e18cb2d40b9f534d9b738ad9061211a9033906141ec565b60405180910390a485546001600160401b0342811691161161215e578c600080516020614d1f833981519152600060405161215591906141e3565b60405180910390a25b50505050505050505050505050565b6000878152601060205260409020600361218689610847565b600781111561219157fe5b146121ae5760405162461bcd60e51b8152600401610547906148b2565b60018611156121cf5760405162461bcd60e51b81526004016105479061492e565b60006121df89338888888861324f565b90506121fb82600b0188600281106121f357fe5b0154826130e1565b82600b01886002811061220a57fe5b0155600089815260126020908152604080832033845290915290205461223089896134a5565b811461224e5760405162461bcd60e51b815260040161054790614555565b60008a815260126020908152604080832033845290915281208190556122748b84612c52565b90506122848460060154826130e1565b6006850155604051899033908d907f90285c90067ec863f95f2423d6cc031a545257d9b53dfb1974a65b46bd4a55bd90600090a46005840154600b850180546122ce9160016108fb565b141561232157835467ffffffffffffffff60801b1916600160801b426001600160401b0316021784556040518b90600080516020614d1f83398151915290612318906002906141e3565b60405180910390a25b6005546006546040516393c4553560e01b81526001600160a01b03928316926393c455359261235c929116908590339060019060040161429f565b600060405180830381600087803b15801561237657600080fd5b505af115801561238a573d6000803e3d6000fd5b505050505050505050505050505050565b600089815260106020526040902060018711156123ca5760405162461bcd60e51b81526004016105479061492e565b60016123d58b610847565b60078111156123e057fe5b146123fd5760405162461bcd60e51b81526004016105479061458c565b60006124088b6130c2565b9050600061242f8861242a84866009018d6002811061242357fe5b015461337c565b6134d8565b9050600081116124515760405162461bcd60e51b81526004016105479061495b565b60008c815260116020908152604080832033845282528083208c845290915281205461247d90836130e1565b905061248d8d338a8a8a8a61324f565b8111156124ac5760405162461bcd60e51b81526004016105479061462f565b6124b883600954613367565b811015806124de5750826124dc856009018c600281106124d457fe5b0154846130e1565b145b6124fa5760405162461bcd60e51b81526004016105479061444a565b612514846009018b6002811061250c57fe5b0154836130e1565b846009018b6002811061252357fe5b015560008d815260116020908152604080832033845282528083208d8452909152902081905560018a14801561255e5750600d84015460ff16155b801561256d5750600a84015483145b80156125ec5750600e8401805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152633268b39f60e21b936125e0939192909183018282801561132d5780601f106113025761010080835404028352916020019161132d565b6001600160e01b031916145b80156126095750600d8401546201000090046001600160a01b0316155b1561277657600e8401805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152600093612674939192909183018282801561140e5780601f106113e35761010080835404028352916020019161140e565b6000818152601460205260409020549091506126919060016130e1565b60008281526014602090815260409182902092909255600e870180548251601f6002600019610100600186161502019093169290920491820185900485028101850190935280835260609361274b939291908301828280156127345780601f1061270957610100808354040283529160200191612734565b820191906000526020600020905b81548152906001019060200180831161271757829003601f168201915b505050505060036000198161274557fe5b04611a16565b90506127578f8261344b565b6127735760405162461bcd60e51b8152600401610547906143a2565b50505b89336001600160a01b03168e7f36de51a8af0dcecf368691aa77f69ba4d4e7974e9c709f33aeaad0e7ac5af1b8856040516127b191906141e3565b60405180910390a46009840154831480156127cf5750600a84015483145b1561286c57835467ffffffffffffffff1916426001600160401b0390811691909117808655600c5467ffffffffffffffff60401b198216600160401b9284169091018316820217808755600d5467ffffffffffffffff60801b198216600160801b93909204841601909216021784556040518d90600080516020614d1f8339815191529061285f906000906141e3565b60405180910390a2612949565b8915801561287d5750600984015483145b80612896575060018a1480156128965750600a84015483145b1561294957600b8054855467ffffffffffffffff1916429091016001600160401b0390811691909117808755600c5467ffffffffffffffff60401b198216600160401b9284169091018316820217808855600d5467ffffffffffffffff60801b198216600160801b93909204841601909216021785556129199085016000613931565b83600501600090558c600080516020614d1f833981519152600060405161294091906141e3565b60405180910390a25b6005546006546040516307dba22560e31b81526001600160a01b0392831692633edd1128926129839291169060009060019060040161427c565b600060405180830381600087803b15801561299d57600080fd5b505af11580156129b1573d6000803e3d6000fd5b5050600354600287015460405163096abb4960e01b81526001600160a01b03909216935063096abb4992506129ed91339190879060040161422e565b600060405180830381600087803b158015612a0757600080fd5b505af1158015612a1b573d6000803e3d6000fd5b50505050600360009054906101000a90046001600160a01b03166001600160a01b031663446c1aa28d8d3033896002015488306040518863ffffffff1660e01b8152600401612a709796959493929190614c5a565b600060405180830381600087803b158015612a8a57600080fd5b505af1158015612a9e573d6000803e3d6000fd5b5050505050505050505050505050505050565b6000546001600160a01b031681565b6003546001600160a01b031690565b60008681526010602052604090206002612ae888610847565b6007811115612af357fe5b14612b105760405162461bcd60e51b8152600401610547906143e4565b85612b2d5760405162461bcd60e51b815260040161054790614a0c565b6000612b3d88338888888861324f565b6000898152601260209081526040808320338452909152902054909150612b7257612b6c8260050154826130e1565b60058301555b60008881526012602090815260408083203380855292528083208a90555190918a917f918e84941a111dde88f3d5739c3e63ffa70d869cbbfd4ecbab1dbb3b379055f99190a3612bc88260040154600a54613367565b826005015410612c4857815467ffffffffffffffff60401b1916600160401b426001600160401b038181169290920292909217808555600d5490920116600160801b0267ffffffffffffffff60801b199091161782556040518890600080516020614d1f83398151915290612c3f906001906141e3565b60405180910390a25b5050505050505050565b600082815260106020526040812060058101548290612c72908590613343565b90506000612c8c60098401600101546009850160006108fb565b9050612ca3612c9b8383613367565b600854613367565b9695505050505050565b60008581526010602052604090206006612cc687610847565b6007811115612cd157fe5b1480612cf057506007612ce387610847565b6007811115612cee57fe5b145b612d0c5760405162461bcd60e51b815260040161054790614b29565b600080612d1a888686610eda565b60008a81526011602090815260408083206001600160a01b038b16845282528083208984529091529020549193509150612d665760405162461bcd60e51b8152600401610547906145c3565b60008881526011602090815260408083206001600160a01b03808a1685529083528184208885529092528083209290925560055460065492516393c4553560e01b8152908216926393c4553592612dc99291169086908a9060019060040161429f565b600060405180830381600087803b158015612de357600080fd5b505af1158015612df7573d6000803e3d6000fd5b505050506000811115612e7657600354600284015460405163fce891a560e01b81526001600160a01b039092169163fce891a591612e43918b918b918b90600089900390600401614c93565b600060405180830381600087803b158015612e5d57600080fd5b505af1158015612e71573d6000803e3d6000fd5b505050505b83856001600160a01b0316897f388e060f12fe3bf76a4ba6d79050cbfa0484dfbfc3a2b866afbcbf4058b24bfe85604051612eb191906141e3565b60405180910390a45050505050505050565b60009081526014602052604090205490565b612ee860016000198888888888886109bb565b505050505050565b60008381526011602090815260408083206001600160a01b038616845282528083208484529091529020545b9392505050565b600083815260106020526040812060048101548291908290612f46908790613343565b600583015460008981526012602090815260408083206001600160a01b038b16845290915290205491925090612f8357612f8081886130e1565b90505b6000612f8f8883613343565b90506000612fa960098601600101546009870160006108fb565b9050612fb8612c9b8583613367565b612fc5612c9b8484613367565b965096505050505050935093915050565b600354600160a01b900460ff1690565b60006001600160a01b03831630141561300157506001611b66565b6001546001600160a01b038481169116141561301f57506001611b66565b6000546001600160a01b031661303757506000611b66565b60005460405163b700961360e01b81526001600160a01b039091169063b70096139061306b9086903090879060040161424f565b60206040518083038186803b15801561308357600080fd5b505afa158015613097573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130bb9190613bbd565b9050611b66565b600081815260106020526040812060040154600754611b669190613367565b80820182811015611b665760405162461bcd60e51b815260040161054790614666565b60006001600160a01b0382161561311b5781611b66565b50506003546001600160a01b031690565b6020015190565b60248101516044820151600354604051630d3d4c7160e11b8152600093929184916001600160a01b0390911690631a7a98e2906131749086906004016141e3565b604080518083038186803b15801561318b57600080fd5b505afa15801561319f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131c39190613c73565b51600480546040516304e8852f60e11b81529293506001600160a01b0316916309d10a5e916131f69185918791016141bf565b60206040518083038186803b15801561320e57600080fd5b505afa158015613222573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132469190613bf1565b95945050505050565b60008061325e868686866134ef565b60008981526010602052604090206001015490915081146132915760405162461bcd60e51b815260040161054790614694565b60208501516014870151603488015160488901516003546001600160a01b038085169116146132d25760405162461bcd60e51b8152600401610547906144af565b60008c81526010602052604090206003015482146133025760405162461bcd60e51b8152600401610547906149d5565b8a6001600160a01b0316816001600160a01b0316146133335760405162461bcd60e51b815260040161054790614815565b50919a9950505050505050505050565b60008161335884670de0b6b3a7640000613517565b8161335f57fe5b049392505050565b6000670de0b6b3a76400006133588484613517565b80820382811115611b665760405162461bcd60e51b81526004016105479061441b565b6000611b6660018361337c565b6000633268b39f60e21b6133bf8361312c565b6001600160e01b031916146133d057fe5b60648201516084830151610184840151601982141561341757826040516020016133fa91906141e3565b604051602081830303815290604052805190602001209350613443565b828160405160200161342a9291906141bf565b6040516020818303038152906040528051906020012093505b505050919050565b6000828152601060205260408120600d01548190613477906201000090046001600160a01b0316613104565b90506000808451602086016000855af1949350505050565b600060e482015280516043190160649091012090565b600082826040516020016134ba9291906141bf565b60405160208183030381529060405280519060200120905092915050565b6000818311156134e85781612f1c565b5090919050565b60008061350c86805190602001208680519060200120868661354e565b509695505050505050565b60008115806135325750508082028282828161352f57fe5b04145b611b665760405162461bcd60e51b8152600401610547906144f0565b600061355861393f565b61356061395d565b5060408051808201909152868152610100602082015261357e613974565b86815261358961393f565b60005b86518110156136655760006135a0896136cf565b60ff169050806001901b19891698506135c58160ff038661372790919063ffffffff16565b602086018190529095506000906135db9061378e565b602087015290506135eb856137e8565b8482600281106135f757fe5b6020020152885189906000198582030190811061361057fe5b602002602001015184826001036002811061362757fe5b60200201818152505083604051602001613641919061418b565b60408051601f1981840301815291905280516020909101208552505060010161358c565b508661367757602082018390526136b8565b6000613682886136cf565b60ff16905061369d8160ff038561372790919063ffffffff16565b602085018190529094506136b09061378e565b602085015250505b6136c1826137e8565b999098509650505050505050565b6000816136ee5760405162461bcd60e51b815260040161054790614739565b8160805b60018160ff16106109a957600019600160ff83161b01821661371c579182019160ff81169190911c905b60011c607f166136f2565b61372f61395d565b61373761395d565b8360200151831115801561374d57506101008311155b61375357fe5b60208201839052826137685760008252613777565b835160011960ff8590031b1682525b60208085015184900390820152925190911b825291565b600061379861395d565b60008360200151116137bc5760405162461bcd60e51b8152600401610547906148e9565b5050805160408051808201909152825160011b8152602092830151600019019281019290925260ff1c91565b805160208083015180820151905160405160009461380a9490939291016141cd565b604051602081830303815290604052805190602001209050919050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061386857805160ff1916838001178555613895565b82800160010185558215613895579182015b8281111561389557825182559160200191906001019061387a565b506138a1929150613993565b5090565b604051806101c001604052806138b96139a8565b81526020016000801916815260200160008152602001600081526020016000815260200160008152602001600081526020016138f361393f565b815260200161390061393f565b815260200161390d61393f565b81526000602082018190526040820181905260608083019190915260809091015290565b506000815560010160009055565b60405180604001604052806002906020820280368337509192915050565b604080518082019091526000808252602082015290565b60408051808201909152600081526020810161398e61395d565b905290565b5b808211156138a15760008155600101613994565b60405180606001604052806003906020820280368337509192915050565b803561080e81614cfb565b600082601f8301126139e1578081fd5b81356001600160401b038111156139f457fe5b6020808202613a04828201614cbf565b83815293508184018583018287018401881015613a2057600080fd5b600092505b84831015611b60578035825260019290920191908301908301613a25565b600082601f830112613a53578081fd5b81356001600160401b03811115613a6657fe5b613a79601f8201601f1916602001614cbf565b9150808252836020828501011115613a9057600080fd5b8060208401602084013760009082016020015292915050565b600060208284031215613aba578081fd5b8135612f1c81614cfb565b600060208284031215613ad6578081fd5b8151612f1c81614cfb565b60008060008060008060c08789031215613af9578182fd5b613b02876139c6565b955060208701356001600160401b0380821115613b1d578384fd5b613b298a838b01613a43565b96506040890135915080821115613b3e578384fd5b613b4a8a838b01613a43565b95506060890135915080821115613b5f578384fd5b613b6b8a838b01613a43565b94506080890135935060a0890135915080821115613b87578283fd5b50613b9489828a016139d1565b9150509295509295509295565b600060208284031215613bb2578081fd5b8135612f1c81614d10565b600060208284031215613bce578081fd5b8151612f1c81614d10565b600060208284031215613bea578081fd5b5035919050565b600060208284031215613c02578081fd5b5051919050565b600060208284031215613c1a578081fd5b81356001600160e01b031981168114612f1c578182fd5b60008060408385031215613c43578182fd5b82356001600160401b03811115613c58578283fd5b613c6485828601613a43565b95602094909401359450505050565b600060408284031215613c84578081fd5b604051604081018181106001600160401b0382111715613ca057fe5b604052825181526020928301519281019290925250919050565b600080600060608486031215613cce578081fd5b833592506020840135613ce081614cfb565b929592945050506040919091013590565b60008060008060008060c08789031215613d09578384fd5b863595506020870135945060408701356001600160401b0380821115613b3e578586fd5b600080600080600080600060e0888a031215613d47578485fd5b87359650602088013595506040880135945060608801356001600160401b0380821115613d72578283fd5b613d7e8b838c01613a43565b955060808a0135915080821115613d93578283fd5b613d9f8b838c01613a43565b945060a08a0135935060c08a0135915080821115613dbb578283fd5b50613dc88a828b016139d1565b91505092959891949750929550565b60008060408385031215613de9578182fd5b50508035926020909101359150565b600080600060608486031215613e0c578081fd5b83359250602084013591506040840135613e2581614cfb565b809150509250925092565b600080600080600080600080610100898b031215613e4c578182fd5b8835975060208901359650613e6360408a016139c6565b955060608901356001600160401b0380821115613e7e578384fd5b613e8a8c838d01613a43565b965060808b0135915080821115613e9f578384fd5b613eab8c838d01613a43565b955060a08b0135915080821115613ec0578384fd5b613ecc8c838d01613a43565b945060c08b0135935060e08b0135915080821115613ee8578283fd5b50613ef58b828c016139d1565b9150509295985092959890939650565b600080600080600080600060e0888a031215613f1f578081fd5b873596506020880135955060408801356001600160401b0380821115613f43578283fd5b613f4f8b838c01613a43565b965060608a0135915080821115613d72578283fd5b600080600080600060a08688031215613f7b578283fd5b8535945060208601359350604086013592506060860135613f9b81614cfb565b949793965091946080013592915050565b600080600080600080600060e0888a031215613d47578081fd5b60008060008060008060008060006101208a8c031215613fe4578283fd5b8935985060208a0135975060408a0135965060608a0135955060808a0135945060a08a01356001600160401b038082111561401d578485fd5b6140298d838e01613a43565b955060c08c013591508082111561403e578485fd5b61404a8d838e01613a43565b945060e08c013593506101008c0135915080821115614067578283fd5b506140748c828d016139d1565b9150509295985092959850929598565b600080600080600080600080610100898b0312156140a0578182fd5b505086359860208801359850604088013597606081013597506080810135965060a0810135955060c0810135945060e0013592509050565b6001600160a01b03169052565b8060005b60028110156141085781518452602093840193909101906001016140e9565b50505050565b8060005b60038110156141085781516001600160401b0316845260209384019390910190600101614112565b15159052565b60008151808452815b8181101561416557602081850181015186830182015201614149565b818111156141765782602083870101525b50601f01601f19169290920160200192915050565b60008183825b60028110156141b0578151835260209283019290910190600101614191565b50505060408201905092915050565b918252602082015260400190565b9283526020830191909152604082015260600190565b90815260200190565b6001600160a01b0391909116815260200190565b6001600160a01b0384168152602081018390526060810161422083614cee565b826040830152949350505050565b6001600160a01b039390931683526020830191909152604082015260600190565b6001600160a01b0393841681529190921660208201526001600160e01b0319909116604082015260600190565b6001600160a01b0393909316835260208301919091521515604082015260600190565b6001600160a01b039485168152602081019390935292166040820152901515606082015260800190565b901515815260200190565b6001600160e01b031991909116815260200190565b600060208252612f1c6020830184614140565b6000604082016040835281855460018082166000811461432357600181146143415761437a565b60028304607f16855260ff198316606088015260808701935061437a565b600283048086526143518a614ce2565b875b828110156143705781548a82016060015290840190602001614353565b8901606001955050505b5050508092505050612f1c602083018461413a565b6020810161439c83614cee565b91905290565b60208082526022908201527f766f74696e672d7265702d657870656e6469747572652d6c6f636b2d6661696c604082015261195960f21b606082015260800190565b6020808252601a908201527f766f74696e672d7265702d6d6f74696f6e2d6e6f742d6f70656e000000000000604082015260600190565b60208082526015908201527464732d6d6174682d7375622d756e646572666c6f7760581b604082015260600190565b6020808252601d908201527f766f74696e672d7265702d696e73756666696369656e742d7374616b65000000604082015260600190565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b60208082526021908201527f766f74696e672d7265702d696e76616c69642d636f6c6f6e792d6164647265736040820152607360f81b606082015260800190565b60208082526014908201527364732d6d6174682d6d756c2d6f766572666c6f7760601b604082015260600190565b6020808252601e908201527f766f74696e672d7265702d616c72656164792d696e697469616c697365640000604082015260600190565b6020808252601a908201527f766f74696e672d7265702d7365637265742d6e6f2d6d61746368000000000000604082015260600190565b6020808252601d908201527f766f74696e672d7265702d6d6f74696f6e2d6e6f742d7374616b696e67000000604082015260600190565b6020808252601b908201527f766f74696e672d7265702d6e6f7468696e672d746f2d636c61696d0000000000604082015260600190565b6020808252818101527f766f74696e672d7265702d677265617465722d7468616e2d68616c662d776164604082015260600190565b6020808252601b908201527f766f74696e672d7265702d696e73756666696369656e742d7265700000000000604082015260600190565b60208082526014908201527364732d6d6174682d6164642d6f766572666c6f7760601b604082015260600190565b6020808252601c908201527f766f74696e672d7265702d696e76616c69642d726f6f742d6861736800000000604082015260600190565b6020808252601c908201527f766f74696e672d7265702d696e76616c69642d646f6d61696e2d696400000000604082015260600190565b6020808252601a908201527f766f74696e672d7265702d63616c6c65722d6e6f742d726f6f74000000000000604082015260600190565b6020808252601e908201527f636f6c6f6e792d70617472696369612d747265652d7a65726f2d73656c660000604082015260600190565b6020808252601f908201527f766f74696e672d7265702d696e76616c69642d646f6d61696e2d70726f6f6600604082015260600190565b6020808252601b908201527f657874656e73696f6e2d616c72656164792d696e7374616c6c65640000000000604082015260600190565b6020808252601e908201527f766f74696e672d7265702d646973616c6c6f7765642d66756e6374696f6e0000604082015260600190565b6020808252601f908201527f766f74696e672d7265702d696e76616c69642d757365722d6164647265737300604082015260600190565b602080825260159082015274766f74696e672d7265702d6e6f742d61637469766560581b604082015260600190565b6020808252601c908201527f766f74696e672d7265702d6d6f74696f6e2d6e6f742d636c6f73656400000000604082015260600190565b6020808252601c908201527f766f74696e672d7265702d6d6f74696f6e2d6e6f742d72657665616c00000000604082015260600190565b60208082526025908201527f636f6c6f6e792d70617472696369612d747265652d7a65726f2d73656c662d6c6040820152640cadccee8d60db1b606082015260800190565b602080825260139082015272766f74696e672d7265702d6261642d766f746560681b604082015260600190565b6020808252601590820152741d9bdd1a5b99cb5c995c0b5898590b585b5bdd5b9d605a1b604082015260600190565b6020808252602b908201527f766f74696e672d7265702d616c742d7461726765742d63616e6e6f742d62652d60408201526a626173652d636f6c6f6e7960a81b606082015260800190565b6020808252601b908201527f766f74696e672d7265702d696e76616c69642d736b696c6c2d69640000000000604082015260600190565b60208082526019908201527f766f74696e672d7265702d696e76616c69642d73656372657400000000000000604082015260600190565b60208082526021908201527f766f74696e672d7265702d6d6f74696f6e2d6e6f742d66696e616c697a61626c6040820152606560f81b606082015260800190565b6020808252601b908201527f766f74696e672d7265702d677265617465722d7468616e2d7761640000000000604082015260600190565b6020808252601b908201527f636f6c6f6e792d657874656e73696f6e2d646570726563617465640000000000604082015260600190565b6020808252601a908201527f766f74696e672d7265702d706572696f642d746f6f2d6c6f6e67000000000000604082015260600190565b6020808252601f908201527f766f74696e672d7265702d6d6f74696f6e2d6e6f742d636c61696d61626c6500604082015260600190565b600060208252614b7460208301845161410e565b60208301516080830152604083015160a0830152606083015160c0830152608083015160e083015260a0830151610100818185015260c08501519150610120828186015260e08601519250610140614bce818701856140e5565b91860151925061018091614be4868401856140e5565b818701519350614bf86101c08701856140e5565b8601519250614c0d905061020085018361413a565b6101608501519150614c2361022085018361413a565b8401519050614c366102408401826140d8565b506101a083015161026083810152614c52610280840182614140565b949350505050565b96875260208701959095526001600160a01b0393841660408701529183166060860152608085015260a08401521660c082015260e00190565b948552602085019390935260408401919091526001600160a01b03166060830152608082015260a00190565b6040518181016001600160401b0381118282101715614cda57fe5b604052919050565b60009081526020902090565b60088110614cf857fe5b50565b6001600160a01b0381168114614cf857600080fd5b8015158114614cf857600080fdfe0ae897e29e11067b0051d7f0047638509aeaeacf4e5c4146283aa5dd6ad03fd4a26469706673582212208d92fabcc84d340c1f7eb1a4bebab7c35d06c8916b693cb798b8d4185fb2afd864736f6c63430007030033"; diff --git a/src/contracts/extensions/votingReputation/2/index.d.ts b/src/contracts/extensions/votingReputation/2/index.d.ts new file mode 100644 index 000000000..910d6a045 --- /dev/null +++ b/src/contracts/extensions/votingReputation/2/index.d.ts @@ -0,0 +1,29 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { + BigNumberish, + EventDescription, + FunctionDescription, +} from "ethers/utils"; + +export interface TransactionOverrides { + gasLimit?: BigNumberish | Promise; + gasPrice?: BigNumberish | Promise; + nonce?: BigNumberish | Promise; + value?: BigNumberish | Promise; + from?: string | Promise; + chainId?: number | Promise; +} + +export interface TypedEventDescription< + T extends Pick +> extends EventDescription { + encodeTopics: T["encodeTopics"]; +} + +export interface TypedFunctionDescription< + T extends Pick +> extends FunctionDescription { + encode: T["encode"]; +} diff --git a/src/helpers.ts b/src/helpers.ts index 903048d34..7d4094ec2 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -8,12 +8,8 @@ import { toUtf8Bytes, } from 'ethers/utils'; -import { - ColonyRole, - ColonyRoles, - ColonyVersion, - ROOT_DOMAIN_ID, -} from './constants'; +import { ColonyRole, ColonyRoles, ROOT_DOMAIN_ID } from './constants'; +import { ColonyVersion } from './versions'; import { ColonyClient, ContractClient } from './types'; import { @@ -21,7 +17,9 @@ import { getPotDomain as exGetPotDomain, getPermissionProofs as exGetPermissionProofs, getMoveFundsPermissionProofs as exGetMoveFundsPermissionProofs, + getExtensionPermissionProofs as exGetExtensionPermissionProofs, AwkwardRecoveryRoleEventClient, + ExtendedIColony, } from './clients/Colony/extensions/commonExtensions'; interface ColonyRolesMap { @@ -232,6 +230,7 @@ export const getChildIndex = async ( */ export const getColonyRoles = async ( client: ColonyClient, + options?: LogOptions, ): Promise => { const ROOT_DOMAIN = ROOT_DOMAIN_ID.toString(); @@ -263,6 +262,7 @@ export const getColonyRoles = async ( filterName ](), ), + options, ); const recoveryRoleSetFilter = @@ -280,6 +280,7 @@ export const getColonyRoles = async ( const recoveryRoleEvents = await getEvents( client.awkwardRecoveryRoleEventClient, recoveryRoleSetFilter, + options, ); // We construct a map that holds all users with all domains and the roles as Sets @@ -336,6 +337,16 @@ export const getColonyRoles = async ( }); }; +/* + * Wrapper method around `getColonyRoles` that will get historic user roles based on + * events, from a certain block number, up to a certain block number + */ +export const getHistoricColonyRoles = async ( + client: ColonyClient, + fromBlock?: number, + toBlock?: number, +): Promise => getColonyRoles(client, { fromBlock, toBlock }); + /** * Get the permission proofs for a user address and a certain role * @@ -396,3 +407,20 @@ export const getMoveFundsPermissionProofs = async ( customAddress?: string, ): Promise<[BigNumber, BigNumber, BigNumber]> => exGetMoveFundsPermissionProofs(client, fromtPotId, toPotId, customAddress); + +/** + * Wrapper around `getPermissionProofs` to check two types of permissions: Funding and Administration + * To be used for checking an extension's permission in said colony + * + * @param colonyClient Any ColonyClient + * @param domainId Domain id the method needs to act in + * @param address Address of the extension + * + * @returns Tuple of `[permissionDomainId, childSkillIndex]` + */ +export const getExtensionPermissionProofs = async ( + colonyClient: ExtendedIColony, + domainId: BigNumberish, + address?: string, +): Promise<[BigNumberish, BigNumberish]> => + exGetExtensionPermissionProofs(colonyClient, domainId, address); diff --git a/src/index.ts b/src/index.ts index 9aba246ea..27999d05c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,6 +2,7 @@ require('isomorphic-fetch'); export * from './constants'; +export * from './versions'; export * from './helpers'; export * from './types'; @@ -12,8 +13,20 @@ export { ColonyClientV3 } from './clients/Colony/ColonyClientV3'; export { ColonyClientV4 } from './clients/Colony/ColonyClientV4'; export { ColonyClientV5 } from './clients/Colony/ColonyClientV5'; export { ColonyClientV6 } from './clients/Colony/ColonyClientV6'; -export { OneTxPaymentClient } from './clients/OneTxPaymentClient'; -export { CoinMachineClient } from './clients/CoinMachineClient'; +export { + OneTxPaymentClient, + OneTxPaymentClient as OneTxPaymentClientV1, +} from './clients/Extensions/OneTxPayment/1/OneTxPaymentClient'; +export { CoinMachineClient as CoinMachineClientV1 } from './clients/Extensions/CoinMachine/1/CoinMachineClient'; +export { + CoinMachineClient, + CoinMachineClient as CoinMachineClientV2, +} from './clients/Extensions/CoinMachine/2/CoinMachineClient'; +export { VotingReputationClient as VotingReputationClientV1 } from './clients/Extensions/VotingReputation/1/VotingReputationClient'; +export { + VotingReputationClient, + VotingReputationClient as VotingReputationClientV2, +} from './clients/Extensions/VotingReputation/2/VotingReputationClient'; export { TokenClient, ColonyTokenClient, @@ -29,6 +42,6 @@ export { Extension, ExtensionClient, extensions, -} from './clients/Colony/colonyContractExtensions'; +} from './clients/Extensions/colonyContractExtensions'; /* eslint-enable import/first */ diff --git a/src/types.ts b/src/types.ts index 658217e9b..f07b26864 100644 --- a/src/types.ts +++ b/src/types.ts @@ -7,9 +7,10 @@ import { ColonyClientV3 } from './clients/Colony/ColonyClientV3'; import { ColonyClientV4 } from './clients/Colony/ColonyClientV4'; import { ColonyClientV5 } from './clients/Colony/ColonyClientV5'; import { ColonyClientV6 } from './clients/Colony/ColonyClientV6'; +import { ColonyClientV7 } from './clients/Colony/ColonyClientV7'; import { TokenClient } from './clients/TokenClient'; import { TokenLockingClient } from './clients/TokenLockingClient'; -import { ExtensionClient } from './clients/Colony/colonyContractExtensions'; +import { ExtensionClient } from './clients/Extensions/colonyContractExtensions'; export type ColonyClient = | ColonyClientV1 @@ -17,7 +18,8 @@ export type ColonyClient = | ColonyClientV3 | ColonyClientV4 | ColonyClientV5 - | ColonyClientV6; + | ColonyClientV6 + | ColonyClientV7; export type ContractClient = | ColonyClient diff --git a/src/utils.ts b/src/utils.ts index 664a6ba27..bccf894bd 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -3,6 +3,7 @@ import { getAddress, EventFragment } from 'ethers/utils'; import { Provider } from 'ethers/providers'; import { IColony__factory as IColonyFactory } from '../src/contracts/6/factories/IColony__factory'; +import { ColonyVersion } from './versions'; // eslint-disable-next-line @typescript-eslint/no-var-requires const isEqual = require('lodash.isequal'); @@ -70,3 +71,22 @@ export const getAllAbiEvents = ( }); return abiEvents; }; + +export const getExtensionCompatibilityMap = ( + incompatibilityMap: Record, + colonyVersions: typeof ColonyVersion, +): Record => { + const compatibilityMap: Record = {}; + const allColonyVersions = Object.keys(colonyVersions) + .map((version) => parseInt(version, 10)) + .filter((version) => !!version); + const extensionVersions = Object.keys(incompatibilityMap); + extensionVersions.map((version) => { + const currentCompatibleVersions = allColonyVersions.filter( + (colonyVersion) => !incompatibilityMap[version].includes(colonyVersion), + ); + compatibilityMap[parseInt(version, 10)] = currentCompatibleVersions; + return null; + }); + return compatibilityMap; +}; diff --git a/src/versions.ts b/src/versions.ts new file mode 100644 index 000000000..14acd07fb --- /dev/null +++ b/src/versions.ts @@ -0,0 +1,205 @@ +import { getExtensionCompatibilityMap } from './utils'; + +enum Extension { + OneTxPayment = 'OneTxPayment', + CoinMachine = 'CoinMachine', + VotingReputation = 'VotingReputation', +} + +/* + * Colony / Network Versioning + */ + +/** + * Available versions for colonies that could be deployed. When a new version for a colony needs to be supported, it should be added here. The versions are incremented integers. + */ +export enum ColonyVersion { + /** Only deployed to Goerli, hence not present on mainnet deployments */ + GoerliGlider = 1, // glider-rc.1 + Glider = 2, + AuburnGlider = 3, + BurgundyGlider = 4, + LightweightSpaceship = 5, + CeruleanLightweightSpaceship = 6, + DandelionLightweightSpaceship = 7, +} + +// These are the corresponding git release tags for the deployed versions of the Colony Network +const colonyReleaseMap = { + [ColonyVersion.GoerliGlider]: 'glider-rc.1', + [ColonyVersion.Glider]: 'glider', + [ColonyVersion.AuburnGlider]: 'auburn-glider', + [ColonyVersion.BurgundyGlider]: 'burgundy-glider', + [ColonyVersion.LightweightSpaceship]: 'lwss', + [ColonyVersion.CeruleanLightweightSpaceship]: `clwss`, + [ColonyVersion.DandelionLightweightSpaceship]: `dlwss`, +}; + +/** + * The newest colony version. This will be used when deploying new colonies */ +export const CurrentColonyVersion = parseInt( + ColonyVersion[(Object.keys(ColonyVersion).slice(-1)[0] as unknown) as number], + 10, +); +/* + * kept for legacy purposes + */ +export const CurrentVersion = CurrentColonyVersion; + +/* + * One Transaction Payment Extension Versioning + */ + +export enum OneTxPaymentExtensionVersion { + CeruleanLightweightSpaceship = 1, + DandelionLightweightSpaceship = 2, +} + +const oneTxPaymentReleaseMap = { + [OneTxPaymentExtensionVersion.CeruleanLightweightSpaceship]: `clwss`, + [OneTxPaymentExtensionVersion.DandelionLightweightSpaceship]: `dlwss`, +}; + +export const CurrentOneTxPaymentVersion = parseInt( + OneTxPaymentExtensionVersion[ + (Object.keys(OneTxPaymentExtensionVersion).slice( + -1, + )[0] as unknown) as number + ], + 10, +); + +const OneTxPaymentExtensionVersionIncompatibilityMap: Record< + OneTxPaymentExtensionVersion, + Array +> = { + [OneTxPaymentExtensionVersion.CeruleanLightweightSpaceship]: [], + [OneTxPaymentExtensionVersion.DandelionLightweightSpaceship]: [], +}; + +const OneTxPaymentExtensionVersionCompatibilityMap: Record< + OneTxPaymentExtensionVersion, + Array +> = getExtensionCompatibilityMap( + OneTxPaymentExtensionVersionIncompatibilityMap, + ColonyVersion, +); + +/* + * Coin Machine Extension Versioning + */ + +export enum CoinMachineExtensionVersion { + CeruleanLightweightSpaceship = 1, + DandelionLightweightSpaceship = 2, +} + +const coinMachineReleaseMap = { + [CoinMachineExtensionVersion.CeruleanLightweightSpaceship]: `clwss`, + [CoinMachineExtensionVersion.DandelionLightweightSpaceship]: `dlwss`, +}; + +export const CurrentCoinMachineVersion = parseInt( + CoinMachineExtensionVersion[ + (Object.keys(CoinMachineExtensionVersion).slice(-1)[0] as unknown) as number + ], + 10, +); + +const CoinMachineExtensionVersionIncompatibilityMap: Record< + CoinMachineExtensionVersion, + Array +> = { + [CoinMachineExtensionVersion.CeruleanLightweightSpaceship]: [], + [CoinMachineExtensionVersion.DandelionLightweightSpaceship]: [], +}; + +const CoinMachineExtensionVersionCompatibilityMap: Record< + CoinMachineExtensionVersion, + Array +> = getExtensionCompatibilityMap( + CoinMachineExtensionVersionIncompatibilityMap, + ColonyVersion, +); + +/* + * Voting Reputation Extension Versioning + */ + +export enum VotingReputationExtensionVersion { + CeruleanLightweightSpaceship = 1, + DandelionLightweightSpaceship = 2, +} + +const votingReputationReleaseMap = { + [VotingReputationExtensionVersion.CeruleanLightweightSpaceship]: `clwss`, + [VotingReputationExtensionVersion.DandelionLightweightSpaceship]: `dlwss`, +}; + +export const CurrentVotingReputationVersion = parseInt( + VotingReputationExtensionVersion[ + (Object.keys(VotingReputationExtensionVersion).slice( + -1, + )[0] as unknown) as number + ], + 10, +); + +const VotingReputationExtensionVersionIncompatibilityMap: Record< + VotingReputationExtensionVersion, + Array +> = { + [VotingReputationExtensionVersion.CeruleanLightweightSpaceship]: [], + [VotingReputationExtensionVersion.DandelionLightweightSpaceship]: [ + ColonyVersion.GoerliGlider, + ColonyVersion.Glider, + ColonyVersion.AuburnGlider, + ColonyVersion.BurgundyGlider, + ColonyVersion.LightweightSpaceship, + ColonyVersion.CeruleanLightweightSpaceship, + ], +}; + +const VotingReputationExtensionVersionCompatibilityMap: Record< + VotingReputationExtensionVersion, + Array +> = getExtensionCompatibilityMap( + VotingReputationExtensionVersionIncompatibilityMap, + ColonyVersion, +); + +/* + * Extensions Compatibility and Incompatibility Map + * (Aggregates from the various extensions ones) + */ +export const extensionsIncompatibilityMap = { + [Extension.OneTxPayment]: OneTxPaymentExtensionVersionIncompatibilityMap, + [Extension.CoinMachine]: CoinMachineExtensionVersionIncompatibilityMap, + // eslint-disable-next-line max-len + [Extension.VotingReputation]: VotingReputationExtensionVersionIncompatibilityMap, +}; + +export const extensionsCompatibilityMap = { + [Extension.OneTxPayment]: OneTxPaymentExtensionVersionCompatibilityMap, + [Extension.CoinMachine]: CoinMachineExtensionVersionCompatibilityMap, + // eslint-disable-next-line max-len + [Extension.VotingReputation]: VotingReputationExtensionVersionCompatibilityMap, +}; + +/* + * Release Map + */ +export const releaseMap = { + /* + * kept for legacy purposes + */ + ...colonyReleaseMap, + colony: { + ...colonyReleaseMap, + }, + extension: { + oneTxPayment: { ...oneTxPaymentReleaseMap }, + coinMachine: { ...coinMachineReleaseMap }, + votingReputation: { ...votingReputationReleaseMap }, + }, +}; diff --git a/vendor/colonyNetwork b/vendor/colonyNetwork index 56859c64f..fffe3ab22 160000 --- a/vendor/colonyNetwork +++ b/vendor/colonyNetwork @@ -1 +1 @@ -Subproject commit 56859c64fcd8bda92130d3c72609e2b63bbe7c58 +Subproject commit fffe3ab227398ef2f3ba359e0b996b7b75ea5591